Blob分析之bottlet.hdev

本文档详细介绍了如何使用Blob分析进行图像分割,并通过步骤演示了OCR训练过程,包括字体预处理、区域选择、训练文件生成及训练。具体操作涉及阈值分割、开运算、联通区域等图像处理技术,以及append_ocr_trainf、trainf_ocr_class_mlp等OCR训练函数。
摘要由CSDN通过智能技术生成
  • OCR训练
  • Training of the OCR
    *字体在"bottle.hdev"项目中用过
  • The font is used in “bottle.hdev”
  • 第0步:准备工作
  • Step 0: Preparations
    FontName := ‘bottle’
  • 第1步:分割
  • Step 1: Segmentation
    *关闭窗体更新
    dev_update_window (‘off’)
    *读取图像
    read_image (Bottle, ‘bottle2’)
    *获取图像尺寸
    get_image_size (Bottle, Width, Height)
    *关闭窗体
    dev_close_window ()
    *打开窗体
    dev_open_window (0, 0, 2 * Width, 2 * Height, ‘black’, WindowID)
    *设置显示字体
    set_display_font (WindowID, 27, ‘mono’, ‘true’, ‘false’)
    *阈值分割
    threshold (Bottle, RawSegmentation, 0, 95)
    *填充阈值分割的区域
    fill_up_shape (RawSegmentation, RemovedNoise, ‘area’, 1, 5)
    *开运算:先腐蚀后膨胀,去除小连接的斑点
    opening_circle (RemovedNoise, ThickStructures, 2.5)
    *填充
    fill_up (ThickStructures, Solid)
    *以矩形算子做开运算
    opening_rectangle1 (Solid, Cut, 1, 7)
    *联通区域
    connection (
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值