Barcode读取之decode_bar_code_rectangle2.hdev

该示例详细展示了如何使用decode_bar_code_rectangle2算子从名为'tea_box'的图像文件中提取并解码EAN-13条形码。通过简单的阈值分割和连接操作确定条码区域,然后利用这个区域进行解码,并显示解码结果。
摘要由CSDN通过智能技术生成

*这个示例展示了如何使用decode_bar_code_rectangle2算子

  • This example demonstrates how to use the operator
  • decode_bar_code_rectangle2.
    *条码区域通过简单的阈值分割提取。矩形参数区域传递给decode_bar_code_rectangle2算子
  • The bar code region is extracted by simple segmentation
  • and the returned rectangle2 parameters are passed to
  • the operator decode_bar_code_rectangle2.
  • 初始化变量
  • Initialize variables
    *图像文件夹
    Directory := ‘barcode/ean13/’
    TeaBoxRegExp := ‘.tea_box.
  • 初始化设置
  • Initialize settings
    *关闭更新
    dev_update_window (‘off’)
    *设置填充方式
    dev_set_draw (‘margin’)
  • 获取图像到集合
  • Get list of tea_box*-image files
    list_image_files (Directory, ‘default’, [], ImageFiles)
    ImageFilesTea := regexp_select(ImageFiles,[TeaBoxRegExp,‘ignore_case’])
    *读取图像
    read_image (Image, ImageFilesTea[0])
  • 准备图像窗体和一维码读取句柄
  • Prepare graphics window and bar code model
    *关闭所有窗体
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值