camelot-dev / camelot-dev/camelot
Misdetection of columns with narrow gap between them
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 546
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 3
Description
When I was trying to extract table in screenshot from pdf, you can download from given link, I got the table object which extracted as first and second columns are combined together.
**Steps to reproduce the bug**
Run the following code after installing Camelot and Ghostscript etc.
**Expected behavior**
I was expecting to get the table extracted correctly.
**Here is the code I used to extract:**
```
tables, layout, dim = self.extract_tables(linescale=30, flag_size= True)
acc_tables = self.filter_acc_tables(tables=tables, min_accuracy=85, max_whitespace=30)
```
**PDF**
**Screenshots**


**Environment**
- OS: Windows
- Python version: 3.9.12
- Numpy version: 1.22.3
- OpenCV version: 4.5.5.64
- Ghostscript version: 0.7
- Camelot version: 0.10.1
**Link for PDF**
https://www.irf.com/product-info/datasheets/data/irhm9150.pdf
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the reported extract_tables and filter_acc_tables calls against the linked PDF with the stated environment, then compare the extracted columns with the screenshots. Done means the narrow gap is preserved and the first two columns are returned separately in the table object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, opencv, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100