Configuring Glare Threshold in Document Reader Android SDK

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:

  1. Enable the glare check by setting glaresCheck to true.
  2. Set imgMarginPart to define the margin along the document image border where the SDK ignores glare.
  3. Set maxGlaringPart to specify the maximum allowed percentage of the image area covered by glare. For example, 0.01 means 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:

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section

See more