Infrared camera MTF test method, system and device and storage medium
Through the image processing technology of the infrared camera, the clarity value and target hole center positioning are used to solve the problems of inaccurate adjustment of the infrared camera and uneven target surface, and improve the accuracy of imaging quality evaluation.
Patent Information
- Application Number
- CN202410897899.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-10-11
AI Technical Summary
In the existing technology, infrared cameras have problems with inaccuracy in adjusting to the clearest position and four corner positions, and the uneven target surface affects the test results, resulting in inaccurate test results.
By acquiring the image based on the infrared camera, using the preset area frame and evaluation function to calculate the sharpness value, locate the clear point and generate the alignment position, combine the low-frequency and high-frequency area images, obtain the center of the target hole, generate the alignment position, and collect multiple frames Image, segment the image to generate ROI, and input it into MTF for edge method calculation to evaluate imaging quality.
Quickly adjust the infrared camera to the appropriate position to eliminate the impact of uneven target surfaces, reduce noise fluctuations, and improve the accuracy of MTF results.
Smart Images

Figure CN118764607A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of optical metrology and measurement technology, and specifically relates to an infrared camera MTF test method, system, device and storage medium. Background Art
[0002] Modulation Transfer Function (MTF) is an indicator used to measure the image quality of a lens or the entire optical system in an imaging system. It is particularly suitable for evaluating the system's ability to reproduce details of different spatial frequencies. In the prior art, a bevel test target that meets the ISO12233 inclination requirements is used, and the distance between the camera under test and the test target is adjusted so that the distance between the camera lens surface under test and the test target meets the minimum focusing distance, the test target covers the central field of view and at least two 70% fields of view, and the length of each square edge is not less than 10 pixels; the camera under test is adjusted so that the angle between the edge of the test target square in the central field of view and its corresponding direction is about 5°; the temperature difference between the high and low temperature areas of the target is adjusted to 10°C±2°C; the camera under test is adjusted so that its optical axis is orthogonal to the test target plane; the camera under test is flipped so that the target square under test is at the central field of view and 70% field of view, and the length of the target square edge is not less than 10 pixels; and image processing software is used to analyze the MTF50P values of the central area and 70% field (four corners of upper left, upper right, lower left, and lower right).
[0003] However, in the above-mentioned prior art, there are problems of inaccuracy in adjusting the camera under test to the clearest position and the four corners to the clearest position, and there is a problem of slow adjustment when adjusting the camera under test to align with the target. Among them, the uneven target surface will also affect the test results. Therefore, it is necessary to use the target surface features and image processing methods to accurately locate and adjust the camera under test to adapt to the target surface, overcome the uneven target surface and the noise in the time domain, and obtain more accurate test results. Summary of the invention
[0004] To solve the above problems, the present invention provides an infrared camera MTF test method, system, device and storage medium to solve the problems in the prior art.
[0005] In order to achieve the above-mentioned invention object, the present invention proposes an infrared camera MTF test method, comprising:
[0006] S1: acquiring a first image based on an infrared camera; acquiring a central area of the first image based on a preset area frame, and acquiring a clarity value of the central area based on a preset evaluation function; locating a clarity point of the first image based on the clarity value and a preset movement adjustment method; adjusting the infrared camera based on the clarity point to generate a second image;
[0007] S2: respectively acquiring a low-frequency region and a high-frequency region of the second image, mapping the low-frequency region and combining it with the high-frequency region to generate a third image;
[0008] S3: the infrared camera locates the characteristic mark of the third image based on the movement adjustment method, obtains the centers of four target holes based on the characteristic marks, and connects the centers of the diagonal target holes to generate a connecting line; the infrared camera is adjusted based on the movement adjustment method to make the connecting line coincide with the diagonal line of the third image, an alignment position is generated, and the positioning alignment of the infrared camera is completed based on the alignment position;
[0009] S4: the infrared camera collects a plurality of frame images based on the alignment position and the preset frame number to generate a first image set; calculates the average frame of all the frame images in the first image set to generate a fourth image; and segments the fourth image based on the center of the target hole to generate an ROI;
[0010] S5: Input the ROI into the MTF, calculate and generate an MTF result based on the knife edge method, and evaluate the imaging quality of the infrared camera based on the MTF result.
[0011] Furthermore, the obtaining the clarity value of the central area based on a preset evaluation function includes:
[0012] The definition value F of the central area is calculated based on a first formula, wherein the first formula is:
[0013]
[0014] Among them, max is the maximum value operator symbol, sqrt is the square root operator symbol, I1(i1+1, j1), I1(i1-1, j1), I1(i1, j1+1) and I1(i1, j1-1) are all pixel values corresponding to the two-dimensional function of the central area in the first image, I1 represents the central area, i1 and j1 respectively represent the coordinate points in the central area, i1 is the horizontal coordinate of the central area, j1 is the vertical coordinate of the central area, and |f| is the numerical value corresponding to the preset evaluation function.
[0015] Furthermore, generating the second image comprises the following steps:
[0016] A three-dimensional coordinate system is constructed based on the first position of the infrared camera, a direction perpendicular to the target surface is set as the Z axis of the three-dimensional coordinate system, a horizontal direction perpendicular to the Z axis is set as the X axis, and a vertical direction perpendicular to the Z axis is set as the Y axis. The infrared camera moves and rotates based on the three-dimensional coordinate system to form the movement adjustment method;
[0017] The infrared camera is moved along the Z axis to a coordinate point in the central area where the clarity value is greater than a first preset value, a second position of the infrared camera after the movement is obtained, and the second image is generated based on the second position.
[0018] Further, generating the third image comprises the following steps:
[0019] Filter the second image through a filter to generate the low-frequency region and the high-frequency region respectively;
[0020] The maximum pixel value and the minimum pixel value of the second image are respectively obtained, and the low-frequency area is mapped based on a second formula to generate a mapping area, where the second formula is:
[0021] Among them, J(i J , j J ) is the pixel value corresponding to the two-dimensional function of the mapping area, I2(i2, j2) is the pixel value corresponding to the two-dimensional function of the low-frequency area, I2 represents the low-frequency area, i2 is the abscissa of the low-frequency area, j2 is the ordinate of the low-frequency area, K is the mapping coefficient, l max is the maximum pixel value, and l min is the minimum pixel value;
[0022] The mapping area is combined with coordinate points included in the high-frequency area to generate the third image.
[0023] Furthermore, the filter is a 9*9 template Gaussian filter, wherein a standard deviation parameter sigma of the filter is set to a preset numerical range.
[0024] Further, obtaining the centers of four target holes includes the following steps:
[0025] Locate the coordinate point of the maximum definition value in the third image, set it as a reference point, move the infrared camera to align with the reference point based on the movement adjustment method, and make the center of the third image coincide with the center of the target;
[0026] Divide the third image into multiple sub-areas based on the preset area frame, obtain the pixel average value of all sub-areas, extract the area with pixel values greater than the pixel average value in all sub-areas, set it as the target area, and obtain the position coordinate (x) of the target center in the target area based on the third formula c ,y c ), the third formula is:
[0027]
[0028] Among them, I avgis the average value of all pixels in the sub-region, P is the total number of coordinate points in the horizontal direction of the sub-region, Q is the total number of coordinate points in the vertical direction of the sub-region, I3(i3, j3) is the pixel value corresponding to the two-dimensional function of the sub-region, I3 represents the sub-region, i3 and j3 represent the coordinate points in the sub-region respectively, i3 is the abscissa of the sub-region, j3 is the ordinate of the sub-region, x c is the horizontal coordinate of the target center, y c is the ordinate of the target center, I4(i4, j4) is the pixel value corresponding to the two-dimensional function of the target area, I4 represents the target area, i4 and j4 respectively represent the coordinate points in the target area, i4 is the abscissa of the target area, j4 is the ordinate of the target area, M is the total number of coordinate points of the target area in the horizontal direction, and N is the total number of coordinate points of the target area in the vertical direction;
[0029] Based on the third formula, the position coordinates of the target centers corresponding to the four corners of the field of view are respectively obtained, and the position coordinates of all the target centers are sequentially set as the four target hole centers.
[0030] Further, generating the alignment position comprises the following steps:
[0031] The clarity and clarity average of the four-corner field of view are respectively obtained; if the difference between each clarity and the clarity average is less than a second preset value, the four-corner field of view is determined to be normal; otherwise, the infrared camera is rotated based on the movement adjustment method until the clarity average is maximum and the difference between each clarity and the clarity average is less than the second preset value, and the position of the infrared camera after rotation is set as the alignment position.
[0032] The present invention also provides an infrared camera MTF test system, which is used to implement the above-mentioned infrared camera MTF test method, and the system mainly includes:
[0033] a coarse positioning module, which acquires a first image based on an infrared camera; acquires a central area of the first image based on a preset area frame, and acquires a clarity value of the central area based on a preset evaluation function; locates a clear point of the first image based on the clarity value and a preset movement adjustment method; and adjusts the infrared camera based on the clear point to generate a second image;
[0034] A first processing module, respectively acquiring a low-frequency region and a high-frequency region of the second image, mapping the low-frequency region and combining it with the high-frequency region to generate a third image;
[0035] A positioning and alignment module, wherein the infrared camera locates the characteristic mark of the third image based on the movement adjustment method, obtains the centers of four target holes based on the characteristic marks, and connects the centers of the diagonal target holes to generate a connecting line; the infrared camera is adjusted based on the movement adjustment method to overlap the connecting line with the diagonal line of the third image to generate an alignment position, and the positioning and alignment of the infrared camera is completed based on the alignment position;
[0036] The second processing module, the infrared camera collects a plurality of frame images based on the alignment position and the preset frame number to generate a first image set; calculates the average frame of all the frame images in the first image set to generate a fourth image; and segments the fourth image based on the center of the target hole to generate an ROI;
[0037] The testing module inputs the ROI into the MTF, generates an MTF result based on the knife edge method, and evaluates the imaging quality of the infrared camera based on the MTF result.
[0038] The present invention also provides a device, characterized in that it comprises:
[0039] Memory for storing computer programs;
[0040] A processor is used to implement the above-mentioned infrared camera MTF test method when executing the computer program.
[0041] The present invention also provides a computer storage medium, which stores program instructions. When the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned infrared camera MTF test method.
[0042] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0043] The present invention firstly collects a first image through an infrared camera, and then displays the clear points of the first image according to the clarity value of the central area, can quickly adjust the infrared camera to a suitable position, and generate a clearer second image, and finally, through the image processing of the filter, the low-frequency area and the high-frequency area of the second image are combined to generate a third image, which can eliminate the influence of the unevenness of the target surface.
[0044] The present invention also obtains the centers of four target holes of the third image through the four-corner field of view, and generates an alignment position by overlapping the connecting line and the diagonal line of the third image, so that the infrared camera completes the positioning alignment, and then generates a fourth image by averaging a plurality of frame images, generates an ROI through segmented image processing, and finally inputs the ROI into the MTF to generate an MTF result, which is used to evaluate the imaging quality of the infrared camera, can reduce the influence of noise fluctuations in the time domain and target surface temperature fluctuations on the test results, and improve the accuracy of the MTF result. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flow chart of the steps of an infrared camera MTF test method of the present invention;
[0046] Figure 2 It is a schematic diagram of the arrangement of the infrared camera device of the present invention;
[0047] Figure 3 is a schematic diagram of the second image and the third image in the present invention;
[0048] Figure 4 A schematic diagram of generating ROI in the present invention;
[0049] Figure 5 This is a structural diagram of an infrared camera MTF test system of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0052] like Figure 1 As shown, a method for testing the MTF of an infrared camera includes:
[0053] S1: Acquire a first image based on an infrared camera; acquire a central area of the first image based on a preset area frame, and acquire a clarity value of the central area based on a preset evaluation function; locate a clarity point of the first image based on the clarity value and a preset movement adjustment method; adjust the infrared camera based on the clarity point to generate a second image.
[0054] Specifically, the MTF test provides an objective method to evaluate and ensure the performance of the infrared camera, so that it can provide high-quality imaging results in various applications. In this embodiment, the preset evaluation function refers to a function suitable for infrared clarity evaluation, the first image refers to the first reference image taken by the infrared camera, the clarity value is a numerical indicator used to quantify the clarity of the image, the central area is the central area of the first image selected according to the size and shape of the preset area frame, the movement adjustment method refers to the setting of the movement and rotation method of the infrared camera, the clear point of the first image can be located according to the clarity value of the central area, and the infrared camera can be adjusted to preliminarily clear the image, that is, the second image, for example. Figure 2 As shown, the device layout of the infrared camera TC includes the movement and adjustment method of the infrared camera, and the dotted arrow L1 is the shooting direction of the infrared camera TC.
[0055] S2: respectively obtaining a low-frequency region and a high-frequency region of the second image, mapping the low-frequency region and combining it with the high-frequency region to generate a third image.
[0056] Specifically, the low-frequency region refers to a portion of the image in the frequency domain representation that changes more slowly or has a larger uniform area. On the contrary, the high-frequency region refers to a portion of the image in the frequency domain representation that contains rapid changes or rich details. In the present invention, mapping the low-frequency region of the second image can reduce the unevenness of the target surface, wherein the target surface refers to the surface of the imaging sensor of the infrared camera. After mapping the low-frequency region, it is combined with the high-frequency region so that the generated third image has higher uniformity. For example, Figure 3 As shown, they are a non-uniform second image P2 and a uniform third image P3 respectively.
[0057] S3: The infrared camera locates the characteristic mark of the third image based on the mobile adjustment method, obtains the centers of the four target holes respectively based on the characteristic mark, and connects the centers of the diagonal target holes to generate a connecting line; the infrared camera is adjusted based on the mobile adjustment method, the connecting line is overlapped with the diagonal line of the third image, an alignment position is generated, and the positioning alignment of the infrared camera is completed based on the alignment position.
[0058] Specifically, in this embodiment, the characteristic mark refers to the clearest coordinate point in the third image, and the target hole center refers to a specific point on the third image, that is, the characteristic mark. The generation method of the four target hole centers will be described later. Figure 2 As shown, the infrared camera can rotate around the Z axis so that the connecting line coincides with the diagonal line of the third image. The alignment position refers to the position of the infrared camera when the infrared camera is adjusted so that the connecting line coincides with the diagonal line of the third image. At this time, the positioning alignment can be completed.
[0059] S4: The infrared camera collects multiple frame images based on the alignment position and the preset frame number to generate a first image set; calculates the average frame of all frame images in the first image set to generate a fourth image; and segments the fourth image based on the center of the target hole to generate an ROI.
[0060] Specifically, in this embodiment, the preset number of frames can be set to 10 frames, so the first image set contains 10 frame images. The average frame refers to the average value of certain attributes of the frames selected by multiple images in the image processing algorithm, including but not limited to pixel value, signal power and frame average image, etc. The present invention refers to generating a frame average image, i.e., the fourth image, by averaging frames, which can eliminate the influence caused by small fluctuations in temporal noise and target surface temperature. Segmentation refers to image segmentation processing. Since the centers of each target hole and the preset target hole size are known, a certain offset can be made based on these data, and the image can be automatically segmented into ROI, where ROI refers to the region of interest (ROI), such as Figure 4 As shown, a ROI is generated based on the center of the target well.
[0061] S5: Input the ROI into the MTF, calculate and generate the MTF result based on the edge method, and evaluate the imaging quality of the infrared camera based on the MTF result.
[0062] Specifically, in this embodiment, the knife-edge method refers to a method used in image processing and computer vision to evaluate image clarity or imaging system performance. The ROI is input into the MTF calculation program, and the knife-edge method is used to analyze the sharpness and contrast of its edges to determine the spatial frequency. The performance of the imaging system of the infrared camera at different spatial frequencies can be evaluated, that is, the imaging quality of the infrared camera is evaluated by the MTF result.
[0063] As a preferred technical solution of the present invention, obtaining the clarity value of the central area based on a preset evaluation function includes:
[0064] The clarity value F of the central area is calculated based on the first formula, which is:
[0065]
[0066] Among them, max is the maximum value operator symbol, sqrt is the square root operator symbol, I1(i1+1, j1), I1(i1-1, j1), I1(i1, j1+1) and I1(i1, j1-1) are all pixel values corresponding to the two-dimensional function of the central area in the first image, I1 represents the central area, i1 and j1 represent the coordinate points in the central area respectively, i1 is the horizontal coordinate of the central area, j1 is the vertical coordinate of the central area, and |f| is the numerical value corresponding to the preset evaluation function.
[0067] Specifically, in this embodiment, the central area of the first image may include multiple coordinate points, and an evaluation function is required to obtain the relationship between the corresponding pixel values between adjacent coordinate points in the central area, and then the clarity value of the central area is calculated by the maximum value of the evaluation function.
[0068] As a preferred technical solution of the present invention, generating the second image includes the following steps:
[0069] A three-dimensional coordinate system is constructed based on the first position of the infrared camera, a direction perpendicular to the target surface is set as the Z axis of the three-dimensional coordinate system, a horizontal direction perpendicular to the Z axis is set as the X axis, and a vertical direction perpendicular to the Z axis is set as the Y axis. The infrared camera moves and rotates based on the three-dimensional coordinate system to form a moving adjustment method;
[0070] The infrared camera is moved along the Z axis to a coordinate point in the central area where the clarity value is greater than a first preset value, a second position of the infrared camera after the movement is obtained, and a second image is generated based on the second position.
[0071] Specifically, in this embodiment, the first position refers to the spatial position when the infrared camera acquires the first image. Figure 2 As shown, the three-dimensional coordinate system includes an X-axis, a Y-axis, and a Z-axis. The infrared camera can be moved or rotated according to the three-dimensional coordinate system, and this method is set as a mobile adjustment method to ensure the stability of the infrared camera.
[0072] When the infrared camera is moved along the Z axis, the clarity value of the central area may change. When the clarity value is greater than the first preset value, the movement can be stopped, the position of the infrared camera, i.e., the second position, is marked, and the camera is re-shot at the second position to generate a second image.
[0073] As a preferred technical solution of the present invention, generating the third image includes the following steps:
[0074] The second image is filtered through the filter to generate a low-frequency region and a high-frequency region respectively.
[0075] The maximum pixel value and the minimum pixel value of the second image are obtained respectively, and the low-frequency area is mapped based on the second formula to generate a mapping area. The second formula is:
[0076] Among them, J(i J , j J ) is the pixel value corresponding to the two-dimensional function of the mapping area, I2(i2, j2) is the pixel value corresponding to the two-dimensional function of the low-frequency area, I2 represents the low-frequency area, i2 is the horizontal coordinate of the low-frequency area, j2 is the vertical coordinate of the low-frequency area, K is the mapping coefficient, l max is the maximum pixel value, and l min is the minimum pixel value.
[0077] The mapping area is combined with the coordinate points included in the high-frequency area to generate a third image.
[0078] Specifically, in this embodiment, the filter is a system or algorithm for signal processing, and the filter can be used to filter out the low-frequency area and the high-frequency area of the second image respectively.
[0079] Mapping refers to linearly mapping the pixel values of the low-frequency area. In the second formula, the low-frequency area can be mapped by combining the maximum pixel value and the minimum pixel value of the second image to generate a new pixel value area, which is the mapping area.
[0080] Coordinate point combination refers to accumulating the pixel values of the mapping area and the high-frequency area at the same coordinate point to generate a new pixel value, that is, setting it as the pixel value of each coordinate point in the third image to generate the third image.
[0081] As a preferred technical solution of the present invention, the filter is a 9*9 template Gaussian filter, wherein the standard deviation parameter sigma of the filter is set to a preset numerical range.
[0082] Specifically, in this embodiment, the 9*9 template Gaussian filter is a convolution kernel used to blur or smooth an image in image processing. The Gaussian filter uses a Gaussian function as a weight and performs local averaging on the image to reduce image noise and details. The standard deviation parameter can control the width of the Gaussian distribution. The preset value range is [10, 70], and the optimal value can be set to 50.
[0083] As a preferred technical solution of the present invention, obtaining the centers of four target holes includes the following steps:
[0084] The coordinate point with the maximum clarity value is located in the third image and set as the reference point. The infrared camera is moved to align with the reference point based on the movement adjustment method, and the center of the third image coincides with the center of the target.
[0085] Based on the preset area frame, the third image is divided into multiple sub-areas, the pixel averages of all sub-areas are obtained, and the areas with pixel values greater than the pixel average in all sub-areas are extracted and set as target areas. The position coordinates (x c ,y c ), the third formula is:
[0086]
[0087] Among them, I avgis the average value of all pixels in the sub-region, P is the total number of coordinate points in the sub-region in the horizontal direction, Q is the total number of coordinate points in the sub-region in the vertical direction, I3 (i3, j3) is the pixel value corresponding to the two-dimensional function of the sub-region, I3 represents the sub-region, i3 and j3 represent the coordinate points in the sub-region respectively, i3 is the abscissa of the sub-region, j3 is the ordinate of the sub-region, xc is the abscissa of the target center, yc is the ordinate of the target center, I4 (i4, j4) is the pixel value corresponding to the two-dimensional function of the target region, I4 represents the target region, i4 and j4 represent the coordinate points in the target region respectively, i4 is the abscissa of the target region, j4 is the ordinate of the target region, M is the total number of coordinate points in the horizontal direction of the target region, and N is the total number of coordinate points in the vertical direction of the target region.
[0088] Based on the third formula, the position coordinates of the target centers corresponding to the four corners of the field of view are respectively obtained, and the position coordinates of all the target centers are set as the four target hole centers in sequence.
[0089] Specifically, in this embodiment, the maximum clarity value of the third image can be calculated using the first formula, that is, the reference point can be located, and the infrared camera can be moved along the Z axis to find and align with the reference point, and then moved along the X axis and Y axis respectively so that the center of the third image coincides with the center of the target.
[0090] Among them, the position coordinates of the target center need to be calculated by the third formula. First, the target area is screened out in all sub-areas divided by the third image according to the size of the pixel average value. Therefore, there may be multiple target areas. The target center point is aligned using the third formula, and then the four corner areas (four corner fields of view) are aligned using the third formula.
[0091] In this embodiment, the four-corner field of view is a 0.7 field of view at the four corners, which means that the field of view of an imaging system or infrared camera covers 70% of the area of its four corners, and four corner areas can be generated. Using the same calculation method, the position coordinates of the four target centers corresponding to the four corner areas can be obtained respectively, so four target hole centers can be generated. The purpose is to solve the situation where the center may be aligned but the four corners are not aligned.
[0092] As a preferred technical solution of the present invention, generating the alignment position includes the following steps:
[0093] The clarity and clarity average of the four-corner field of view are obtained respectively. If the difference between each clarity and the clarity average is less than a second preset value, the four-corner field of view is determined to be normal. Otherwise, the infrared camera is rotated based on the mobile adjustment method until the clarity average is maximum and the difference between each clarity and the clarity average is less than a second preset value, and the position of the infrared camera after rotation is set as the alignment position.
[0094] Specifically, in this embodiment, the calculation method of the first formula can be used to obtain the clarity value of each corner area in the four-corner field of view, that is, the clarity of the four-corner field of view, and the clarity mean refers to the average value of the clarity of each corner area in the four-corner field of view. If there is a difference between a certain clarity and the clarity mean that is greater than or equal to the second preset value, it means that the four-corner field of view needs to be adjusted, and the corresponding adjustment method is: rotate the infrared camera around the Y axis so that the clarity mean is the maximum, and the difference between each clarity and the clarity mean is less than the second preset value, and the alignment position is the optimal position of the infrared camera before the MTF test. Similarly, the grid search method can be directly used to determine the rotation positioning process of the infrared camera on the X-axis and Y-axis, for example, determine the search range: first, determine the search range of the X-axis and Y-axis rotation angles, and set the appropriate range and step size according to the actual situation; generate candidate parameters: according to the search range, discretize the rotation angles of the X-axis and Y-axis to generate a list of candidate parameters; evaluate each candidate parameter combination: traverse all possible parameter combinations to maximize the clarity mean.
[0095] like Figure 5 As shown, the present invention also provides an infrared camera MTF test system, which is used to implement the above-mentioned infrared camera MTF test method, and the system mainly includes:
[0096] A coarse positioning module is used to obtain a first image based on an infrared camera; obtain a central area of the first image based on a preset area frame, and obtain a clarity value of the central area based on a preset evaluation function; locate a clear point of the first image based on the clarity value and a preset movement adjustment method; and adjust the infrared camera based on the clear point to generate a second image.
[0097] A first processing module, respectively acquiring a low-frequency region and a high-frequency region of the second image, mapping the low-frequency region and combining it with the high-frequency region to generate a third image;
[0098] In the positioning and alignment module, the infrared camera locates the characteristic mark of the third image based on the mobile adjustment method, obtains the centers of the four target holes respectively based on the characteristic marks, and connects the centers of the diagonal target holes to generate a connecting line; the infrared camera is adjusted based on the mobile adjustment method, the connecting line is overlapped with the diagonal line of the third image, an alignment position is generated, and the positioning and alignment of the infrared camera is completed based on the alignment position.
[0099] In the second processing module, the infrared camera collects multiple frame images based on the alignment position and the preset frame number to generate a first image set; calculates the average frame of all frame images in the first image set to generate a fourth image; and segments the fourth image based on the center of the target hole to generate an ROI.
[0100] The test module inputs the ROI into the MTF and generates the MTF result based on the knife edge method, and evaluates the imaging quality of the infrared camera based on the MTF result.
[0101] The present invention also provides a device, comprising:
[0102] Memory for storing computer programs;
[0103] The processor is used to implement the above-mentioned infrared camera MTF test method when executing a computer program.
[0104] The present invention also provides a computer storage medium, which stores program instructions. When the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned infrared camera MTF test method.
[0105] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0106] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0107] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0108] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0109] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for testing the MTF of an infrared camera, characterized in that: The method comprises the following steps: S1: acquiring a first image based on an infrared camera; acquiring a central area of the first image based on a preset area frame, and acquiring a clarity value of the central area based on a preset evaluation function; Positioning a clear point of the first image based on the clarity value and a preset movement adjustment method; Adjusting the infrared camera based on the clear point to generate a second image; S2: respectively acquiring a low-frequency region and a high-frequency region of the second image, mapping the low-frequency region and combining it with the high-frequency region to generate a third image; S3: the infrared camera locates the characteristic mark of the third image based on the movement adjustment mode, obtains the centers of four target holes respectively based on the characteristic mark, and connects the centers of the diagonal target holes to generate a connecting line; Adjusting the infrared camera based on the movement adjustment method, aligning the connecting line with the diagonal line of the third image, generating an alignment position, and completing the positioning alignment of the infrared camera based on the alignment position; S4: the infrared camera collects a plurality of frame images based on the alignment position and a preset number of frames to generate a first image set; Calculating the average frame of all the frame images in the first image set to generate a fourth image; segmenting the fourth image based on the center of the target hole to generate a ROI; S5: Input the ROI into the MTF, calculate and generate an MTF result based on the knife edge method, and evaluate the imaging quality of the infrared camera based on the MTF result.
2. The method according to claim 1, characterized in that The obtaining of the clarity value of the central area based on a preset evaluation function includes: The definition value F of the central area is calculated based on a first formula, wherein the first formula is: Among them, max is the maximum value operator symbol, sqrt is the square root operator symbol, I1(i1+1, j1), I1(i1-1, j1), I1(i1, j1+1) and I1(i1, j1-1) are all pixel values corresponding to the two-dimensional function of the central area in the first image, I1 represents the central area, i1 and j1 respectively represent the coordinate points in the central area, i1 is the horizontal coordinate of the central area, j1 is the vertical coordinate of the central area, and |f| is the numerical value corresponding to the preset evaluation function.
3. The method according to claim 2, characterized in that Generating the second image comprises the following steps: A three-dimensional coordinate system is constructed based on the first position of the infrared camera, a direction perpendicular to the target surface is set as the Z axis of the three-dimensional coordinate system, a horizontal direction perpendicular to the Z axis is set as the X axis, and a vertical direction perpendicular to the Z axis is set as the Y axis. The infrared camera moves and rotates based on the three-dimensional coordinate system to form the movement adjustment method; The infrared camera is moved along the Z axis to a coordinate point in the central area where the clarity value is greater than a first preset value, a second position of the infrared camera after the movement is obtained, and the second image is generated based on the second position.
4. The method according to claim 1, characterized in that: Generating the third image comprises the following steps: filtering the second image by a filter to generate the low-frequency region and the high-frequency region respectively; The maximum pixel value and the minimum pixel value of the second image are respectively obtained, and the low-frequency area is mapped based on a second formula to generate a mapping area, where the second formula is: Among them, J(i J , j J ) is the pixel value corresponding to the two-dimensional function of the mapping area, I2(i2, j2) is the pixel value corresponding to the two-dimensional function of the low-frequency area, I2 represents the low-frequency area, i2 is the abscissa of the low-frequency area, j2 is the ordinate of the low-frequency area, K is the mapping coefficient, l max is the maximum pixel value, and l min is the minimum pixel value; The mapping area is combined with coordinate points included in the high-frequency area to generate the third image.
5. The method according to claim 4, characterized in that The filter is a 9*9 template Gaussian filter, wherein the standard deviation parameter sigma of the filter is set to a preset value range.
6. The method according to claim 1, characterized in that Obtaining the centers of the four target holes includes the following steps: Locate the coordinate point of the maximum definition value in the third image, set it as a reference point, move the infrared camera to align with the reference point based on the movement adjustment method, and make the center of the third image coincide with the center of the target; Divide the third image into multiple sub-areas based on the preset area frame, obtain the pixel average value of all sub-areas, extract the area with pixel values greater than the pixel average value in all sub-areas, set it as the target area, and obtain the position coordinate (x) of the target center in the target area based on the third formula c ,y c ), the third formula is: Among them, I avg is the average value of all pixels in the sub-region, P is the total number of coordinate points in the horizontal direction of the sub-region, Q is the total number of coordinate points in the vertical direction of the sub-region, I3(i3, j3) is the pixel value corresponding to the two-dimensional function of the sub-region, I3 represents the sub-region, i3 and j3 represent the coordinate points in the sub-region respectively, i3 is the abscissa of the sub-region, j3 is the ordinate of the sub-region, x c is the horizontal coordinate of the target center, y c is the ordinate of the target center, I4(i4, j4) is the pixel value corresponding to the two-dimensional function of the target area, I4 represents the target area, i4 and j4 respectively represent the coordinate points in the target area, i4 is the abscissa of the target area, j4 is the ordinate of the target area, M is the total number of coordinate points of the target area in the horizontal direction, and N is the total number of coordinate points of the target area in the vertical direction; Based on the third formula, the position coordinates of the target centers corresponding to the four corners of the field of view are respectively obtained, and the position coordinates of all the target centers are sequentially set as the four target hole centers.
7. The method according to claim 6, characterized in that Generating the alignment position comprises the following steps: The clarity and clarity average of the four-corner field of view are respectively obtained; if the difference between each clarity and the clarity average is less than a second preset value, the four-corner field of view is determined to be normal; otherwise, the infrared camera is rotated based on the movement adjustment method until the clarity average is maximum and the difference between each clarity and the clarity average is less than the second preset value, and the position of the infrared camera after rotation is set as the alignment position.
8. An infrared camera MTF test system, used to implement the method according to any one of claims 1 to 7, characterized in that: The system includes the following modules: A coarse positioning module, which acquires a first image based on an infrared camera; acquires a central area of the first image based on a preset area frame, and acquires a clarity value of the central area based on a preset evaluation function; Positioning a clear point of the first image based on the clarity value and a preset movement adjustment method; Adjusting the infrared camera based on the clear point to generate a second image; A first processing module, respectively acquiring a low-frequency region and a high-frequency region of the second image, mapping the low-frequency region and combining it with the high-frequency region to generate a third image; A positioning and alignment module, wherein the infrared camera locates the characteristic mark of the third image based on the movement adjustment mode, obtains the centers of four target holes based on the characteristic mark, and connects the centers of the diagonal target holes to generate a connecting line; Adjusting the infrared camera based on the movement adjustment method, aligning the connecting line with the diagonal line of the third image, generating an alignment position, and completing the positioning alignment of the infrared camera based on the alignment position; A second processing module, wherein the infrared camera collects a plurality of frame images based on the alignment position and a preset number of frames to generate a first image set; Calculating the average frame of all the frame images in the first image set to generate a fourth image; segmenting the fourth image based on the center of the target hole to generate a ROI; The testing module inputs the ROI into the MTF, generates an MTF result based on the knife edge method, and evaluates the imaging quality of the infrared camera based on the MTF result.
9. A device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer storage medium, characterized in that: The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
