Gamma (dart E)#
该功能的使用#
运作原理#
相机根据以下公式(以彩色相机和红色像素值 (R) 为例)将 Gamma 校正值 (γ) 应用于每个像素的亮度值:
具体的最大像素值 (Rmax) 视情况而有所不同,例如在 8 位像素格式下为 255,在 10 位像素格式下为 1023。
配置 Gamma 校正#
To configure gamma correction, set the Gamma
parameter to the desired value. The parameter's value range is 0 to ≈4. - Gamma = 1: The overall brightness remains unchanged. - Gamma < 1: The overall brightness increases. - Gamma > 1: The overall brightness decreases.
在所有情况下,黑色像素(亮度 = 0)和白色像素(亮度 = 最大值)都不会被调整。
信息
如果启用 Gamma 校正,并且像素格式设置为 12 位像素格式,则会丢失一些图像信息。像素数据输出仍将是 12 位,但是像素值将在 Gamma 校正过程中插入。
设置色彩空间#
在 daA…mci 相机模块上,BslColorSpace
参数可用。通过该参数可以选择以下伽玛校正模式之一:
RGB
:不应用其他 Gamma 校正值。sRGB
:图像亮度经过优化,可在 sRGB 显示器上显示。应用大约 0.4 的伽玛校正值后,Gamma
参数变为只读,而且Gamma
参数值被忽略。
示例代码#
You can also use the pylon Viewer to easily set the parameters.