Halcon一维码读取

Halcon一维码读取
Halcon一维码读取

*---------------------------------------------------------------------------------------------------------------------
*条码读取
*---------------------------------------------------------------------------------------------------------------------

* Image Acquisition 01: Code generated by Image Acquisition 01
list_files ('C:/Users/Public/Documents/MVTec/HALCON-19.11-Progress/examples/images/barcode/code128', ['files','follow_links'], ImageFiles)
tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima|hobj)$','ignore_case'], ImageFiles)
for Index := 0 to |ImageFiles| - 1 by 1
    *读取图片
    read_image (Image, ImageFiles[Index])
    *创建一维条码模型
    create_bar_code_model ([], [], BarCodeHandle1)  
    *查找条码
    find_bar_code (Image, SymbolRegions, BarCodeHandle1, 'auto', DecodedDataStrings)
    *读取条码区域
    get_bar_code_object (BarCodeObjects, BarCodeHandle1, 'all', 'symbol_regions')
    *获取条码信息
    get_bar_code_result (BarCodeHandle1, 'all', 'decoded_strings', BarCodeResults)
    *清除条码信息
    clear_bar_code_model (BarCodeHandle1)
endfor
上一篇:状态栏配置


下一篇:原生js模拟滚动条