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

Xamarin & ScanFlow: Is it possible to require a minimum document size for successful scan? #68

Open
MihaMarkic opened this issue Jan 24, 2023 · 5 comments

Comments

@MihaMarkic
Copy link

By default document is fine as long as it is recognized, no matter it's relative size to camera size. i.e. if user takes a photo from a distance it will still produce a valid result, regardless of documents size in pixels.
I'd like to enforce a minimum ratio (or area) that document has to fill to product an image with enough pixels.
Basically I'd pass a percentage factor and UI would refuse to scan smaller documents (perhaps with a feedback of different color).
Is it possible with ScanFlow? If not, with custom UI?

@MihaMarkic
Copy link
Author

By checking Android demo-custom I've found out that I could detect document size within onBorderDetectionResult and act accordingly. However I'd prefer to check invalid sizes during border detection, not only after it is detected. And I'd prefer ScanFlow if possible.

@guillaume-tgl
Copy link
Contributor

That's not possible with the ScanFlow (even though it's in our plans to support a similar feature). However, you're right, if you have your custom UI, you can filter out documents that don't have the minimum required size and ask the user to move closer to the document for example.

@MihaMarkic
Copy link
Author

MihaMarkic commented Jan 24, 2023

Hi, got it. But it'd be even better if I could show to user feedback in real time, i.e. by using a different overlay color. That way user doesn't have to wait for document detection and can adjust position immediately.
Do you have any timeline for ScanFlow implementation?

@guillaume-tgl
Copy link
Contributor

You're right, that's not ideal. We'll try to to either provide this in the ScanFlow or make it possible in the Core module. What's your need exactly? You'd like each scan to be at least a certain resolution?

@MihaMarkic
Copy link
Author

What's your need exactly? You'd like each scan to be at least a certain resolution?

Exactly. Because of OCR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants