Basics of lens selection
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.
Point
Clear images are the most important part of image processing.
The following three points are essential for high-accuracy, stable inspection.
- Capture a large image of the target
- Focus the image
- Ensure the image bright and clear
Lens basics and selection methods
Lens structure
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.
Working distance : View angle = Focal length : Sensor size
Example 1: When the focal length is 16 mm and the sensor size is 3.6 mm, the WD should be 200 mm to make the field of view 45 mm.
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
Lens distortion
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.
Summary of lens selection and image processing basics
High-quality images are fundamental for image processing. With some is basic knowledge of lens selection:
- The suitable field of view for the target is ensured
- The entire image can be focused
- The contrast between the target and background can be enhanced with a suitable brightness