QT调用Halcon查询所有摄像头名称
QT软件中的测试代码
//获取当前连接的所有设备信息实例HTuple hv_general, hv_ValueList;InfoFramegrabber("DirectShow", "device", &hv_general, &hv_ValueList);qDebug()<<QString::fromUtf8(hv_general.S().Text());//Value list for device parameter (name of the capture device).qDebug()<<QString::fromUtf8(hv_ValueList.S().Text());//[0] USB Camera
Halcon软件中的测试代码
*本机摄像头连接参数实例*打开摄像头
open_framegrabber('DirectShow', 1, 1, 0, 0, 0, 0, 'default', 8, 'rgb', -1, 'false', 'default', '[0] USB Camera', 0, -1, AcqHandle)*Halcon查询指定的图像采集接口的信息算子info_framegrabber用法
*Name:图像采集设备的名称
*Query:需要查询的参数名称
*Information:输出的文本信息
*ValueList:图像采集接口的参数值*其它Query参数实例
info_framegrabber('DirectShow', 'bits_per_channel', info, valList)
info_framegrabber('DirectShow', 'camera_type', info, valList)
info_framegrabber('DirectShow', 'color_space', info, valList)
info_framegrabber('DirectShow', 'defaults', info, valList)
info_framegrabber('DirectShow', 'device', info, valList)
info_framegrabber('DirectShow', 'revision', info, valList)
info_framegrabber('DirectShow', 'field', info, valList)
info_framegrabber('DirectShow', 'general', info, valList)
info_framegrabber('DirectShow', 'generic', info, valList)
info_framegrabber('DirectShow', 'external_trigger', info, valList)
info_framegrabber('DirectShow', 'horizontal_resolution', info, valList)
info_framegrabber('DirectShow', 'image_height', info, valList)
info_framegrabber('DirectShow', 'image_width', info, valList)
info_framegrabber('DirectShow', 'info_boards', info, valList)
info_framegrabber('DirectShow', 'line_in', info, valList)
info_framegrabber('DirectShow', 'start_column', info, valList)
info_framegrabber('DirectShow', 'start_row', info, valList)
info_framegrabber('DirectShow', 'vertical_resolution', info, valList)*不可运行项目
*info_framegrabber('DirectShow', 'grab_timeout', info, valList)
*info_framegrabber('DirectShow', 'name', info, valList)*其它Information参数实例
info_framegrabber('DirectShow', 'device', defaults, ValueList)
info_framegrabber('DirectShow', 'device', info, valList)
info_framegrabber('DirectShow', 'device', info_boards, ValueList)
info_framegrabber('DirectShow', 'device', parameters, ValueList)
info_framegrabber('DirectShow', 'device', filed, ValueList)
info_framegrabber('DirectShow', 'device', generic, ValueList)
info_framegrabber('DirectShow', 'device', parameters_readonly, ValueList)
info_framegrabber('DirectShow', 'device', parameters_writeonly, ValueList)
info_framegrabber('DirectShow', 'device', vertical_resolution, ValueList)
info_framegrabber('DirectShow', 'device', port, ValueList)
info_framegrabber('DirectShow', 'device', bits_per_channel, ValueList)
info_framegrabber('DirectShow', 'device', camera_type, ValueList)
info_framegrabber('DirectShow', 'device', color_space, ValueList)
info_framegrabber('DirectShow', 'device', device, ValueList)
info_framegrabber('DirectShow', 'device', external_trigger, ValueList)
info_framegrabber('DirectShow', 'device', horizontal_resolution, ValueList)
info_framegrabber('DirectShow', 'device', image_height, ValueList)
info_framegrabber('DirectShow', 'device', image_width, ValueList)
info_framegrabber('DirectShow', 'device', start_row, ValueList)
info_framegrabber('DirectShow', 'device', start_column, ValueList)
info_framegrabber('DirectShow', 'device', revision, ValueList)
info_framegrabber('DirectShow', 'device', info, valList)