Skip to content

Vignetting Correction (pylon Viewer)#

The Vignetting Correction feature in the pylon Viewer allows you to remove vignetting artifacts with a single click.

This feature is available on selected cameras only. Check the Vignetting Correction topic to find out whether your camera supports this feature.

How It Works#

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.

To remove these vignetting artifacts, the Vignetting Correction feature uses an algorithm that calculates a multiplier to bring the lower-than-expected gray values up to normal levels. The correction data is saved in the camera and can also be downloaded to use it on a different camera. Use the File Access option in the Camera menu to do this.

Performing Vignetting Correction#

Info

  • For best results, disable all non-linear features, e.g., light source presets or gamma, before creating the correction data. Afterwards, you can enable them again.
  • On color cameras, select a Bayer pixel format before creating the correction data. Once you have created the correction data, you can select any pixel format.
  • When performing vignetting correction, it is important that the generated reference image shows only a moderate darkening of the corners compared to its center.
  • Vignetting is influenced by the lens used, the aperture, and the focal length. If you change the lens, the aperture, or the focal length, you must create a new set of vignetting correction data.

To perform vignetting correction:

  1. Open the camera if you have not already done so.
  2. Select a Bayer pixel format.
  3. Place a white sheet of paper in the camera's field of view.
    This allows for a homogeneous illumination of the scene.
  4. Stop continuous image acquisition if it is currently enabled.
  5. Click Camera > Vignetting Correction.
    The algorithm creates the correction data and captures an image with the correction data applied.

Messages about the result will be displayed in the Message Log pane. Among other information, this will give you an error value. This is an indication of the degree of correction achieved. The closer the error value is to zero, the more effective the vignetting correction has been.

Downloading and Uploading Vignetting Correction Data#

You can download vignetting correction data from a camera and upload it to a different camera.

To download vignetting correction data:

  1. Perform vignetting correction as described above.
  2. On the camera that you have performed the vignetting correction on, click Camera > File Access.
    The camera must be open.
  3. In the Camera File Access dialog, select Vignetting Correction in the drop-down list.
  4. Click Download and specify the desired location.
  5. Enter a file name, including a file extension, e.g., .txt, and close the dialog.

To upload vignetting correction data:

  1. On the camera on which you want to upload the correction data, click Camera > File Access.
    The camera must be open.
  2. In the Camera File Access dialog, select Vignetting Correction in the drop-down list.
  3. Click Upload and navigate to the location where you saved the correction data file.
  4. Select the file and click Upload.

To apply the correction data on another camera, execute the VignettingCorrectionLoad command.

Info

  • You should only upload vignetting correction data on cameras with identical specifications to the one on which you created the vignetting correction data, e.g., the sensor size must be the same.
  • Bear in mind that there is a certain variance between individual cameras and lenses, i.e., correction data created on one camera may not completely remove vignetting artifacts on another camera.
  • If the upload fails, the VignettingCorrectionMode parameter in the Features pane will be disabled. If this happens, create a new set of vignetting correction data and repeat the procedure.