Calibrating shading and white balance

Many JAI cameras have a built-in shading compensation, which can be calibrated to compensate for lens vignetting, uneven lighting and the slight variation of sensitivity on the sensor surface.

For some of the color cameras, it is even possible to choose between different versions of the shading compensation. Please see the specific camera manual for a description of these.

Our recommended calibration procedure is as follows:

  • Configure the camera system with lens and light as similar as possible to the actual scene, which must be inspected.
  • Set the exposure time, gain and black level to the same values which should be used in the system.
  • Replace the scene with a flat white target.
  • The white target should now be at a digital level of about 220 grey levels at 8 bit, most importantly with no saturation.
  • Defocus the lens (to make sure that the white target texture does not affect the result).
  • Run the shading compensation calibration function on the camera.
  • Inspect the result – the image out of the camera should be flat.



Most of the color cameras have a digital gain based white balance. To calibrate this, keep the camera and white target in place, and run the white balance feature. The white balance calibration may have slightly different names, depending on the camera model.

Most of the newer camera models use the feature name “Balance White Auto”, which can be “off”, “once”, or “continuous”. In most cases, run “Balance White Auto” – “Once”, which will calibrate the white balance to the current light and white target. The gain settings for the color channels will then be set once, and can be stored with the other camera settings as a “user set”.



Products: AM-series, AB-series, SP-series, AD-series, AT-series, GO-series.

Tags: Shading correction, Flat-field correction, FFC

Have more questions? Submit a request


Please sign in to leave a comment.