# Depth of Focus

## Introduction

Depth of Focus is a term used to describe the distances where an object is deemed to be within focus. If the object is too close or too far it falls out of focus.

In this article, we will describe the basic principles of Depth of Focus, and also learn how to apply these principles for the Zivid cameras.

## What do we mean by focus?

Focus is typically defined by what is called the *Circle of Confusion*, or CoC for short.
The CoC is the radius, or area, covered by light from a point as it hits the imaging sensor after passing through the camera lens.
Typically, an object is deemed out of focus when the CoC is so large that it covers more than one pixel.
The net effect is that the signal power is lost from the target pixel to neighboring pixels as noise.
This causes the target and its neighbors to have a lower signal to noise ratio.
When the aperture is sufficiently large, objects that are too close will be focused in front of the image sensor and blur into neighboring pixels.
Similarly, objects that are too far behind the focus plane will be focused behind the image sensor and blur into neighboring pixels.
See the illustration below.

The Depth of Field is defined as the distance range where an object is deemed to be in focus. The boundaries are defined by the near focus distance, \(d_{near}\), and the far focus distance, \(d_{far}\). Outside these boundaries, the CoC grows such that the light from that point begins to spread into the neighbor pixels.

The angles at which the lens refracts the light rays grow with the aperture size. For Zivid 3D cameras, this means that objects in the scene lose focus when the aperture is too large. At the same time, this reduces the SNR and makes the point cloud noisier. Therefore, it is essential to carefully select the apertures suitable for the camera’s working distance for optimal image quality.

## How does focus affect my point cloud?

As the image gets more out of focus, artifacts such as noise and Contrast Distortion will increase. When we speak about noise, we are talking about the point precision of the point cloud. This means that the capture-to-capture variations of a given pixel will increase and that the pixel-to-pixel variation within for a given capture will increase. It is important to be aware that a slight increase in noise may still be acceptable. It all depends on the algorithm that is going to process the point cloud afterward. For this reason, it is more often than not, acceptable to have an unfocused image.

Note

Zivid cameras are very robust against defocus!

It is also important to note that only the image regions that are out of focus will be affected. Consider the working distance of the camera for the given application to achieve good point clouds with optimal precision.

Depth of Focus for Zivid Cameras

### Zivid One+ Small

Zivid One+ Small |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|

\(f\) -number |
\(f/1.4\) |
\(f/2\) |
\(f/2.8\) |
\(f/4\) |
\(f/5.6\) |
\(f/8\) |
\(f/11\) |
\(f/16\) |
\(f/22\) |
\(f/32\) |

Stops |
+4 |
+3 |
+2 |
+1 |
0 |
-1 |
-2 |
-3 |
-4 |
-5 |

Focus, near (mm) |
480 |
470 |
460 |
450 |
430 |
400 |
380 |
340 |
300 |
250 |

Focus, far (mm) |
520 |
530 |
540 |
570 |
600 |
650 |
750 |
950 |
1350 |
5500 |

Depth of Field (mm) |
40 |
60 |
80 |
120 |
170 |
250 |
370 |
610 |
1050 |
5250 |

### Zivid One+ Medium

Zivid One+ Medium |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|

\(f\) -number |
\(f/1.4\) |
\(f/2\) |
\(f/2.8\) |
\(f/4\) |
\(f/5.6\) |
\(f/8\) |
\(f/11\) |
\(f/16\) |
\(f/22\) |
\(f/32\) |

Stops |
+4 |
+3 |
+2 |
+1 |
0 |
-1 |
-2 |
-3 |
-4 |
-5 |

Focus, near (mm) |
925 |
900 |
850 |
800 |
750 |
650 |
600 |
500 |
425 |
350 |

Focus, far (mm) |
1100 |
1150 |
1200 |
1300 |
1500 |
1900 |
2800 |
13000 |
Inf 1 |
Inf 1 |

Depth of Field (mm) |
175 |
250 |
350 |
500 |
750 |
1250 |
2200 |
12500 |
Inf 1 |
Inf 1 |

### Zivid One+ Large

Zivid One+ Large |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|

\(f\) -number |
\(f/1.4\) |
\(f/2\) |
\(f/2.8\) |
\(f/4\) |
\(f/5.6\) |
\(f/8\) |
\(f/11\) |
\(f/16\) |
\(f/22\) |
\(f/32\) |

Stops |
+4 |
+3 |
+2 |
+1 |
0 |
-1 |
-2 |
-3 |
-4 |
-5 |

Focus, near (mm) |
1700 |
1600 |
1500 |
1350 |
1200 |
1000 |
900 |
700 |
500 |
400 |

Focus, far (mm) |
2400 |
2600 |
3000 |
3750 |
5700 |
29000 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |

Depth of Field (mm) |
700 |
1000 |
1500 |
2400 |
4500 |
28000 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |

### Zivid Two M70

Zivid Two M70 |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|

\(f\) -number |
\(f/1.4\) |
\(f/2\) |
\(f/2.8\) |
\(f/4\) |
\(f/5.6\) |
\(f/8\) |
\(f/11\) |
\(f/16\) |
\(f/22\) |
\(f/32\) |

Stops |
+4 |
+3 |
+2 |
+1 |
0 |
-1 |
-2 |
-3 |
-4 |
-5 |

Focus, near (mm) |
570 |
530 |
480 |
420 |
370 |
300 |
250 |
190 |
150 |
110 |

Focus, far (mm) |
900 |
1040 |
1280 |
1990 |
7630 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |

Depth of Field (mm) |
330 |
510 |
800 |
1570 |
7260 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |

### Zivid Two L100

Zivid Two L100 |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|

\(f\) -number |
\(f/1.4\) |
\(f/2\) |
\(f/2.8\) |
\(f/4\) |
\(f/5.6\) |
\(f/8\) |
\(f/11\) |
\(f/16\) |
\(f/22\) |
\(f/32\) |

Stops |
+4 |
+3 |
+2 |
+1 |
0 |
-1 |
-2 |
-3 |
-4 |
-5 |

Focus, near (mm) |
755 |
680 |
605 |
520 |
430 |
350 |
280 |
210 |
160 |
120 |

Focus, far (mm) |
1480 |
1870 |
2870 |
14290 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |

Depth of Field (mm) |
730 |
1190 |
2260 |
13770 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |
Inf 1 |

## Depth of Focus Calculator

By using Zivid’s depth of focus calculator, it is possible to find the recommended max aperture based on the working distance and acceptable blur radius. Keep in mind, getting sharp images in the region of interest is one of many things needed for optimal point cloud quality, but it is not a hard constraint. As mentioned above, Zivid 3D technology is very resilient to blur and defocus. It will still be able to provide good point clouds even if the image appears out of focus, though they can be a little noisier.