Imaging focal length correction method for infrared imaging target simulation system
By analyzing the local gradient change characteristics of the target contour and outer contour in infrared grayscale images, evaluating image clarity and performing imaging correction, the problem of untimely focal length correction in harsh environments is solved, and imaging quality and information capture efficiency are improved.
Patent Information
- Application Number
- CN202510346259.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The existing infrared imaging systems are not corrected in time in harsh environments, resulting in unclear imaging, inaccurate analysis results, and frequent refocusing consumes a lot of time, affecting the efficiency of information capture.
By acquiring infrared grayscale images, extracting target contours and outer contours, analyzing local gradient change characteristics of contour pixel points and extended pixel points, obtaining the sharpness of each pixel point, and combining gradient difference characteristics, evaluating image clarity, and finally imaging correction is performed.
Timely correction of infrared imaging focal length parameters is achieved, imaging quality is improved, focusing time is reduced, and information capture efficiency is improved.
Smart Images

Figure CN119863370B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of infrared imaging correction, and in particular to an imaging focal length correction method for an infrared imaging target simulation system. Background Art
[0002] Infrared imaging target simulation systems are widely used in the testing of infrared weapons, simulation testing of infrared imaging guidance technology, and testing the anti-interference ability and target recognition ability of infrared guided weapons. However, in actual use, infrared targets may appear at different distances, and the focus needs to be adjusted to improve the accuracy of infrared system imaging targets.
[0003] The accuracy of focal length is an important factor in the imaging quality of infrared target simulation systems. Traditional methods often adjust the focal length of infrared simulation systems based on the optical system, but the calculation of focal length depends on factors such as the environment. In actual military reconnaissance, due to harsh, complex and changeable environments, the focal length needs to be adjusted in a timely manner. Inappropriate focal length will lead to unclear infrared imaging and inaccurate analysis results. Too frequent refocusing will consume a lot of focusing time and affect the efficiency of infrared imaging in capturing information. Therefore, there is a technical problem of timely correction of the focal length parameters of infrared imaging. Summary of the invention
[0004] In order to solve the technical problem that the focusing parameters of existing infrared imaging are not corrected in time and affect infrared imaging, the purpose of the present invention is to provide an imaging focal length correction method for an infrared imaging target simulation system. The technical solution adopted is as follows:
[0005] An imaging focal length correction method for an infrared imaging target simulation system, the method comprising:
[0006] Acquire an infrared grayscale image and extract the contour as the target contour; obtain the gradient of each pixel in the infrared grayscale image;
[0007] According to the local gradient change characteristics of the contour pixels on the target contour, the clarity of each contour pixel is obtained; the target contour is extended to obtain the outer contour; according to the local gradient change characteristics of the extended pixels on the outer contour, the clarity of each extended pixel is obtained; according to the clarity of all contour pixels and all extended pixels, combined with the gradient difference characteristics of all contour pixels and all extended pixels, the image clarity of the infrared grayscale image is obtained;
[0008] Perform imaging correction based on image clarity.
[0009] Furthermore, the method for acquiring the clarity of the contour pixel points includes:
[0010] The continuous pixels in the target contour are regarded as the same contour; any contour pixel is selected as the contour target pixel; a preset number of adjacent pixels of the contour target pixel belonging to the same contour are selected to jointly constitute a local sequence to be analyzed of the contour target pixel;
[0011] In the local sequence to be analyzed, the clarity of the pixel points of the outline object is obtained according to the gradient change characteristics of adjacent pixel points.
[0012] Furthermore, the method for obtaining the clarity of the outline target pixel points according to the gradient change characteristics of adjacent pixel points includes:
[0013] In the local sequence to be analyzed, a first amplitude stability is obtained according to the stability of the gradient amplitude change of adjacent pixel points; a first direction stability is obtained according to the stability of the gradient direction change of adjacent pixel points; and a local gradient change stability of the contour target pixel point is obtained according to the first amplitude stability and the first direction stability;
[0014] The clarity of the outline target pixel is obtained according to the local gradient change stability of the outline target pixel and the gradient amplitude of the outline target pixel; the local gradient change stability and the gradient amplitude of the outline target pixel are both positively correlated with the clarity of the outline target pixel.
[0015] Furthermore, the method for obtaining the outer contour includes:
[0016] The target contour is gradually extended toward the edge of the image by one adjacent layer of pixels each time, each layer of extended pixels is used as an outer contour, and the pixels are sorted according to the order of extension; at least two layers of pixels are extended.
[0017] Furthermore, the method for acquiring the clarity of the extended pixel point includes:
[0018] Select any extended pixel point as a target extended pixel point, and obtain the local gradient change stability of the target extended pixel point; obtain the clarity of the target extended pixel point according to the local gradient change stability of the target extended pixel point and the gradient amplitude of the target extended pixel point; the local gradient change stability of the target extended pixel point is positively correlated with the clarity of the target extended pixel point; the gradient amplitude of the target extended pixel point is negatively correlated with the clarity of the target extended pixel point.
[0019] Furthermore, the method for obtaining the image clarity includes:
[0020] According to the overall characteristics of the clarity of all the outline pixels on the target outline, the overall clarity of the target outline is obtained; according to the overall characteristics of the clarity of all the extended pixels on each layer of the outer contour, the overall clarity of each layer of the outer contour is obtained; according to the concentrated characteristics of the overall clarity of the target contour and the overall clarity of the outer contour, the contour clarity is obtained;
[0021] Obtaining contour discrimination according to the difference characteristics between the overall gradient amplitude of all pixel points on the target contour and the overall amplitude of all pixel points on the first outer contour;
[0022] The outer layer similarity is obtained based on the similarity characteristics of the overall gradients of all pixels of the outer layer contours of different layers;
[0023] The image clarity of the infrared grayscale image is acquired according to the contour distinction, the outer layer similarity and the contour clarity; the contour distinction, the outer layer similarity and the contour clarity are all positively correlated with the image clarity.
[0024] Furthermore, the method for obtaining the contour clarity includes:
[0025] The sum of the average value of the overall clarity of all outer contours and the overall clarity of the target contour is obtained as the numerator, the variance of the overall clarity of all outer contours is taken as the denominator, and the fraction is taken as the contour clarity.
[0026] Furthermore, the method for performing imaging correction according to the image clarity includes:
[0027] When the image clarity is lower than a preset clarity threshold, it is determined that refocusing is required.
[0028] Furthermore, the Sobel operator is used to obtain the gradient of each pixel in the infrared grayscale image.
[0029] Furthermore, the contour is extracted using a snake detection algorithm.
[0030] The present invention has the following beneficial effects:
[0031] The present invention firstly acquires an infrared grayscale image and extracts the target contour, so as to facilitate the subsequent analysis of the clarity of the target contour and its surroundings, evaluate the image clarity, and correct the imaging in time; further, according to the local gradient change characteristics of contour pixels on the target contour, the influence of different parts on the target contour being in different environmental backgrounds is reduced, and the clarity of each contour pixel is acquired, so as to facilitate the subsequent evaluation of the image clarity; the target contour is further extended to obtain an outer contour, and according to the local gradient change characteristics of the extended pixels on the outer contour, the clarity of each extended pixel is acquired, and the clarity around the target contour is analyzed, so as to facilitate the analysis of the image clarity from multiple angles, improve the accuracy of the image clarity, and finally correct the imaging more appropriately; further, according to the clarity of all contour pixels and all extended pixels, combined with the gradient difference characteristics of all contour pixels and all extended pixels, the image clarity of the infrared grayscale image is evaluated from multiple angles by integrating multiple angles, so as to provide a judgment basis for the final imaging correction; finally, the imaging correction is performed according to the image clarity. The present invention extracts the target contour in the image, analyzes the clarity of the target contour and its surroundings with the help of the local gradient change of pixel points, and then evaluates the clarity of the image based on the gradient difference between the target contour and the outer contour, so as to timely correct the imaging and ensure the imaging quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 A flowchart of an imaging focal length correction method for an infrared imaging target simulation system provided by one embodiment of the present invention;
[0034] Figure 2 An original image of an infrared target provided by an embodiment of the present invention;
[0035] Figure 3 A simulated image of an infrared target provided by an embodiment of the present invention;
[0036] Figure 4 An extended schematic diagram provided for an embodiment of the present invention;
[0037] Figure 5 The present invention provides a flowchart of a method for obtaining image clarity according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the imaging focal length correction method for an infrared imaging target simulation system proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0039] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0040] The following is a detailed description of a specific solution of an imaging focal length correction method for an infrared imaging target simulation system provided by the present invention in conjunction with the accompanying drawings.
[0041] See also Figure 1 , which shows a flow chart of an imaging focal length correction method for an infrared imaging target simulation system provided by an embodiment of the present invention, specifically comprising:
[0042] Step S1: Obtain an infrared grayscale image and extract the contour as the target contour; obtain the gradient of each pixel in the infrared grayscale image.
[0043] In infrared-based imaging systems, the clarity of the image contour is usually analyzed. However, since the contour of the target of infrared imaging may be complex and easily affected by background factors, different positions of the same target may be in different backgrounds, which makes the clear contour pixels also have large gradient changes, which leads to inaccurate judgment of the clarity of the image, resulting in errors in the simulation system's focus judgment, and the inability to accurately find the focal length for clear imaging, which ultimately affects the imaging quality. Therefore, it is necessary to analyze the image contour in detail. First, the infrared grayscale image is obtained and the target contour is extracted. Considering that the clear image contour is significantly different from the background pixels, it shows a strong sharpening feature and a large gradient difference, so the gradient of each pixel in the infrared grayscale image is obtained.
[0044] In one embodiment of the present invention, an infrared image is acquired by a digital micro-mirror array DMD, and the acquired image is grayed to obtain an infrared grayscale image; see Figure 2 , which shows an original image of an infrared target provided by an embodiment of the present invention; please refer to Figure 3 , which shows a simulated image of an infrared target provided by an embodiment of the present invention.
[0045] Preferably, in one embodiment of the present invention, a contour is extracted by a snake detection algorithm and recorded as a target contour; the gradient of each pixel point is obtained by a Sobel operator, including a gradient amplitude and a gradient direction; in other embodiments of the present invention, the implementer may also use other methods such as a Canny algorithm to obtain the target contour, or may use other methods such as a Scharr filter to obtain the gradient of a pixel point; these are all technical means well known to those skilled in the art and will not be described in detail here.
[0046] Step S2: according to the local gradient change characteristics of the contour pixels on the target contour, the clarity of each contour pixel is obtained; the target contour is extended to obtain the outer contour; according to the local gradient change characteristics of the extended pixels on the outer contour, the clarity of each extended pixel is obtained; according to the clarity of all contour pixels and all extended pixels, combined with the gradient difference characteristics of all contour pixels and all extended pixels, the image clarity of the infrared grayscale image is obtained.
[0047] Considering that when the focal length is appropriate, the target of infrared imaging is clear, the target and the background are clearly distinguished, and the target contour is relatively clear, the image clarity of the infrared grayscale image is obtained by analyzing the clarity of the pixels on the target contour. Considering that the infrared target may have a large volume, different parts may be in different environments, and the gradient characteristics of pixels far apart on the target contour are quite different, it is necessary to obtain the clarity of each contour pixel based on the local gradient change characteristics of the contour pixel on the target contour.
[0048] Preferably, in one embodiment of the present invention, considering that the target contour obtained by some algorithms may contain multiple ones, or when the focal length is not appropriate, the infrared image may also contain multiple infrared targets and obtain multiple target contours, so continuous pixel points in the target contour are regarded as the same contour; when the gradient feature change of adjacent pixel points of the contour pixel point is continuous, it means that the pixel point can clearly present the contour feature of the infrared target and the focal length parameter is more appropriate, so any contour pixel point is selected as the contour target pixel point; a preset number of adjacent pixel points of the same contour of the contour target pixel point are selected to jointly constitute a local sequence of contour target pixel points to be analyzed;
[0049] In the local sequence to be analyzed, the clarity of the contour target pixel is obtained according to the gradient change characteristics of adjacent pixel points.
[0050] Preferably, in one embodiment of the present invention, considering that the gradient change includes the gradient amplitude change and the gradient direction change, the analysis is performed from both the amplitude and direction perspectives; the more similar the gradient features of adjacent pixels are, the smaller the difference is, the greater the similarity is, indicating that the local contour of the contour target pixel is clearer and the contour target pixel is clearer; at the same time, considering that the larger the gradient amplitude of the contour target pixel is, the greater the difference between the pixel and the background is, the clearer the contour is, and the higher the definition is;
[0051] Based on this, in the local sequence to be analyzed, the first amplitude stability is obtained according to the stability of the gradient amplitude change of adjacent pixels; the first direction stability is obtained according to the stability of the gradient direction change of adjacent pixels; the local gradient change stability of the contour target pixel is obtained according to the first amplitude stability and the first direction stability;
[0052] The clarity of the contour target pixel is obtained according to the local gradient change stability of the contour target pixel and the gradient amplitude of the contour target pixel; the local gradient change stability and the gradient amplitude of the contour target pixel are positively correlated with the clarity of the contour target pixel.
[0053] As an example, the preset number is 10, and 10 adjacent pixels of the same contour of the contour target pixel are selected to form a local sequence to be analyzed. The local sequence to be analyzed includes the contour target pixel itself, and the pixel farthest from the contour target pixel is used as the starting point for sorting; any direction in the local sequence to be analyzed is selected as the positive direction, and the absolute value of the difference in the gradient amplitude and the absolute value of the difference in the gradient direction of two adjacent pixels are obtained; the calculation formula for the clarity of the contour target pixel includes: ;
[0054] in, Indicates the clarity of the outline target pixel; Represents the gradient amplitude of the contour target pixel; Indicates the stability of local gradient changes of contour target pixels; , Represents the average value of the absolute value of the difference in the gradient amplitude of all adjacent pixels in the local sequence to be analyzed; Represents the variance of the absolute value of the difference in the gradient amplitude of all adjacent pixels in the local sequence to be analyzed; Represents the average absolute value of the difference in the gradient direction of all adjacent pixels in the local sequence to be analyzed; Represents the variance of the absolute value of the difference in the gradient direction of all adjacent pixels in the local sequence to be analyzed; Used to obtain the Euclidean norm; Represents the zero division parameter, which is used to prevent the denominator from being zero and is set to 0.01.
[0055] In the calculation formula of the clarity of the contour target pixel point, the absolute value of the difference is used to indicate the severity of the change in the gradient amplitude. The larger the absolute value of the difference, the more severe the gradient change in amplitude or direction of the adjacent pixel points. The stability of the gradient amplitude change is indicated by the negative correlation mapping method of taking the reciprocal. The overall change characteristics are reflected by the method of finding the average and variance. The larger the value is, the greater the change in the gradient amplitude of all adjacent pixels in the local sequence to be analyzed is, and the worse the change stability is, so negative correlation mapping is required; at the same time The larger the value, the worse the stability of the gradient amplitude change, the less regular the gradient change, the smaller the clarity of the contour, and the need for negative correlation mapping; Fusion and , obtain the first amplitude stability, and reflect the change stability of the gradient amplitude from the change amplitude and change regularity. Indicates the stability of the first amplitude. The greater the stability of the first amplitude, the more stable the change of the local gradient amplitude of the contour target pixel point, the clearer the local contour, and the greater the clarity. Similarly, the stability of the first direction is obtained , and then integrate the gradient amplitude and gradient angle to jointly represent the stability of gradient changes.
[0056] In other embodiments of the present invention, the implementer may also use other negative correlation methods, such as using Negative correlation mapping function is used to perform negative correlation mapping: ; The regularity of gradient change can also be expressed by the mean absolute deviation instead of variance; some positive correlation mapping functions can also be used, such as using Map the gradient amplitude of the contour target pixel points. , amplify the sensitivity of the gradient amplitude of the contour target pixel; positive correlation mapping can also be performed by addition.
[0057] In the embodiment of the present invention, considering that a clear infrared image can effectively separate the imaging target from the image background, the target contour will have obvious sharpening features, and there will be no obvious gradient changes in adjacent non-contour pixels; on the contrary, if the imaging focal length is not appropriate and the infrared image is not clear, the target contour will not accurately describe the true contour of the imaging target, so that the pixels adjacent to the target contour also have a large gradient change, showing a strong contour; therefore, the target contour is extended to obtain an outer contour; based on the local gradient change characteristics of the extended pixels on the outer contour, the clarity of each extended pixel is obtained; it is convenient to analyze the image clarity from multiple angles, improve the accuracy of the image clarity, and thus more appropriately correct the imaging.
[0058] Preferably, in one embodiment of the present invention, the target contour is gradually extended toward the edge of the image by pixels, and each time an adjacent layer of pixels is extended, each layer of extended pixels is used as an outer contour, and the pixels are sorted according to the extension order; at least two layers of pixels are extended. For example, an outer contour is added to the outer layer of the target contour, that is, an outer contour with the same shape as the target contour is constructed along the target contour, but the range is extended outward by one pixel.
[0059] In one embodiment of the present invention, the outer contour of the two layers is obtained by extending twice. Figure 4 , which shows an extended schematic diagram provided by an embodiment of the present invention, Figure 4 Each square in the image represents a pixel point. The squares with the number 0 constitute the target contour, the squares with the number 1 constitute the first outer contour, and the squares with the number 2 constitute the second outer contour.
[0060] Preferably, in one embodiment of the present invention, any extended pixel point is selected as a target extended pixel point, and the local gradient change stability of the target extended pixel point is obtained; the local gradient change stability of the target extended pixel point is obtained in a similar manner to the local gradient change stability of the contour target pixel point, and is also obtained by analyzing the gradient amplitude and gradient direction of the local sequence to be analyzed, and will not be described in detail;
[0061] Considering that the smaller the local gradient change stability of the target extended pixel point, the more similar the local gradients of the pixel points in the image background area around the target contour are, the less obvious the contour features are, and the smaller the gradient amplitude is, the higher the local grayscale similarity is, the more likely it is the image background, and the higher the clarity is; therefore, the clarity of the target extended pixel point is obtained based on the local gradient change stability of the target extended pixel point and the gradient amplitude of the target extended pixel point; the local gradient change stability of the target extended pixel point is positively correlated with the clarity of the target extended pixel point; the gradient amplitude of the target extended pixel point is negatively correlated with the clarity of the target extended pixel point.
[0062] It should be noted that the pixels in the same layer and in a continuous manner are regarded as the same outer contour.
[0063] As an example, negative correlation is performed by taking the inverse, and the gradient amplitude of the target extended pixel point plus the preset zero division parameter 0.1 is used as the denominator, the local gradient change stability of the target extended pixel point is used as the numerator, and the fraction is used as the clarity of the target extended pixel point.
[0064] As another example, negative correlation is performed by mapping a negative correlation function, and the gradient amplitude of the target extended pixel point is passed through a negative correlation mapping function, such as Mapping is performed, and the product of the mapping value and the stability of the local gradient change is used as the clarity.
[0065] After obtaining the clarity of each pixel on the target contour and outer contour, the clarity of the image can be analyzed based on the clarity of all contour pixels and all extended pixels. At the same time, considering that the greater the gradient difference characteristics between the contour pixels and all extended pixels, the greater the difference between the target contour and the pixels around it, the more obvious the sharpening characteristics, the clearer the boundary, and the better the imaging effect, the image clarity of the infrared grayscale image is obtained by combining the gradient difference characteristics between all contour pixels and all extended pixels.
[0066] Preferably, in one embodiment of the present invention, the method for acquiring image clarity includes:
[0067] See also Figure 5 , which shows a flow chart of a method for obtaining image clarity provided by an embodiment of the present invention, specifically comprising:
[0068] S501: Obtain the overall clarity of the target contour according to the overall clarity characteristics of all contour pixel points on the target contour; obtain the overall clarity of each outer contour layer according to the overall clarity characteristics of all extended pixel points on each outer contour layer; obtain the contour clarity according to the concentrated characteristics of the overall clarity of the target contour and the overall clarity of the outer contour layer.
[0069] Considering that the clarity of contour pixels or extended pixels are local features of pixels, in order to reflect the overall clarity of the image, it is necessary to comprehensively consider the overall features of the clarity of all pixels on the target contour and all pixels on each outer contour.
[0070] As an example, the overall characteristics of clarity are reflected by the average value. The average value of the clarity of all contour pixels on the target contour is normalized and used as the overall clarity of the target contour; the average value of the clarity of all extended pixel points on each outer contour is normalized and used as the overall clarity of each outer contour.
[0071] As another example, the mode and median of clarity can be combined to represent the overall characteristics of clarity. For example, the mode, median and average are weighted as 0.3, 0.3 and 0.4, and the weighted sum and normalization are used as the overall clarity.
[0072] It should be noted that the normalization methods are all maximum and minimum value normalization methods. When all values are consistent, the normalization results of all values are 1.
[0073] S502: Obtain contour discrimination according to the difference characteristics between the overall gradient amplitude of all pixels on the target contour and the overall amplitude of all pixels on the first outer contour.
[0074] Considering that the first outer contour is closest to the target contour, the greater the difference in gradient amplitude between the two, the clearer the target contour is and the greater the discrimination degree is. Therefore, the contour discrimination degree is obtained by the difference in the overall gradient amplitude between the target contour and the first outer contour.
[0075] As an example, the overall gradient amplitude of all pixels on the contour is represented by the average value of the gradient amplitude, and the absolute value of the difference between the average value of the gradient amplitude of all pixels on the target contour and the average value of the gradient amplitude of all pixels on the first outer contour is used as the contour discrimination. The difference characteristics are analyzed by means of the absolute value of the difference. The larger the absolute value of the difference, the greater the difference characteristic between the overall gradient amplitude of all pixels on the target contour and the overall amplitude of all pixels on the first outer contour, the clearer the contour, and the greater the contour discrimination.
[0076] S503: Obtain outer layer similarity according to similar features of the overall gradients of all pixel points of outer layer contours of different layers.
[0077] Considering that the more similar the overall gradients of the outer contours of different layers are, the stronger the consistency of the pixels of all the outer contours is, which reflects that the background area in the image is clearer, so the outer layer similarity is obtained based on the similarity characteristics of the overall gradients of all pixels of the outer contours of different layers.
[0078] As an example, the average value of the gradient amplitude of all pixel points of each outer contour is obtained as the overall gradient of each outer contour; the standard deviation of the overall gradient of all outer contours is obtained, and the standard deviation is added with a preset zero division parameter 0.1 and the inverse is taken as the outer layer similarity; with the help of the standard deviation and negative correlation mapping, the similarity characteristics of the overall gradient are reflected. The smaller the standard deviation, the smaller the fluctuation of the overall gradient, the stronger the consistency, the stronger the similarity, and the greater the outer layer similarity.
[0079] In other embodiments of the present invention, similarly to the overall clarity, the mode and the median can jointly represent the overall gradient of each outer layer contour; negative correlation can be performed by mapping the negative correlation function, and the standard deviation can be mapped through the negative correlation mapping function, such as Mapping is performed and the mapping value is used as the outer similarity. The fluctuation characteristics of the overall gradient can also be represented by the range and mean absolute deviation of the overall gradient. The smaller the range or mean absolute deviation, the greater the outer similarity.
[0080] S504: Obtaining image clarity of the infrared grayscale image according to the contour distinction, the outer layer similarity and the contour clarity; the contour distinction, the outer layer similarity and the contour clarity are all positively correlated with the image clarity.
[0081] As an example, the product of contour distinction, outer layer similarity and contour clarity is normalized and used as image clarity.
[0082] As another example, the sum of the contour distinction, the outer layer similarity, and the contour clarity is normalized and used as the image clarity.
[0083] Preferably, in one embodiment of the present invention, considering that the larger the average value of the overall clarity of all outer contours is, the higher the clarity at which the overall clarity of the outer contours is concentrated, and at the same time, the smaller the variance of the overall clarity of all outer contours is, the more concentrated the overall clarity of the outer contours is, the smaller the difference in overall clarity of outer contours of different layers is, and the clearer the image is, the sum of the average value of the overall clarity of all outer contours and the overall clarity of the target contour is obtained as the numerator, the variance of the overall clarity of all outer contours is taken as the denominator, and the fraction is taken as the contour clarity.
[0084] Step S3: Perform imaging correction according to image clarity.
[0085] After obtaining the image clarity of the infrared grayscale image, the imaging can be corrected in time to ensure the imaging quality.
[0086] Preferably, in one embodiment of the present invention, when the image clarity is lower than a preset clarity threshold, it is determined that refocusing is required.
[0087] As an example, the preset clarity threshold is 0.9. When the image clarity is lower than 0.9, it is considered that the focal length parameters of the imaging are inappropriate, the infrared imaging effect is not ideal, and refocusing is required.
[0088] It should be noted that the automatic focusing method of infrared imaging is a technical means well known to those skilled in the art. In one embodiment of the present invention, an automatic focusing method for an infrared thermal imager with publication number CN114544004A is adopted. In other embodiments of the present invention, the implementer may choose other focusing methods, which will not be described in detail here.
[0089] In summary, in order to solve the technical problem that the focusing parameters of existing infrared imaging are not corrected in time and infrared imaging is affected, the present invention provides an imaging focal length correction method for an infrared imaging target simulation system. The present invention first obtains an infrared grayscale image and extracts the target contour, and obtains the gradient of each pixel point; further obtains the clarity of each contour pixel point; further extends the target contour to obtain the outer contour; further obtains the clarity of each extended pixel point; further obtains the image clarity of the infrared grayscale image based on the clarity of all contour pixels and all extended pixels, combined with the gradient difference characteristics of all contour pixels and all extended pixels; finally, imaging correction is performed based on the image clarity. The present invention extracts the target contour in the image, analyzes the clarity of the target contour and its surroundings with the help of the local gradient changes of the pixels, and then evaluates the clarity of the image in combination with the gradient difference between the target contour and the outer contour, thereby timely correcting the imaging and ensuring the imaging quality.
[0090] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0091] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. An imaging focal length correction method for an infrared imaging target simulation system, characterized in that: The method comprises: Acquire an infrared grayscale image and extract the contour as the target contour; obtain the gradient of each pixel in the infrared grayscale image; According to the local gradient change characteristics of the contour pixels on the target contour, the clarity of each contour pixel is obtained; the target contour is extended to obtain the outer contour; according to the local gradient change characteristics of the extended pixels on the outer contour, the clarity of each extended pixel is obtained; according to the clarity of all contour pixels and all extended pixels, combined with the gradient difference characteristics of all contour pixels and all extended pixels, the image clarity of the infrared grayscale image is obtained; Perform imaging correction according to image clarity; The method for obtaining the clarity of the outline pixel points includes: Continuous pixels in the target contour are regarded as the same contour; any contour pixel is selected as the contour target pixel; a preset number of adjacent pixels of the contour target pixel belonging to the same contour are selected to jointly constitute a local sequence to be analyzed of the contour target pixel; In the local sequence to be analyzed, the clarity of the pixel points of the outline target is obtained according to the gradient change characteristics of adjacent pixel points; The method for obtaining the clarity of the pixel points of the contour target according to the gradient change characteristics of adjacent pixel points includes: In the local sequence to be analyzed, a first amplitude stability is obtained according to the stability of the gradient amplitude change of adjacent pixels; a first direction stability is obtained according to the stability of the gradient direction change of adjacent pixels; and a local gradient change stability of the contour target pixel is obtained according to the first amplitude stability and the first direction stability; Obtaining the clarity of the outline target pixel point according to the local gradient change stability of the outline target pixel point and the gradient amplitude of the outline target pixel point; both the local gradient change stability and the gradient amplitude of the outline target pixel point are positively correlated with the clarity of the outline target pixel point; The method for acquiring the clarity of the extended pixel point includes: Select any extended pixel point as a target extended pixel point, and obtain the local gradient change stability of the target extended pixel point; obtain the clarity of the target extended pixel point according to the local gradient change stability of the target extended pixel point and the gradient amplitude of the target extended pixel point; the local gradient change stability of the target extended pixel point is positively correlated with the clarity of the target extended pixel point; the gradient amplitude of the target extended pixel point is negatively correlated with the clarity of the target extended pixel point.
2. The imaging focal length correction method for an infrared imaging target simulation system according to claim 1, characterized in that: The method for obtaining the outer contour comprises: The target contour is gradually extended toward the edge of the image by one adjacent layer of pixels each time, each layer of extended pixels is used as an outer contour, and the pixels are sorted according to the order of extension; at least two layers of pixels are extended.
3. The imaging focal length correction method for an infrared imaging target simulation system according to claim 2, characterized in that: The method for acquiring the image clarity comprises: According to the overall characteristics of the clarity of all the outline pixels on the target outline, the overall clarity of the target outline is obtained; according to the overall characteristics of the clarity of all the extended pixels on each layer of the outer contour, the overall clarity of each layer of the outer contour is obtained; according to the concentrated characteristics of the overall clarity of the target contour and the overall clarity of the outer contour, the contour clarity is obtained; Obtaining contour discrimination according to the difference characteristics between the overall gradient amplitude of all pixel points on the target contour and the overall amplitude of all pixel points on the first outer contour; The outer layer similarity is obtained based on the similarity characteristics of the overall gradients of all pixels of the outer layer contours of different layers; The image clarity of the infrared grayscale image is acquired according to the contour distinction, the outer layer similarity and the contour clarity; the contour distinction, the outer layer similarity and the contour clarity are all positively correlated with the image clarity.
4. The imaging focal length correction method for an infrared imaging target simulation system according to claim 3, characterized in that: The method for obtaining the contour clarity comprises: The sum of the average value of the overall clarity of all outer contours and the overall clarity of the target contour is obtained as the numerator, the variance of the overall clarity of all outer contours is taken as the denominator, and the fraction is taken as the contour clarity.
5. The imaging focal length correction method for an infrared imaging target simulation system according to claim 1, characterized in that: The method for performing imaging correction according to the image clarity comprises: When the image clarity is lower than a preset clarity threshold, it is determined that refocusing is required.
6. The imaging focal length correction method for an infrared imaging target simulation system according to claim 1, characterized in that: The Sobel operator is used to obtain the gradient of each pixel in the infrared grayscale image.
7. The imaging focal length correction method for an infrared imaging target simulation system according to claim 1, characterized in that: The contour is extracted using a snake detection algorithm.
Citation Information
Patent Citations
Automatic focusing method for thermal infrared imager
CN114544004A
Aerial target detection identifying method by means of infrared imaging equipment
CN102982333A
Polygon contour detection method and device based on line scanning camera imaging
CN117830336A