- 这个例子中用到find_text去分割文字,最后用OCR算子去识别
*This example uses the operator find_text to segment
- text on a bottle label.
- First, a text model is created and some parameters
- are set. Before the actual segmentation can be
- performed, the image has to be aligned horizontally,
- which is done by the operators text_line_orientation
- and rotate_image. Then, find_text is called and OCR
- is performed on the results.
- Initialization
*关闭更新
dev_update_off ()
*读取图像
read_image (Image, ‘ocr/bottle_label_01’)
*关闭窗体
dev_close_window ()
*打开适合图像尺寸大小的窗体
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle)
*设置显示字体
set_display_font (WindowHandle, 16, ‘mono’, ‘true’, ‘false’)
*读取CNN分类器句柄
read_ocr_class_cnn (‘Universal_Rej.occ’, OCRHandle) - 创建一个文字读取器模型
- Create text model and specify parameter settings
create_text_model_r