Depth of field is defined as the range of object distances in which objects are imaged with acceptable sharpness. It represents the portion of the specimen which is in focus and it is determined by the camera-to-object distance, the lens f-number or aperature, the lens focal length, and the format size or circle of confusion criterion. The following relationships exist:
For most visual inspection applications, it is desireable to have the deepest or greatest depth of field where possible without sacrificing resolution. A greater depth of field allows the inspector to see more objects in greater clarity without having to reposition the camera to the object or the adjustment of the focusing lens. To obtain this, you would use a wide-angle lens, set a small aperture and stand back from the subject. However, in practice wide-angle lenses may not provide enough resolution, small aperatures may not let in enough light, and space constraints may limit the distance from the subject. In most cases, an appropriate compromise is made between all the variables to provide the best overall image.
1The diaphragm opening of the lens.
2A deeper depth of field should be understood as more of the field of view in acceptable focus.