Skip to content

Detection

  • The SDK receives data from a motion sensor and pauses scanning when a device is moving. Turn on/off the video capture motion control:
DocReader.shared.functionality.videoCaptureMotionControl = true
[RGLDocReader shared].functionality.videoCaptureMotionControl = YES;
DocumentReader.Instance().functionality().edit().setVideoCaptureMotionControl(true).apply()
DocumentReader.Instance().functionality().edit().setVideoCaptureMotionControl(true).apply();
DocumentReader.instance.functionality.videoCaptureMotionControl = true;
DocumentReader.setFunctionality({
    videoCaptureMotionControl: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    videoCaptureMotionControl: true
});
DocumentReader.setFunctionality({
    videoCaptureMotionControl: true
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetVideoCaptureMotionControl(true).Apply();

// iOS
RGLDocReader.Shared.Functionality.VideoCaptureMotionControl = true;
  • Pause scanning while a camera is focusing (may decrease the camera processing speed):
DocReader.shared.functionality.skipFocusingFrames = true
[RGLDocReader shared].functionality.skipFocusingFrames = YES;
DocumentReader.Instance().functionality().edit().setSkipFocusingFrames(true).apply()
DocumentReader.Instance().functionality().edit().setSkipFocusingFrames(true).apply();
DocumentReader.instance.functionality.skipFocusingFrames = true;
DocumentReader.setFunctionality({
    skipFocusingFrames: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    skipFocusingFrames: true
});
DocumentReader.setFunctionality({
    skipFocusingFrames: true
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetSkipFocusingFrames(true).Apply();

// iOS
RGLDocReader.Shared.Functionality.SkipFocusingFrames = true;
  • To omit the document focus check, enable the following parameter:
DocReader.shared.processParams.disableFocusingCheck = true
[RGLDocReader shared].processParams.disableFocusingCheck = @YES;
DocumentReader.Instance().processParams().disableFocusingCheck = false
DocumentReader.Instance().processParams().disableFocusingCheck = false;
DocumentReader.instance.processParams.disableFocusingCheck = true;
DocumentReader.setProcessParams({
    disableFocusingCheck: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    disableFocusingCheck: true
});
DocumentReader.setProcessParams({
    disableFocusingCheck: true
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DisableFocusingCheck = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.DisableFocusingCheck = true;
  • Set the maximum value of the deviation of the corners of the document from the 90 degrees value:
DocReader.shared.processParams.perspectiveAngle = 5
[RGLDocReader shared].processParams.perspectiveAngle = @5;
DocumentReader.Instance().processParams().perspectiveAngle = 5
DocumentReader.Instance().processParams().perspectiveAngle = 5;
DocumentReader.instance.processParams.perspectiveAngle = 5;
DocumentReader.setProcessParams({
    perspectiveAngle: 5
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    perspectiveAngle: 5
});
DocumentReader.setProcessParams({
    perspectiveAngle: 5
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().PerspectiveAngle = (Java.Lang.Integer)5;

// iOS
RGLDocReader.Shared.ProcessParams.PerspectiveAngle = 5;
  • Specify the minimal area of an image that a document should cover to be treated as a candidate when locating. The value should be in a range from 0 to 1, where 1 is for the document that fully covers the image:
DocReader.shared.processParams.documentAreaMin = 0.7
RGLDocReader.shared.processParams.documentAreaMin = @0.7;
DocumentReader.Instance().processParams().documentAreaMin = 0.7
DocumentReader.Instance().processParams().documentAreaMin = 0.7;
DocumentReader.instance.processParams.documentAreaMin = 0.7;
DocumentReader.setProcessParams({
    documentAreaMin: 0.7
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    documentAreaMin: 0.7
});
DocumentReader.setProcessParams({
    documentAreaMin: 0.7
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DocumentAreaMin = (Java.Lang.Float)0.7F;

// iOS
RGLDocReader.Shared.ProcessParams.DocumentAreaMin = 0.7F;
  • Enable the CAN (Card Access Number) detection when using scenarios with document location and MRZ reading, such as the MRZ and Locate:
DocReader.shared.processParams.doDetectCan = true
RGLDocReader.shared.processParams.doDetectCan = @YES;
DocumentReader.Instance().processParams().doDetectCan = true
DocumentReader.Instance().processParams().doDetectCan = true;

Next Steps