davide710 / scanner

Your pocket scanner: effortless A4 document capture and transformation into a clean PDF
https://onlinescanner.pythonanywhere.com/
MIT License
7 stars 6 forks source link

Further testing #4

Open davide710 opened 6 months ago

davide710 commented 6 months ago

It is through testing that the flaws of the code become known or clearer. If you unsuccessfully tried to scan a document, please upload the original document and the result you got here or with a pull request. It would be a great contribution to the project.

temi-ro commented 3 months ago

Hi! I found some images with problems. I uploaded them at the end of the comment and each time there is the image and the result. In the 1st case there is a problem when the background is too clear/white. I tried to solve it with Histogram Equalizer or Adaptive Histogram Equalization (CLAHE), but it does not help at all. (It is supposed to "flatten" the distribution of pixel intensities OpenCV tutorial histogram equalizer). I also tried changing the Canny or Erosion parameters, but that didn't help either. I do not know if you have another idea.

The second image may not be a real problem as it does not respect the assumption that the 4 corners of the paper are easily visible, but I post it anyway as it may be useful to see the limits of the program :)

I hope it helps the project. I really like the idea, so I would be happy to help more. I found some grammatical errors in the code (e.g. the print in case of error), but nothing that makes the code incomprehensible.

image image image image

davide710 commented 3 months ago

Thanks a lot @temi-ro , this is really useful, I'll look into it when I'll have the time. In the meantime, if you find the solution or you make some progress, let me know or open a pull request if you want.