Optimizing Image Quality#
To get a focused image, consider the following:
- The lens must be screwed into the lens mount as far as it will go.
- The glass surfaces of the lens must be clean.
- The target object must be within the range of focus of the lens.
Depth of Focus#
If your objects are located at different distances from the camera, you must consider depth of focus. The depth of focus must be sufficiently deep to allow all objects to appear focused.
- Closing the lens aperture (turning the aperture ring to higher f-numbers) increases the depth of focus and vice versa.
- Closing the aperture decreases the amount of light reaching the camera's sensor and therefore results in a darker image.
The following factors determine the brightness of an image:
- Basler recommends the use of bright illumination if possible, but to avoid excessive intensity. This will prevent you from having to operate the camera using extreme camera settings.
- In images acquired from CCD sensors, excessive brightness will cause artifacts such as smear (white stripes in the image) and blooming (local over-saturation that destroys contrast). You can decrease the proneness to smear and blooming by choosing a diffuse and less intense illumination.
- If illumination of sufficient brightness is not available, you can select a lens that is optimized for light utilization.
- Opening the lens aperture allows more light to reach the camera's sensor and therefore increases the brightness of the image.
- Opening the lens aperture also increases the effects of optical aberrations. This causes image distortions and the intensity of light decreases towards the edges of the sensor (vignetting). In addition, the depth of focus decreases.
- You can increase the brightness of the image by increasing the camera's Exposure Time setting. This increases the amount of photons collected for pixel readout.
- Increasing the exposure time setting may decrease the camera's frame rate. If you are acquiring images of moving objects, increasing the exposure time setting may increase motion blur.
- Increasing the camera's Gain setting will also increase image brightness.
- Unless your application requires extreme contrast, you should make sure that detail remains visible in the brightest portions of the image.
- Image noise is increased by increasing gain.
- You can change the brightness of the image by changing the camera's Black Level setting.
- Normally, you should increase the black level setting only as far as is necessary to make detail visible in the darkest portions of an image.
The exposure time setting determines the time interval during which the sensor is exposed to light.
Choose an exposure time setting that takes account of whether you want to acquire images of still or moving objects:
- If the object is not moving, you can choose a high exposure time setting. High exposure time settings may reduce the camera's maximum allowed acquisition frame rate and may cause artifacts to appear in the image.
- If the object is moving, choose a low exposure time setting to prevent motion blur. As a general rule, choose a short enough exposure time to make sure that the image of the object does not move by more than one pixel during exposure.
Gain amplifies each pixel readout by a certain factor. Accordingly, signal and noise are both amplified.
- Increasing gain will increase the image contrast.
- Increasing gain will increase the image brightness. Unless your application requires extreme contrast, make sure that detail remains visible in the brightest portions of the image when increasing gain.
Strong contrast in an image is obtained when objects of different brightnesses are represented by strongly different gray values. For most applications, optimum contrast is achieved when the image displays a wide range of gray values with fine detail remaining visible even in the darkest and brightest parts of an image. Some applications, however, may require extreme contrast.
- You can increase the contrast in the image by increasing the camera's gain setting. Gain amplifies the pixel readout.
- High black level settings will prevent high contrast. Basler recommends not to exceed a black level setting of 64 (at greater than 8 bit output).
- In images acquired from CCD sensors, contrast can be destroyed by local over-saturation (blooming) if the image brightness is too high. You can decrease the proneness for smear and blooming by choosing a diffuse and less intense illumination.
- Closing the lens aperture not only decreases image brightness but also increases contrast towards the edges of an image.
- If you must use insufficient illumination resulting in dark images, you may notice the blurring influence of noise. If you operate the camera near the top end of its specified temperature range, the effects may be particularly noticeable. You can increase contrast by lowering the operating temperature of the camera. Note that it is not possible to improve the signal-to-noise ratio by increasing gain. Increasing the gain will increase both signal and noise in equal proportions.
- If you are using a color camera, the object that you use when adjusting the white balance should be a uniform gray and should fill the camera's entire field of view. Your white balance will be correct when images of this object show a uniform gray.
- Changing the black level setting will also change the white balance. Basler therefore recommends that you check the white balance after setting the black level.
- Make sure the image is neither underexposed nor overexposed when checking the white balance.