OSS-DocumentScanner
OSS-DocumentScanner copied to clipboard
[BUG] Scanner fails to detect pages with stapled corner when turned over
Which app is your issue for
Document Scanner
Version
1.14.3.119
What platform are you using?
Android
OS Version
Android 15
What happened?
When scanning documents that are stapled by the corner (such as a top-left or top-right corner staple), the scanner fails to detect the page correctly when it is turned over. Specifically, when the page is flipped over to scan the reverse side, one corner of the document is "missing" from the scanner’s detection area, leading to incomplete scans.
Relevant log output
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
@loxoron218 can you please share a sample image so that i can test and see ?
@loxoron218 can you please share a sample image so that i can test and see ?
Here is a screen recording of mine scanning two pages stapled together. As you can see, the first one works flawlessly, but the second one struggles and only works when getting closer to it with the phone.
I guess that "fools" the app that the page begins right down the missing corner, but that discards the part of the page that is attached to the "turned" angle.
https://github.com/user-attachments/assets/ffc89acd-39b6-46ef-8a32-9a40da00e7ef
@loxoron218 it seems github did not accept your video. Could you share it somewhere else? Also could you take a photo of what you try to scan with your phone? Having it could allow to pass it on to my algo and see what i can do
@loxoron218 it seems github did not accept your video. Could you share it somewhere else? Also could you take a photo of what you try to scan with your phone? Having it could allow to pass it on to my algo and see what i can do
Weird, I can see the video on my phone, but not on the PC. I just uploaded the screen recording to a page that allows streaming it:
https://streamable.com/540hjw
@loxoron218 ok i see now it is indeed a tricky case. Can you share a photo of what the phone "sees"? Would like to run some tests
@loxoron218 ok i see now it is indeed a tricky case. Can you share a photo of what the phone "sees"? Would like to run some tests
What do you mean by "seeing"? Do you mean the file that gets created "wrongly"?
@loxoron218 i mean take a photo of the document on the table (the case where it fails) just like we see in the video. That way i can pass that to my algo directly to run some tests and try to improve it. Will need to compare to other scanner apps to see how they handle that
@loxoron218 i mean take a photo of the document on the table (the case where it fails) just like we see in the video. That way i can pass that to my algo directly to run some tests and try to improve it. Will need to compare to other scanner apps to see how they handle that
Like this?
The light conditions changed a bit, but hopefully it helps :)
@loxoron218 perfect thanks
@loxoron218 i have run some tests on this image. And it is actually really tricky to pick up the true document size. The trickiest part is actually not the folded part for the top photo of the document which creates a "separation" for the document discovery. To that you add the background which is actually not that different in contrast from the document itself. When i have time(sorry but wont be before september :s) i will run more tests with different algorithms but not sure how it will be possible (and still fast).
Did you test with other document scanner apps? Do they pick it up correctly? If you find on open source one which does it please share!!!