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. //注释部分去掉