Edmund Optics uses cookies to optimize and enhance the features and content on our website. By continuing to use this website, you consent to our use of cookies.

# Contrast

This is Section 2.3 of the Imaging Resource Guide

Contrast describes how well black can be distinguished from white at a given resolution on an object. For an image to appear well defined, the black details need to appear black and the white details must appear white (See Figure 1). The more the black and white information trend into the intermediate greys, the lower the contrast at that frequency. The greater the difference in intensity between a light and dark line, the better the contrast. While this may appear obvious, it is critically important.

##### Figure 1: Understanding Contrast: Transition from Black to White is High Contrast while Intermediate Greys Indicate Lower Contrast

The contrast at a given frequency can be calculated in Equation 1, where Imax is the maximum intensity (usually in pixel greyscale values, if a camera is being used) and Imin is the minimum intensity:

(1)$$\text{% Contrast} = \left[ \frac{I_{\text{max}} - I_{\text{min}}}{I_{\text{max}} + I_{\text{min}}} \right]$$

The lens, sensor, and illumination all play key roles in determining the resulting image contrast. Each one can detract from the overall contrast of a system at a given resolution if not applied correctly and in concert with one another.

### Lenses and Contrast Limitations

Lens contrast is typically defined in terms of the percentage of the object contrast that is reproduced when assuming ideal illumination. Resolution is actually somewhat meaningless unless defined at a specific contrast. In the application note, Resolution, the example assumed perfect reproduction on the object, including sharp transitions at the edge of the object on the pixel. However, in reality this is never the case. Because of the nature of light, even a perfectly designed and manufactured lens cannot fully reproduce an object’s resolution and contrast. Even when the lens is operating at the diffraction limit (described in Diffraction Limit), the edges of the dots in Figure 2 will be blurred in the image. This is where calculating a system’s resolution by simply counting pixels loses accuracy, and can even become completely ineffective.

Consider two dots close to each other being imaged through a lens, as in Figure 2. When the spots are far apart (in other words, at a low frequency), the dots are distinct, though both somewhat blurry at the edges. As they approach each other, the blurs overlap until the dots can no longer be distinguished as separate entities. The system’s actual resolving power depends on the imaging system’s ability to detect the space between the dots. Even if there are ample pixels between the spots, if the spots blend together due to lack of contrast, they will not easily be resolved as two separate details. Therefore, the resolution of the system depends on many things, including blur caused by diffraction and other optical errors, the dot spacing, and the sensors ability to detect contrast.

### Contrast Example

The ability to resolve detail is directly related to both a lens’s ability to reproduce contrast and the number of pixels utilized. The images below are of the same test target, but taken by two different lenses using the same number of pixels on the sensor. Both images are cropped from the center of the sensor. Each lens’s ability to reproduce contrast is the determining factor in the performance of the system.

Lens 1 yields a contrast level of 22.6%, while Lens 2 produces a contrast level of 12.7%. This is a 78% difference in performance between the two lenses, even though the systems look somewhat equivalent to the human eye.

It must also be understood that a lens will not necessarily produce the same contrast at the same frequency across the entire FOV. Additionally, contrast levels will change as a lens’s f/# is adjusted. More detail on this can be found in f# (Lens Iris/Aperture Setting), and Limitations on Resolution and Contrast: The Airy Disk.

Lens 1

Lens 2

With over 800 Imaging Lenses and 40 pages of in depth Technical Content, make Edmund Optics Your Partner in Imaging Optics.

Telecentric, fixed focal length, micro-video, fixed magnification, variable magnification, or zoom lenses available. High resolution or large format designs to cover your sensor.

Free training videos with imaging and illumination tips and tricks.

Edmund Optics can not only help you learn how to specify the right imaging optics, but can also provide you with multiple resources and products to surpass your imaging needs.

Need help finding the right product? Have questions on your application? Contact us to discuss your technical questions with our expert engineering staff.

×