Halcon-如何设置白平衡 [英] Halcon - how to set white balance

查看:1053
本文介绍了Halcon-如何设置白平衡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这段代码可尝试使用halcon.图像偏绿,无法弄清楚如何设置白平衡.我无法在示例,文档,google和参数中找到它. halcon如何设置白平衡?

I have this code to try around with halcon. Images are quite greenish, and cannot figure out how to set whitebalance. I cannot find it in the samples, in the documentation, on google, and in the parameters. How is whitebalance set on halcon?

* Image Acquisition 06: Code generated by Image Acquisition 06
* Image Acquisition 06: Attention: The initialization may fail in case parameters need to
* Image Acquisition 06: be set in a specific order (e.g., image resolution vs. offset).
open_framegrabber ('GigEVision', 0, 0, 0, 0, 0, 0, 'default', -1, 'default', 'GtlForceIP=00010dc465ce,10.5.5.144/24', 'false', 'default', 'S1204667', 0, -1, AcqHandle)
set_framegrabber_param (AcqHandle, 'Gain', 5.01187)
set_framegrabber_param (AcqHandle, 'BlackLevel', 240.0)

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)

推荐答案

如果使用助手->图像采集->连接选项卡在HDevelop中打开相机,则有一个用于设置色彩空间的参数.当我在其中一台GigE摄像机上将其设置为"yuv"时,图像看上去是绿色的.查看是否可以将该值修改为"rgb"或灰色"或默认".通过在可见性设置下选择大师",您可以在参数"选项卡下进行一些高级设置.但是我在下面找不到我的GigE相机的白平衡设置.通常,摄像机的制造商会提供允许您配置高级参数(IDS摄像机管理器,Basler Pylon等)的软件.您可以尝试使用制造商的软件打开相机,看看是否有白平衡设置.

If you open your camera in HDevelop using Assistants -> Image Acquisition -> Connection tab there is a parameter for setting the color space. When I set it to "yuv" on one of my GigE cameras the image looks green. See if you can modify that value to "rgb" or "gray" or "default". There are also some advanced settings under the "Parameters" tab that you could play with by selecting "Guru" under the visibility settings. But I couldn't find white balance settings for my GigE camera under there. Usually the manufacturer of the camera will supply software to allow you to configure advanced parameters (IDS Camera Manager, Basler Pylon etc). You could try opening your camera under the manufacturers software to see if there are any settings for white balance.

这篇关于Halcon-如何设置白平衡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆