Blob分析之bottlet.hdev

  • 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 (
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值