我第一次在Halcon中尝试了几件事。但是,即使在文档中,也不知道如何设置图像采集的曝光。到目前为止,我的代码是这样的,但我的测试环境是黑暗的,我想让图像变得更亮一点:
open_framegrabber ('uEye', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, 'default', 'default', 'default', -1, -1, AcqHandle)
dev_open_window (0, 0, 500, 300, 'light gray', WindowHandleButton)
i := 0
create_bar_code_model ([], [], BarCodeHandle)
while (i < 100)
grab_image (Image, AcqHandle)
find_bar_code (Image, SymbolRegions, BarCodeHandle, 'auto', DecodedDataStrings)
get_bar_code_result (BarCodeHandle, 'all', 'decoded_types', BarCodeResults)
i:= i+1
endwhile
close_framegrabber (AcqHandle)发布于 2020-05-13 14:04:54
您可以使用以下命令设置曝光量:
set_framegrabber_param (AcqHandle, 'exposure', 10.0)使用Halcon助手是查找和设置参数助手->打开新图像Acquisition->Source(uEye)->Connect->Parameters:的一种简单方法

您可以在其中更改参数,并使用最后一个选项卡自动生成代码。
另外,使用示例程序examples/hdevelop/Image/Acquisition/ueye_parameters.hdev将为您提供相机上所有可用参数的列表:

https://stackoverflow.com/questions/61767212
复制相似问题