Git Product home page Git Product logo

Comments (3)

internaut avatar internaut commented on May 26, 2024

You should get acquainted with the parameters of OpenCV's hough transform and probably experiment with the hough_votes_thresh parameter of the detect_lines method (see the example), i.e. probably set it lower in order to detect more lines. The canny_* parameters can also be helpful, but a lower value of hough_votes_thresh should be enough.
Another note: MIN_COL_WIDTH should be the approx. minimum expected column width in pixels, measured in the scanned page image. I guess your left column's width is smaller, isn't it?

from pdftabextract.

skadambala avatar skadambala commented on May 26, 2024

@internaut Thanks for your reply.

MIN_COL_WIDTH is the width of left column measured in pixels using GIMP measurement tool. It gave me that value.

Sure, I will experiment with lowering the value of hough_votes_thresh.

Is it possible to extract tables like this, a table with only horizontal lines and no vertical lines. To a human eye, this looks like a table and can be read. Can the script help to extract such tables?

page5_pageimageonly pdf-1_1 copy

from pdftabextract.

internaut avatar internaut commented on May 26, 2024

When there are no column borders, they can of course not be detected by Computer Vision algorithms like Hough transform.
You'll probably have to use the distribution of x/y coordinates of the text boxes in order to find regularities (i.e. they will cluster together around certain x-positions) and hence detect the columns.

from pdftabextract.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.