Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Scanner fails to detect pages with stapled corner when turned over #429

Open
1 task done
loxoron218 opened this issue Feb 6, 2025 · 10 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@loxoron218
Copy link

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

  • I agree to follow this project's Code of Conduct
@loxoron218 loxoron218 added the bug Something isn't working label Feb 6, 2025
@farfromrefug
Copy link
Collaborator

@loxoron218 can you please share a sample image so that i can test and see ?

@loxoron218
Copy link
Author

@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.

screen.mp4

@farfromrefug
Copy link
Collaborator

@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
Copy link
Author

@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

@farfromrefug
Copy link
Collaborator

@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
Copy link
Author

loxoron218 commented Feb 7, 2025

@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"?

@farfromrefug
Copy link
Collaborator

@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
Copy link
Author

@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?

Image

The light conditions changed a bit, but hopefully it helps :)

@farfromrefug
Copy link
Collaborator

@loxoron218 perfect thanks

@farfromrefug
Copy link
Collaborator

@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!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants