Barcode读取之barcode_param_scanning_control.hdev

本文档通过一个具体的示例详细解释了如何使用特定参数`min_identical_scanlines`和`start_stop_tolerance`来避免在 Barcode 读取过程中的错误解码问题。在 Code 39 和 Code 128 的场景中,通过调整这些参数,可以提高解码的准确性和鲁棒性。
摘要由CSDN通过智能技术生成

*这个项目展示了如何去处理错误的解码

  • This program demonstrates how to handle false bar code
  • decoding.
    *以下两个参数可以解决这个问题
  • For this, the following two parameters can be used:
    • min_identical_scanlines
    • start_stop_tolerance
      *在这个特殊的例子中,这个参数用来抑制Code 128的错误检测
  • In this particular example these parameters are used to
  • suppress the false detection of a Code 128 in a Code 39
  • symbol.
  • 关闭更新
    dev_update_off ()
    *设置填充方式
    dev_set_draw (‘margin’)
  • 创建一个一维码读取器
    create_bar_code_model ([], [], BarCodeHandle)
    *设置扫描行数
    set_bar_code_param (BarCodeHandle, ‘num_scanlines’, 10)
    *用来识别条码边沿,一般取值[0.05,0.2]
    set_bar_code_param (BarCodeHandle, ‘meas_thresh’, 0.1)
    *保存解码的中间结果
    set_bar_code_param (BarCodeHandle, ‘persistence’, 1)
    *读取图像
    read_image (Image, ‘barcode/code39/code3905’)
    *获取图像尺寸
    get_image_size (Image, Width, Height)
    StatusHeight := 200
    *关闭窗体
    dev_close_window ()
    *打开窗体
    dev_open_window (0, 0, Width, Height + StatusHeight, ‘white’, WindowHandle)
    *图像铺满窗口
    dev_set_part (0, 0, Height + StatusHeight - 1, Width - 1)
    *设置显示字体
    set_display_font (WindowHandle, 16, ‘mono’, ‘true’, ‘false’)
  • 图像中一维码类别是Code 39
  • The code in the image is a Code 39 symbol.
    *读取条码
    find_bar_code (Image, SymbolRegions, BarCodeHandle, ‘Code 39’, Data)
    *显示图像
    dev_display (Image)
    *设置显示颜色
    dev_set_color (‘green’)
    *设置线宽
    dev_set_line_width (3)
    *显示条码区域
    dev_display (Sy
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值