2#import <Foundation/Foundation.h>
16@property (nonatomic, copy) NSString *
label;
18@property (nonatomic, assign)
float score;
20@property (nonatomic, strong) NSArray *
rect;
32@property (nonatomic, copy) NSString *
label;
34@property (nonatomic, assign)
float score;
36@property (nonatomic, strong) NSArray *
rect;
48@property (nonatomic, assign)
int startX;
50@property (nonatomic, assign)
int startY;
52@property (nonatomic, assign)
int endX;
54@property (nonatomic, assign)
int endY;
64@property (nonatomic, assign)
int left;
66@property (nonatomic, assign)
int top;
68@property (nonatomic, assign)
int right;
70@property (nonatomic, assign)
int bottom;
80@property (nonatomic, assign)
float score;
84@property (nonatomic, copy) NSString *
text;
96@property (nonatomic, assign)
int num;
102@property (nonatomic, assign)
int angle;
104@property (nonatomic, assign)
int score;
106@property (nonatomic, copy) NSString *
type;
108@property (nonatomic, strong) NSArray *
rect;
114@property (nonatomic, strong) NSArray<NSArray<CTextLine *> *> *
cellsText;
120@property (nonatomic, strong) NSArray *
cells;
155@property (nonatomic, copy) NSString *
text;
157@property (nonatomic, strong) NSArray<CTextLine *> *
lines;
170@property (nonatomic, copy) NSString *
text;
172@property (nonatomic, assign)
float score;
174@property (nonatomic, strong) NSArray *
rect;
184@property (nonatomic, strong) NSImage *
image;
195@property (nonatomic, strong) NSArray *
points;
197@property (nonatomic, strong) NSImage *
image;
231+ (ErrorCode)Ocr:(
id)input andResult:(NSMutableArray<
COCRResult*> *)ocrResult;
256+ (ErrorCode)TableRec:(
id)input andResult:(NSMutableArray<
CTABResult*>*)tabResult;
Dewarp output including key points and the corrected image.
NSArray * points
Corner points as 8 integers [tl.x,tl.y,tr.x,tr.y,bl.x,bl.y,br.x,br.y].
NSImage * image
Dewarped/corrected image.
int startY
Y coordinate of start point.
int endY
Y coordinate of end point.
int startX
X coordinate of start point.
int endX
X coordinate of end point.
Image result of MagicColor enhancement.
NSImage * image
Output enhanced image.
Single OCR token/line result.
float score
Confidence score in range [0,1].
NSString * text
Recognized text content.
NSArray * rect
Quadrilateral as 8 integers [x0,y0,x1,y1,x2,y2,x3,y3].
High-level APIs for Document AI tasks.
A rectangle defined by four edges.
int top
Top edge (inclusive).
int right
Right edge (exclusive or inclusive by context).
int bottom
Bottom edge (exclusive or inclusive by context).
int left
Left edge (inclusive).
Table recognition result for a page.
int colCount
Column count of the table.
NSString * jsonStr
Table content in JSON format.
int score
Confidence score.
NSArray * rect
Table bounding box as [left, top, right, bottom].
NSArray * heightOfRows
Height for each row.
NSString * type
Table type label.
NSArray * cells
Table cells list.
NSArray< NSArray< CTextLine * > * > * cellsText
Recognized text lines for each cell, organized by [row][col].
NSArray< CLine * > * horizonLines
Horizontal grid lines of the table.
int angle
Table rotation angle (degree).
NSString * htmlStr
Table content in HTML format.
int num
Table index on the page (0-based).
NSArray< CLine * > * verticalLines
Vertical grid lines of the table.
NSArray * widthOfCols
Width for each column.
int rowCount
Row count of the table.
A single table cell with text and geometry.
int startCol
Starting column index (inclusive).
NSArray< CTextLine * > * lines
Recognized lines in the cell.
int cellBackgroundColorR
Cell background Red [0..255].
CRect * bbox
Cell bounding box.
int cellBackgroundColorG
Cell background Green [0..255].
int cellBackgroundColorB
Cell background Blue [0..255].
NSString * text
Cell text content.
int lineCount
Line count inside the cell.
int startRow
Starting row index (inclusive).
int endRow
Ending row index (inclusive).
int textLength
Text length in the cell.
int endCol
Ending column index (inclusive).
A recognized text line with bounding box.
int textLength
Text length (character count).
CRect * bbox
Bounding box of the text line as [left, top, right, bottom].
float score
Confidence score in range [0,1].
NSString * text
Recognized text content (UTF-8).
Single layout element detected on a page.
NSString * label
Detected label/type name.
float score
Confidence score in range [0,1].
NSArray * rect
Bounding box as [left, top, right, bottom].
Single stamp/seal detected on a page.
NSString * label
Detected label/type name.
float score
Confidence score in range [0,1].
NSArray * rect
Bounding box as [left, top, right, bottom].