This interface represents a single line of text and is used to access its properties. More...
Public Member Functions | |
void | Draw (HDC hdc, LPVOCRDrawFlags drawFlags, double zoomX, double zoomY, double panX, double panY) |
double | GetCharHeightMetric (LPVAggregation aggType) |
double | GetCharSpaceMetric (LPVAggregation aggType) |
double | GetCharWidthMetric (LPVAggregation aggType) |
void | GetLineImage (ILImage *img) |
ILOCRChar * | Item (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 | |
double | Angle [get] |
The angle of the line. | |
ILPoint | Center [get] |
The center of the line. | |
double | Height [get] |
The height of the line. | |
ILLine | Midline [get] |
The middle line of text. | |
ILPolygon | Quad [get] |
The region of the line as a quadrangle region. | |
double | Space [get] |
The space between the line and its previous line. The first line has -1 space. | |
LString | String [get] |
The recognition result. | |
double | Width [get] |
The width of the line. | |
This interface represents a single line of text and is used to access its properties.
Usually you get the LOCRLine object from the ILOCRResult::ItemLine() function. You can then use this interface to access to the line's placement, recognition result, reduced image, etc., and draw the result on graphics windows.
void Draw | ( | HDC | hdc, |
LPVOCRDrawFlags | drawFlags, | ||
double | zoomX, | ||
double | zoomY, | ||
double | panX, | ||
double | panY | ||
) |
Draw the line of text 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 the characters, 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 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 the characters, for example, averaging width.
[in] | aggType | Aggregation type, see LPVAggregation for usage. |
val | Return the aggregated metric. |
void GetLineImage | ( | ILImage * | img | ) |
Get the reduced image of the line. For italic characters, the image is rectified.
[out] | img | Output the line's image |
ILOCRChar* Item | ( | int | index | ) |
Fetch one character with given index.
[in] | index | The input index, it should be a 0-based number smaller than total count. |
result | Return the character object of given index. |