assessQualityForOcr method
Estimates if an image quality is suitable for OCR. The whole image is represented as a set of rectangles. A type of rectangle can be either text or unknown. The quality assessment of the image for OCR is calculated based on the rectangles collection.
Note: This is a technology preview feature. The functionality will be improved and completed in future versions.
export async function assessQualityForOcr(settings)
Parameters
- settings
- Object specifying parameters of the image quality assessment (see Options).
Return values
The method returns result depending on how the scenario finished (see Result).
Options
The table below describes parameters that you can pass as the settings argument to change image quality assessment settings. Omitting a parameter means that a default setting will be used.
Parameter | Value type | Description |
---|---|---|
licenseFileName | string |
The name of the license file. This file must be located in the /assets/ directory in your project. Default: "MobileCapture.License". |
imageUri | string |
Image source for the operation passed as URI. This parameter can be set to the following values:
Required parameter. |
documentBoundary | object |
Quadrangle containing the whole document. It is represented by an array of its four vertices' coordinates: { x: int, y: int }. The vertices are indexed clockwise starting from the bottom left. Default: coordinates of a quadrangle, containing the whole image. |
Result
This section describes the object that represents image capture results. Returned parameters depend on the scenario.
Parameter | Value type | Description |
---|---|---|
qualityAssessmentForOcrBlocks | object[] |
Collection of rectangles with corresponding quality assessment for each of them. Each rectangle can have the following parameters:
|
Example of a result JSON.
02.03.2022 12:59:15