Halcon读取条形码和二维码

读取条形码

1创建条形码句柄

create_bar_code_model(: : GenOaramName,GenParamValue: BarCodeHandle)
2设置条形码参数

GenParamName 设置的参数

'element_size_min' 条形码最小单位,黑条之间的最小间距

'barcode_width_min'条形码的最小宽度

'persistence' 设置条形码的查找精度,0快,1精确

'contrast_min' 最小对比度

set_bar_code_param(: : BarCodeHandle, GenParamName, GenParamValue :)
3获取结果

ResultName 结果名字

'decoded_types' 条形码类型

'decoded_strings' 字符串

get_bar_code_results(: : BarCodeHandle, CandidateHandle, ResultName : BarCodeResults)

二维码检测

1创建二维码对象

SymbolType 二维码类型

'Data Matrix ECC 200' 数据矩阵码 简称D码

'PDF417' 一种二维堆叠条形码

Micro QR Code QR码

create_data_code_2d_model(: : SymbolType, GenParamName, GenParamValue : DataCodeHandle)
2查找二维码

ResultHandles 输出码类型

DecodedDataStrings 输出码数据

find_data_code_2d(Image : SymbolXLDs : DataCodeHandle, GenParamName, GenParamValue : ResultHandles, DecodedDataStrings)
如果内容是中文需要设置编码类型

set_data_code_2d_param(DataCodeHandle, 'string_encoding', 'utf8')

相关推荐
youcans_3 天前
【HALCON 实战入门】4. 图像读取、显示与保存
图像处理·人工智能·计算机视觉·halcon
youcans_3 天前
【HALCON 实战入门】2. HALCON 快速入门
图像处理·人工智能·计算机视觉·halcon
爱凤的小光16 天前
Halcon之3D位姿-个人学习笔记篇(待完善)
halcon
MyBFuture19 天前
Halcon 金字塔与边缘检测技术解析
人工智能·计算机视觉·halcon
MyBFuture21 天前
Halcon条形码与二维码识别全攻略
开发语言·人工智能·halcon·机器视觉
code bean21 天前
【Halcon 】用 Halcon 实现涂抹:Region、仿射变换与 WPF 交互
wpf·交互·halcon
wuguan_22 天前
Halcon模板匹配+对齐模板+测量边(例子)
halcon·模板匹配·测量算子
MyBFuture24 天前
Halcon模板匹配核心技术解析大全
开发语言·人工智能·计算机视觉·halcon·机器视觉
wuguan_1 个月前
Halcon图像处理(灰度值)
图像处理·halcon