OCR之find_text_bottle_label.hdev

该示例展示了如何在计算机视觉中应用find_text和OCR技术来识别图像中瓶标上的文字。首先创建一个文本模型并设置参数,然后对图像进行预处理,包括文字方向校正,接着使用find_text进行文字分割,最后执行OCR识别。
摘要由CSDN通过智能技术生成
  • 这个例子中用到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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值