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:
DocumentReader.setConfig({
functionality: {
videoCaptureMotionControl: true
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Pause scanning while a camera is focusing (may decrease the camera processing speed):
DocumentReader.setConfig({
functionality: {
skipFocusingFrames: true
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- To omit the document focus check, enable the following parameter:
DocumentReader.setConfig({
processParams: {
disableFocusingCheck: true
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set the maximum value of the deviation of the corners of the document from the 90 degrees value:
DocumentReader.setConfig({
processParams: {
perspectiveAngle: 5
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- 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:
DocumentReader.setConfig({
processParams: {
documentAreaMin: 0.7
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Shorten the list of candidates to process during the document detection in a single image process mode. The option reduces the processing time for specific backgrounds:
DocumentReader.setConfig({
processParams: {
fastDocDetect: true
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });