Basics of Lens Selection and the Effects
Image processing is the process of detecting changes in pixel density data through calculation. As such, stable detection requires projection of a clear image. The lens selection plays an important role in determining the performance of image processing–based inspection. This section introduces the basic knowledge required for selecting the correct lens.
Typical Procedure For Image Processing
Image processing roughly consists of the following four steps.
1. Capturing An Image
Release the shutter and capture an image
2. Transferring the image data
Transfer the image data from the camera to the controller
3. Enhancing the image data
Pre-process the image data to enhance the features
4. Measurement processing:
measure flaws or dimensions on the image data
Measure and output the processed results as signals to the connected control device (PLC, etc.)
Image processing flow chart
Many vision sensor manufacturers focus on explaining Step 3, “Processing the image data”, and emphasize the processing capability of the controller in their catalogs. Step 1, “Capturing an image”, however, is the most important piece for accurate and stable image processing. The key to making Step 1 a success is proper selection of a lens and illumination system. This basic guide details how to successfully capture an image by selecting a suitable lens.
Application example: Detecting foreign objects/flaws inside of a cup
Q: When detecting foreign objects/flaws inside of a cup, which of the following two images is more suitable for detecting small defects over the entire inspection area?
A: The image on the right
Because the cup is tall, it is difficult to get both the top and bottom in focus
Entirely focused image from the top to the bottom of the cup
It will be difficult to consistently detect the defects in the image on the left, even if a high-performance controller is used. With the right combination of knowledge, it will be easy to create a highly focused image like the image on the right.
Clear images are the most important part of image processing.
The following three points are essential for high-accuracy, stable inspection.
Lens basics and selection methods
A camera lens consists of multiple lenses, an iris diaphragm (brightness) ring and a focus ring.
The iris diaphragm and focus should be adjusted by an operator looking at the camera's monitor screen to make sure the image is “bright and clear”.
（Some lenses have fixed adjustment systems）
Focal length and field of view(FOV) of lenses
Focal distance is one lens specification. Typical lenses for factory automation have focal length of 8 mm/16 mm/25 mm/50 mm. From the necessary field of view of the target and the focal length of the lens, the WD (working distance) can be determined.
The WD and FOV size are determined by the focal length and the sensor size. When NOT using a close up ring, the following proportional expression can be applied.
Focusing an image with a large depth of field (range in which a lens can focus on objects)
1. The shorter the focal length, the larger the depth of field
2. The longer the distance from the lens to the object, the larger the depth of field
→Close up rings and macro lenses make the depth of field smaller
3. The smaller the aperture, the larger the depth of field
→A small aperture and bright illumination make focusing easy
What is distortion?
Distortion is the ratio of change between the center and edge areas of a captured image. Due to the aberration of the lens, the distortion is more noticeable at the edges of a captured image. There are two types of distortion: barrel distortion and pincushion distortion. The general rule is that when the absolute value of the distortion value is small, the lens offers higher accuracy. Lenses with smaller distortion should be used for dimension measurement, for example. Lenses with a long focal length generally have smaller distortion.