- This example demonstrates how to use the operator
- find_text to segment text in an image before
- performing OCR.
- 关闭更新
dev_update_off ()
dev_close_window ()
*读取图像
read_image (Image, ‘ocr/dongle_01’)
*开启窗体
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle)
*设置显示字体
set_display_font (WindowHandle, 14, ‘mono’, ‘true’, ‘false’) - 读取训练好的OCR文件
- Read the OCR classifier from file
read_ocr_class_mlp (‘DotPrint_NoRej’, OCRHandle) - 创建一个文字读取器
- Create the text model and specify the text properties
create_text_model_reader (‘manual’, [], TextModel) - 设置一些参数,字符宽高,是否是点印,文字行数,是否识别返回标点,是否返回分隔符等
set_text_model_param (TextModel, ‘manual_char_width’, 24)
set_text_model_param (TextModel, ‘manual_char_height’, 33)
set_text_model_param (TextModel, ‘manual_is_dotprint’, ‘true’)
set_text_model_param (TextModel, ‘manual_max_
OCR之find_text_dongle.hdev
最新推荐文章于 2021-08-10 18:42:54 发布
该示例展示了如何利用find_text操作符在图像中分割文本,然后进行OCR识别。通过读取图像,设置OCR参数,创建文字模型,进行图像预处理,二值化,文字行角度校正,最后识别并显示每个识别区域的文字。
摘要由CSDN通过智能技术生成