Open nvwebm opened 5 years ago
Hey @nvwebm Thanks for raising the issue and sticking to the template. Could you try by changing the quality value to 2 in the scan options you pass in. Also try with a background with a little more contrast. The android scanner edge detection still requires some improvement.
export interface DocumentScannerOptions {
/**
* Choose to scan from camera or existing image file. Only valid for Android.
*/
sourceType?: DocumentScannerSourceType;
/**
* Filename to save scanned image to (minus extension, which is always ".png").
* Only valid for iOS. Caller is responsible for cleaning up any files created
* if this parameter is set to anything other than the default value,
* which is "image".
*/
fileName?: string;
}
this is the interface of options there is no quality @ChrisTomAlx
Hey @nvwebm If you wouldn't mind, may I ask where you are getting this documentation from? Is this from ionic or phonegap? Unfortunately I do not directly maintain those. I only maintain the original source available here and on npm.
If you look at the readme available on github, you will see there is a quality option. If you can give me the link to the docs you are using, I can try and contact the doc creators and ask them to update to the latest version.
@nvwebm I just ran into the same issue regarding there not being a quality property on the interface and all I had to do was add a quality property to the interface in the ionic-native wrapper.
@daltonpearson I tried this already, but it doesn't seem to reslove the issue, does it scan better with that parameter for you?
@nvwebm I haven't really had any issues scanning, just that I couldn't specify the quality.
@nvwebm I find that a contrasting background helps a lot though
@nvwebm I was just looking at your video again, it seems like the camera is capturing a lot more than it should. I see an entire black area on the original image. Also it seems like you are pulling the crop selector from outside the area of the image from 00:13 of the video. Could you maybe try changing the aspect ratio of your camera and take a pic then send a video over? This extra capture maybe why you are having problems with edge detection and memory.
Also could try with another phone and see if there is a difference?
Describe the bug I tried to scan a document with a text in it, and it didn't recognize the edges of the document. also it adds a black square to part of the exported image To Reproduce Steps to reproduce the behavior:
Expected behavior Detect edges and hide memory notification Screenshots If applicable, add screenshots to help explain your problem. Video: https://ufile.io/0ne9wimy (can't upload to github)
Smartphone (please complete the following information): Device: oneplus 5/6T
Additional context I have largeHeap in my manifest