Selecting the Right Camera Lens for Machine Vision

Selecting a camera lens for your machine vision application is an important decision. Lenses impact the quality of your image. You have to get it right because poor image quality as a result of the wrong lens can’t be fixed with software after-the-fact!Selecting the Right Camera Lens for Machine Vision

The lens typically performs several critical functions that affect your image quality. First off, it defines the level of detail and extent of the area to be captured. In machine vision this is typically referred to on a lens data sheet as the ‘angle of view’ (also called field of view) and is typically normal (what the eye can see), wide-angle (larger field of view that achieves clear images under low light intensity), or telephoto (extreme close-up for far away or small objects).

The angle of view is determined by the focal length (mm) of the lens and the size of the image sensor of the camera (1”, 2/3”, or 1/2”, for example).

The lens also has focusing functions, which include adjusting elements within its assembly and controlling distance from the image sensor. Lens data sheets will usually include a ‘focusing range’ (from the front of the lens) in meters (m); for example: 8 ~ 0.1. Lenses intended for machine vision applications may contain information specifying ‘Objects Dimensions at M.O.D.’ corresponding to specified image sensor sizes. M.O.D. is short for ‘minimum object distance’ and refers to the shortest working distance between the lens and the object that can be focused using the lens’s focus ring. M.O.D. depends on focal length and depth of field. As a result, for example, a lower M.O.D. is expected for wide-angle lenses.

When researching lens options, you’ll also see they can be Fixed, Vari-Focal, or Zoom (often motorized). A fixed lens offers a fixed focal length with only one field of view (normal, wide-angle, or telephoto). Vari-focal means you get a range of focal lengths and different fields of view that can be manually adjusted; however, you must also manually re-focus the lens whenever you change the field-of-view. The difference between a vari-focal lens and a zoom lens is that you don’t have to re-focus the lens if you change the field of view. Focus is maintained within a range of focal lengths and for anything outside that range lens adjustments can be manual or motorized (look for Motorized Zoom feature).

To ensure an image is properly exposed, the lens also functions to control the amount of light that passes through to the sensor. Inside the lens is an adjustable diaphragm which opens and closes to let in light. The diameter of the opening is referred to as the lens aperture and it is given an f-number (f/1.4, f/2, f/2.8, f/4, f/5.6, f/8, etc.), which is the ratio of the focal length of the lens to the size of the aperture. In a nutshell, the f-number tells you not only how much light will pass but how the passing rays are affected. Without getting into a discussion beyond the scope of this post, it is helpful to know that smaller f-numbers let in more light - usually a good choice when rapid movement or a high frame rate is required – but you must take into consideration the ways in which rays are affected at different f-numbers. Longer exposures let in more light – good for low light conditions – but may decrease your frame rate or cause image blurring.

You can quickly see how important the lens is. There is so much to consider when selecting a camera lens for machine vision applications. Remember that lenses are made to work with certain image sensors. You must match the lens to the correct size of the image sensor of the camera (1”, 2/3”, or 1/2”, for example) or it just won’t work. Then let your application and system requirements continue to guide you to select the best lens for what you need to accomplish.