allgood / OpenNoteScanner

Android application for scanning and manipulating handwritten notes and documents.
Other
1.37k stars 285 forks source link

Enhancement request: detect paper with folded angle #187

Open callegar opened 4 years ago

callegar commented 4 years ago

The current page detection algorithm only works if the paper is rectangular.

In many cases, one may have pages to scan that have a folded angle. This common if you are trying to scan the second page of a document that is stapled at the left top corner. You get something like

 __________
/          |
|          |
|          |
|          |
|          |
------------

The folded angle is enough to make the paper detection fail miserably (possibly because the algorithm looks for a rectangle and here you have a pentagon).

Steps to reproduce

Take a document made of at least two pages. Staple it at the top left corner. Fold it to see the second page to the max of its extension, by placing the first page on the back. You get a folded corner. Try to acquire the page.

Expected behaviour

The software should be able to detect the page from the background, regardless of the folded angle.

Actual behaviour

The paper detection algorithm cannot detect the page from the background.

kofaysi commented 3 years ago

ONS 1.0.35-fdroid:

Screenshot_20210922-160637_Open_Note_Scanner

IMG_20210922_160659