Optical modulation transfer function calculation method based on knife edge image
By using the adaptive image differential filter method in the knife edge image processing, the adaptive differential template matrix is constructed for convolutional operation, which solves the problem of noise interference in optical modulation transfer function calculation, and achieves high accuracy and automated image processing.
Patent Information
- Application Number
- CN202411306738.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-09-19
AI Technical Summary
The prior art is susceptible to noise interference when calculating optical modulation transfer functions using knife edge images, resulting in an increase in measurement error.
The adaptive image differential filter method is used to construct an adaptive differential template matrix and perform convolutional operation on the knife edge image to obtain the line expansion function LSF image, and the optical modulation transfer function curve is obtained through discrete Fourier transform.
It effectively eliminates noise interference, improves the calculation accuracy of optical modulation transfer function, and realizes automated and intelligent image processing.
Smart Images

Figure CN119515712A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of optical metrology, and in particular relates to a method for calculating an optical modulation transfer function based on a knife-edge image. Background Art
[0002] Optical modulation transfer function, also known as spatial frequency response function (MTF), is an important indicator that quantitatively reflects the imaging quality of the system. In practical applications, it is specifically manifested as the number of circular rings or line pairs per unit length displayed in the image presented after the target passes through the optical system, generally expressed in line pairs per millimeter (lp / mm). The methods for measuring MTF usually include the slit method, the knife-edge method, and the standard target method of ISO12233. The slit target in the slit method is usually difficult to make and has a high cost; the standard target relies on human eye observation, has poor accuracy, and cannot be accurately quantitatively analyzed; the knife-edge method has obvious advantages in production and cost, and also performs well in accuracy and data analysis. Therefore, it is widely used to measure MTF in many applications.
[0003] At present, the traditional knife-edge method for calculating MTF mainly includes directly fitting the edge spread function and calculating using the histogram of the knife-edge image histogram feature. However, in the method of fitting the edge pixels of the knife-edge, due to the uncertainty of the mathematical model, fitting and overfitting are prone to occur, thereby increasing the measurement error of the MTF calculation. In the algorithm using the histogram calculation, it is easy to be affected by the brightness of the image itself, resulting in a large error.
[0004] In the above traditional algorithms for knife-edge image processing, no matter which method is used, it is necessary to perform differential operations on the image, and differential operations on the image often increase the impact of noise, which will eventually interfere with the MTF measurement results. The image noise is generally caused by the dark current of the detector and the background noise of the ambient light. It has strong randomness and is difficult to eliminate by filtering methods. Summary of the invention
[0005] The purpose of the present invention is to solve the noise problem caused by the calculation process of optical transfer function using knife-edge images in imaging metrology in the prior art, and to provide a method for calculating optical modulation transfer function based on knife-edge images, and to achieve noise elimination and signal extraction by constructing an adaptive image differential filter.
[0006] To achieve the above purpose, the technical solution provided by the present invention is:
[0007] A method for calculating optical modulation transfer function based on knife-edge image comprises the following steps:
[0008] Step 1: Use an optical modulation function measurement device to collect a knife edge image, and convert the collected multi-channel knife edge image into a single-channel grayscale image;
[0009] Step 2: Traverse each pixel value of each row of the knife-edge image, count the number of pixels whose pixel values are in the rising edge interval, and use the following formula to calculate the knife-edge rising edge width of the grayscale image:
[0010]
[0011] Wherein, width represents the width of the rising edge of the grayscale image, row represents the horizontal coordinate of the pixel position, height represents the vertical coordinate of the pixel position, f(row,height) represents the ratio of the pixel value at (row,height) to the maximum pixel value of the knife-edge image, number represents the number of pixels whose pixel values are in the rising edge interval, n represents the number of pixel columns of the knife-edge image, and the rising edge interval refers to 10%-90% of the maximum pixel value of the knife-edge image;
[0012] Step 3: Based on the rising edge width of the knife edge, a differential template matrix is constructed, and the differential template matrix is used to perform convolution operation on the grayscale image to obtain the LSF image;
[0013] Step 4: Identify the edge coordinates of the LSF image, and then use affine transformation to rotate the LSF image to vertical;
[0014] Step 5: Perform discrete Fourier transform on the rotated LSF image to obtain the optical modulation transfer function curve.
[0015] Furthermore, in step 3, the length of the differential template matrix is determined by the width of the rising edge of the knife edge.
[0016] Furthermore, in step 4, the ratio of the coordinate pixel value to the maximum pixel value of the knife edge image is used as the judgment basis to identify the edge coordinates of the LSF image, obtain the discrete point edge coordinates of the LSF image, and fit the discrete point edge coordinates using the least squares method. The slope and intercept of the fitting line are expressed as:
[0017]
[0018] Among them, a represents the slope of the fitted line, b represents the intercept of the fitted line, and x i ,y i Represents the horizontal and vertical coordinates of discrete edge points, and N represents the number of calculated pixels; is the mean ordinate of discrete edge points, is the mean value of the horizontal coordinates of discrete edge points.
[0019] Furthermore, the slope and intercept of the fitting line can be used to obtain the tilt angle of the LSF image as -b / a, and the angle at which the LSF image is rotated using the affine transformation is the tilt angle.
[0020] Furthermore, the coordinates [xy] of each pixel point T Perform affine transformation to obtain the corresponding pixel coordinate point [x1y1] T , expressed as:
[0021]
[0022] in, Represents the rotation matrix of affine transformation, α=scale*cos(angle), β=scale*sin(angle), center.x and center.y represent the horizontal and vertical coordinates of the rotation center, angle represents the rotation angle, and scale represents the scale factor.
[0023] Furthermore, in step 5, the optical modulation transfer function curve obtained is:
[0024]
[0025] Where k = 0, 1, 2, 3…N-1, x(n) represents the horizontal coordinate of the corresponding pixel, N-1 represents the number of pixels in a row of the LSF image, n represents the horizontal coordinate sequence number of the pixel point in the original image, k represents the horizontal coordinate sequence number of the calculated new image, and j represents an imaginary number;
[0026] The abscissa of the optical modulation transfer function satisfies:
[0027]
[0028] in, The step size is 1, and Δu represents the distance between two pixels.
[0029] The advantages of the present invention are:
[0030] The optical modulation transfer function calculation method based on the knife-edge image provided by the present invention obtains the corresponding adaptive differential convolution template by calculating the average value of the pixel width of the rising edge of each row, then convolves the knife-edge image to obtain the line spread function LSF image, and finally obtains the curve of the optical transfer function through discrete Fourier transform. Since the differential method of this method relies on the adaptive differential template method to perform convolution solution, the noise fluctuation of random fluctuations of adjacent points can be eliminated compared with the traditional algorithm; at the same time, the degree of automation is high, the automation and intelligence of knife-edge image processing are realized, and the useful information contained in the knife-edge image can be fully extracted and utilized, so as to accurately calculate the modulation transfer function of the optical system. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The features and advantages of the present invention will become more readily understood through the following description with reference to the accompanying drawings, which are not drawn to scale and in which some features are exaggerated or minimized to show details of particular components:
[0032] Figure 1 is a schematic structural diagram of an optical modulation function measuring device in an embodiment of the present invention;
[0033] Figure 2 is the knife edge image captured by the camera in the embodiment of the present invention;
[0034] Figure 3 is a flow chart of a method for calculating an optical modulation transfer function in an embodiment of the present invention;
[0035] Figure 4 Schematic diagram of an algorithm for convolution of an adaptive differential template matrix and a grayscale image in an embodiment of the present invention;
[0036] Figure 5 is a graph of the edge spread function (ESF) of the knife edge in the embodiment of the present invention and the line spread function (LSF) of the two algorithms after differentiation;
[0037] Figure 6 It is a comparison of the optical transfer function calculated by the algorithm proposed in the present invention and the traditional algorithm in the embodiment of the present invention;
[0038] In the figure: 1- integrating sphere; 2- knife-edge target; 3- reflector; 4- camera. DETAILED DESCRIPTION
[0039] The present invention will be described in detail below with reference to the accompanying drawings by means of exemplary embodiments of the present invention. It should be noted that the following detailed description of the present invention is only for the purpose of illustration, and is not intended to limit the present invention.
[0040] A method for calculating optical modulation transfer function based on knife edge image, the method is based on an optical modulation function measurement device for calculation, such as Figure 1 As shown, the optical modulation function measurement device includes: an integrating sphere light source 1, a knife-edge target 2, a reflector 3, a curved mirror 4 and a camera 5. The integrating sphere light source 1 emits white light, which is irradiated onto the knife-edge target 2 below it. The remaining light is reflected by one or more reflectors 3 below the knife-edge target 2 to the curved mirror 4, forming parallel light emission, which is finally collected by the camera 5 as shown in FIG. Figure 2 The knife edge image is shown. The knife edge image is input into a computer for processing to obtain the optical modulation transfer function.
[0041] Optical modulation transfer function calculation method, such as Figure 3 As shown, the following steps are included:
[0042] Step 1: Use an optical modulation function measurement device to collect knife edge images, and use a computer to convert the collected multi-channel knife edge images into single-channel grayscale images using the following formula:
[0043] GRAY=0.3R+0.59G+0.11B
[0044] Among them, R, G, B represent the pixel values under each channel, and GRAY represents the pixel value of the grayscale image.
[0045] Step 2: Calculate the width of the rising edge of the knife edge of the grayscale image.
[0046] Specifically, in the optical modulation function measurement device, the clarity of the knife-edge imaging is determined by the width of the boundary between the light and dark areas, that is, the rising edge width of the edge expansion function of the knife-edge image. This width is usually defined as the width between 10% and 90% of the maximum pixel value. In the calculation of the knife-edge image, this is used as a benchmark to determine the size of the knife-edge rising edge width. Traverse each pixel value in each row to determine whether the pixel value is within the rising edge interval. If so, start counting, sum up all the rows, and then calculate the average value. The knife-edge rising edge width of the grayscale image is calculated as shown in the following formula:
[0047]
[0048] Wherein, width represents the width of the rising edge of the grayscale image, row represents the horizontal coordinate of the pixel position, height represents the vertical coordinate of the pixel position, f(row,height) represents the ratio of the pixel value at (row,height) to the maximum pixel value of the knife-edge image, number represents the number of pixels whose pixel values are in the rising edge interval, n represents the number of pixel columns of the knife-edge image, and the rising edge interval refers to 10%-90% of the maximum pixel value of the knife-edge image;
[0049] Step 3: Based on the width of the rising edge of the knife edge, a differential template matrix is constructed, and the differential template matrix is used to perform a convolution operation on the grayscale image to obtain the LSF image.
[0050] In optical theory: Due to the linear invariant optical system, the output light intensity distribution function g(x,y) (i.e., the grayscale image in this algorithm) is the convolution of the input light intensity distribution function f(x,y) (i.e., the knife-edge imaging illumination) and the point spread function h(x,y) (i.e., the response efficiency of the camera to the knife-edge imaging illumination), expressed as:
[0051] g(x,y)=f(x,y)*h(x,y)
[0052] Among them, x and y represent the horizontal and vertical coordinate positions of the pixel point, and * represents the convolution operation.
[0053] In the paraxial imaging region, the calculation of the optical transfer function of the linear optical system is: the input light intensity distribution is the line spread function LSF image of the line pulse I(x) imaged by Fourier transform. The input light intensity is the line pulse I(x), then:
[0054] f(x,y)=I(x)
[0055] The response function of the camera to the line pulse is the line spread function (similar to the slit image in traditional algorithm processing), which is expressed as:
[0056]
[0057] Among them, it is manifested as the light intensity distribution in the horizontal axis direction after summing the vertical axis direction in the measured image.
[0058] The line spread function is the derivative of the edge spread function. It is expressed as:
[0059]
[0060] The specific operation in image processing is: taking pixel differences (ie, taking derivatives) of adjacent pixels of the horizontal coordinates of the knife-edge image (ie, edge spread function), and finally obtaining a line spread function image.
[0061] In the present invention, the image pixels are convolved by a differential template to calculate, such as Figure 4 As shown in FIG. 3 , the constructed differential template matrix is a single row, and the length of the differential template matrix is determined by the width of the rising edge of the knife edge obtained in step 3. The two end elements of the differential template matrix are 1, and the middle element is 0. After the differential template matrix is constructed, the differential template matrix is convolved with the grayscale image matrix. The specific operation is as follows: the differential template matrix is placed at the top left position of the pixel matrix, the corresponding primary colors in the differential template matrix and the grayscale image matrix are multiplied and summed, and then the values are replaced to the corresponding positions of the grayscale image matrix, and then the differential template matrix is differentially translated from left to right until all coverage calculations are completed, and the line spread function image is calculated, thereby achieving noise elimination.
[0062] Step 4: Identify the edge coordinates of the LSF image, and then use affine transformation to rotate the LSF image to vertical.
[0063] Among them, the ratio of the coordinate pixel value to the maximum pixel value of the knife edge image is used as the judgment basis to identify the edge coordinates of the LSF image. The edge coordinates of the discrete points of the LSF image are obtained, and the edge coordinates of the discrete points are fitted using the least squares method. The slope and intercept of the fitting line are expressed as:
[0064]
[0065] Among them, a represents the slope of the fitted line, b represents the intercept of the fitted line, and x i ,y i Represents the horizontal and vertical coordinates of discrete edge points, and N represents the number of calculated pixels; is the mean ordinate of discrete edge points, is the mean value of the horizontal coordinates of discrete edge points.
[0066] The above formula can be used to obtain the tilt angle of the LSF image, and the LSF image can be rotated using affine transformation according to the tilt angle.
[0067] The coordinates of each pixel [xy] T Perform affine transformation to obtain the corresponding pixel coordinate point [x1 y1] T , expressed as:
[0068]
[0069] in, Represents the rotation matrix of affine transformation, α=scale*cos(angle), β=scale*sin(angle), center.x and center.y represent the horizontal and vertical coordinates of the rotation center, angle=-b / a represents the rotation angle, and scale represents the scale factor.
[0070] Step 5: Perform discrete Fourier transform on the rotated LSF image as shown below to obtain the optical modulation transfer function curve:
[0071]
[0072] Where k = 0, 1, 2, 3…N-1, n represents the horizontal coordinate number of the pixel point in the LSF image, k represents the horizontal coordinate number calculated by the new matrix after discrete Fourier transform, x(n) represents the horizontal coordinate of the pixel point, N-1 represents the number of pixels in a row of the LSF image, and j represents the imaginary number i.
[0073] The abscissa of the optical modulation transfer function satisfies:
[0074]
[0075] in, The step size is 1, and Δu represents the distance between two pixels.
[0076] The algorithm of the present invention is now compared with the traditional algorithm. The collected knife edge image is extracted as follows Figure 5The ESF (edge spread function) curve shown in Figure 2 is shown in Figure 2. After differential operation using two different algorithms, it is found that the width of the LSF curves calculated by the two algorithms are basically the same, indicating that the adaptive differential algorithm can basically guarantee the accuracy of MTF calculation. Figure 5 It can be seen that the line spread function curve calculated without the adaptive differential algorithm is not symmetrical, and a base noise will be formed within the horizontal coordinate range of the ESF curve step. The formation of this base noise is caused by the uneven imaging of the original knife edge image. Therefore, the adaptive differential algorithm of the present invention is used for image processing to eliminate this noise.
[0077] like Figure 6 As shown in the figure, it can be seen that the modulation transfer function curve calculated before the adaptive differential algorithm is used has obvious jitter, and the low-frequency part changes rapidly, which shows that the experimental device has basic application value.
[0078] Finally, it should be noted that the features mentioned and / or shown in the above description of the exemplary embodiments of the present invention may be combined in the same or similar manner into one or more other embodiments, combined with the features in other embodiments or substituted for the corresponding features in other implementations. The technical solutions obtained by these combinations or substitutions shall also be deemed to be included in the protection scope of the present invention.
Claims
1. A method for calculating optical modulation transfer function based on knife-edge image, characterized in that: The following steps are involved: Step 1: Use an optical modulation function measurement device to collect a knife edge image, and convert the collected multi-channel knife edge image into a single-channel grayscale image; Step 2: Traverse each pixel value of each row of the knife-edge image, count the number of pixels whose pixel values are in the rising edge interval, and use the following formula to calculate the knife-edge rising edge width of the grayscale image: Wherein, width represents the width of the rising edge of the grayscale image, row represents the horizontal coordinate of the pixel position, height represents the vertical coordinate of the pixel position, f(row,height) represents the ratio of the pixel value at (row,height) to the maximum pixel value of the knife-edge image, number represents the number of pixels whose pixel values are in the rising edge interval, n represents the number of pixel columns of the knife-edge image, and the rising edge interval refers to 10%-90% of the maximum pixel value of the knife-edge image; Step 3: Based on the rising edge width of the knife edge, a differential template matrix is constructed, and the differential template matrix is used to perform convolution operation on the grayscale image to obtain the LSF image; Step 4: Identify the edge coordinates of the LSF image, and then use affine transformation to rotate the LSF image to vertical; Step 5: Perform discrete Fourier transform on the rotated LSF image to obtain the optical modulation transfer function curve.
2. The optical modulation transfer function calculation method according to claim 1, characterized in that: In step 3, the length of the differential template matrix is determined by the width of the rising edge of the knife edge.
3. The optical modulation transfer function calculation method according to claim 1, characterized in that: In step 4, the ratio of the coordinate pixel value to the maximum pixel value of the knife edge image is used as the judgment basis to identify the edge coordinates of the LSF image, obtain the discrete point edge coordinates of the LSF image, and fit the discrete point edge coordinates using the least squares method. The slope and intercept of the fitting line are expressed as: a=(N∑x i and j -∑x i ∑y j ) / (N∑x i2 -(∑x i ) 2 ) Among them, a represents the slope of the fitted line, b represents the intercept of the fitted line, and x i ,y i Represents the horizontal and vertical coordinates of discrete edge points, and N represents the number of calculated pixels; is the mean ordinate of discrete edge points, is the mean value of the horizontal coordinates of discrete edge points.
4. The optical modulation transfer function calculation method according to claim 3, characterized in that: The slope and intercept of the fitting line can be used to obtain the tilt angle of the LSF image, which is -b / a. The angle at which the LSF image is rotated using affine transformation is the tilt angle.
5. The optical modulation transfer function calculation method according to claim 4, characterized in that: The coordinates [xy] of each pixel point T Perform affine transformation to obtain the corresponding pixel coordinate point [x1 y1] T , expressed as: in, Represents the rotation matrix of affine transformation, α=scale*cos(angle), β=scale*sin(angle), center.x and center.y represent the horizontal and vertical coordinates of the rotation center, angle represents the rotation angle, and scale represents the scale factor.
6. The optical modulation transfer function calculation method according to claim 1, characterized in that: In step 5, the optical modulation transfer function curve obtained is: Where k = 0, 1, 2, 3…N-1, x(n) represents the horizontal coordinate of the corresponding pixel, N-1 represents the number of pixels in a row of the LSF image, n represents the horizontal coordinate sequence number of the pixel point in the original image, k represents the horizontal coordinate sequence number of the new matrix after calculation, and j represents an imaginary number; The abscissa of the optical modulation transfer function satisfies: in, The step size is 1, and Δu represents the distance between two pixels.
Citation Information
Patent Citations
Method of on-track detection for MTF (modulation transfer function) of interference hyperspectral imager
CN102692273A
Knife-edge measuring method of modulation transfer function of digital X-ray imaging system
CN102809494A
Method for measuring size of electron beam spot of scanning electron microscope
CN104266572A
Adaptive high-precision MTF measuring method
CN104820980A
Apparatus for measuring influence of blade edge dip angles on modulation transfer function and method
CN104833480A