In most cases, a sharp image is a prerequisite for a robust inspection. In the z-direction (towards and away from the camera), only a small area is in focus within certain limits: the depth of field is the area of the object in depth away from the camera and lens that appears sufficiently sharp in the video image generated by the camera.
A sharp image impression is given up to approximately one pixel of image blur, but should be as small as possible for measurement applications. It is important for the inspection application that all features to be inspected are within this depth of field.
Calculating depth of field
The exact calculation of the expansion of the depth of field is somewhat more complex. Therefore you can find a complete calculation tool for the depth of field in the "Service" area. The formula used with explanations can be found at the end of this page.
Faktors for depth of field
In case of a completely pre-set camera system with fixed mechanic dimensions and already selected components, only the lens aperture has an influence on the field of depth: if the user closes the aperture of the lens, the field of depth in the image is increased. A higher focal ratio, however, results in a longer exposure time. The international aperture scale is arranged in such a way that each step means halving or doubling the exposure time.
Image 1: F-stop 1.4, 0.16ms
Small depth of field , but short exposure time of 0,16ms .
Image 2: F-stop 16, 20ms
Large depth of field, but a long exposure time of 20 ms for the same brightness was needed .
Fundamentals of depth of field
In our example, the lens has been focused so that object y1 is sharply captured as image y'1 on the sensor. An object closer to the optics creates a focus point that is behind the sensor (refocusing to this working distance would actually move the lens group away from the sensor to create a sharp image again).
It therefore produces a blurred image on the sensor (image plane), the ideally sharp pixel is blurred into a larger spot of light called the blur circle. However, the resulting blur is only perceived when the diameter of the blur circle becomes larger than the camera pixel and its image information is imaged onto neighbouring pixels.
By stopping down the lens, the light path is artificially vignetted and the blur circle on the image sensor becomes smaller. Objects y1 and y2 can now be much further apart to produce the same blur circle as in figure a).
Different f-stop - different depth of field
The depth of field is greater...
the further away the test object is (similar, almost parallel light beams for both imaging cases)
the smaller the focal length of the optics, the smaller the sensor, as this requires smaller focal lengths.
the smaller the aperture / the larger the f-stop number (see illustrations)
the larger the camera pixels: The blur circle can be larger before it becomes noticeable as a negative effect on neighbouring pixel structures.
Formulae to calculate the depth of field
The exact calculation of the expansion of the depth of field requires several individual calculations. The formulae used here are based on the publication by Greenleaf, Allen R., Photographic Optics, The MacMillan Company, New York, 1950, p. 25-27.
However, these are only simple approximate equations, just like any other equations published on this topic. Image sharpness and depth of field are strongly influenced by the optic design and the optical errors. An unsharpness of the image points is additionally caused by chromatic and spherical aberration, coma and astigmatism and can make up one entire pixel already in case of very small camera pixels.
Hyperfocale distance:
SIt refers to the object distance at which objects lying in the infinite can only just be depicted with an acceptable unsharpness if precisely this object distance is focused. Then the field of depth stretches from half the hyperfocal distance to the infinite. First the hyperfocal distance must be calculated:
H= (f´* f´) / (N * c) + f´
Minimum focus distance for acceptable image sharpness:
a near= a (H - f´) / (H + a - 2* f´)
Maximum focus distance for acceptable image sharpness:
a far= a (H - f´) / (H-a)
Total depth of field:
a near - a far
H
Hyperfocal distance in mm
a near
Minimum focus distance for acceptable image sharpness in mm
a far
Maximum focus distance for acceptable image sharpness in mm
a
Object distance
f´
Focal length of the lens in mm
N
Focal ratio of the optics
c
Blurred spot in mm, typically double pixel size
Need to buy the perfect lens?
Vision-Doctor.com is a private, independent, non-commercial website project without customer support.