Small target detection method fusing region average gray difference and infrared image block
By combining the average grayscale difference in the region and infrared image block model, combined with robust principal component analysis, the problem of accuracy and low success rate of infrared small object detection in complex backgrounds is solved, and more efficient infrared small object detection is achieved.
Patent Information
- Application Number
- CN202411608681.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-25
AI Technical Summary
In a highly noisy environment, it is difficult for the prior art to effectively detect small infrared targets in complex backgrounds, resulting in low accuracy and success rate of target detection.
By integrating the region average grayscale difference and infrared image block model, the images are decomposed using robust principal component analysis (RPCA), and the region average grayscale difference is introduced to enhance the detection ability of small targets, and the real target is recognized by comparing the average grayscale difference.
It effectively improves the detection rate of small infrared targets, enhances the distinction between target areas and non-target areas, improves the success rate of target detection, and retains the complete form of targets.
Smart Images

Figure CN119516209A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical fields of image processing, target detection and image segmentation, and in particular to a small target detection method of integrating regional average grayscale difference and infrared image blocks. Background Art
[0002] Robust principal component analysis (RPCA) has significant application value as a matrix dimension reduction and decomposition technology in image processing. RPCA achieves effective separation of content by decomposing the image into a combination of a background matrix and a target matrix. The background matrix carries the common information in the image, while the target matrix highlights the local non-common structure. This decomposition method can show robustness to noise and outliers while retaining the different components of the image. However, in a noisy environment, the processing results of RPCA may be disturbed. Therefore, through precise block division and rearrangement, more accurate data input can be provided to RPCA, thereby improving the detection effect of infrared small targets.
[0003] The regional average grayscale difference is of great significance in the detection of infrared small targets. As an effective method to measure the grayscale changes of pixels in an image, it can describe the grayscale differences in different regions of the image. This indicator is used to analyze the grayscale difference between the real target area and the non-real target area. By introducing it into the target matrix, it can enhance the detection ability of small targets. The regional average grayscale difference not only reflects the texture characteristics of the image, but also provides a measure of the noise level, which helps to achieve accurate detection of infrared small targets in complex backgrounds. Summary of the invention
[0004] The object of the present invention is to provide a small target detection method by fusing regional average grayscale difference and infrared image blocks, which can suppress background clutter and improve target detection rate in infrared small target detection under complex background.
[0005] The technical solution adopted by the present invention is: a small target detection method integrating regional average grayscale difference and infrared image blocks, comprising: Step S110, obtaining an original image matrix containing a single frame of infrared small target; Step S120, using a local area construction method to construct the original image matrix into an infrared block image matrix; Step S130, performing robust principal component analysis on the infrared block image matrix to obtain a background matrix and a target matrix to be measured; Step S140, calculating and obtaining all connected domains in the target matrix to be tested, where the connected domains are suspected target regions; Step S150, constructing a rectangular local area for each suspected target area, wherein the center of each rectangular local area coincides with the center of the corresponding suspected target area; Step S160 , calculating and comparing the average grayscale difference between each suspected target area and the corresponding rectangular local area of the target matrix to be tested, to obtain the real target.
[0006] The beneficial effects of the present invention compared with the prior art are: (1) The present invention effectively improves the target detection rate by fusing the regional average grayscale difference with the infrared image block model.
[0007] (2) The present invention optimizes the selection logic of the average grayscale difference area, increases the distinction between the target area and the non-target area, and improves the success rate of target detection.
[0008] (3) The algorithm flow of the present invention does not involve threshold segmentation operations and can retain the complete shape of the target. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 It is a flow chart of a small target detection method for fusing regional average grayscale difference and infrared image blocks according to the present invention; Figure 2 The detection results of different algorithms, (a) is the original image, (b) is the result of LCM algorithm processing, (c) is the result of Top-Hat algorithm processing, (d) is the result of RPCA algorithm processing, (e) is the result of this method processing; Figure 3 SCRG values of different algorithms for each image, where (a) shows the SCRG values of each algorithm for Figure 2 (a) shows the detection results of the top image, and (b) shows the detection results of each algorithm. Figure 2 (a) shows the detection results of the middle image, and (c) shows the detection results of each algorithm. Figure 2 (a) Detection results of the bottom image. DETAILED DESCRIPTION
[0010] The present invention is further described below with reference to the accompanying drawings and specific embodiments.
[0011] Small targets in infrared images have the characteristics of small area, irregular shape and low contrast. In the case of complex background, small infrared targets are more difficult to detect. The present invention proposes a small target detection method that integrates regional average grayscale difference and infrared image blocks. A single frame infrared image containing a small target to be detected is divided into blocks and rearranged to generate an infrared block image. Robust principal component analysis (RPCA) is applied to the infrared block image to decompose the background matrix and the target matrix. The regional average grayscale difference is introduced into the target matrix, and the infrared small target detection under complex background is realized based on the difference in the average grayscale difference between the real target area and the non-real target area.
[0012] Figure 1 Flow chart of the small target detection method of the present invention which combines the average grayscale difference of the region and the infrared image block. Figure 1 As shown, the specific steps of this method are as follows: Step S110, obtaining an original image matrix containing a single frame of infrared small target; Step S120, using a local area construction method to construct the original image matrix into an infrared block image matrix; Step S120 may include: setting a sliding window of a fixed size on the original image matrix. For the original image matrix, traverse the sliding window in the order from the upper left to the lower right to obtain a plurality of local block images of the same size. Then, transpose each local block image into a column vector, and construct an infrared block image matrix from these column vectors.
[0013] Step S130, performing robust principal component analysis on the infrared block image matrix to obtain a background matrix and a target matrix to be measured; Step S130 may include: according to the robust principal component analysis theory, the infrared block image matrix Decomposed into background matrix and target matrix: , in, is a background matrix with low rank, is the target matrix to be tested with sparsity.
[0014] According to the theory of robust principal component analysis, the above formula can be expressed as a convex optimization problem: satisfy , in, represents the nuclear norm, express norm, is the regularization coefficient. The accelerated proximal gradient (APG) algorithm is used to calculate and solve the convex optimization problem described in the above formula to obtain the background matrix and the target matrix to be tested .
[0015] Step S140, calculating and obtaining all connected domains in the target matrix to be detected, and calling these connected domains as suspected target regions; In the target matrix to be tested In step S140, all connected domains are calculated based on the eight connected domain algorithm. Step S140 also includes: removing the connected domains whose area is greater than a predetermined number of pixels in the connected domains, and the remaining connected domains are used as suspected target areas. In step S110, it is defined that the area of the small infrared target is not greater than 25 pixels, so in step S140, the connected domains whose area is greater than 25 pixels are removed, and the remaining connected domains are called suspected target areas.
[0016] Step S150: construct a rectangular local area for each suspected target area. The center of each rectangular local area coincides with the center of the corresponding suspected target area; The process of constructing a rectangular local area includes: for each suspected target area, calculate its geometric center, and set the pixel point that coincides with the geometric center as the center pixel point. Each suspected target area corresponds to a center pixel point. At each center pixel point, the boundary of the corresponding suspected target area is pushed outward by 9 pixels to obtain a rectangular local area. The new boundary is the boundary of the rectangular local area.
[0017] Step S160 , calculating and comparing the average grayscale difference between each suspected target area and the corresponding rectangular local area of the target matrix to be tested, to obtain the real target.
[0018] Step S160 may include: calculating the average grayscale difference between each suspected target region and the corresponding rectangular local region according to the definition of the average grayscale difference of the region: , in, represents the mean operation, is the average grayscale difference between the ith suspected target area and the corresponding rectangular local area, is the sum of the gray values of the i-th suspected target area, is the sum of the grayscale values of the local area of the i-th rectangle, is the number of pixels contained in the i-th suspected target area.
[0019] Since the real target carries information, the average grayscale difference of the suspected target area containing the real target is much greater than the average grayscale difference of the suspected target area not containing the real target.
[0020] Set an adaptive judgment value to obtain the true target: , in, Indicates the standard deviation operation. Indicates the maximum value operation. Indicates the absolute value operation. Indicates the calculated adaptive judgment value. is the calculated average grayscale difference. Traverse all average grayscale differences, when an average grayscale difference is greater than the adaptive judgment value When , the suspected target area corresponding to the average grayscale difference is considered to be the real target.
[0021] To prove the effectiveness and detection ability of this method, three infrared small target images in complex backgrounds were selected for verification and compared with other commonly used target detection methods. The other three comparison algorithms are: Local Contrast Measure (LCM), Top-Hat filtering and RPCA. Figure 2 As shown in the figure, (a) is the original image, (b) is the result of LCM algorithm processing, (c) is the result of Top-Hat algorithm processing, (d) is the result of RPCA algorithm processing, and (e) is the result of this method processing.
[0022] In order to quantitatively compare the advantages and disadvantages of various algorithms, the signal-to-clutter ratio (SCR) and signal-to-clutter ratio gain (SCRG) are introduced: , , in, is the mean gray value of the target area, is the mean gray value of the background area, is the standard deviation of the grayscale value of the background area, Represents the clutter signal ratio of the original image, It represents the clutter signal ratio of the output image after algorithm processing. SCRG represents the enhancement effect of the algorithm on the target. The larger the SCRG value, the better the detection effect of the algorithm.
[0023] Figure 3 The SCRG values in the figure show the effects of each algorithm on Figure 2 (a) shows the detection results of three original images, where (a) shows the detection results of each algorithm. Figure 2 (a) shows the detection results of the top image, and (b) shows the detection results of each algorithm. Figure 2 (a) shows the detection results of the middle image, and (c) shows the detection results of each algorithm. Figure 2The detection result of the bottom image in (a). Figure 2 and Figure 3 , which proves that this method has good detection capability for small infrared targets in complex backgrounds.
[0024] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technology can understand and think of any changes or substitutions within the technical scope disclosed by the present invention, which should be included in the scope of the present invention. The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
Claims
1. A small target detection method integrating regional average grayscale difference and infrared image blocks, characterized in that: include: Step S110, obtaining an original image matrix containing a single frame of infrared small target; Step S120, using a local area construction method to construct the original image matrix into an infrared block image matrix; Step S130, performing robust principal component analysis on the infrared block image matrix to obtain a background matrix and a target matrix to be measured; Step S140, calculating and obtaining all connected domains in the target matrix to be tested, where the connected domains are suspected target regions; Step S150, constructing a rectangular local area for each suspected target area, wherein the center of each rectangular local area coincides with the center of the corresponding suspected target area; Step S160 , calculating and comparing the average grayscale difference between each suspected target area and the corresponding rectangular local area of the target matrix to be tested, to obtain the real target.
2. The small target detection method of fusing regional average grayscale difference and infrared image blocks according to claim 1, characterized in that: In step S110, the area of the small infrared target is not larger than 25 pixels.
3. The small target detection method of fusing regional average grayscale difference and infrared image blocks according to claim 1, characterized in that: In step S120, a sliding window of a fixed size is set on the original image matrix. For the original image matrix, the sliding window is traversed in order from the upper left to the lower right to obtain a plurality of local block images of the same size, and then each local block image is transposed into a column vector, and an infrared block image matrix is constructed by these column vectors.
4. The small target detection method of fusing regional average grayscale difference and infrared image blocks according to claim 1, characterized in that: In step S130, according to the robust principal component analysis theory, the infrared block image matrix Decompose into background matrix and target matrix: , in, is a background matrix with low rank, is the target matrix to be tested with sparsity; According to the robust principal component analysis theory, the above formula is expressed as a convex optimization problem: satisfy , in, represents the nuclear norm, express norm, is the regularization coefficient, and the accelerated proximal gradient algorithm is used to calculate and solve the convex optimization problem described in the above formula to obtain the background matrix and the target matrix to be tested .
5. The small target detection method of fusing regional average grayscale difference and infrared image blocks according to claim 1, characterized in that: In step S140, all connected domains are calculated based on the eight connected domain algorithm. Step S140 further includes: removing connected domains whose areas are larger than a preset number of pixels from the connected domains, and taking the remaining connected domains as suspected target regions.
6. The small target detection method of fusing regional average grayscale difference and infrared image blocks according to claim 1, characterized in that: In step S150, the process of constructing a rectangular local area includes: for each suspected target area, calculating its geometric center, setting the pixel point coinciding with the geometric center as the center pixel point, and at each center pixel point, pushing the boundary of the corresponding suspected target area outward by 9 pixels to obtain a rectangular local area.
7. The small target detection method of fusing regional average grayscale difference and infrared image blocks according to claim 1, characterized in that: Step S160 includes: Calculate the average grayscale difference between each suspected target area and the corresponding rectangular local area: , in, represents the mean operation, is the average grayscale difference between the ith suspected target area and the corresponding rectangular local area, is the sum of the gray values of the i-th suspected target area, is the sum of the grayscale values of the local area of the i-th rectangle, is the number of pixels contained in the i-th suspected target area; Set an adaptive judgment value to obtain the true target: , in, Indicates the standard deviation operation. Indicates the maximum value operation. Indicates the absolute value operation. represents the calculated adaptive judgment value, is the calculated average grayscale difference; Traverse all average grayscale differences, when an average grayscale difference is greater than the adaptive judgment value When , the suspected target area corresponding to the average grayscale difference is the real target.
Citation Information
Cited By
Machine vision-based inner hexagonal screw surface defect online detection method
CN122335741A
A machine vision-based internal hexagonal screw surface defect online detection method
CN122335741B