Scenarios
Select the Document Reader SDK scenario.
Overview
A scenario is the main setting for Document Reader SDK. It controls all scanning processes of the Core framework and defines the way Core works. The set of available scenarios is different for each Core type.
To get all available scenarios, make sure the initialization is completed and use the following part of the code:
// getting current processing scenario
let currentScenario: String = DocReader.shared.processParams.scenario
// printing available scenarios
for scenario in DocReader.shared.availableScenarios {
print(scenario)
}
// getting current processing scenario
NSString *currentScenario = [RGLDocReader shared].processParams.scenario;
// printing available scenarios
for (RGLScenario *scenario in RGLDocReader.shared.availableScenarios) {
NSLog(@"%@", scenario);
}
Set the processing scenario:
// set the scenario value
DocReader.shared.processParams.scenario = RGL_SCENARIO_MRZ
// set the scenario value
[RGLDocReader shared].processParams.scenario = RGL_SCENARIO_MRZ;
Scenarios and Results
Here is a comparison table of available scenarios and their capabilities.
Scenario name | Multiple pages processing | Document location | MRZ OCR | Barcode data | Document type | Visual zone OCR | Graphic fields | Credit card data | Free OCR |
---|---|---|---|---|---|---|---|---|---|
Locate | A | X | |||||||
Mrz | X | ||||||||
MrzOrLocate | O | O | |||||||
MrzAndLocate | A | X | X | ||||||
Barcode | X | ||||||||
MrzOrBarcode | O | O | |||||||
MrzOrOcr | A | O | O | O | O | O | |||
MrzOrBarcodeOrOcr | O | O | O | O | O | O | |||
LocateVisual_And_MrzOrOcr | A | X | O | O | O | O | |||
DocType | A | O | O | X | O | ||||
Ocr | A | X | O | X | X | O | |||
FullProcess | A | X | O | O | X | O | X | ||
Id3Rus | O | O | O | O | O | ||||
Capture | X | ||||||||
CreditCard | A | X | X | ||||||
OcrFree | X | ||||||||
RusStamp | X |
A
The option is available.
Empty
The result type is not included in the processing list and is not available.
O
The result type is not mandatory to reach the COMPLETED state. Might be available when the processing is finished.
X
The result type is mandatory to reach the COMPLETED state and is always available when the processing is finished.
Scenarios and Core Types
Here is a comparison table of available scenarios and Core types.
Core name | MrzOrBarcodeOrOcr | FullProcess | CreditCard | Mrz | Barcode | Locate | Ocr | DocType | MrzOrBarcode | MrzOrLocate | MrzAndLocate | MrzOrOcr | LocateVisual_And_MrzOrOcr | Id3Rus | OcrFree | RusStamp | Capture |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bounds | X | X | |||||||||||||||
MRZ | X | X | X | X | X | ||||||||||||
MRZRFID | X | X | X | X | X | ||||||||||||
Barcode | X | X | |||||||||||||||
MRZBarcode | X | X | X | X | X | X | X | ||||||||||
MRZBarcodeRFID | X | X | X | X | X | X | X | ||||||||||
DocType | X | X | X | X | X | X | |||||||||||
OCR | X | X | X | X | X | X | X | X | X | X | X | X | X | ||||
OCRRFID | X | X | X | X | X | X | X | X | X | X | X | X | X | ||||
Full | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
FullRFID | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
Warning
The list of returned scenarios is restricted by the license.