Issue:
How can I set the glare threshold in the Document Reader Android SDK?
Solution:
To configure glare detection, use glaresCheckParams under DocumentReader.Instance().processParams().imageQA:
- Enable the glare check by setting
glaresChecktotrue. - Set
imgMarginPartto define the margin along the document image border where the SDK ignores glare. - Set
maxGlaringPartto specify the maximum allowed percentage of the image area covered by glare. For example,0.01means 1%.
For example, in Java:
DocumentReader.Instance().processParams().imageQA.glaresCheck = true; DocumentReader.Instance().processParams().imageQA.glaresCheckParams = new ImageQA.GlaresCheckParams(); DocumentReader.Instance().processParams().imageQA.glaresCheckParams.imgMarginPart = 0.05; DocumentReader.Instance().processParams().imageQA.glaresCheckParams.maxGlaringPart = 0.01;
These values are examples, not documented defaults. Adjust them to suit your requirements.
For more information, see:
- Image Quality configuration for Document Reader Mobile SDK — instructions for configuring image quality checks, including glare detection.
-
Android API reference for
ImageQA.GlaresCheckParams— descriptions of the glare detection parameters.
Comments
Please sign in to leave a comment.