Depth-of-field testing method for objective lens imaging system
By using the target marking plate and camera in the objective imaging system to acquire images and calculate the normalized definition evaluation value, the problem of difficulty in depth detection of the objective imaging system is solved, and accurate and simple depth detection is achieved, suitable for various detection sites and environments.
Patent Information
- Application Number
- CN202311747613.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2025-06-20
AI Technical Summary
The depth of field detection of objective lens imaging systems is difficult, especially for small depth of field systems, which can easily lead to the deviation of the sample to be measured beyond the Z-axis deviation limit, making it difficult to continuously obtain clear images.
By providing illumination light, the target surface image is collected using the target marking plate and the camera, the target marking plate is moved along the Z-axis direction, the normalized sharpness evaluation value of each image is calculated, and the relationship curve between the sharpness evaluation value and the vertical position is generated, and the depth of field of the imaging system is determined.
It realizes accurate detection of the depth of field of the objective imaging system, which is simple and easy to use, is suitable for various detection sites and environments, and is short time-consuming, and the image clarity evaluation curve has high sensitivity and noise resistance.
Smart Images

Figure CN120182348A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of semiconductor equipment, and in particular to a method for testing the depth of field of an objective lens imaging system. Background Art
[0002] The objective lens imaging system is a core component of semiconductor lithography and defect detection equipment, and the size of the depth of field is an important optical parameter of the equipment. For an objective lens imaging system with a large depth of field, when scanning a sample to be measured, a relatively large Z-axis jump amount can be tolerated, and it is easy to always obtain a clear image; for an objective lens imaging system with a small depth of field, when scanning a sample to be measured, only a small Z-axis deviation amount between the objective lens object plane and the sample to be measured can be tolerated, and the sample to be measured is likely to deviate from the Z-axis deviation amount limit, resulting in difficulty in always obtaining a clear image. In view of the fact that precision measurement and detection are the basis and prerequisite of high-precision manufacturing, therefore, for the manufacture of a high-performance wide-spectrum objective lens imaging system, it is of great significance to achieve accurate detection of the depth of field of the objective lens imaging system. However, at present, there are difficulties in detecting the depth of field of the objective lens imaging system. Summary of the Invention
[0003] To improve the problem of difficult detection of the depth of field of the objective lens imaging system, an embodiment of the present invention provides a method for testing the depth of field of an objective lens imaging system, and the method includes:
[0004] Providing illumination light, the illumination light is converged by the objective lens and incident on a target marker plate located on a moving stage, the illumination light is reflected by the target marker plate and then collected by the objective lens and reaches a camera to generate an image of the target marker plate; moving the moving stage up and down along the Z-axis direction at a preset step size, and obtaining the vertical position of the target marker plate after each movement; collecting target surface images of the target marker plate at different vertical positions through the camera; calculating the normalized sharpness evaluation value of each target surface image; obtaining a relationship curve between the normalized sharpness evaluation value and the vertical position of the target marker plate based on mathematical fitting; obtaining a sharpness threshold of the target surface image based on the relationship curve; and determining the depth of field of the imaging system based on the relationship curve and the sharpness threshold.
[0005] In a possible embodiment, for any one of the target surface images, calculating the normalized sharpness evaluation value of the target surface image includes: extracting corresponding several edge points of the target surface image; calculating the gray gradient values of the edge points; using the sum of the gray gradient values of several edge points as the sharpness evaluation value of the target surface image; and performing normalization processing on the sharpness evaluation value of the target surface image to obtain the normalized sharpness evaluation value of the target surface image.
[0006] In another possible embodiment, the extracting the edge points of the target surface image includes:
[0007] Obtain the image edge segmentation threshold corresponding to the target surface image;
[0008] Calculate the local gray variance of each pixel point in the edge region of the target surface image;
[0009] Extract the local gray variance greater than the image edge segmentation threshold as the target local gray variance of the target surface image, and the pixel points corresponding to the target local gray variance are used as the corresponding edge points of the target surface image.
[0010] In other possible embodiments, the obtaining of the image edge segmentation threshold corresponding to the target surface image is calculated by the following formula:
[0011]
[0012] where T is the image edge segmentation threshold, M and N are the horizontal and vertical dimensions of the target image, T OTSU is the initial value of the edge segmentation reference, and f(x, y) is the gray value of the pixel point at the position (x, y) of the target image.
[0013] In another possible embodiment, the calculating of the local gray variance of each pixel point in the edge region of the target surface image includes: setting the local area of each pixel point in the edge region; within the local area, respectively obtaining the local gray average value of each pixel point in the edge region; within the local area, respectively obtaining the local gray variance of each pixel point in the edge region, and the local gray variance of any pixel point in the edge region satisfies the following relationship:
[0014]
[0015]
[0016] where σ 2 (x, y) is the local gray variance of the pixel point (x, y) in the edge region, f(x + i, y + j) represents the gray value of any pixel point (x + i, y + i) in the local area of the pixel point (x, y), μ(x, y) is the local gray average value of the pixel point (x, y), m, n, and i are natural numbers, and m < M, n < N.
[0017] In other possible embodiments, the calculating of the gray gradient value of the edge points includes:
[0018] For any edge point of the target surface image, set operator templates, where the operator templates include a horizontal direction operator template, a vertical direction operator template, a left diagonal direction operator template, and a right diagonal direction operator template;
[0019] Obtain the horizontal direction gray-scale gradient, vertical direction gray-scale gradient, left diagonal direction gray-scale gradient, and right diagonal direction gray-scale gradient of the edge point based on the operator template;
[0020] Calculate the gray-scale gradient value of the edge point based on the horizontal direction gray-scale gradient, the vertical direction gray-scale gradient, the left diagonal direction gray-scale gradient, and the right diagonal direction gray-scale gradient.
[0021] In another possible embodiment, the gray-scale gradient value of the edge point satisfies the following formula:
[0022]
[0023]
[0024]
[0025]
[0026]
[0027] where (x, y) is the coordinate position of any one of the edge points, f(x, y) represents the gray-scale value of the edge point (x, y), T(x, y) represents the gray-scale gradient value of the edge point (x, y), S1(x, y) represents the horizontal direction gray-scale gradient of the edge point (x, y), S2(x, y) represents the vertical direction gray-scale gradient of the edge point (x, y), S3(x, y) represents the left diagonal direction gray-scale gradient of the edge point (x, y), S4(x, y) represents the right diagonal direction gray-scale gradient of the edge point (x, y), g1 is the horizontal direction operator template, g2 is the vertical direction operator template, g3 is the left diagonal direction operator template, g4 is the right diagonal direction operator template, represents the convolution operation.
[0028] In a possible embodiment, the clarity evaluation value of each target surface image is calculated through the following relationship:
[0029] F k =∑ x ∑ y T k (x, y),
[0030] where, F k represents the clarity evaluation value of the k-th target surface image, T k (x, ) represents the gray-scale gradient value of any edge point (x, y) of the k-th target surface image, and k is a natural number.
[0031] In another possible embodiment, the sharpness evaluation value of each of the target surface images is calculated through the following relationship:
[0032] F k = ∑ x ∑ y T k (x, y),
[0033] where F k represents the sharpness evaluation value of the k-th target surface image, and T k (x, y) represents the gray gradient value of any edge point (x, y) of the k-th target surface image.
[0034] In other possible embodiments, the normalization process of the sharpness evaluation value of each of the target surface images to obtain the normalized sharpness evaluation value of each of the target surface images includes:
[0035] Based on the sharpness evaluation values of all the target surface images, obtain the maximum sharpness value Fmax and the minimum sharpness value Fmin;
[0036] Calculate the normalized sharpness evaluation value of each of the target surface images through the following relationship:
[0037]
[0038] where F k ' represents the normalized sharpness evaluation value of the k-th target surface image, k is a natural number, F min represents the maximum sharpness evaluation value of the target surface image, F max represents the minimum sharpness evaluation value of the target surface image, and F k represents the sharpness evaluation value of the k-th target surface image.
[0039] In another possible embodiment, the obtaining of the sharpness threshold of the target surface image based on the relationship curve includes:
[0040] Select any data point z and the infinitesimal adjacent point (z + ε) of the data point z in the relationship curve;
[0041] Extract the normalized sharpness evaluation value F' z corresponding to the data point z, and the normalized sharpness evaluation value F' z+ε corresponding to the infinitesimal adjacent point (z + ε);
[0042] Calculate the sharpness threshold of the target surface image through the following relationship:
[0043]
[0044] where F tRepresents the clarity threshold of the target surface image.
[0045] In other possible embodiments, determining the depth of field of the imaging system based on the relationship curve and the clarity threshold includes:
[0046] In the relationship curve, obtain the clarity threshold F of the target surface image t The corresponding first vertical position value Z1 and the second vertical position value Z2 of the target marker board;
[0047] Calculate the depth of field of the imaging system through the following relationship:
[0048] D = |Z1 - Z2|,
[0049] where D represents the depth of field of the imaging system.
[0050] The beneficial effect of the method for testing the depth of field of the objective lens imaging system provided by the embodiments of the present invention is as follows: This method is based on the traditional objective lens imaging system, combined with a wide-spectrum illumination system and a target marker board. The target surface images are collected by a camera when the target marker board is at different vertical positions. Then, by calculating the normalized clarity evaluation value of each target surface image, a relationship curve between the normalized clarity evaluation value and the vertical position of the target marker board is generated, so as to determine the depth of field of the imaging system. This detection method has the advantages of simple detection, simple requirements for the detection site, detection environment and size. In addition, in this embodiment, only the edge information of the target surface image needs to be extracted to calculate the normalized clarity evaluation value of the image, without calculating the pixel points of the entire image, and information in multiple directions can be extracted. In this way, the obtained image clarity evaluation curve has higher sensitivity and anti-noise performance, and takes less time. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0052] Figure 1 Schematic diagram of the objective lens imaging system depth of field test system provided by the embodiments of the present invention;
[0053] Figure 2 Another schematic diagram of the objective lens imaging system depth of field test system provided by the embodiments of the present invention;
[0054] Figure 3 Schematic diagram of the process of the method for testing the depth of field of the objective lens imaging system provided by the embodiments of the present invention;
[0055] Figure 4 Schematic diagram of the pattern of a target marking plate provided by an embodiment of the present invention;
[0056] Figure 5 Schematic diagram of the data relationship curve between the vertical position of the target marking plate and the normalized clarity evaluation value provided by an embodiment of the present invention.
[0057] Explanation of the reference numerals in the drawings:
[0058] Illumination system 10; moving stage 20; target marking plate 30; objective lens 40; optical focusing system 50; camera 60; tube lens 70;
[0059] Light source 101; rotary filter 102; ND filter 103; light homogenizing rod 104; coupling lens group 1051; aperture 1052; relay lens group 1053; beam splitter 1054. Detailed implementation manners
[0060] The terms in this article will be explained below.
[0061] Depth of Focus (DOF) refers to the range in which the focus can remain clear when using an objective lens to image the surface of a sample. Starting from the position of the aligned focus, the distance between the objective lens and the sample surface is changed. The lens aperture, lens focal length, and the distance from the focal plane to the object being photographed are important factors affecting the depth of field. After focusing is completed, the distance of the clear image presented within the range before and after the focus is the depth of field.
[0062] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein shall have the ordinary meaning as understood by those of ordinary skill in the art in the field to which the present invention pertains. The words such as "including" used herein mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects.
[0063] As Figure 1 shown, an embodiment of the present invention provides a depth of field test system for an objective lens imaging system, including: an illumination system 10, a moving stage 20, a target marking plate 30, an objective lens 40, a focusing optical system 50, a camera 60, and a processor 70 (not shown in the figure), wherein:
[0064] The lighting system 10 is used to provide illumination light, which is converged by the objective lens 40 and incident on the target marking plate 30. After reflection, it is collected by the objective lens 40 and reaches the camera 60.
[0065] The moving stage 20 is used to move up and down along the Z-axis perpendicular to the objective lens 40 at a preset step size.
[0066] The processor 70 is used to calculate the vertical position of the target marking plate 30 from the objective lens 40 after each movement, and control the camera 60 to collect the target surface images when the target marking plate 30 is at different vertical positions.
[0067] The processor 70 is also used to calculate the normalized sharpness evaluation value of each target surface image after each movement; obtain the relationship curve between the normalized sharpness evaluation value and the vertical position of the target marking plate based on mathematical fitting; obtain the sharpness threshold of the target surface image based on the relationship curve, and determine the depth of field of the imaging system based on the relationship curve and the sharpness threshold.
[0068] In a possible embodiment, as Figure 2 shown, the above lighting system 10 may specifically include a light source 101, a rotary filter 102, an ND filter 103, a light homogenizing rod 104, a coupling lens group 1051, a diaphragm 1052, a relay lens group 1053, and a beam splitter 1054. Optionally, the objective lens 40 may be a wide-spectrum objective lens, the moving stage 20 may be an electric XYZ moving platform, and the camera 60 may be a area array CCD camera. A tube lens 70 may also be provided above the wide-spectrum objective lens.
[0069] Combined with Figure 2 the depth of field test system of the objective lens imaging system shown, the coherent light beam emitted by the wide-spectrum light source 101 is filtered by the rotary filter 102 to select the transmission band, the intensity is adjusted by the ND filter 103, homogenized by the light homogenizing rod 104, and reaches the beam splitter 1054 after passing through the coupling lens group 1051, the diaphragm 1052, and the relay lens group 1053, and enters the wide-spectrum objective lens 40 to illuminate the target marking plate 30 placed on the moving stage 20. At the object space position, the target marking plate is placed on the moving stage 20 to adjust the position of the imaging target, and is adjusted in the Z-axis direction by setting a certain moving step size. The images formed by the target marking plate 30 at different positions on the Z-axis pass through the wide-spectrum objective lens, pass through the tube lens 70, and are collected by the camera 60, and then the light intensity signal is analyzed. The imaging effect of each of the foregoing images is determined through the sharpness imaging algorithm provided below, and the depth of field range of the imaging system is obtained.
[0070] The embodiment of the present invention also provides a method for testing the depth of field of an objective lens imaging system, as Figure 3As shown, it includes the following steps:
[0071] S301, provide illumination light, the illumination light is converged by the objective lens and incident on the target marking plate located on the moving stage, and after being reflected by the target marking plate, the illumination light is collected by the objective lens and reaches the camera to generate an image of the target marking plate.
[0072] S302, move the moving stage up and down along the Z-axis direction with a preset step size, and obtain the vertical position of the target marking plate after each movement.
[0073] S303, collect target surface images of the target marking plate at different vertical positions through the camera.
[0074] S304, calculate the normalized sharpness evaluation value of each target surface image.
[0075] S305, obtain the relationship curve between the normalized sharpness evaluation value and the vertical position of the target marking plate based on mathematical fitting.
[0076] S306, obtain the sharpness threshold of the target surface image based on the relationship curve.
[0077] S307, determine the depth of field of the imaging system based on the relationship curve and the sharpness threshold.
[0078] In the process of depth of field detection in this embodiment, the moving target marking plate 30 is realized by moving the moving stage 20 along the Z-axis multiple times, so that the imaging change of the target marking plate 30 includes a process of gradually becoming clear from being blurred and then gradually becoming blurred again. Among them, when the target marking plate 30 is at the positive focal plane, the clearest target surface image is collected. When the target marking plate 30 leaves the positive focal plane, the target surface image tends to be blurred. Exemplarily, as Figure 4 shown, Figure 4 the target surface image shown in (a) in Figure 4 represents the image of the target marking plate 30 at the positive focal plane position, Figure 4 the target surface image shown in (b) in Figure 4 represents the image of the target marking plate 30 slightly away from the positive focal plane but still within the depth of field range,
[0079] In the above S304, before calculating the normalized sharpness evaluation value of each target surface image, it is necessary to first extract corresponding several edge points of the target surface image; calculate the gray gradient values of the edge points; use the sum value of the gray gradient values of several edge points as the sharpness evaluation value of the target surface image, and then perform normalization processing on the sharpness evaluation value of the target surface image to obtain the normalized sharpness evaluation value of the target surface image. In this embodiment, only the edge points of the target surface image need to be extracted, without calculating the pixel points of the entire image, so the calculation amount is greatly reduced and the time consumed is shortened.
[0080] Specifically, the method for extracting corresponding several edge points of the target surface image includes: obtaining the image edge segmentation threshold corresponding to the target surface image; calculating the local gray variance of each pixel point in the edge region of the target surface image; extracting the local gray variance greater than the image edge segmentation threshold as the target local gray variance of the target surface image, and the pixel points corresponding to the target local gray variance are used as the corresponding edge points of the target surface image. Among them, the image edge segmentation threshold corresponding to the target surface image is calculated by the following formula [1]:
[0081]
[0082] where T is the image edge segmentation threshold, M and N are the horizontal and vertical dimensions of the target image, T OTSU is the initial value of the edge segmentation reference, and f(x, y) is the gray value of the pixel point at the position (x, y) of the target image.
[0083] In a possible embodiment, the method steps for calculating the local gray variance of each pixel point in the edge region of the target surface image are as follows: setting the local region of each pixel point in the edge region; within the local region, respectively obtaining the local gray average value of each pixel point in the edge region and the local gray variance of each pixel point in the edge region, and the local gray variance of any pixel point in the edge region satisfies the following formula [2]:
[0084]
[0085] where σ 2 (x, y) is the local gray variance of any pixel point (x, y) in the edge region, f(x + i, y + j) represents the gray value of any pixel point (x + i, y + i) in the local region of the pixel point (x, y), μ(x, y) is the local gray average value of the pixel point (x, y), m, n, and i are natural numbers, and m < M, n < N.
[0086] Further, based on the above image segmentation threshold T and local gray variance σ 2(x, y), extract the corresponding edge points of each target surface image. Optionally, the extraction rules for the edge points and non-edge points of each target surface image satisfy the following formula [3]:
[0087]
[0088] Wherein, P(x, y) is the extraction value of the pixel point (x, y), and P(x, y) = 1 indicates that the pixel point (x, y) is an edge point of the image, and P(x, y) = 0 indicates that the pixel point (x, y) is a non-edge point of the image, and σ 2 (x, y) represents the local gray variance of the pixel point (x, y).
[0089] In addition, the method for calculating the gray gradient value of the edge point includes: for any edge point of the target surface image, set an operator template, and the operator template includes a horizontal direction operator template, a vertical direction operator template, a left diagonal direction operator template, and a right diagonal direction operator template; obtain the horizontal direction gray gradient, vertical direction gray gradient, left diagonal direction gray gradient, and right diagonal direction gray gradient of the edge point based on the operator template; calculate the gray gradient value of the edge point based on the horizontal direction gray gradient, the vertical direction gray gradient, the left diagonal direction gray gradient, and the right diagonal direction gray gradient.
[0090] Specifically, the gray gradient value T(x, y) of the edge point satisfies the following formula [4]:
[0091]
[0092] Wherein, (x, y) is the coordinate position of any edge point, S1(x, y) represents the horizontal direction gray gradient of the edge point (x, y), S2(x, y) represents the vertical direction gray gradient of the edge point (x, y), S3(x, y) represents the left diagonal direction gray gradient of the edge point (x, y), and S4(x, y) represents the right diagonal direction gray gradient of the edge point (x, y).
[0093] Specifically, in the above formula [4], S1(x, y), S2(x, y), S3(x, y), and S4(x, y) satisfy the following formulas [5] to [8].
[0094]
[0095]
[0096]
[0097]
[0098] Among them, f(x, y) represents the gray value of the edge point (x, y), g1 is the horizontal direction operator template, g2 is the vertical direction operator template, g3 is the left diagonal direction operator template, and g4 is the right diagonal direction operator template. represents the convolution operation.
[0099] Exemplarily, the four operator templates can be respectively as shown in the following formulas [9] to
[12] :
[0100]
[0101]
[0102]
[0103]
[0104] Based on the above calculation formula of the gray gradient value, the gray gradients of several edge points are obtained, and the sum value of the gray gradient values of several said edge points is used as the clarity evaluation value of the target surface image. The clarity evaluation value of each said target surface image is calculated through the following formula
[13] :
[0105] F k = ∑ x ∑ t T k (x, y).................
[13]
[0106] Among them, F k represents the clarity evaluation value of the k-th target surface image, k is a natural number, and T k (x, y) represents the gray gradient value of any edge point (x, y) of the k-th target surface image.
[0107] In a possible embodiment, based on the clarity evaluation values of all target surface images, the maximum clarity value Fmax and the minimum clarity value Fmin are obtained; the normalized clarity evaluation value of each said target surface image is calculated through the following formula
[14] :
[0108]
[0109] Among them, F k ′ represents the normalized clarity evaluation value of the k-th target surface image, k is a natural number, F min represents the maximum clarity evaluation value of the target surface image, F max represents the minimum clarity evaluation value of the target surface image, and F k represents the clarity evaluation value of the k-th target surface image.
[0110] In a possible embodiment, in the above S305, a mathematical fitting is performed on the obtained several normalized sharpness evaluation values and the vertical position of the target marking plate during the acquisition of each target image corresponding to the normalized sharpness evaluation value, so as to obtain a relationship curve between the normalized sharpness evaluation value and the vertical position of the target marking plate, as Figure 5 shown.
[0111] In a possible embodiment, the calculation method of the sharpness threshold in the above S306 may be: select any data point z and the infinitesimal adjacent point (z + ε) of the data point z in the relationship curve; extract the normalized sharpness evaluation value F' corresponding to the data point z Z , and the normalized sharpness evaluation value F' corresponding to the infinitesimal adjacent point (z + ε) z+ε ; calculate the sharpness threshold of the target surface image through the following formula
[15] :
[0112]
[0113] where F t represents the sharpness threshold of the target surface image.
[0114] In another possible embodiment, in the above S307, combined with Figure 5 speaking, in the Figure 5 relationship curve shown, obtain the first vertical position value Z1 and the second vertical position value Z2 of the target marking plate corresponding to the sharpness threshold F of the target surface image t ; calculate the depth of field of the imaging system through the following relationship: D = |Z1 - Z2|, where D represents the depth of field of the imaging system. It should be understood that during the process of moving the moving stage 20 multiple times, as the distance between the target marking plate 30 and the objective lens changes, the imaging effect of the target marking plate 30 includes a change phenomenon of gradually becoming blurred, then gradually becoming clear, and then gradually becoming blurred again. Therefore, in this embodiment, based on the sharpness threshold of the target surface image, the boundary values of the two vertical positions of the target marking plate corresponding to the clear imaging of the objective lens are found in the relationship curve: the first vertical position value Z1 and the second vertical position value Z2, and the position difference between the two is the depth of field of the imaging system.
[0115] In summary, based on the traditional objective lens imaging system, this embodiment combines a wide-spectrum illumination system and a target marking board. The camera captures the target surface images when the target marking board is at different vertical positions. Then, by calculating the normalized sharpness evaluation value of each target surface image, a relationship curve between the normalized sharpness evaluation value and the vertical position of the target marking board is generated, thereby determining the depth of field of the imaging system. This detection method has the advantages of simple detection, simple requirements for the detection site, detection environment, and size. In addition, in this embodiment, only the edge points of the target surface image need to be extracted, without calculating the pixel points of the entire image, and information in multiple directions can be extracted. In this way, the image sharpness evaluation curve obtained has higher sensitivity and noise resistance, and takes less time.
[0116] Although the embodiments of the present invention have been described in detail above, it is obvious to those skilled in the art that various modifications and changes can be made to these embodiments. However, it should be understood that such modifications and changes are all within the scope and spirit of the present invention described in the claims. Moreover, the present invention described herein may have other embodiments and can be implemented or realized in various ways.
Claims
1. A method for testing the depth of field of an objective lens imaging system, characterized in that, Including: Providing illumination light, which is converged by the objective lens and incident on a target marking plate located on a moving stage, and after being reflected by the target marking plate, the illumination light is collected by the objective lens and reaches a camera to generate an image of the target marking plate; Moving the moving stage up and down along the Z-axis direction at a preset step length to obtain the vertical position of the target marking plate after each movement; Collecting target surface images of the target marking plate at different vertical positions through the camera; Calculating the normalized sharpness evaluation value of each target surface image; Obtaining a relationship curve between the normalized sharpness evaluation value and the vertical position of the target marking plate based on mathematical fitting; Obtaining a sharpness threshold of the target surface image based on the relationship curve; Determining the depth of field of the imaging system based on the relationship curve and the sharpness threshold.
2. The method according to claim 1, characterized in that, For any one of the target surface images, calculating the normalized sharpness evaluation value of the target surface image all includes: Extracting corresponding several edge points of the target surface image; Calculating the gray level gradient values of the edge points; Taking the sum of the gray level gradient values of several edge points as the sharpness evaluation value of the target surface image; Performing normalization processing on the sharpness evaluation value of the target surface image to obtain the normalized sharpness evaluation value of the target surface image.
3. The method according to claim 2, characterized in that, The extracting corresponding several edge points of the target surface image includes: Obtaining an image edge segmentation threshold corresponding to the target surface image; Calculating the local gray level variance of each pixel point in the edge region of the target surface image; Extracting the local gray level variance greater than the image edge segmentation threshold as the target local gray level variance of the target surface image, and the pixel points corresponding to the target local gray level variance as the corresponding edge points of the target surface image.
4. The method according to claim 3, characterized in that, The obtaining the image edge segmentation threshold corresponding to the target surface image is calculated by the following formula: Wherein, T is the threshold for image edge segmentation, M and N are the horizontal and vertical dimensions of the target image, T OTSU is the initial reference value for edge segmentation, and f(x, y) is the gray value of the pixel at the position (x, y) of the target image.
5. The method according to claim 3, characterized in that, The calculating the local gray level variance of each pixel point in the edge region of the target surface image includes: Setting the local region of each pixel point in the edge region; Within the local region, respectively obtaining the local gray level average value of each pixel point in the edge region; Within the local region, respectively obtaining the local gray level variance of each pixel point in the edge region, and the local gray level variance of any pixel point in the edge region satisfies the following relationship: where σ 2 (x, y) is the local gray variance of any pixel point (x, y) in the edge region, f(x + i, y + j) represents the gray value of any pixel point (x + i, y + i) in the local region of the pixel point (x, y), μ(x, y) is the local gray average value of the pixel point (x, y), m, n, and i are natural numbers, and m < M, n < N.
6. The method according to claim 2, characterized in that, The calculating the gray level gradient value of the edge point includes: For any edge point of the target surface image, setting an operator template, and the operator template includes a horizontal direction operator template, a vertical direction operator template, a left diagonal direction operator template, and a right diagonal direction operator template; Obtaining the horizontal direction gray level gradient, the vertical direction gray level gradient, the left diagonal direction gray level gradient, and the right diagonal direction gray level gradient of the edge point based on the operator template; Calculating the gray level gradient value of the edge point based on the horizontal direction gray level gradient, the vertical direction gray level gradient, the left diagonal direction gray level gradient, and the right diagonal direction gray level gradient.
7. The method according to claim 6, characterized in that, The gray level gradient value of the edge point satisfies the following formula: Among them, (x, y) is the coordinate position of any one of the edge points, f(x, y) represents the gray value of the edge point (x, y), T(x, y) represents the gray gradient value of the edge point (x, y), S1(x, y) represents the horizontal direction gray gradient of the edge point (x, y), S2(x, y) represents the vertical direction gray gradient of the edge point (x, y), S3(x, y) represents the left diagonal direction gray gradient of the edge point (x, y), S4(x, y) represents the right diagonal direction gray gradient of the edge point (x, y), g1 is the horizontal direction operator template, g2 is the vertical direction operator template, g3 is the left diagonal direction operator template, g4 is the right diagonal direction operator template, represents the convolution operation.
8. The method according to claim 2, wherein, The sharpness evaluation value of each target surface image is calculated by the following relationship: F k = ∑ x ∑ y T k (x, y), Among them, F k represents the clarity evaluation value of the k-th target surface image, and T k (x, y) represents the gray-scale gradient value of any edge point (x, y) of the k-th target surface image, where k is a natural number.
9. The method according to claim 2, wherein, Normalizing the sharpness evaluation value of each of the target surface images to obtain the normalized sharpness evaluation value of each of the target surface images, including: Based on the sharpness evaluation values of all the target surface images, obtaining the maximum sharpness value Fmax and the minimum sharpness value Fmin; Calculating the normalized sharpness evaluation value of each of the target surface images through the following relationship: Among them, F k ′ represents the normalized clarity evaluation value of the k-th target surface image, where k is a natural number, and F min represents the maximum clarity evaluation value of the target surface image, and F max represents the minimum clarity evaluation value of the target surface image, and F k represents the clarity evaluation value of the k-th target surface image.
10. The method according to claim 1, wherein, The obtaining of the sharpness threshold of the target surface image based on the relationship curve includes: Selecting any data point z and the infinitesimal adjacent point (z + ε) of the data point z in the relationship curve; Extract the normalized sharpness evaluation value F′ corresponding to the data point z z , and the normalized sharpness evaluation value F′ corresponding to the infinitesimal adjacent point (z + ε) z+ε ; Calculating the sharpness threshold of the target surface image through the following relationship: Among them, F t represents the clarity threshold of the target surface image.
11. The method according to claim 10, wherein, The determining of the depth of field of the imaging system based on the relationship curve and the sharpness threshold includes; In the relationship curve, obtain the clarity threshold F of the target surface image t The corresponding first vertical position value Z1 and the second vertical position value Z2 of the target marker board Calculating the depth of field of the imaging system through the following relationship: D = |Z1 - Z2|, where D represents the depth of field of the imaging system.