Skip to content

Image Quality

  • When enabled, the image quality check status affects the document optical and overall status:
DocReader.shared.processParams.respectImageQuality = true
RGLDocReader.shared.processParams.respectImageQuality = @YES;
DocumentReader.Instance().processParams().respectImageQuality = true
DocumentReader.Instance().processParams().respectImageQuality = true;
DocumentReader.instance.processParams.respectImageQuality = true;
DocumentReader.setProcessParams({
  respectImageQuality: true
}, _ => { }, _ => { });
DocumentReader.setProcessParams({
    respectImageQuality: true
});
DocumentReader.setProcessParams({
    respectImageQuality: true
}, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().ProcessParams().RespectImageQuality = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.RespectImageQuality = true;
  • Set the threshold for an actual document DPI below which the check fails:
DocReader.shared.processParams.imageQA.dpiThreshold = 150
RGLDocReader.shared.processParams.imageQA.dpiThreshold = @150;
DocumentReader.Instance().processParams().imageQA.dpiThreshold = 150
DocumentReader.Instance().processParams().imageQA.dpiThreshold = 150;
DocumentReader.instance.processParams.imageQA.dpiThreshold = 150;
DocumentReader.setProcessParams({
    imageQA: {
        dpiThreshold: 150
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageQA: {
        dpiThreshold: 150
    }
});
DocumentReader.setProcessParams({
    imageQA: {
          dpiThreshold: 150
    }
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageQA.DpiThreshold = (Java.Lang.Integer)150;

// iOS
```csharp
RGLDocReader.Shared.ProcessParams.ImageQA.DpiThreshold = 150;
  • Set the threshold for an actual document perspective angle above which the check fails:
DocReader.shared.processParams.imageQA.angleThreshold = 5
RGLDocReader.shared.processParams.imageQA.angleThreshold = @5;
DocumentReader.Instance().processParams().imageQA.angleThreshold = 5
DocumentReader.Instance().processParams().imageQA.angleThreshold = 5;
DocumentReader.instance.processParams.imageQA.angleThreshold = 5;
DocumentReader.setProcessParams({
    imageQA: {
        angleThreshold: 5
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageQA: {
        angleThreshold: 5
    }
});
DocumentReader.setProcessParams({
    imageQA: {
          angleThreshold: 5
    }
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageQA.AngleThreshold = (Java.Lang.Integer)5;

// iOS
```csharp
RGLDocReader.Shared.ProcessParams.ImageQA.AngleThreshold = 5;
  • Disable / enable the focus check for the image quality validation:
DocReader.shared.processParams.imageQA.focusCheck = true
RGLDocReader.shared.processParams.imageQA.focusCheck = @YES;
DocumentReader.Instance().processParams().imageQA.focusCheck = true
DocumentReader.Instance().processParams().imageQA.focusCheck = true;
DocumentReader.instance.processParams.imageQA.focusCheck = true;
DocumentReader.setProcessParams({
    imageQA: {
        focusCheck: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageQA: {
        focusCheck: true
    }
}, function (m) { }, function (e) { console.log(e); });
DocumentReader.setProcessParams({
    imageQA: {
          focusCheck: true
    }
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageQA.FocusCheck = (Java.Lang.Boolean)true;

// iOS
```csharp
RGLDocReader.Shared.ProcessParams.ImageQA.FocusCheck = true;
  • Disable / enable the glares check for the image quality validation:
DocReader.shared.processParams.imageQA.glaresCheck = true
RGLDocReader.shared.processParams.imageQA.glaresCheck = @YES;
DocumentReader.Instance().processParams().imageQA.glaresCheck = true
DocumentReader.Instance().processParams().imageQA.glaresCheck = true;
DocumentReader.instance.processParams.imageQA.glaresCheck = true;
DocumentReader.setProcessParams({
    imageQA: {
        glaresCheck: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageQA: {
        glaresCheck: true
    }
}, function (m) { }, function (e) { console.log(e); });
DocumentReader.setProcessParams({
    imageQA: {
          glaresCheck: true
    }
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageQA.GlaresCheck = (Java.Lang.Boolean)true;

// iOS
```csharp
RGLDocReader.Shared.ProcessParams.ImageQA.GlaresCheck = true;
  • Disable / enable the colorness check for the image quality validation:
DocReader.shared.processParams.imageQA.colornessCheck = true
RGLDocReader.shared.processParams.imageQA.colornessCheck = @YES;
DocumentReader.Instance().processParams().imageQA.colornessCheck = true
DocumentReader.Instance().processParams().imageQA.colornessCheck = true;
DocumentReader.instance.processParams.imageQA.colornessCheck = true;
DocumentReader.setProcessParams({
    imageQA: {
        colornessCheck: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageQA: {
        colornessCheck: true
    }
}, function (m) { }, function (e) { console.log(e); });
DocumentReader.setProcessParams({
    imageQA: {
          colornessCheck: true
    }
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageQA.ColornessCheck = (Java.Lang.Boolean)true;

// iOS
```csharp
RGLDocReader.Shared.ProcessParams.ImageQA.ColornessCheck = true;
  • Set the threshold for an actual document brightness below which the check fails:
DocReader.shared.processParams.imageQA.brightnessThreshold = 1.5
RGLDocReader.shared.processParams.imageQA.brightnessThreshold = @1.5;
DocumentReader.Instance().processParams().imageQA.brightnessThreshold = 1.5
DocumentReader.Instance().processParams().imageQA.brightnessThreshold = 1.5;
DocumentReader.instance.processParams.imageQA.brightnessThreshold = 1.5;
DocumentReader.setProcessParams({
    imageQA: {
        brightnessThreshold: 1.5
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageQA: {
        brightnessThreshold: 1.5
    }
});
DocumentReader.setProcessParams({
    imageQA: {
          brightnessThreshold: 1.5
    }
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageQA.BrightnessThreshold = (Java.Lang.Double)1.5;

// iOS
```csharp
RGLDocReader.Shared.ProcessParams.ImageQA.BrightnessThreshold = 1.5;
  • This option controls the quality checks that the image should pass to be considered a valid input during the scanning process.
DocReader.shared.processParams.imageQA.expectedPass = [.imageResolution, .imageGlares]
RGLDocReader.shared.processParams.imageQA.expectedPass = @[RGLImageQualityCheckTypeImageResolution, RGLImageQualityCheckTypeImageGlares];
DocumentReader.Instance().processParams().imageQA!!.expectedPass = intArrayOf(
        eImageQualityCheckType.IQC_IMAGE_RESOLUTION,
        eImageQualityCheckType.IQC_IMAGE_GLARES
    )
DocumentReader.Instance().processParams().imageQA.expectedPass = new int[] {eImageQualityCheckType.IQC_IMAGE_RESOLUTION, eImageQualityCheckType.IQC_IMAGE_GLARES};
DocumentReader.instance.processParams.imageQA.expectedPass = [
  ImageQualityCheckType.IMAGE_RESOLUTION,
  ImageQualityCheckType.IMAGE_GLARES
];
DocumentReader.setProcessParams({
    imageQA: {
        expectedPass: [
            eImageQualityCheckType.IQC_IMAGE_RESOLUTION,
            eImageQualityCheckType.IQC_IMAGE_GLARES
        ]
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageQA: {
        expectedPass: [
            eImageQualityCheckType.IQC_IMAGE_RESOLUTION,
            eImageQualityCheckType.IQC_IMAGE_GLARES
          ]
    }
}, function (m) { }, function (e) { console.log(e); });
DocumentReader.setProcessParams({
    imageQA: {
        expectedPass: [
            eImageQualityCheckType.IQC_IMAGE_RESOLUTION,
            eImageQualityCheckType.IQC_IMAGE_GLARES
        ]
    }
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageQA.ExpectedPass = new int[] { EImageQualityCheckType.IqcImageResolution, EImageQualityCheckType.IqcImageGlares};

// iOS
```csharp
RGLDocReader.Shared.ProcessParams.ImageQA.ExpectedPass = { Constants.RGLImageQualityCheckTypeImageGlares, Constants.RGLImageQualityCheckTypeImageColorness };
  • Specify the minimum indent from the corners of the document to the borders of the image. The value reflects the allowed percentage for the indent relative to the width of the document. If it is detected that the corners of the document are closer than the specified value, the status will contain an error in the documentPosition field.
DocReader.shared.processParams.imageQA.documentPositionIndent = 5
RGLDocReader.shared.processParams.imageQA.documentPositionIndent = @5;    
DocumentReader.Instance().processParams().imageQA.documentPositionIndent = 5
DocumentReader.Instance().processParams().imageQA.documentPositionIndent = 5;
DocumentReader.instance.processParams.imageQA.documentPositionIndent = 5;
DocumentReader.setProcessParams({
    imageQA: {
        documentPositionIndent: 5
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageQA: {
        documentPositionIndent: 5
    }
});
DocumentReader.setProcessParams({
    imageQA: {
          documentPositionIndent: 5
    }
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageQA.DocumentPositionIndent = (Java.Lang.Integer)5;

// iOS
```csharp
RGLDocReader.Shared.ProcessParams.ImageQA.DocumentPositionIndent = 5;

Next Steps