This interface represents a OCR result instance and is used to access its properties. More...
Public Member Functions | |
int | CountChar () |
int | CountLine () |
void | Draw (HDC hdc, int lineIndex, int charIndex, LPVOCRDrawFlags drawFlags, double zoomX, double zoomY, double panX, double panY) |
void | DrawAll (HDC hdc, LPVOCRDrawFlags drawFlags, double zoomX, double zoomY, double panX, double panY) |
double | GetCharHeightMetric (LPVAggregation aggType) |
double | GetCharSpaceMetric (LPVAggregation aggType) |
double | GetCharWidthMetric (LPVAggregation aggType) |
double | GetLineSpaceMetric (LPVAggregation aggType) |
ILOCRChar * | ItemChar (int index) |
ILOCRLine * | ItemLine (int index) |
Public Member Functions inherited from ILObjects | |
int | Count () |
BOOL | Empty () |
ILObject * | ItemObject (int objIndex) |
Public Member Functions inherited from ILObject | |
ILObject * | Copy () |
LPVErrorCode | Load (LString filename) |
void | Reset () |
LPVErrorCode | Save (LString filename) |
BOOL | Valid () |
Properties | |
LString | String [get] |
The recognition result. For multi-line result, the string is merged by line break '\n'. | |
This interface represents a OCR result instance and is used to access its properties.
Usually you get the LOCRResult object from the segmentation or recognition. You can then use this interface to access to the details such as the per-line or per-character result, and draw the result on graphics windows.
int CountChar | ( | ) |
Get count of the characters in the result
int CountLine | ( | ) |
Get count of the lines in the result
void Draw | ( | HDC | hdc, |
int | lineIndex, | ||
int | charIndex, | ||
LPVOCRDrawFlags | drawFlags, | ||
double | zoomX, | ||
double | zoomY, | ||
double | panX, | ||
double | panY | ||
) |
Draw part of the OCR result onto provide device context.
[in] | drawFlags | Control the drawing behavior, see LPVOCRDrawFlags |
[in] | lineIndex | The index of the line to drawn |
[in] | charIndex | The index of the character to drawn, pass in negative value to draw the whole line |
void DrawAll | ( | HDC | hdc, |
LPVOCRDrawFlags | drawFlags, | ||
double | zoomX, | ||
double | zoomY, | ||
double | panX, | ||
double | panY | ||
) |
Draw the OCR result onto provide device context.
[in] | drawFlags | Control the drawing behavior, see LPVOCRDrawFlags |
double GetCharHeightMetric | ( | LPVAggregation | aggType | ) |
Calculate the aggregated metric based on the heights of all the characters in the result, for example, maximum height.
[in] | aggType | Aggregation type, see LPVAggregation for usage. |
val | Return the aggregated metric. |
double GetCharSpaceMetric | ( | LPVAggregation | aggType | ) |
Calculate the aggregated metric based on the spaces between the characters for all the characters in the result, for example, averaging space.
[in] | aggType | Aggregation type, see LPVAggregation for usage. |
val | Return the aggregated metric. |
double GetCharWidthMetric | ( | LPVAggregation | aggType | ) |
Calculate the aggregated metric based on the widths of all the characters in the result, for example, averaging width.
[in] | aggType | Aggregation type, see LPVAggregation for usage. |
val | Return the aggregated metric. |
double GetLineSpaceMetric | ( | LPVAggregation | aggType | ) |
Calculate the aggregated metric based on the spaces between the lines in the result, for example, averaging space.
[in] | aggType | Aggregation type, see LPVAggregation for usage. |
val | Return the aggregated metric. |
ILOCRChar* ItemChar | ( | int | index | ) |
Fetch one character with given index. For multi-line result, the characters are ordered firstly by lines then by its index in line.
[in] | index | The input index, it should be a 0-based number smaller than total count. |
result | Return the character object of given index. |
ILOCRLine* ItemLine | ( | int | index | ) |
Fetch one line of text with given index.
[in] | index | The input index, it should be a 0-based number smaller than total count. |
result | Return the line of text of given index. |