该接口类表示字符识别结果对象,用于获取其具体识别结果。 更多...
Public 成员函数 | |
| 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 成员函数 继承自 ILObjects | |
| int | Count () |
| BOOL | Empty () |
| ILObject * | ItemObject (int objIndex) |
Public 成员函数 继承自 ILObject | |
| ILObject * | Copy () |
| LPVErrorCode | Load (LString filename) |
| void | Reset () |
| LPVErrorCode | Save (LString filename) |
| BOOL | Valid () |
属性 | |
| LString | String [get] |
| 识别结果。对于多行识别结果,该结果按换行符 '\n' 合并。 | |
该接口类表示字符识别结果对象,用于获取其具体识别结果。
通常通过字符分割或识别获得 LOCRResult 对象。可以使用该接口访问具体的识别结果细节,如单行或单个字符结果, 还可以调用绘制函数将该结果对象绘制在界面上。
| int CountChar | ( | ) |
获取该结果的总字符数
| int CountLine | ( | ) |
获取该结果的总行数
| void Draw | ( | HDC | hdc, |
| int | lineIndex, | ||
| int | charIndex, | ||
| LPVOCRDrawFlags | drawFlags, | ||
| double | zoomX, | ||
| double | zoomY, | ||
| double | panX, | ||
| double | panY | ||
| ) |
绘制该字符识别结果对象中的部分到给定设备。
| [in] | drawFlags | 控制字符绘制内容,使用方式请查阅 LPVOCRDrawFlags |
| [in] | lineIndex | 需绘制的行号 |
| [in] | charIndex | 需绘制的字符的行内索引。负数表示绘制全行。 |
| void DrawAll | ( | HDC | hdc, |
| LPVOCRDrawFlags | drawFlags, | ||
| double | zoomX, | ||
| double | zoomY, | ||
| double | panX, | ||
| double | panY | ||
| ) |
绘制该字符识别结果对象到给定设备。
| [in] | drawFlags | 控制字符绘制内容,使用方式请查阅 LPVOCRDrawFlags |
| double GetCharHeightMetric | ( | LPVAggregation | aggType | ) |
计算该结果对象中的所有字符高度的统计值,如所有高度中的最大值
| [in] | aggType | 统计方式,查看 LPVAggregation |
| val | 返回高度统计值 |
| double GetCharSpaceMetric | ( | LPVAggregation | aggType | ) |
计算该结果对象中的所有字符字间距的统计值,如所有字间距的均值
| [in] | aggType | 统计方式,查看 LPVAggregation |
| val | 返回字间距统计值 |
| double GetCharWidthMetric | ( | LPVAggregation | aggType | ) |
计算该结果对象中的所有字符宽度的统计值,如所有宽度的均值
| [in] | aggType | 统计方式,查看 LPVAggregation |
| val | 返回宽度统计值 |
| double GetLineSpaceMetric | ( | LPVAggregation | aggType | ) |
计算该结果对象中的所有行间距的统计值,如所有行间距的均值
| [in] | aggType | 统计方式,查看 LPVAggregation |
| val | 返回行间距统计值 |
| ILOCRChar* ItemChar | ( | int | index | ) |
获取索引对应的字符对象。对于多行识别结果,字符先按行、再按其在行内的索引排序。
| [in] | index | 输入索引,从 0 开始但小于总数的数字 |
| result | 返回索引对应的字符对象 |
| ILOCRLine* ItemLine | ( | int | index | ) |