Skip to content

Vignetting Correction (dart E)#

The Vignetting Correction camera feature allows you to remove vignetting artifacts from your images.

Info

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

Using the Feature#

Vignetting means a darkening of the corners of an image compared to its center. It is a common effect in digital imaging and occurs when the pixels at the edges of the sensor don't receive sufficient light.

This can happen, e.g., because the image circle is too small in relation to the size of the sensor or because the light rays don't hit the sensor at right angles like they do at the center of the sensor. This means that the pixels at the edges have lower gray values.

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

Sample Code#

// 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.