halcon 二维码 不用设置参数,自主学习 &解决项目中出现输入字符串的格式不正确

1.代码

* Image Acquisition 01: Code generated by Image Acquisition 01
open_framegrabber ('DirectShow', 1, 1, 0, 0, 0, 0, 'default', 8, 'gray', -1, 'false', 'default', '[0] Integrated Webcam', 0, -1, AcqHandle)
grab_image_start (AcqHandle, -1)

 grab_image_async (Image, AcqHandle, -1)
 create_data_code_2d_model ('Data Matrix ECC 200', [], [], DataCodeHandle)
query_data_code_2d_params (DataCodeHandle, 'get_model_params', GenParamName)
get_data_code_2d_param (DataCodeHandle, GenParamName, ModelBeforeTraining)
 find_data_code_2d (Image, SymbolXLDs, DataCodeHandle, 'train', 'all', ResultHandles, DecodedDataStrings)
get_data_code_2d_param (DataCodeHandle, GenParamName, ModelAfterTraining)
set_data_code_2d_param(DataCodeHandle, GenParamName, ModelAfterTraining)

while (true)
    grab_image_async (Image, AcqHandle, -1)
   find_data_code_2d(Image, SymbolXLDs1, DataCodeHandle, 'stop_after_result_num', 1, ResultHandles1, DecodedDataStrings1)
endwhile
close_framegrabber (AcqHandle)

2,使用GetPrivateProfileString 读取配置文件时,出现输入字符串的格式不正确的提示,Debug下,也看到没有读取配置文件的参数

1. config.ini 另存为Unicode编码

2. //注释部分去掉

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值