I always wanted a tool to place a polygon (even just four corners) and ability to set an aspect ratio (custom or preset like 4:3, 16:9 and A-series) and have perspective fixed image or just move vertices around (just like you expect by having a textured polygon). I would like to have this tool as a part of GIMP and a standard around light image editing tools like many viewers are. Perspective correction tools are either designed for photography or I don't really know how to use them. When you have this you can add edge detection and you're almost done to do this automatically.
I made a simple GUI in python which essentially wraps OpenCV's getPerspectiveTransform/warpPerspective. It let's you select the four corners, chose an aspect ratio and do some simple postprocessing. I was working on edge detection, but it's not working well right now.
I've been using the Adobe equivalent, and it seems to work pretty well. It's not quite as good as a flatbed scanner, but it does a good-enough job with nothing more than my existing phone.
Still, if there were a better one, I'd use it. Its interface is slightly clunky and it's only so-so with documents that have been folded. Is the MS one any better?
Tried both, Adobe Scan and Office Lens, and liked MS one more, because its default “auto” filter produced more legible documents (better contrast and brigthness) than the Adobe’s “auto”, IMO.
My first instinct is to compare this to OpenNoteScanner, the only other quasi-functioning FOSS note scanning app.
The UI here is significantly more polished and better. The only thing OpenNoteScanner does better is that it starts in camera mode, and therefore the workflow is a bit faster.
However, feature-wise this is seriously lacking. I would not consider using this until it can automatically crop and correct perspective distortion.
Also the default filters are seriously lacking. Either make them smarter or give the user more control (e.g. for B/W allow setting the threshold, even for decently-lit documents I get poor results with random black areas)
You can do both by integrating with OpenCV. No idea how easy it is to integrate it with flutter though...
Anyways, good job! I'll keep following the project and might consider contributing if you ever start working on these features.
Thank you for the suggestions! I will for sure take it into consideration.
The scanner itself is from another open source project, the only one which was a viable option. I'll have to look into OpenNoteScanner's scanner if I were to improve mine. Seems people are happy with the edge detection it offers.
I see there is an F-Droid compatible repo linked. Is there a reason it has not been submitted to F-Droid proper? Sounds like a perfect addition to the default repo.
I don't see anything on the readme about OCR. In the PDF conversion, does OpenScan do any OCR? I guess I expect this from a document scanning app these days, but I don't really know the space. Are there any good open-source OCR libraries?
There are no OCR capabilities. Just managed to get a good cropper implemented with perspective cropping. There were very few options of which only one was viable.
Looks like a really great start! Just gave the app a quick test and the basics seem to be working fine.
Apart from automatic cropping and perspective distortion correction others have mentioned already, the white margins of the exported PDFs are IMHO quite a bit too large. In fact, as the app is a document scanner, I'd not expect any border at all.
It is nice start, but cropping function is pretty much not working. When scanning with the phone the page is rarely properly alighned ans cropping step should be automatic (like with CamScan). Even if performing it manually under perfect conditions (white page on back background) it fails to detect page boundaries. Screenshot: https://www.dropbox.com/s/cpvdidugiy7n3lk/Screenshot_2021010...
And in the files app, long tapping gives the option to scan a document, which works great. I’m trying to retain fewer pieces of paper and this is super convenient.
Features: This app does not fix perspective distortion.
Office Lens (https://play.google.com/store/apps/details?id=com.microsoft....) is so much better, I get rectangular image without any hints, to say nothing about manually selecting anything.
Office Lens really creates this https://play-lh.googleusercontent.com/AgErNUVn_Jg41jSQO2p2CF... from this https://play-lh.googleusercontent.com/yv6eUY6EyR8x2Hd6NB1SBW... and that is amazing.