Data Types

Last updated: 2021-07-07 11:27:49

Coord

Coordinates

Used by actions: GeneralAccurateOCR, GeneralBasicOCR, TableOCR.

Name Type Description
X Integer Horizontal coordinate
Y Integer Vertical coordinate

DetectedWordCoordPoint

Coordinates of a word’s four corners in a clockwise order on the input image, starting from the upper-left corner

Used by actions: GeneralAccurateOCR, GeneralBasicOCR.

Name Type Description
WordCoordinate Array of Coord Coordinates of a word’s four corners in a clockwise order on the input image, starting from the upper-left corner

DetectedWords

Information about a character detected, including the character itself and its confidence

Used by actions: GeneralAccurateOCR, GeneralBasicOCR.

Name Type Description
Confidence Integer Confidence. Value range: 0–100
Character String A possible character

ItemCoord

Pixel coordinates of the text line in the image after rotation correction, which is in the format of (X-coordinate of top-left point, Y-coordinate of top-left point, width, height).

Used by actions: GeneralAccurateOCR, GeneralBasicOCR.

Name Type Description
X Integer X-coordinate of top-left point.
Y Integer Y-coordinate of top-left point.
Width Integer Width
Height Integer Height

TextDetection

OCR result.

Used by actions: GeneralAccurateOCR, GeneralBasicOCR.

Name Type Description
DetectedText String Recognized text line content.
Confidence Integer Confidence. Value range: 0–100.
Polygon Array of Coord Text line coordinates, which are represented as 4 vertex coordinates.
Note: this field may return null, indicating that no valid values can be obtained.
AdvancedInfo String Extended field.
The paragraph information Parag returned by the GeneralBasicOcr API contains ParagNo.
ItemPolygon ItemCoord Pixel coordinates of the text line in the image after rotation correction, which is in the format of (X-coordinate of top-left point, Y-coordinate of top-left point, width, height).
Words Array of DetectedWords Information about a character, including the character itself and its confidence. Supported APIs: GeneralBasicOCR, GeneralAccurateOCR
WordCoordPoint Array of DetectedWordCoordPoint Coordinates of a word’s four corners on the input image. Supported APIs: GeneralBasicOCR, GeneralAccurateOCR

TextTable

Form recognition result.

Used by actions: TableOCR.

Name Type Description
ColTl Integer Column index of the top-left corner of the cell.
RowTl Integer Row index of the top-left corner of the cell.
ColBr Integer Column index of the bottom-right corner of the cell.
RowBr Integer Row index of the bottom-right corner of the cell.
Text String Cell text
Type String Cell type. Valid values: body, header, footer
Confidence Integer Confidence. Value range: 0–100
Polygon Array of Coord Text line coordinates, which are represented as 4 vertex coordinates.
AdvancedInfo String Extended field