halcon中通过字体确定图片的位姿的例子

dev_update_window ('off')
dev_update_var ('off')
dev_update_pc ('off')
dev_close_window ()
dev_open_window (0, 0, 640, 480, 'black', WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_set_colored (12)
dev_set_draw ('margin')
for J := 1 to 5 by 1

    read_image (Image, 'dot_print_rotated/dot_print_rotated_'+J$'02d')

   *确定字体方向

    text_line_orientation (Image, Image, 50, rad(-30), rad(30), OrientationAngle)

  *旋转图片

    rotate_image (Image, ImageRotate, -OrientationAngle/rad(180)*180, 'constant')

   *分离字符

    segment_characters (ImageRotate, ImageRotate, ImageForeground, RegionForeground, 'local_auto_shape', 'false', 'true', 'medium', 25, 25, 0, 10, UsedThreshold)
    select_characters (RegionForeground, RegionCharacters, 'true', 'ultra_light', 60, 60, 'false', 'false', 'none', 'true', 'wide', 'true', 0, 'completion')
    dev_clear_window ()
    dev_display (ImageRotate)
    dev_display (RegionCharacters)
    if (J < 5)
        disp_continue_message (WindowHandle, 'black', 'true')
    endif
    stop ()
endfor
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值