设置首页收藏本站
开启左侧

Barcode train code 128

[复制链接]
Halcon_ 发表于 2018-9-15 23:12:47 | 显示全部楼层 |阅读模式
Hello,
I used HALCON 13 for barcode controller but it doesn't work well. (It didn't find any barcode in image list on below.)

Codes:
*************
create_bar_code_model ([], [], BarCodeHandle)
set_bar_code_param (BarCodeHandle, 'train', 'all')

for Index := 1 to 2 by 1
    read_image (Image, 'test' + Index + '.jpg')
    find_bar_code (Image, SymbolRegions, BarCodeHandle, 'Code 128', DecodedDataStrings)
endfor

************

test1.jpg
test2.jpg
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
Criss 发表于 2018-9-16 17:14:24 | 显示全部楼层
may be your image resolution not enough!
only this image can be decoded on beblow
QQ截图20180916171327.png

my codes:
  1. dev_set_draw ('margin')
  2. set_display_font (3600, 20, 'mono', 'true', 'false')
  3. create_bar_code_model ([], [], BarCodeHandle)
  4. *set_bar_code_param (BarCodeHandle, 'train', 'all')

  5. for Index := 1 to 2 by 1
  6.     read_image (Image, 'test' + Index + '.jpg')
  7.     draw_rectangle2 (3600, Row, Column, Phi, Length1, Length2)
  8.     gen_rectangle2 (Rectangle, Row, Column, Phi, Length1, Length2)
  9.     decode_bar_code_rectangle2 (Image, BarCodeHandle, 'auto', Row, Column, Phi, Length1, Length2, DecodedDataStrings)
  10.     disp_message (3600, DecodedDataStrings, 'window', 12, 12, 'green', 'true')
  11.     stop()
  12. *    find_bar_code (Image, SymbolRegions, BarCodeHandle, 'auto', DecodedDataStrings)
  13. endfor
复制代码


奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
 楼主| Halcon_ 发表于 2018-9-16 17:31:58 | 显示全部楼层
I tried your codes on HALCON 13. But it didn't find any barcodes. Which version of HALCON do you use?
Thanks for information.
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
Criss 发表于 2018-9-16 18:00:18 | 显示全部楼层
Halcon_ 发表于 2018-9-16 17:31
I tried your codes on HALCON 13. But it didn't find any barcodes. Which version of HALCON do you use ...

Halcon 12.0.3
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
 楼主| Halcon_ 发表于 2018-9-16 20:32:05 | 显示全部楼层
本帖最后由 Halcon_ 于 2018-9-16 20:35 编辑

Well,
Does anybody have any ideas for
  1. [set_bar_code_param] and  [set_bar_code_param_specific]
复制代码
settings?
Thanks.
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
852474220 发表于 2018-9-18 14:12:52 | 显示全部楼层
Criss 发表于 2018-9-16 17:14
may be your image resolution not enough!
only this image can be decoded on beblow

敢问 这个为什么不是创建条码模型直接create_bar_code_model ([], [], BarCodeHandle)然后直接find_bar_code (Image, SymbolRegions, BarCodeHandle, 'Code 128', DecodedDataStrings)呢?  
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
Criss 发表于 2018-9-18 14:53:57 | 显示全部楼层
852474220 发表于 2018-9-18 14:12
敢问 这个为什么不是创建条码模型直接create_bar_code_model ([], [], BarCodeHandle)然后直接find_bar_c ...

他是要用训练模式去识别条码,而且这个条码确实不容易识别出来!
而且直接根据条码模型去识别也识别不出来,不信你试试看,应该是分辨率不够!
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表