cordova-plugin-document-scanner icon indicating copy to clipboard operation
cordova-plugin-document-scanner copied to clipboard

Edge detection seems a bit weak.

Open humblecoder opened this issue 7 years ago • 11 comments

When in auto mode, the edge detection of pages seems to desperately try to find "letter" sized paper regardless of the actual page size. Also, it seems to not detect pages well in general. Perhaps I'm simply missing a configuration option. 🤔

humblecoder avatar Oct 21 '18 15:10 humblecoder

Hey again @humblecoder

Yes, you are talking about the iOS version of the plugin I assume. I noticed this too, edge detection is perfect only when the contrast between the document to be scanned and the surrounding area is really high. That is an inherent defect in the library we used. It would seem we would have to either find a new open source one with better edge detection or write an entirely new library.

Cheers, Chris Neutrinos

ChrisTomAlx avatar Oct 24 '18 11:10 ChrisTomAlx

does android support edge detection?

crapthings avatar Mar 26 '19 02:03 crapthings

@crapthings It does, but it isn't as great as the WeScan ios one. You need a decent amount of contrast between the document to be scanned and the background. For eg a white paper on a black background will perfectly be captured. But white on a cream background has lower accuracy of edge detection.

Cheers, Chris Neutrinos

ChrisTomAlx avatar Mar 26 '19 04:03 ChrisTomAlx

there's a decent android scanner

https://github.com/ctodobom/OpenNoteScanner

will this work better than the old one?

crapthings avatar Mar 26 '19 04:03 crapthings

It is an entire app. This might be useful, it could work with some changes to the code base. Although I do not enjoy the fact that the opencv app has to be installed separately. I will have to find a way around that as well. Thanks for sharing this info. Will look into upgrading the android plugin as well, but not in the immediate future.

Also WeScan has a discussion going on about an android version of their scanner. Was hoping to get that in here because they seem to be creating some crazy good software. But no work has been done on it yet.

Cheers, Chris Neutrinos

ChrisTomAlx avatar Mar 26 '19 04:03 ChrisTomAlx

Also to the original poster @humblecoder the 3.x.x version of this plugin uses a new library with great edge detection (iOS). Although I must warn you that, it is in its infancy and it uses swift 4 so please bear with me if you run into problems. Will be here to help!

Cheers, Chris Neutrinos

ChrisTomAlx avatar Mar 26 '19 04:03 ChrisTomAlx

@ChrisTomAlx awesome! I'll be checking it out!

humblecoder avatar Mar 29 '19 02:03 humblecoder

Does this mean this library uses WeScan for iOS now ? PS: Thanks for your amazing work this far !

MentalGear avatar Apr 10 '19 22:04 MentalGear

Hey @MentalGear

Does this mean this library uses WeScan for iOS now ?

Yup. Plugin version 3.x.x uses the latest WeScan cocoapod along with swift version 4.0 as of today.

PS: Thanks for your amazing work this far !

It is an honor to be part of the open source community. Hope you have fun with the plugin!

Cheers, Chris Neutrinos

ChrisTomAlx avatar Apr 11 '19 05:04 ChrisTomAlx

Hey Christy,

Thanks fir the quick reply! Great to have wescan functionality.

As a head’s up: Just checked the readme file. Could it be that it is a bit outdated, as it still describes the irl as ios library.

On 11 Apr 2019, at 07:45, Christy Thomas Alex [email protected] wrote:

Hey @MentalGear

Does this mean this library uses WeScan for iOS now ?

Yup. Plugin version 3.x.x uses the latest WeScan cocoapod along with swift version 4.0 as of today.

PS: Thanks for your amazing work this far !

It is an honor to be part of the open source community. Hope you have fun with the plugin!

Cheers, Chris Neutrinos

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

MentalGear avatar Apr 11 '19 08:04 MentalGear

Currently the document has been updated only on the github branch ver/3.x.x. Although the 3.x.x version of the plugin is stable, since cordova doesn't work as well as it should with swift, I was waiting to test this on cordova 9.0.0 before pushing this as the stable release of the plugin.

You can refer the ver/3.x.x documentation on github for now. Will be updating the docs soon. Thanks for bringing this up though :)

Edit : You can download from npm using cordova plugin add [email protected]

Cheers, Chris Neutrinos

ChrisTomAlx avatar Apr 11 '19 09:04 ChrisTomAlx