Lens Selection - Depth of Field Calculation

Uploading... Reupload Cancel

1 Overview

Let’s look at two examples first. When taking pictures of flowers, insects, etc., the background is blurred and the subject is highlighted. But when taking commemorative photos, landscape photos, etc., the background will be shot as clearly as the subject. The two are different depths of field . The former has a shallow depth of field, and when shooting is focused on the subject, only a short distance can be captured clearly. The scenery in front of and behind the subject is blurred, and the clear range is small. The latter has a large depth of field and a large range of clarity.

small depth of field

large depth of field

2 Physical principles of depth of field

2.1 Definition of depth of field

The definition of depth of field in Baidu Encyclopedia is: the front and back distance range of the subject measured by the imaging of the front edge of the camera lens or other imager that can obtain a clear image . In layman's terms, the scene at the focus point plane of the object to be photographed will form a clear image on the film, and there is a range from somewhere in front of the focus point plane to somewhere behind it, and the scene within it can form a clear image For images, this range is called depth of field. When discussing depth of field, we generally use the term "shallow", that is, shallow depth of field (narrow depth of field) or large depth of field (large depth of field).

2.2 The principle of depth of field

Before understanding the principle of depth of field, we must understand one thing: when we focus, only one plane is actually in focus . This plane is parallel to the image plane (which can be simply understood as the film or sensor plane). Everything in front of or behind this plane is not in focus. The light emitted from a certain point of the object on the in-focus plane at different angles converges at one point in the imaging plane , while the light emitted from a certain point of the non-in-focus object at different angles will fall on different points on the image plane, forming a fuzzy circle. The technical term is called circle of confusion.


So points that are not in focus will look blurry on the film. If you were photographing a light bulb, it would look like a circle.
Let's take a look at the relationship between the circle of confusion and the focus distance. The non-focus plane 1 is farther away from the focus plane, and its circle of confusion on the image plane is larger, while the non-focus plane 2 is closer to the focus plane, and the circle of confusion on the image plane smaller. So the closer you get to the focal plane, the smaller the circle of confusion .


If the circle of confusion is so small that the human eye cannot distinguish it (or the diameter of the circle of confusion is smaller than the size of the sensor pixel ), the circle of confusion can be regarded as the imaging of a point, which looks as clear as the thing that is in focus, and this indistinguishable blur The circle is called the permission circle of confusion. There is a distance between the front and back of the subject (focus point or focal plane), and the blurred degree of the image on the image plane cannot be distinguished by the naked eye. It is relatively clear and is within the limit of the allowable circle of confusion. The distance between them is called the depth of field . .

3. Calculation of depth of field

3.1 General calculation formula


Note:
L: focal object distance (shooting distance)
δ: allowable diameter of the circle of confusion
F: lens aperture value
f: lens focal length
depth of foreground

rear depth of field


depth of field


From the result of the formula, we can see that the depth of the foreground < the depth of the back field

3.2 Simplification of common camera calculation formula

Most of the photos are taken at medium and long shooting distances, that is, L is much greater than f, according to the imaging formula


Among them, u is the object distance, that is, L, and v is the image distance, so the image distance v is close to f, and the imaging plane is close to the focal plane at this time, and the optical path for calculating the depth of field can be simplified as


The depth of field calculation formula can be simplified as

4 Influencing factors


From the depth of field calculation formula, it can be known that the depth of field is related to the aperture of the lens, the focal length of the lens, the shooting distance, and the requirements for image quality (expressed as the size of the allowable circle of confusion). These factors affect the depth of field as follows:
Lens aperture: the larger the aperture, the smaller the depth of field; the smaller the aperture, the greater the depth of field; the
focal length of the lens: the longer the focal length of the lens, the smaller the depth of field; the shorter the focal length, the greater the
depth of field; The farther the distance, the greater the depth of field; the closer the distance, the smaller the depth of field.


4.1 aperture

The aperture size is undoubtedly the most effective factor for us to control the depth of field . We can use the picture below to see the effect of depth of field:


The aperture size is inversely proportional to the depth of field, the larger the aperture, the shallower the depth of field.

Shooting tips:

4.2 Focal length

The focal length of the lens also affects the effect of depth of field. Take the following picture as an example. Under the same aperture and shooting distance, the same photo only changes the focal length (left: 24MM; right: 70MM), and the depth of field also changes accordingly.


A lens with a longer focal length provides a shallower depth of field and a greater depth of foreground, which can bring out more in-focus areas because blurred areas are exaggerated.

4.3 Object distance
The shooting distance is also an important factor affecting the depth of field. The closer the subject is to the lens, the shallower the depth of field will be.

5 Supplementary knowledge

5.1 Camera Lens Basics

The early lens is an optical camera tube, and the camera tube is generally circular, and the size of the imaging device is generally expressed by the diameter of the circle



5.2 Selection of the diameter of the circle of confusion

The following is the calculation method of the circle of confusion for ordinary digital cameras
. Normally, the resolution of the naked eye is 1/1000 to 1/5000. The minimum object size that the human eye can distinguish at a clear distance (30 cm in front of the eyes) is about 0.125 mm . Therefore, the enlargement of the circle of confusion in a 7-inch photo (which is a common size) can only be within 0.125mm, which is about 1/1730 of the diagonal length of the image. The size of the circle of confusion of about 1/1730 is suitable for any size of film or CCD, because they can control the circle of confusion to 0.125mm in the 7-inch photos they magnify. Therefore, the standard established by Chase is that the diameter of the circle of confusion δ=1/1730 the length of the diagonal of the film.
It can be seen here that the depth of field is relative, not absolute, and has a direct relationship with the value of the diameter δ of the circle of confusion.
The formula for calculating the diameter of the permissible circle of confusion δ = d / 1730, d is the diagonal length of the CCD chip (chip size)

5.3 Industrial Camera Application

Industrial cameras generally shoot close-up objects, and the magnification M value is relatively large, according to the imaging magnification
formula


The depth of field formula simplifies to:


Lens aperture: the larger the aperture, the smaller the depth of field; the smaller the aperture, the greater the depth of field; the
allowable diameter of the circle of confusion: the larger the allowable diameter, the greater the
depth of field Magnification: the larger the magnification, the smaller the depth of field The magnification
has a greater influence on the depth of field , decreases rapidly with increasing magnification


In the figure above, the aperture value is F = 12, and the allowable diameter of the diffusion circle is δ = 0.04 mm. The
diameter of the diffusion circle of a general industrial camera is 0.04 mm. However, with the reduction in the pixel size of the camera chip in recent years, the diffusion spot of 0.04 mm is much larger than the size of the chip. resolution. And strictly speaking, the same lens, with cameras of different pixel sizes, will have different depth of field due to the different diameters of the allowed circle of confusion. But customarily, lens manufacturers in the machine vision industry still use the diameter of the circle of confusion = 0.04mm to calculate the depth of field. Therefore, the actual depth of field value measured by the lens < the theoretical value of the depth of field indicated by the lens parameters.

reference

https://blog.csdn.net/mingjinliu/article/details/103648118

https://blog.csdn.net/JoshYueby/article/details/82966891

What is the principle of depth of field?

Technical Science丨What is Depth of Field? - Programmer Sought

Uploading... Reupload Cancel

1 Overview

Let’s look at two examples first. When taking pictures of flowers, insects, etc., the background is blurred and the subject is highlighted. But when taking commemorative photos, landscape photos, etc., the background will be shot as clearly as the subject. The two are different depths of field . The former has a shallow depth of field, and when shooting is focused on the subject, only a short distance can be captured clearly. The scenery in front of and behind the subject is blurred, and the clear range is small. The latter has a large depth of field and a large range of clarity.

small depth of field

large depth of field

2 Physical principles of depth of field

2.1 Definition of depth of field

The definition of depth of field in Baidu Encyclopedia is: the front and back distance range of the subject measured by the imaging of the front edge of the camera lens or other imager that can obtain a clear image . In layman's terms, the scene at the focus point plane of the object to be photographed will form a clear image on the film, and there is a range from somewhere in front of the focus point plane to somewhere behind it, and the scene within it can form a clear image For images, this range is called depth of field. When discussing depth of field, we generally use the term "shallow", that is, shallow depth of field (narrow depth of field) or large depth of field (large depth of field).

2.2 The principle of depth of field

Before understanding the principle of depth of field, we must understand one thing: when we focus, only one plane is actually in focus . This plane is parallel to the image plane (which can be simply understood as the film or sensor plane). Everything in front of or behind this plane is not in focus. The light emitted from a certain point of the object on the in-focus plane at different angles converges at one point in the imaging plane , while the light emitted from a certain point of the non-in-focus object at different angles will fall on different points on the image plane, forming a fuzzy circle. The technical term is called circle of confusion.


So points that are not in focus will look blurry on the film. If you were photographing a light bulb, it would look like a circle.
Let's take a look at the relationship between the circle of confusion and the focus distance. The non-focus plane 1 is farther away from the focus plane, and its circle of confusion on the image plane is larger, while the non-focus plane 2 is closer to the focus plane, and the circle of confusion on the image plane smaller. So the closer you get to the focal plane, the smaller the circle of confusion .


If the circle of confusion is so small that the human eye cannot distinguish it (or the diameter of the circle of confusion is smaller than the size of the sensor pixel ), the circle of confusion can be regarded as the imaging of a point, which looks as clear as the thing that is in focus, and this indistinguishable blur The circle is called the permission circle of confusion. There is a distance between the front and back of the subject (focus point or focal plane), and the blurred degree of the image on the image plane cannot be distinguished by the naked eye. It is relatively clear and is within the limit of the allowable circle of confusion. The distance between them is called the depth of field . .

3. Calculation of depth of field

3.1 General calculation formula


Note:
L: focal object distance (shooting distance)
δ: allowable diameter of the circle of confusion
F: lens aperture value
f: lens focal length
depth of foreground

rear depth of field


depth of field


From the result of the formula, we can see that the depth of the foreground < the depth of the back field

3.2 Simplification of common camera calculation formula

Most of the photos are taken at medium and long shooting distances, that is, L is much greater than f, according to the imaging formula


Among them, u is the object distance, that is, L, and v is the image distance, so the image distance v is close to f, and the imaging plane is close to the focal plane at this time, and the optical path for calculating the depth of field can be simplified as


The depth of field calculation formula can be simplified as

4 Influencing factors


From the depth of field calculation formula, it can be known that the depth of field is related to the aperture of the lens, the focal length of the lens, the shooting distance, and the requirements for image quality (expressed as the size of the allowable circle of confusion). These factors affect the depth of field as follows:
Lens aperture: the larger the aperture, the smaller the depth of field; the smaller the aperture, the greater the depth of field; the
focal length of the lens: the longer the focal length of the lens, the smaller the depth of field; the shorter the focal length, the greater the
depth of field; The farther the distance, the greater the depth of field; the closer the distance, the smaller the depth of field.


4.1 aperture

The aperture size is undoubtedly the most effective factor for us to control the depth of field . We can use the picture below to see the effect of depth of field:


The aperture size is inversely proportional to the depth of field, the larger the aperture, the shallower the depth of field.

Shooting tips:

4.2 Focal length

The focal length of the lens also affects the effect of depth of field. Take the following picture as an example. Under the same aperture and shooting distance, the same photo only changes the focal length (left: 24MM; right: 70MM), and the depth of field also changes accordingly.


A lens with a longer focal length provides a shallower depth of field and a greater depth of foreground, which can bring out more in-focus areas because blurred areas are exaggerated.

4.3 Object distance
The shooting distance is also an important factor affecting the depth of field. The closer the subject is to the lens, the shallower the depth of field will be.

5 Supplementary knowledge

5.1 Camera Lens Basics

The early lens is an optical camera tube, and the camera tube is generally circular, and the size of the imaging device is generally expressed by the diameter of the circle



5.2 Selection of the diameter of the circle of confusion

The following is the calculation method of the circle of confusion for ordinary digital cameras
. Normally, the resolution of the naked eye is 1/1000 to 1/5000. The minimum object size that the human eye can distinguish at a clear distance (30 cm in front of the eyes) is about 0.125 mm . Therefore, the enlargement of the circle of confusion in a 7-inch photo (which is a common size) can only be within 0.125mm, which is about 1/1730 of the diagonal length of the image. The size of the circle of confusion of about 1/1730 is suitable for any size of film or CCD, because they can control the circle of confusion to 0.125mm in the 7-inch photos they magnify. Therefore, the standard established by Chase is that the diameter of the circle of confusion δ=1/1730 the length of the diagonal of the film.
It can be seen here that the depth of field is relative, not absolute, and has a direct relationship with the value of the diameter δ of the circle of confusion.
The formula for calculating the diameter of the permissible circle of confusion δ = d / 1730, d is the diagonal length of the CCD chip (chip size)

5.3 Industrial Camera Application

Industrial cameras generally shoot close-up objects, and the magnification M value is relatively large, according to the imaging magnification
formula


The depth of field formula simplifies to:


Lens aperture: the larger the aperture, the smaller the depth of field; the smaller the aperture, the greater the depth of field; the
allowable diameter of the circle of confusion: the larger the allowable diameter, the greater the
depth of field Magnification: the larger the magnification, the smaller the depth of field The magnification
has a greater influence on the depth of field , decreases rapidly with increasing magnification


In the figure above, the aperture value is F = 12, and the allowable diameter of the diffusion circle is δ = 0.04 mm. The
diameter of the diffusion circle of a general industrial camera is 0.04 mm. However, with the reduction in the pixel size of the camera chip in recent years, the diffusion spot of 0.04 mm is much larger than the size of the chip. resolution. And strictly speaking, the same lens, with cameras of different pixel sizes, will have different depth of field due to the different diameters of the allowed circle of confusion. But customarily, lens manufacturers in the machine vision industry still use the diameter of the circle of confusion = 0.04mm to calculate the depth of field. Therefore, the actual depth of field value measured by the lens < the theoretical value of the depth of field indicated by the lens parameters.

reference

https://blog.csdn.net/mingjinliu/article/details/103648118

https://blog.csdn.net/JoshYueby/article/details/82966891

What is the principle of depth of field?

Technical Science丨What is Depth of Field? - Programmer Sought

Guess you like

Origin blog.csdn.net/weixin_38584764/article/details/129448584