Choosing the camera is only half the battle. Without the right lens, even the most sophisticated sensor becomes useless. Yet optics selection is often treated as a secondary concern. That's a mistake that can paralyze system performance or force a costly redesign.
In the previous post we defined how to choose a camera for a vision system. Now we need to complete the set with the right lens. In an earlier article we also discussed which optics parameters to watch. Today we'll dig into each of those parameters and explain how their values affect the image from the camera.
Camera-lens compatibility: system fundamentals
Before we get to optical parameters, let's establish the basic requirements. Your lens must be physically and technically compatible with the camera in three key dimensions:
Sensor size matching
The chosen optics must be rated for at least the same sensor size as your camera. Otherwise the light passing through the lens will insufficiently illuminate the sensor, potentially creating dark corners or vignetting in the resulting image.
The rule is simple: if the camera has a 1" sensor, you can choose a lens rated for a larger 1.2" sensor, but never the other way around. Choosing optics for a smaller sensor than you have guarantees problems.
Mount type
Camera manufacturers offer different series with different lens mounts. The most commonly encountered in industrial applications are C-mount and S-mount. This is purely mechanical compatibility, but it is absolute. There is no workaround if you choose the wrong mount type. Verify this specification before ordering.
Resolution support
Cameras with large sensors produce high-resolution images. Some optics manufacturers specify the maximum resolution their lenses are designed for. This matters because a lens optimized for 2MP won't provide the sharpness required by a 12MP sensor. When resolution specifications are available, pay attention to them — they define the upper limit of detail your system can capture.
Focal length: distance and distortion
Focal length is commonly referred to as "zoom," because it directly determines the working distance required to place the observed object within the camera's field of view (FOV). Photo 1 perfectly visualizes this relationship: the photographs were taken from the same position, with only the lens focal length changed.

Photo 1: visualization of different focal length ranges and their angles of view
In industrial quality control systems, focal length matters for two key reasons:
Working distance from the inspected product
This is fundamental. On production lines, space is at a premium. You rarely have the luxury of positioning the camera far from the product. Moreover, the required distance often defines the final size of the inspection machine — if you need to enclose the vision system in a housing, a longer working distance means a larger, more expensive structure.
That's why 12mm and 16mm focal lengths are the starting points in such applications. For smaller products you can increase this value, but remember the spatial consequences.
Optical distortion
Unfortunately, decreasing focal length has consequences. The shorter the focal length, the greater the optical distortion that appears in the resulting image. The so-called "fisheye" effect is created. Yes, this can be corrected programmatically through image undistortion algorithms, but it is computationally expensive and error-prone.
Key note: some optics manufacturers provide distortion characteristics for their lenses. When this data is available, it is invaluable for system design. You can assess in advance whether the distortion is acceptable for your measurement tolerances, or whether it requires correction in the processing pipeline.
Aperture (F-stop): light, speed and depth
The aperture setting defines how much light passes through the lens and reaches the camera sensor. A more open aperture (lower F number) lets in more light; a closed aperture (higher F number) restricts it. Lenses with low F numbers (wide-open aperture) are commonly called "fast" because they allow faster sensor exposure, enabling faster image capture.
But the aperture controls more than just light and exposure speed. It fundamentally affects depth of field — the range of distances in front of the camera that remain in sharp focus rather than blurred.
Photo 2 perfectly illustrates this relationship: the most open lens (low F number) has the shallowest depth of field, while the most closed aperture (high F number) achieves the greatest depth.

Photo 2: visualization of the relationship between aperture and depth of field
In the context of vision systems, this has critical implications. If your product is always positioned at a fixed, known distance from the lens, the decision is simple: open the aperture to its maximum, set the focus to that specific distance and you're done. An additional advantage of a wide-open aperture is fast sensor exposure, allowing you to minimize exposure time — which often increases the achievable camera FPS.
However, if the product can be positioned at varying distances from the lens, things get complicated. You then have a variable working range for the vision system, and depth of field becomes critical. To increase depth of field, you must close down the aperture, which reduces the amount of light reaching the sensor at the same time.
You can compensate for this in two ways: by increasing exposure time or increasing lighting power. There is also a third option — lenses with programmable focus adjustment, but these are several times more expensive than traditional fixed-focus lenses. In most industrial applications they are not cost-effective unless absolutely necessary.
Practical implications: real trade-offs
Let's be honest — in industrial inspection, each of these parameters translates into specific consequences, and as an engineer you are constantly balancing their trade-offs:
- Short focal length gives a compact system design, but introduces distortion that may require correction.
- Wide aperture provides fast exposure and bright images, but sacrifices depth of field, making the system sensitive to changes in product position.
- Closed aperture gives robustness through depth of field, but requires stronger lighting or slower capture speeds.
Summary
Choosing a lens is not about finding the "best" optics. It is about finding optics that solve your specific problem within your specific constraints. The parameters we discussed — sensor compatibility, focal length and aperture — form the foundation of this decision.
In practice, we often prototype with multiple lens options, testing them in real production conditions with actual product samples. Data sheets give you the boundaries; empirical testing reveals which combination provides the image quality and system robustness required by your application.
