Optimization method for weak target detection of SAR image based on local filtering
By employing local filtering and correlation calculation at different scales in SAR images, the problem of weak target detection is solved, and the detection accuracy and clarity of targets are improved.
Patent Information
- Application Number
- CN202411128246.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-08-16
AI Technical Summary
Weak target detection in SAR images is difficult. Existing algorithms have difficulty distinguishing between small hole-like objects and weak target objects. Background noise and clutter have serious influence, and the contrast between target and background is low, making detection difficult.
Local mean filtering is performed using mask matrices of different scales, and filtering is performed using window filters at eight different locations. Local feature correlation is calculated, and image contrast is adjusted by weighting coefficients to highlight target features.
It improves the detection accuracy and recognition of weak targets, enhances the clarity of targets in images, and makes weak targets easier to detect accurately.
Smart Images

Figure CN119130923B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of weak target processing of SAR images. BACKGROUND
[0002] With the rapid development of science and technology, synthetic aperture radar (SAR) technology is widely used in security, environment, remote sensing, climate and other fields. SAR images have unique advantages and can obtain target information at night or in bad weather conditions, so they have important application value in weak target detection.
[0003] SAR image texture contour has less feature information, and a large amount of noise and clutter is contained in the background. When detecting a distant target, the weak target of the SAR image obtained is a dim dot on the imaging picture, and the target is easily submerged in the background noise and clutter. Moreover, the existing algorithm cannot directly distinguish small hole-shaped objects and weak target objects, is extremely sensitive to noise and high-frequency background texture, and is also affected by cloud clutter and other surrounding maneuvers. When the target is very close to the edge of the cloud layer, the high gray cloud pixels will occupy the small neighborhood range of the weak target, and the problem will become more serious when the contrast of the target and the background is low. Weak target detection is still a challenging problem. SUMMARY
[0004] The application is to solve the problem that the weak target in the existing SAR image is not easy to detect, and provides a SAR image weak target detection optimization method based on local filtering.
[0005] The SAR image weak target detection optimization method based on local filtering provided by the application comprises the following steps:
[0006] Step one, a mask matrix of different scales is used to perform local mean filtering on the SAR image to be detected at different scales, and local mean images at different scales are obtained; the mask matrix is at least a 3*3 matrix;
[0007] Step two, the local mean image at each scale is enlarged by 3 times, and the mask matrix at different scales obtained in step one is used to slide on the corresponding enlarged image, and 8 different position window filters are obtained at each scale; the 8 different position window filters are 8 windows arranged around the center window position; and the 8 different position window filters are sequentially labeled.
[0008] Step 3: Filter the SAR image to be detected using the eight window filters at different positions, obtaining eight filtered result images at each scale, subtracting the eight filtered result images at each scale from the pixel values of corresponding pixels in the local mean image at the corresponding scale to obtain eight pixel difference matrices, and labeling the pixel difference matrices according to the labels of the eight window filters at different positions; and obtaining eight labeled pixel difference matrices;
[0009] Step 4: Multiply the two pixel difference matrices whose labels differ by 3, obtain 4 correlation values for each pixel, and take the minimum value of the 4 correlation values as the pixel value of the pixel;
[0010] Step 5: Select the maximum value of the pixel at the same pixel point at different scales as the pixel value of the pixel point in the SAR image to be detected, and obtain the maximum correlation two-dimensional image matrix Im;
[0011] Step 6: Calculate the local feature response of the maximum correlation two-dimensional image matrix Im; obtain the optimized image out02.
[0012] Furthermore, in the present invention, in step 2, the 8 different positions of the 8 different position window filters are 8 non-overlapping window positions excluding the center window position.
[0013] Furthermore, in the present invention, in step 6, the method for obtaining the optimized image out02 is:
[0014] Step 61: Use the average filter h to perform local mean filtering on the maximum correlation two-dimensional image matrix Im and the transposed matrix G of the maximum correlation two-dimensional image matrix Im to obtain the local mean mu and the local mean nu;
[0015] Step 62: Multiply the maximum correlation two-dimensional image matrix Im by the corresponding pixels in the transposed matrix G to obtain a product matrix, and perform a convolution operation on the product matrix with the average filter h to obtain a difference result;
[0016] Step 63: Calculate the pixel difference between the local mean of the square of the transposed matrix G and the square of the local mean to obtain a local variance varSigma of the transposed matrix G, use the local variance varSigma to calculate a normalization factor normalizeFactor, and then use the normalization factor normalizeFactor to calculate a first weighting coefficient A and a second weighting coefficient B;
[0017] Step 64: After adjusting the transposed matrix G by the first weighting coefficient A and the second weighting coefficient B, divide it by the normalization factor normalizeFactor to obtain the optimized image out02.
[0018] Further, in the present application, the different scale mask matrices in step one are 3*3, 5*5, 7*7 and 9*9 matrices respectively.
[0019] Further, in the present application, between step five and step six, further comprising: using a [3, 3] average filter to perform smoothing filtering on the maximum correlation two-dimensional image matrix Im, to eliminate noise in the maximum correlation two-dimensional image matrix Im.
[0020] Further, in the present application, in step six three, the method for calculating the first weighting coefficient A and the second weighting coefficient B is:
[0021] The first weight coefficient w is calculated using the local variance varSigma, and the first weight coefficient w is convolved using the average filter h to obtain the normalization factor normalizeFactor.
[0022] According to the local variance varSigma, the second weight parameter Beta is calculated, the first weight coefficient w is multiplied by the second weight parameter Beta to obtain a parameter product, and the parameter product is filtered by the average filter h to obtain the first weighting coefficient A.
[0023] The local mean L of the transposed matrix G is calculated, the difference obtained by subtracting the product of the second weight parameter Beta and the local mean nu of the transposed matrix G from the mean L is multiplied by the first weight coefficient w to obtain a first product result matrix, and the average filter h is used to filter the first product result matrix to obtain the second weighting coefficient B.
[0024] Further, in the present application, the weight parameter Beta is:
[0025]
[0026] Φ=(Im*G)*h-mu*nu
[0027] sign is a sign function, which returns positive or negative 1 according to the sign of Φ, kappa is a weight factor of the regularization term, and Epsilon varSigma represents the local variance.
[0028] Further, in the present application, the weight coefficient w is:
[0029]
[0030] Wherein, V is the average value of the local variance, and scale is the scaling coefficient of the weight w.
[0031] Further, in the present application, in step nine, the method for obtaining the optimized image out02 is:
[0032]
[0033] wherein, normalizeFactor represents a normalization factor.
[0034] The application processes images in different scales, uses mask matrices of different sizes (3x3, 5x5, 7x7, 9x9) to perform local mean calculation, and can better capture different details of the target from larger structures to smaller details, so that the target is easier to be detected, and the correlation of local features in different scales is calculated, so that the information in different scales can be fused together to more comprehensively capture the features of the target; the common features of the target are extracted, the influence of the background is weakened, and the target is more prominent in the image, thereby improving the recognition of the target. The improved local feature response is calculated, the contrast of the image is adjusted, the local features in the image are highlighted using the weighting coefficient, the target in the image is effectively highlighted, and the target is more easily and accurately detected. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 The method flowchart is described in the application.
[0036] Figure 2 The distribution diagram of 8 different position mean windows. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the application. It should be noted that, in the case of no conflict, the embodiments in the application and the features in the embodiments can be combined with each other.
[0038] Specific implementation method one: reference Figure 1 and Figure 2 The SAR image weak target detection optimization method based on local filtering described in this embodiment includes:
[0039] Step one, different scale mask matrices are used to perform local mean filtering on the SAR image to be detected in different scales, and local mean images in different scales are obtained; the mask matrix is at least a 3x3 matrix;
[0040] Step two, each local mean image under each scale is expanded by 3 times, and the mask matrix under different scales in step one is used to slide on the corresponding expanded image, 8 window filterers in different positions are obtained under each scale; the 8 window filterers in different positions are 8 windows arranged around the center window position; and the 8 window filterers in different positions are sequentially labeled;
[0041] Step three, the 8 window filterers in different positions are used to filter the SAR image to be detected respectively, 8 filtered result images are obtained under each scale, the 8 filtered result images under each scale are subtracted from the pixel values of the corresponding pixel points in the local mean image under the corresponding scale respectively, 8 pixel difference matrices are obtained, and the pixel difference matrices are labeled according to the labels of the 8 window filterers in different positions; 8 pixel difference matrices after labeling are obtained.
[0042] The label of the pixel difference matrix is the same as the label of the corresponding position window filterer; for example, the filtered result image obtained by using the filterer with label 1 is subtracted from the pixel value of the corresponding pixel point in the local mean image under the corresponding scale, and the label of the obtained pixel difference matrix is also 1;
[0043] Step four, the two pixel difference matrices with a label difference of 3 are point multiplied, 4 correlation values are obtained for each pixel point, and the minimum value of the 4 correlation values is taken as the pixel value of the pixel point;
[0044] Step five, the maximum pixel value of the same pixel point under different scales is selected as the pixel value of the pixel point of the SAR image to be detected, and a maximum correlation two-dimensional image matrix Im is obtained.
[0045] Step six, the local feature response of the maximum correlation two-dimensional image matrix Im is calculated, and an optimized image out02 is obtained.
[0046] Further, in the present application, in step two, the 8 different positions of the 8 window filterers in different positions are 8 non-overlapping window positions excluding the center window position.
[0047] Further, in the present application, in step six, the method for obtaining the optimized image out02 is:
[0048] Step six one, using an average filter h, local mean filtering is performed on the maximum correlation two-dimensional image matrix Im and the transposed matrix G of the maximum correlation two-dimensional image matrix Im, and local means mu and nu are obtained;
[0049] Step six two, the maximum correlation two-dimensional image matrix Im is multiplied by the corresponding pixels in the transposed matrix G, a product matrix is obtained, the product matrix is convolved with the average filter h, and a difference result is obtained.
[0050] Step six three, by calculating the pixel difference between the local mean of the transposed matrix G square and the square of the local mean, the local variance varSigma of the transposed matrix G is obtained, the normalization factor normalizeFactor is calculated by using the local variance varSigma, and the first weighting coefficient A and the second weighting coefficient B are calculated by using the normalization factor normalizeFactor;
[0051] Step six four, after the transposed matrix G is adjusted by the first weighting coefficient A and the second weighting coefficient B, the normalized factor normalizeFactor is divided to obtain the optimized image out02.
[0052] Further, in the present application, the mask matrix of different scales in step one is respectively a 3*3, 5*5, 7*7 and 9*9 matrix.
[0053] Further, in the present application, between step five and step six, it further includes: using a [3, 3] average filter to perform smoothing filtering on the maximum correlation two-dimensional image matrix Im, and eliminating the noise in the maximum correlation two-dimensional image matrix Im.
[0054] Further, in the present application, in step six three, the method for calculating the first weighting coefficient A and the second weighting coefficient B is:
[0055] The first weight coefficient w is calculated by using the local variance varSigma, and the normalization factor normalizeFactor is obtained by performing convolution operation on the first weight coefficient w by using the average filter h;
[0056] According to the local variance varSigma, the second weight parameter Beta is calculated, the first weight coefficient w is multiplied by the second weight parameter Beta to obtain a parameter product, and the first weighting coefficient A is obtained after the parameter product is filtered by the average filter h;
[0057] The local mean L of the transposed matrix G is calculated, the difference value obtained by subtracting the product of the second weight parameter Beta and the local mean nu of the transposed matrix G from the mean L is multiplied by the first weight coefficient w to obtain a first product result matrix, and the second weighting coefficient B is obtained by filtering the first product result matrix by using the average filter h.
[0058] Further, in the present application, the weight parameter Beta is:
[0059]
[0060]
[0061] Phi = (Im * G) * h - mu * nu
[0062] sign is a sign function, which returns positive or negative 1 according to the sign of Phi, kappa is a weight factor of the regularization term, and Epsilon varSigma represents the local variance.
[0063] Further, in the present application, the weight coefficient w is:
[0064]
[0065] wherein V is the average value of the local variance, and scale is the scaling factor of the weight w.
[0066] Further, in the present application, in step nine, the method for obtaining the optimized image out02 is:
[0067]
[0068] wherein normalizeFactor represents the normalization factor. Specific embodiments:
[0070] Local mean filtering: 3x3, 5x5, 7x7, and 9x9 mask matrices mask3, mask5, mask7, and mask9 are used as the window for local mean calculation, the element values in these matrices are the same, and the sum is 1, and the local mean of the local region is calculated by sliding calculation on the image, so as to realize the calculation of the local mean of the local region, and different local mean windows are input each time, and the local mean images l3, l5, l7, and l9 calculated by using different scales of local mean windows are obtained.
[0071] Correlation between local features of different scales is calculated: taking a 3x3 mask matrix as an example, the processing process is as follows:
[0072] First, 8 9x9 all-0 matrices m31-m38 are obtained, and a 3x3 all-1 matrix is placed in the positions of F31-F38 in each matrix. Figure 2 These window positions are different in the matrix, and by placing 1 in the window position, a local mean window with different shapes is formed. Then, the image is convolved with the local mean window of eight different positions to obtain an LCM3 three-dimensional array, and each layer represents the local mean image of the image at different positions.
[0073] The correlation between the local features at different scales and positions in the image is then calculated. Specifically, each layer of LCM3 is subtracted from l3 to obtain a series of difference values of the local features at different positions, which are stored in F31 to F38, respectively. The products of F31 and F35, F32 and F36, F33 and F37, and F34 and F38 are then stored in temp3, and the correlation between the local features at different positions in the image is obtained by calculating the products of these difference values. For example, the first layer of temp3 stores the product of F31 and F35, which represents the correlation between the local features at the first window position mean filtered local feature and the fifth window position mean filtered local feature. The minimum value along the third dimension (i.e., the depth) in temp3 is extracted to obtain a two-dimensional matrix out3.
[0074] The processing of the additional 5x5, 7x7, and 9x9 matrices is similar, and three two-dimensional matrices out5, out7, and out9 are obtained.
[0075] A three-dimensional array temp of size (row, col, 4) is set to store the minimum correlation between the local features at four different scales. row and col are the number of rows and columns of the image.
[0076] The calculated out3, out5, out7, and out9 are then stored in different layers of temp, and the corresponding pixel values of the four feature maps are compared along the third dimension (the depth) of the temp array. The maximum correlation value at each pixel point at four scales is extracted to obtain a new two-dimensional matrix out01. An average filter of size [3, 3] is used to smooth out01 to eliminate noise in the image and obtain a smoothed image Im, from which the features in the image are extracted. The improved local feature response is calculated as follows:
[0077] An average filter h is created as follows:
[0078] An average filter h of size patchSize x patchSize is defined, and the value of each element is helement, which ensures that the sum of all elements is 1, for calculating the local mean.
[0079]
[0080] Im is assigned to G, and the local means mu and nu of the images Im and G are calculated using the average filter h.
[0081] The difference value Φ is calculated as follows:
[0082] 1) The images Im and G are multiplied at corresponding positions to obtain the product of the pixels at corresponding positions of the two images.
[0083] 2) Convolve the product image with the averaging filter h to locally average the product image.
[0084] 3) Multiply the image mu with the image nu at corresponding positions, where mu is the local mean of the image Im and nu is the local mean of the image G.
[0085] 4) Subtract the two convolution results to get Φ, which represents the difference between the convolution result of the image Im and G minus the local mean.
[0086] Calculate the local variation factor varSigma:
[0087] 1) Square the pixel values of the image G at corresponding positions.
[0088] 2) Convolve the squared image with the averaging filter h to locally average the squared image.
[0089] 3) Square the pixel values of the image nu at corresponding positions.
[0090] 4) Subtract the two convolution results and compare the result with 0. If the result is greater than 0, output the result; if the result is less than 0, output 0 to ensure the result is non-negative. Get varSigma to represent the difference between the local mean of the squared image G and the square of the local mean, as shown in the flowchart Figure 1
[0091] Calculate the weight parameter Beta:
[0092] 1) First, calculate the intermediate variable a according to formula (2):
[0093]
[0094] 2) Where Epsilon is a small positive number to avoid division by zero.
[0095] 3) Calculate using formula (3):
[0096]
[0097] Where sign is the sign function, which returns positive or negative 1 according to the sign of Φ.
[0098] Calculate the weight coefficient w:
[0099] 1) Take the average of all elements in the entire varSigma matrix, which is to calculate the average of the local variance V.
[0100] 2) Use scale as a scaling coefficient to adjust the range of the weight.
[0101] 3) Calculate using equation (4). Where w is a matrix, representing the weight of each pixel. Divide the local variance by its mean value, and multiply by a scaling factor to get the weight coefficient w.
[0102]
[0103] Then calculate the weight, which is the original variance value weighted by equation (5), so that the larger variance corresponds to a smaller weight, and the smaller variance corresponds to a larger weight.
[0104] Calculate the normalization factor normalizeFactor: Convolve the weight coefficient w with the average filter h to get the normalization factor, to ensure that the weighted image value is correctly normalized.
[0105] Calculate the weight coefficient A:
[0106] Multiply Beta and w at the corresponding position to get a new weight coefficient. Filter the weight coefficient with the normalized average filter h to get A.
[0107] Calculate the weight coefficient B:
[0108] 1) Calculate the local mean mu of Im minus the product of Beta and the local mean nu of G to represent the difference between the average value L of the image G and the average value of the weight-adjusted G.
[0109] 2) Then multiply L with the weight w.
[0110] 3) Filter the weighted difference with the normalized average filter h to get B.
[0111] Calculate the output image out02:
[0112]
[0113] After multiplying the image G with A and adding B, it is the weighted result of the contrast-adjusted image G plus the average value difference. Divide the weighted result by the normalization factor normalizeFactor to get the final output image out02, which is thresholded to obtain a binary image.
[0114] While the application has been described with reference to particular embodiments thereof, it is to be understood that these embodiments are merely illustrative of the principles and applications of the present application. It will be apparent to those skilled in the art that numerous modifications can be made within the scope of the present application as defined by the appended claims. It is intended that all such modification fall within the spirit and scope of the present application. It will be understood that the features described in connection with one embodiment can be used in connection with another embodiment.
Claims
1. A local filtering-based weak target detection optimization method for SAR images, characterized in that: include: Step 1: Using mask matrices of different scales, perform local mean filtering on the SAR image to be detected at different scales to obtain local mean images at different scales; the mask matrix is at least a 3×3 matrix; Step 2: Enlarge the local mean image at each scale by 3 times, and slide the mask matrix of different scales described in step 1 on the corresponding enlarged image to obtain 8 window filters at different positions at each scale; and label the 8 window filters at different positions in sequence; Step 3: Filter the SAR image to be detected using the eight window filters at different positions, obtaining eight filter result images at each scale, subtracting the eight filter result images at each scale from the pixel values of corresponding pixels in the local mean image at the corresponding scale to obtain eight pixel difference matrices, and labeling the pixel difference matrices according to the labels of the eight window filters at different positions; and obtaining eight labeled pixel difference matrices; Step 4: Multiply the two pixel difference matrices whose labels differ by 3, obtain 4 correlation values for each pixel, and take the minimum value of the 4 correlation values as the pixel value of the pixel; Step 5: Select the maximum value of the pixel at the same pixel point at different scales as the pixel value of the pixel point in the SAR image to be detected, and obtain the maximum correlation two-dimensional image matrix Im; Step 6: Calculate the local feature response of the maximum correlation two-dimensional image matrix Im; obtain the optimized image out02.
2. The SAR image weak target detection optimization method based on local filtering according to claim 1 is characterized in that: In step 2, the 8 different positions of the 8 different position window filters are 8 non-overlapping window positions excluding the center window position.
3. The SAR image weak target detection optimization method based on local filtering according to claim 2 is characterized in that: In step 6, the method for obtaining the optimized image out02 is: Step 61: Use the average filter h to perform local mean filtering on the maximum correlation two-dimensional image matrix Im and the transposed matrix G of the maximum correlation two-dimensional image matrix Im to obtain the local mean mu and the local mean nu; Step 62: Multiply the maximum correlation two-dimensional image matrix Im by the corresponding pixels in the transposed matrix G to obtain a product matrix, and perform a convolution operation on the product matrix with the average filter h to obtain a difference result; Step 63: Calculate the pixel difference between the local mean of the square of the transposed matrix G and the square of the local mean to obtain a local variance varSigma of the transposed matrix G, use the local variance varSigma to calculate a normalization factor normalizeFactor, and then use the normalization factor normalizeFactor to calculate a first weighting coefficient A and a second weighting coefficient B; Step 64: After adjusting the transposed matrix G by the first weighting coefficient A and the second weighting coefficient B, divide it by the normalization factor normalizeFactor to obtain the optimized image out02.
4. The SAR image weak target detection optimization method based on local filtering according to claim 3 is characterized in that: In step 1, the mask matrices of different scales are 3×3, 5×5, 7×7, and 9×9 matrices.
5. The method for optimizing weak target detection in SAR images based on local filtering according to claim 1, 2, 3 or 4, wherein: Between step five and step six, the method further includes: using a [3,3] average filter to smooth the maximum correlation two-dimensional image matrix Im and eliminating noise in the maximum correlation two-dimensional image matrix Im.
6. The SAR image weak target detection optimization method based on local filtering according to claim 3 is characterized in that: In step 63, the method for calculating and obtaining the first weighting coefficient A and the second weighting coefficient B is: The first weight coefficient w is calculated using the local variance varSigma, and the first weight coefficient w is convolved using the average filter h to obtain a normalization factor normalizeFactor; Calculate the second weight parameter Beta according to the local variance varSigma, multiply the first weight coefficient w by the second weight parameter Beta to obtain a parameter product, and filter the parameter product by an average filter h to obtain a first weight coefficient A; Calculate the local mean L of the transposed matrix G, subtract the product of the second weight parameter Beta and the local mean nu of the transposed matrix G from the mean L, multiply the obtained difference by the first weight coefficient w to obtain a first product result matrix, and filter the first product result matrix with an averaging filter h to obtain a second weight coefficient B.
7. The SAR image weak target detection optimization method based on local filtering according to claim 6, characterized in that: Weight parameter Beta: Φ=(Im*G)*h-mu*nu sign is a sign function that returns positive or negative 1 according to the sign of Φ, kappa is the weight factor of the regularization term, varSigma represents the local variance, and Epsilon is a small positive number used to avoid division by zero.
8. The SAR image weak target detection optimization method based on local filtering according to claim 7 is characterized in that: The first weight coefficient w is: Where V is the average value of the local variance, and scale is the scaling factor of the first weight coefficient w.
9. The SAR image weak target detection optimization method based on local filtering according to claim 8, characterized in that: In step nine, the method for obtaining the optimized image out02 is: Wherein, normalizeFactor represents the normalization factor.
Citation Information
Patent Citations
Edge perception guide filtering method fusing superpixel and window offset
CN114219740A
Synthetic aperture radar target identification method based on self-supervised learning basic model
CN118155013A