Depth of field box
General information


When using longfocus lenses the depth of field calculation may be necessary.
For example, in the case when one camera is used for the person identification at a short distance and for the person detection at a long distance. At that the sufficient resolution is required in both cases.
With the help of VideoCAD you can:
•  Calculate the view area bounds, in which the resolution is not less than the predetermined value (sharpness area). 
•  Find the optimal focus distance of the camera lens to get the required sharpness area bounds. 
•  Find the resolution in any point in view area with other parameters specified. 
The depthoffield is influence by:
•  Lens focal length. The less focal length is the more is the depth of field. It makes sense to calculate practically the depthoffield in CCTV beginning from the focal length 812 mm when resolution is less than 500800 Lines per picture height (LPH). With less focal lengths the depthoffield is sufficient at the correct lens focusing. 
As a rule with Megapixel cameras we need high optical resolution of lens.Therefore with megapixel cameras the Depth of field distortion can arise with the lesser focal length.
•  Aperture. The more the aperture number is the more is the depthoffield. This dependence is clearly seen when using autoiris lenses. In the dark the diaphragm opens and the depthoffield decreases. 
•  Boundary resolution. I.e. minimum acceptable resolution in the sharpness area. At that we should remember that we won't get better resolution, than other video system components can give. The boundary resolution should not exceed the real resolution of the infocus image. 
•  Focus distance. I.e. minimum distance from the lens to the plane that is perpendicular to the main optical axes, on which the lens is focused. 
In most cases it is impossible to focus practically the lens on the predetermined distance, because the image sensor and monitor resolutions limit the possibility of viewing the maximal resolution at the focus point. Practically we are more interested in the sharpness area bounds. But operating with the focus distance we can calculate these bounds, and then achieve by the practical lens adjusting .
Hyperfocal distance
An important notion is the hyperfocal distance  the closest point of focus at a given aperture, at which infinity falls within the Depth of field.
When the lens is focused on the hyperfocal distance, the sharpness area extends from half the hyperfocal distance to infinity. In this case the sharpness area will have maximum extension.
The hyperfocal distance depends on:
•  lens focal length; 
•  aperture; 
•  boundary resolution. 
In many cases the optimal focus distance is the hyperfocal distance. But there are exceptions when sharpness at a long distance is not required, but shrpness at a distance less than the half of the hyperfocal distance. But there are exceptions, when it is not required the sharpness at a long distance, but the sharpness at a less distance than the half of the hyperfocal distance. In this case it is necessary to focus the lense at the distance less than hyperfocal. At that we lose sharpnes at longer distances and get sharpness at shorter distances.
All these calculations can be performed with the help of the Depth of field calculation box. Calculations for the active camera in the numerical form is possible in any state.
When the depth of field box is visible, next to all cameras in the horizontal projection the following lines are displayed: These lines are calculated according to the depth of field parameters of each camera at the height of depth of field measurement.
If the focus plane or the plane at the hyperfocal distance not intersect the horizontal plane at the height of depth of field measurement within the view area projection, then the focus plane or the plane at the hyperfocal distance are not displayed. 
If the near or the far bound of the sharpness area not intersect the horizontal plane at the height of depth of field measurement within the view area projection, then this bound is not displayed.
The absence of near and far bounds of the sharpness area indicates that the sharpness area completely covers projection of view area, thus the depth of field does not reduce the resolution of the camera.
Depth of Field calculation doesn't take into account Lens distortion.
3D modeling depthoffield and modeling depthoffield depending on scene illumination for auto iris lenses are possible.
See also: Parameters in Depth of field box, Example of Depthoffield calculation, 3D Video main menu>Depthoffield, Checking Depth of Field in horizontal projection