AI Vision Solutions &
Embedded Systems Engineering

What does an AI-powered video camera consist of — Part 2: 

Lens in AI Vision Cameras.

Introduction

A lens is an optical system that forms an image and projects it onto the surface of the image sensor.

A camera lens consists of several key elements (see picture above):
▪️ optical lens elements that focus light onto the sensor
▪️ aperture (iris) that controls the amount of light
▪️ zoom mechanism that adjusts the focal length and field of view
▪️ lens mount that provides a mechanical connection to the camera
▪️ housing that ensures precise alignment and protection of all components

The quality of the lens directly affects:
▪️ system resolution
▪️ accuracy of computer vision algorithms
▪️ geometric distortions
▪️ camera sensitivity
▪️ depth of field

AI Vision systems place high demands on optics because machine vision algorithms are sensitive to distortions, noise, and loss of detail. To select the correct lens, it is necessary to understand the main parameters:
▪️ Focal Length
▪️ Iris, Aperture, F-number
▪️ Sensor Format
(sensor size)
▪️ Lens mount types
▪️ Lens resolution
▪️ Distortion
▪️ Depth of Field
▪️ IR correction

Focal Length

Focal length determines the field of view of the camera, measured in millimeters and is usually denoted by the letter f .

Types of Lenses by Focal Length Control

Depending on the ability to change focal length, lenses can be:

▪️ Fixed (prime lenses) - Have a single, constant focal length.

▪️ Varifocal lenses - Allow manual adjustment of the focal length.

▪️ Motorized (zoom lenses) -Varifocal lenses with an electric motor that allows remote adjustment of the focal length.

Formulas for calculating

The formula for calculating the field of view angle for an ideal lens is:
Field of view calculation formula for camera lens showing relation between sensor size and focal length
Where:
α — field of view angle (degrees)
d — sensor size (mm)
f — focal length (mm)

Field of View Calculator
α — Field of View: °
Also easily calculate the width and height of the scene using the following formulas:
Where:
W — scene width (m)
L — distance to scene (m)
d — sensor size (mm)
f — focal length (mm)

Where:
H — scene height (m)
L — distance to scene (m)
d — sensor size (mm)
f — focal length (mm)

Scene Coverage Calculator
Width: m
Height: m

Lens Types by Field of View

▪️ Telephoto lenses (10–45° diagonal FOV)
Lenses with a large focal length that provide a narrow field of view and allow magnification of distant objects.

▪️ Normal lenses (45–60° diagonal FOV)
Close to the way the human eye perceives space, providing a natural perspective without noticeable distortion.

▪️ Wide-angle lenses (60–90° diagonal FOV)
Provide a wide field of view, allowing the camera to capture a larger area of the scene.

▪️ Ultra-wide lenses / Fish-eye (up to 180° diagonal FOV)
Provide an extremely wide field of view and create strong barrel distortion.
Illustration explaining focal length, angle of view and scene width in machine vision camera optics

Approximate Horizontal Field of View for Different Sensors and Lenses

Typical Lens Focal Lengths and Field of View

The shorter the focal length, the wider the field of view. For AI Vision applications this is important.

Wide angles are commonly used for:
▪️ surveillance
▪️ robotics
▪️ smart retail
Narrow angles are typically used for:
▪️ LPR (license plate recognition)
▪️ inspection systems
▪️ long-distance detection
Focal Length 1/4" Sensor 1/2.8" Sensor 1/2.3" Sensor 1/1.8" Sensor
2.8 mm ~84° ~96° ~108° ~120°
4 mm ~63° ~73° ~84° ~95°
6 mm ~45° ~52° ~63° ~74°
8 mm ~34° ~40° ~49° ~58°
12 mm ~23° ~28° ~35° ~43°
16 mm ~17° ~21° ~26° ~32°
25 mm ~11° ~14° ~17° ~22°
Focal Length Field of View Typical Use
2.8 mm Very Wide Room monitoring, retail analytics, indoor security cameras
4 mm Wide General surveillance, office cameras
6 mm Medium Entrances, corridors, building monitoring
12 mm Narrow Parking lots, perimeter security
25 mm Telephoto Long distance monitoring, license plate recognition

Aperture (Iris), F-number

The lens speed (light transmission) indicates how much the light flux is reduced after entering the lens. This parameter is affected by the diameter of the aperture (Iris) opening, the quality of the lenses (transparency), and several other optical characteristics.

The aperture number, or F-number, is the result of dividing the focal length of the lens (f, mm) by the diameter of the effective aperture (Iris) opening.

Typical aperture values used in machine vision and security cameras.

Aperture Characteristics Typical Use
F1.4 High light transmission Low-light surveillance, night monitoring, indoor AI cameras
F2.0 Good sensitivity General purpose security cameras, indoor monitoring
F2.8 Standard Machine vision systems, industrial cameras
F4 Large depth of field Outdoor monitoring, scenes requiring large depth of field
The smaller the F-number, the better the lens collects light, meaning that more light reaches the image sensor. Under low-light conditions, a lens with a smaller F-number usually produces a higher-quality image. As the F-number increases, the depth of field increases. Typically, a lens with a low F-number is more expensive than a lens with a higher F-number.
Small F-number:
▪️ more light
▪️ better performance in low light
▪️ smaller depth of field
Large F-number:
▪️ greater depth of field
▪️ better suited for machine vision

Types of Iris

The iris can be fixed or adjustable. In the case of an adjustable iris, it can be controlled automatically or manually.

Fixed Aperture (Iris) and Electronic Aperture

The simplest option is where the aperture diameter does not change or physical iris is not present. In cameras with this type of aperture, exposure is controlled using exposure time and sensor gain.

Used in:
▪️ M12 board lenses
▪️ compact AI cameras
▪️ low-cost embedded cameras

Advantages:
▪️ simple design
▪️ low cost
▪️ high reliability

Disadvantages:
▪️ does not adapt to lighting conditions
▪️ possible overexposure or dark frames

Manual Iris

The aperture is adjusted manually by rotating a ring on the lens, which opens or closes the aperture.

Used in:
▪️ machine vision systems
▪️ industrial inspection
▪️ laboratory cameras

Advantages:
▪️ precise depth of field adjustment
▪️ stable imaging parameters

Disadvantages:
not suitable when lighting conditions change, such as in outdoor surveillance.

Auto Iris

Video Iris
The regulation is performed using an analog signal inside the lens. 
The lens system measures brightness and controls the aperture.
This type was commonly used in older analog cameras.

DC Iris
The most common type. The measurement and control circuitry is located inside the camera. The camera ISP analyzes the scene brightness and adjusts the aperture opening. The aperture is controlled through: DC motor and controller
Automatically regulates the amount of incoming light.
The aperture size changes automatically using an electric actuator depending on the lighting level.

Used in:
▪️ CCTV
▪️ outdoor cameras
▪️ surveillance systems

Automatically controlled iris systems are divided into two types: DC iris and Video iris.
In both cases, the aperture is controlled using the video signal or its derivative.
The difference between these types lies in the location of the circuitry that converts the video signal into a control signal for the actuator.

P-Iris (Precision Iris)

A more modern standard for precise automatic aperture control. The system uses a P-Iris lens equipped with an electric actuator and specialized software. The system compensates for the limitations of traditional auto iris systems.
Improving:
▪️ contrast
▪️ sharpness
▪️ resolution

Advantages:
▪️ precise control
▪️ optimal depth of field
▪️ improved image quality
P-Iris is commonly used in:
▪️ professional IP cameras
▪️ high-end surveillance systems
▪️ AI Vision precision cameras

Format of sensors

It is important to select the correct lens size for a camera sensor. Each lens is designed for a specific sensor format.
▪️ If a lens is designed for a smaller sensor, vignetting occurs — the image becomes darker at the corners (see left illustration).
▪️ If a lens is designed for a larger sensor, the effective field of view becomes smaller, and part of the image falls outside the sensor and is lost (see right illustration). In this case, the image appears zoomed-in, and focusing issues may occur.

Common Image Sensor Formats and Physical Dimensions

Sensor Format Width (mm) Height (mm) Diagonal (mm) Typical Use
1/4" 3.6 2.7 4.5 Budget security cameras, IoT cameras
1/3" 4.8 3.6 6.0 Legacy surveillance systems
1/2.8" 5.6 3.1 6.5 Modern AI cameras, Sony IMX415 class sensors
1/2.3" 6.3 4.7 7.7 Action cameras, compact cameras
1/1.8" 7.2 5.4 9.0 Industrial machine vision cameras
1/1.2" 10.7 8.0 13.4 High-end machine vision and automotive cameras

Example

The Sony IMX415 sensor has a 1/2.8" format, so the lens must support 1/2.8" or bigger.

Recommended lens formats are usually specified in the sensor datasheet (for example, Sony IMX902).

Using Larger Format Lenses

If you cannot find a suitable lens for your sensor format, you can use a lens designed for a larger format. However, you will need to use Extension Tube (distance rings) to increase the distance between the lens and the sensor.

This is required to: reduce the zoom effect, achieve correct focus
Extension Tube are available in different thicknesses, from 0.5mm, 2 mm, 5 mm, 8 mm, 10 mm to 50mm
They can be combined to achieve the desired image size and focus.

Standard Lens Mount Types

Comparison of M12, CS-mount and C-mount lenses used in machine vision and AI cameras
There are three main lens mount standards:
▪️ S-mount (M12)
▪️ C-mount
▪️ CS-mount

S-mount / M12 (Board Lens)

The S-mount (M12) standard is used in compact and mini dome cameras.

Features
▪️ M12 thread
▪️ compact size
▪️ low cost
▪️ widely used in IP cameras and embedded vision

Disadvantages
▪️ limited optical quality
▪️ strong distortion at wide angles

C-mount and CS-mount

It's standard for industrial machine vision.
C-mount and CS-mount mounts look identical and both have a 1-inch thread with 32 threads per inch (TPI).
The CS-mount is an improved version of the C-mount standard.
This standard supports large sensors: 4/3", 1", 1/1.8", 1/2.8", 1/3".

The difference between these mounts lies in the distance from the lens to the image sensor:
▪️ C-mount = 17.526 mm
▪️ CS-mount = 12.5 mm

Due to the identical thread, the lenses are mechanically compatible but not optically compatible.
A C-mount lens can be used with a CS-mount camera by using a 5 mm tube (C-to-CS adapter), which is typically included with the camera. In the opposite direction, the lenses are not compatible.

Advantages
▪️ high optical precision
▪️ low distortion
▪️ support for large sensors

Disadvantages
▪️ higher cost
▪️ larger size

Lens Resolution

Lens resolution is the ability of the optics to transfer fine image details to the sensor. If the lens has insufficient resolution, it becomes a bottleneck of the entire system, and the sensor cannot utilize its full number of pixels.

As a result:
▪️ the image appears soft
▪️ fine details are lost
▪️ the accuracy of computer vision algorithms decreases

The lens must match the resolution of the sensor. The smaller the pixel size, the higher the requirements for the lens.
If the lens is insufficient, optical blur occurs, and the sensor cannot achieve its actual resolution. Therefore, for “megapixel” cameras, lenses with resolution equal to or higher than the sensor resolution must be used.

Lens resolution is measured in line pairs per millimeter (lp/mm). A line pair consists of a pair: one black line and one white line. If a lens can resolve 100 lp/mm, it means it can distinguish 200 individual lines per 1 mm. To fully utilize the sensor capabilities, the lens resolution must correspond to the pixel size.

The maximum spatial frequency is determined by the Nyquist criterion, where pixel size is expressed in millimeters:

Example

Sony IMX415, pixel size is 1.45 µm = 0.00145 mm, substituting:
This means that the sensor is capable of resolving details up to approximately 345 lp/mm.

Most compact lenses have the following resolution:
▪️ low-cost M12 is 80–120 lp/mm
▪️ good M12 is 150–200 lp/mm
▪️ industrial C-mount is 200–300 lp/mm

Therefore, if a low-cost M12 lens is used with an IMX415 sensor, the situation is as follows:

sensor capability = 345 lp/mm
lens capability = 120 lp/mm

This means that the actual system resolution will be three times lower, i.e. 120 lp/mm.

Optical Distortion

Most wide-angle lenses have distortion — distortion (from Latin distorsio, distortio — curvature).

Distortion is an aberration of optical systems in which the linear magnification factor changes as the imaged objects move away from the optical axis. As a result, the geometric similarity between the object and its image is violated.

Types

Barrel distortion — the image appears “convex”.
Barrel distortion occurs when the actual field of view is wider than the calculated one.

Pincushion distortion — the image appears “concave”.
Pincushion distortion occurs when the actual field of view is narrower than the calculated one.

For AI Vision, this is critical because:
▪️ scene geometry is distorted
▪️ detection accuracy decreases

Usually, distortion is reduced using camera calibration and distortion correction.
Sony IMX415, pixel size is 1.45 µm = 0.00145 mm, substituting:

Depth of Field

Depth of field defines the range of distances within which the image remains sharp, clear, and not blurred. Depth of field is the distance in front of and behind the focus point within which objects appear sharp. Depth of field is important, for example, in parking monitoring, where it may be necessary to read license plates at distances of 20, 30, and 50 meters.

It depends on: focal length, aperture, distance to the object, sensor size.

A large focal length, a wide aperture, or a small distance between the camera and the object limit the depth of field. For machine vision, maximum depth of field is often required so that objects at different distances remain sharp.

Approximate Horizontal Field of View for Different Sensors and Lenses

The field of view of a camera depends on both the focal length of the lens and the size of the image sensor. The table below shows approximate horizontal field of view values for common sensor formats and focal lengths used in AI vision and security cameras.

Common Image Sensor Formats and Physical Dimensions

Focal Length 1/4" Sensor 1/2.8" Sensor 1/2.3" Sensor 1/1.8" Sensor
2.8 mm ~84° ~96° ~108° ~120°
4 mm ~63° ~73° ~84° ~95°
6 mm ~45° ~52° ~63° ~74°
8 mm ~34° ~40° ~49° ~58°
12 mm ~23° ~28° ~35° ~43°
16 mm ~17° ~21° ~26° ~32°
25 mm ~11° ~14° ~17° ~22°
Sensor Format Width (mm) Height (mm) Diagonal (mm) Typical Use
1/4" 3.6 2.7 4.5 Budget security cameras, IoT cameras
1/3" 4.8 3.6 6.0 Legacy surveillance systems
1/2.8" 5.6 3.1 6.5 Modern AI cameras, Sony IMX415 class sensors
1/2.3" 6.3 4.7 7.7 Action cameras, compact cameras
1/1.8" 7.2 5.4 9.0 Industrial machine vision cameras
1/1.2" 10.7 8.0 13.4 High-end machine vision and automotive cameras
Image sensor formats such as 1/2.8″ or 1/1.8″ are historical optical designations. The table below shows the actual physical dimensions of common image sensor formats used in AI vision, security cameras, and machine vision systems.
Result:

Field of View Calculator

α — Field of View: °
Scene Coverage Calculator
Width: m
Height: m
Field of View Calculator
Horizontal FOV: °
Vertical FOV: °
Diagonal FOV: °
Camera Lens Calculator
Field of View
Horizontal FOV: °
Vertical FOV: °
Diagonal FOV: °
Scene Coverage
Scene Width: m
Scene Height: m

© 2019-2026. ATEH.tech — Engineering Team
AI Vision Solutions &
Embedded Systems Engineering

All rights reserved.
All trademarks are the property of their respective owners.

Georgia, Tbilisi
+995 (591) 93-83-18
[email protected]