跳转到内容

Vignetting Correction (dart E)#

相机的 Vignetting Correction 功能可让您从图像中消除暗角伪影。

信息

The pylon Viewer also has built-in functionality for correcting vignetting. However, you can't use this functionality with dart E cameras.

该功能的使用#

渐晕是指图像的边角与中心相比变暗。这是数字成像中的常见效果,而当传感器边缘的像素没有接收到足够的光线时就会发生这种情况。

出现这种情况的原因可能是相对于传感器大小来说,像圈太小了,或者因为光线不会像在传感器中心那样以直角射入传感器。这意味着边缘像素的灰度值较低。

Using the BslVignettingCorrectionMode parameter, you can turn the correction on and off.

示例代码#

// Turn vignetting correction on
camera.BslVignettingCorrectionMode.SetValue(BslVignettingCorrectionMode_On);
INodeMap& nodemap = camera.GetNodeMap();
// Turn vignetting correction on
CEnumParameter(nodemap, "BslVignettingCorrectionMode").SetValue("On");
// Turn vignetting correction on
camera.Parameters[PLCamera.BslVignettingCorrectionMode].SetValue(PLCamera.BslVignettingCorrectionMode.On);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
/* Turn vignetting correction on */
errRes = PylonDeviceFeatureFromString(hdev, "BslVignettingCorrectionMode", "On");
CHECK(errRes);
# Turn vignetting correction on
camera.BslVignettingCorrectionMode.Value = "On"

You can also use the pylon Viewer to easily set the parameters.