machine-vision

Industry 4.0: Depth of field in machine vision

In machine vision, there are many uses for taking a larger picture of the subject than in general photography.
In the case of such usage, “depth of field” is often talked about. Here, we will explain how to think about the depth of field in machine vision.

Imaging and focusing

In order to obtain an image using a camera, it is necessary to form an image, that is, to form an image of light from an object on an image pickup sensor using a shooting lens. Here, we would like to reconfirm the image formation.

Point imaging and F-number

When imaging with a shooting lens, the basic performance is to “image a point as a point”. As you know, a point is one that “has only a position and no length or area”, but if a light source that can be regarded as a point is imaged with an “ideal lens”, the point will actually appear in the output image from the sensor. Will have brightness only for one pixel, which is an infinitely narrow range. Stars such as Sirius are often compared to point light sources. The sun is relatively close and looks like it has an area, so it cannot be called a point light source.

  1. When the object is a straight line, the image is also a straight line.
  2. When the object is a plane, the image is also a plane.
  3. An image of a plane perpendicular to the optical axis is perpendicular to the optical axis.
  4. The figures in the plane perpendicular to the optical axis and their images are similar to each other.
    However, objects on a plane that is not perpendicular to the optical axis and their images are not necessarily similar.

What is depth of field?

Generally, “depth of field” is explained mainly for photography, but in our technical document, it is explained as follows together with “depth of focus”.

  • The taking lens works to connect an object as an image, but at this time, it is necessary to “image a point as a point”. There is only one point that is intuitively in focus, and you can imagine that the “blurring” increases as you move away from it. However, in an actual camera system, when viewed in the depth direction along the optical axis, the range of focus is not one point, and there is a certain range that can be regarded as not out of focus, which is called “depth of focus”. increase.
  • The “depth of focus” is near the image sensor inside the camera, but there is a certain range on the subject side that can be regarded as not out of focus, and this is called the “depth of field”.

Depth of field and permissible circle of confusion diameter

There is a “permissible circle of confusion diameter” as a variable used when calculating the “depth of field”. The “circle of confusion” here is a circular image when points are imaged by the lens, but the smallest size that cannot be recognized as a blur is especially called the “permissible circle of confusion diameter”.

Even today, when digital cameras are the mainstream in the photographic industry, the permissible circle of confusion diameter is based on the premise of “printing on photographic paper of a certain size and visually viewing at a certain distance,” as with silver halide film. Values ​​are commonly used. However, in machine vision, since image processing is performed using the data of each pixel, visual inspection cannot be used as a reference as in photographs, and the permissible circle of confusion diameter is called the “pixel pitch” or “Airy disk diameter” of the image sensor.

The depth of field calculated in this way means the depth at which the sensor cannot recognize the “difference in blur”, but this result shows the strictest (shallow / narrow) conditions, and is more than this. Even if it comes off, it is not always so blurred that the characteristics of the subject cannot be judged.

How to think about depth of field in machine vision

Contrast and resolution

There are “contrast” and “resolution” as requirements for images for machine vision. “Contrast” refers to the difference in brightness between bright areas (white) and dark areas (black) in an image, and the higher the contrast, the easier it is to determine the characteristics of the subject. In addition, “resolution” refers to the closest limit at which two points that are slightly separated can be seen separately, but as a guideline for seeing them separately, it is said that a contrast (MTF) of about 10% is required for the camera output image.

Spatial frequency and depth of field

The period per unit length of black and white stripes is called the spatial frequency, and is indicated in units of “book / mm” or “lp / mm”. As for the optical characteristics of machine vision systems, the contrast generally decreases as the spatial frequency increases (the value increases), and the finer the stripes, the smaller the difference in brightness and the easier it is to feel out of focus. This means that the coarser the stripes, the less the effect of blurring and the easier it is to recognize the pattern.

The depth of field in machine vision is the shallowest value due to the permissible circle of confusion diameter due to the “pixel pitch” and “Airy disk diameter” mentioned above. However, in most applications in machine vision, spatial frequencies lower than the pixel pitch are used for image processing, and in reality, a deeper depth of field than the calculated value using the “allowable circle of confusion” is obtained.