Ask Your Question

Revision history [back]

How I get only the 'external' lines using HoughLinesP?

I am trying to scan some bank checks.

I used this tutorial: http://opencv-code.com/tutorials/automatic-perspective-correction-for-quadrilateral-objects/

Bank checks despite being quadrilateral, also have lots of lines inside (for example the guide lines of where you need to write).

The current end result after I stop in the HoughLinesP step is some broken-ish lines around the checks (I think they are broken because the check is not entirely flat, after some abuse inside wallets, hands, storage, etc...) and LOTS of lines following guide lines, dense areas of text (those become just a big block), and so on.

So, how I detect only the lines around the check, so I can apply perspective correction to it?