Vignetting Correction (dart E)#
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#
/* 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);
You can also use the pylon Viewer to easily set the parameters.