Adaptive CFAR detection method based on scene classification
Through the adaptive CFAR detection method based on scene classification, using K-means clustering and VI-CFAR technologies, the problems of high false alarm rate and unstable detection performance in ports and land environments are solved, and more accurate and robust object detection is achieved.
Patent Information
- Application Number
- CN202411843035.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Traditional CFAR algorithms are difficult to effectively distinguish between targets and backgrounds in ports and land environments, resulting in unstable detection performance and high false alarm rates, especially in complex backgrounds, which are difficult to adapt to different scenario needs.
Adaptive CFAR detection method based on scene classification is adopted, SAR images are classified through the K-means clustering algorithm, and different detection strategies are adopted according to different scenarios, including VI-CFAR and significance model, and the detection parameters are dynamically adjusted to achieve more accurate and stable object detection.
It effectively reduces the false alarm rate in complex environments, improves the robustness and accuracy of object detection, and ensures that the CFAR algorithm can maintain a constant false alarm rate in different scenarios.
Smart Images

Figure CN119540738A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of radar target detection, and in particular to an adaptive CFAR detection method based on scene classification. Background Art
[0002] Synthetic aperture radar (SAR) images can obtain high-quality images of the surface in the absence of light or in bad weather conditions due to their unique imaging mechanism, and have broad application prospects in ocean monitoring. The constant false alarm rate (CFAR) algorithm has attracted much attention as a very important target automatic detection method in radar automatic detection systems. In recent years, researchers have developed a variety of CFAR detectors, such as the average constant false alarm rate detector (CA-CFAR), the step-type constant false alarm rate detector (GO-CFAR), the sequential check constant false alarm rate detector (SO-CFAR), etc. These detectors can achieve target detection in the air, at sea, and in some land scenes by adapting to different environmental characteristics, and have good detection performance.
[0003] However, the CFAR algorithm faces many challenges in port and land environments. In port environments, due to the low contrast between the target and the background and the complexity of the background, it is difficult for the traditional CFAR algorithm to effectively distinguish the target from the clutter signal, resulting in unstable detection performance and a high false alarm rate. In land environments, complex background factors such as terrain, vegetation, and man-made objects weaken the feature differences between the target and the background. Traditional CFAR detectors are easily interfered by false alarms, reducing the accuracy of target detection. In addition, traditional CFAR algorithms usually evaluate the background noise level based on a fixed window size and structure, but this approach has difficulty dealing with non-uniform backgrounds in port and land environments. The height variation of the background and the irregularity of the target shape further increase the difficulty of target detection, making it difficult for traditional CFAR detectors to adapt to different scene requirements.
[0004] Therefore, there is an urgent need for an adaptive CFAR detection method based on scene classification, which can be adaptively adjusted for different target detection scenarios to achieve more accurate and stable target detection performance. The method will use advanced scene classification algorithms and adaptive strategies to dynamically adjust detection parameters so that it can maintain a constant false alarm rate under complex backgrounds and significantly improve the robustness of target detection. The present invention is mainly used to solve the problem that CFAR cannot accurately detect and generate a large number of false alarms in coastal and land environments. Summary of the invention
[0005] In order to overcome the deficiencies of the prior art, the present invention provides an adaptive CFAR detection method based on scene classification.
[0006] The purpose of the present invention is to provide an adaptive CFAR detection method based on scene classification to solve the problem that CFAR cannot maintain good detection performance in port and land scenes. The detection method ensures that CFAR does not detect land scenes and achieves land-sea segmentation in ports to avoid a large number of false alarms. The method classifies scenes by using a K-means clustering algorithm, and then respectively adopts a land-sea segmentation strategy and an adaptive CFAR detection algorithm for port scenes to achieve excellent detection of targets in different environments.
[0007] The adaptive CFAR detection method based on scene classification described in the present invention is a hybrid expert model, which classifies pictures through a K-means clustering algorithm, and adopts different experts to perform target detection for pictures of different scenes.
[0008] The technical solution adopted by the present invention to solve the technical problem includes the following steps:
[0009] Step 1: Use K-means clustering algorithm to classify the input SAR image;
[0010] Through clustering, the SAR images are divided into three data sets: inland, inshore, and offshore, which refer to the land area accounting for 100%, 0-100%, and 0% of the image respectively. After obtaining the three types of images, the inland images are screened out and target detection is not performed. The target detection of step 2 is performed on the offshore images, and the target detection of step 3 is performed on the inshore images.
[0011] Step 2: Use VI-CFAR to detect targets in the offshore area classified in step 1;
[0012] The CFAR strategy adopted by VI-CFAR (Variance Index CFAR) is to select different mean-type CFAR strategies through VI value and MR value. Among them, the unit average constant false alarm (CA-CFAR) averages the data of the adjacent reference units around the unit to be detected as the background clutter power estimation to obtain the detection threshold, which is suitable for the situation of average background clutter; the unit minimum selection constant false alarm (SO-CFAR) selects the smaller of the sum of the front and back half windows and then takes the average as the background clutter estimation to prevent the background estimation from being too large and thus avoid missing the target; the unit maximum constant false alarm (GO-CFAR) selects the half-window reference unit with larger clutter power and takes the average as the background clutter estimation to improve the false alarm improvement problem at the edge of the clutter;
[0013] Step 3: Use the saliency model to perform CFAR detection on the inshore area obtained in step 1;
[0014] Using a saliency model for CFAR detection is a method that combines saliency feature extraction with constant false alarm rate detection technology. It is suitable for target detection in complex backgrounds such as coastal port environments, especially for ship target detection in synthetic aperture radar images. It can more accurately distinguish targets from backgrounds, thereby improving detection accuracy and reducing false alarms.
[0015] The specific steps of step 1 are as follows:
[0016] Step 1-1: Extract image features using a pre-trained deep learning network;
[0017] Use MobileNetV2 pre-trained based on the ImageNet dataset as the feature extraction model, and extract the feature vector f from the input SAR image X through the feature extraction model. The feature vector extraction formula is expressed as follows:
[0018] f i =MobileNetV2(X i ) (1)
[0019] Among them, X i represents the input data of the i-th image, f i is the image X extracted by the MobileNetV2 model i The eigenvector of
[0020] Step 1-2: Cluster the feature vector into K categories using the K-means algorithm;
[0021] The extracted feature vector f is input into the K-means algorithm, and the feature centers of different categories are calculated according to formula (2). The K-means algorithm calculates the Euclidean distance d between each feature vector f and the center of each category through formula (3), and uses the Euclidean distance d as the similarity metric to calculate the distance between samples and assign the image to the closest category.
[0022]
[0023] Among them, C k represents the number of all feature vectors in the kth category, c k is the center vector of the kth category;
[0024]
[0025] Where M represents the dimension of the feature vector; f i,j The feature vector f represents the i-th data point iThe value in the jth dimension; c k,j Represents the center vector c of the kth cluster k The value in the jth dimension; d(f i ,c k ) represents the feature vector f of the i-th image i and the center vector c of the kth cluster k The Euclidean distance between
[0026] In K-means clustering, in order to determine the optimal number of clusters K, the clustering effect of different K values is evaluated by the silhouette coefficient (Silhouette Score). The calculation formula of the silhouette coefficient is as follows:
[0027]
[0028] Among them, a is the average distance within the same cluster, b is the average distance to the nearest cluster, max is the maximum value, and finally the K value with the highest silhouette coefficient S is selected as the optimal number of clusters;
[0029] By calculating the silhouette coefficient and optimizing the clustering effect, we ensure that the sum of the squares of the distances between each data point and the center of its category is minimized, thereby achieving the best clustering effect. Experiments are conducted based on the SARDet-100K dataset. After optimization, the K value is 3, and the dataset is correctly divided into three categories: inland, inshore, and offshore.
[0030] In step 2, the VI algorithm first calculates the VI value and MR value of the reference window, where VI represents the variable index (VarianceIndex), which is used to determine whether the reference window sampling value is uniform, and MR represents the relative mean ratio (Mean Ratio) of the reference window, which is used to determine whether the power mean values of the previous and next reference windows are consistent; the calculation method of the VI value and the MR value is as follows:
[0031]
[0032] In the formula, σ 2 Represents the variance of the sample values within the reference window, μ 2 for The square of n is the number of half-window reference units, x i represents the value of the i-th sample in the reference window, represents the mean of all samples in the reference window; represents the mean of the samples in the front window, Represents the mean of the samples in the rear window, A represents the samples in the front window, and B represents the samples in the rear window;
[0033] After obtaining the VI value and MR value, the VI value and MR value are respectively compared with the VI judgment threshold K VIand MR decision threshold K MR Compare and judge the type of clutter background. The judgment criteria are: if VI <K VI , then the reference window is uniform, otherwise it is non-uniform; if If the mean values of the front and rear windows are the same, then it is judged that the mean values are different. After VI judgment and MR judgment, VI-CFAR adaptively selects the corresponding CFAR method to calculate the detection threshold according to the judgment results as shown in the following table.
[0034]
[0035] Among them, α N / 2 and α N The threshold product factors corresponding to all reference units and half reference units of CA-CFAR are:
[0036]
[0037] Where P fa represents the probability of false alarm, that is, the probability of mistakenly detecting noise as a target when there is no target, and N represents the number of units in the entire reference window;
[0038] In step 2, for a uniform environment, the front and rear reference windows are uniform and the mean values of the front and rear reference windows are consistent. It is considered that the background of the front and rear reference windows is consistent, and the option of number 1 is applicable. The CA-CFAR idea is selected, and the background power level is estimated using the sampling values in all reference windows to obtain the detection threshold. In fact, this is the calculation method of CA-CFAR. For a clutter edge environment, when the reference units of a reference window on one side belong to clutter areas of two different power levels, one side of the reference window is uniform and the other side is non-uniform. Since the unit to be detected and the reference window on the uniform side are in the same level of clutter area, number 3 or 4 is applicable to obtain a single-sided CA-CFAR. , use the mean of the uniform side reference window sampling values as the power level estimate to avoid the influence of other levels of clutter sampling values on the detection threshold; when the reference windows on both sides belong to or are close to belonging to two power level clutters (that is, the number of reference units occupied by the two clutter areas is a number of changes in the single-side window length, and the number is small), the front and rear reference windows are uniform, but the mean does not belong to the same power level. At this time, it is considered that the front and rear reference windows belong to two clutters with different average powers, and the option of number 2 is applicable. At this time, the idea of GO-CFAR is used to control the false alarm probability, and the side with a larger mean is selected as the background power level estimate, and then the detection threshold is obtained. In fact, α CA,N / 2 Under the same parameters, it is greater than α GO,N / 2 , so the control ability of false alarm probability is further improved.
[0039] For multi-target environment, No. 3, 4 and No. 5 belong to two cases. The case where No. 3 and No. 4 are applicable is that one side window is uniform and the other side window is non-uniform, indicating that there is an interference target or clutter edge on only one side. The mean value of the uniform side reference window is used as the power level estimate. In theory, the detection performance is similar to that of CA-CFAR in a uniform environment with half the number of reference units, which is largely guaranteed not to be affected by the high-power sampling value of the non-uniform side reference window. When the reference windows on both sides are non-uniform, indicating that both sides of the reference windows may contain interference targets or clutter edges, No. 5 is applicable. At this time, the SO-CFAR idea is selected, and the smaller side mean value is selected as the background power level estimate, and because α CA,N / 2 Under the same parameters, it is smaller than α SO,N / 2 , so the probability of successful detection may be further enhanced.
[0040] The specific steps of step 3 are as follows:
[0041] Step 3-1: Use SLIC algorithm to perform superpixel segmentation;
[0042] Step 3-2: Generate a saliency map and perform land-sea segmentation;
[0043] Step 3-3: Use the VI-CFAR in step 2 to detect targets in the inshore area that has shielded land interference.
[0044] The specific steps of using the SLIC algorithm to perform superpixel segmentation in step 3-1 are:
[0045] Superpixel segmentation is a method in image processing that divides an image into multiple small areas with similar features. The small areas are called "superpixels". When using the SLIC (Simple Linear Iterative Clustering) algorithm for superpixel segmentation, it is first necessary to initialize the cluster center in each grid area of the image to ensure that the initial centers are evenly distributed in the image. The grid spacing B is:
[0046]
[0047] Where P is the total number of pixels in the image and K is the desired number of superpixels;
[0048] At the same time, each pixel is represented by a feature (x, y, l, a, b), where (x, y) represents the position coordinates of the pixel, and (l, a, b) represents the color value in the Lab space, where l is the brightness, representing the grayscale value from black to white, a represents the color value from green to red, and b represents the color value from blue to yellow. The feature representation combines the spatial position information and color information of the pixel. When calculating the distance, not only the color similarity but also the spatial proximity is considered, so as to better maintain the structure of the image.
[0049] Then the distance D between each pixel and the cluster center is calculated. The distance metric comprehensively considers the similarity of position and color. The calculation formula is as follows:
[0050]
[0051] Among them, d c is the Euclidean distance between the pixel and the cluster center in Lab color space, d s is the spatial distance between the pixel and the cluster center, m is a parameter that balances color and spatial similarity, a larger m focuses more on color and ignores spatial distance;
[0052] Assign each pixel to the nearest cluster center, and then update the position and color of each cluster center to the average value of all its pixels until the cluster center no longer changes significantly or reaches the predetermined number of iterations. Each small area generated by clustering is a superpixel S;
[0053] The steps of generating a saliency map and performing land-sea segmentation in step 3-2 are as follows:
[0054] For the i-th superpixel S generated in step 3-1 i Perform feature extraction; first obtain each superpixel S by calculating the color histogram of the Lab color space i Color feature F color ; The color histogram is a statistical representation of color distribution, which can capture the frequency and distribution of colors in the superpixel area. i , calculate its Lab color histogram H L (S i ), H a (S i ) and H b (S i ), the color histogram of each superpixel is normalized to eliminate the influence of the histogram caused by the different sizes of superpixels; the normalization process is to divide each value of the histogram by the total number of pixels |S i |, respectively get H′ L (S i ), H′ a (Si ) and H′ b (S i ), color feature vector F color (S i ) is H′ L (S i ), H′ a (S i ) and H′ b (S i )
[0055]
[0056]
[0057] F color (S i )=[H′ L (S i ), H′ a (S i ), H′ b (S i )] (13)
[0058] Where δ is the Dirac delta function, which is used to calculate the matching degree between the pixel value p and the color values L, a, b in the histogram;
[0059] Secondly, the LBP algorithm is used to obtain each superpixel S i The texture feature F texture ; For superpixel S i , calculate the difference LBP(p) between the central pixel and each pixel in the neighborhood, and then count the LBP values in the entire superpixel area to generate the LBP histogram H LBP (S i ) is used to describe the texture pattern distribution of the region; then the LBP histogram H LBP (S i ) is normalized to obtain H′ LBP (S i ) to eliminate the influence of different super-pixel area sizes, so that the LBP features of different super-pixels can be compared on the same scale. texture Equal to H′ LBP (S i );
[0060]
[0061] Among them, g c is the gray value of the center pixel, g iis the gray value of the i-th pixel in the neighborhood, s(x) is the sign function, v is the possible value of the LBP mode, and δ is the Dirac delta function used to count the number of times each LBP mode appears in the superpixel area;
[0062] Then, calculate the superpixel area S i The spatial position feature F spatial ; For each superpixel S i , calculate the centroid position of the area (C x (S i ), C y (S i )), and normalize the centroid position by dividing it by the width and height of the image, respectively, to obtain (C′ x (S i ), C′ y (S i )), then F spatial is [C′ x (S i ), C′ y (S i )];
[0063]
[0064] in, and They represent superpixels S i The position of the centroid on the x-axis and y-axis, x(p) and y(p) are the coordinates of pixel p in the image;
[0065] Finally, for the obtained superpixel feature F color 、F texture and F spatial , as shown in formula (18), Z-score standardization is performed respectively, each feature is standardized by mean and standard deviation, and the value of each feature is scaled to the range of [0, 1] to keep the relative proportion of the features consistent. After processing, F′ is obtained color , F′ texture and F′ spatial ;
[0066]
[0067] Among them, μ is the mean, σ is the standard deviation, F is the extracted eigenvalue, and F′ is the standardized eigenvalue;
[0068] The significance score is calculated using formula (19), and different weights are assigned to each standardized feature. Then, the weighted sum is calculated and the calculated comprehensive significance score S is calculated as superpixelMap to each pixel in the superpixel to form a complete saliency map, and then post-process the saliency map, which is smoothed or threshold segmented to further optimize the effect of target detection;
[0069] S superpixel =ω color ·F′ color +ω texture ·F′ texture +ω spatial ·F′ spatial (19)
[0070] Where S superpixel is the saliency score of the superpixel, ω color ,ω texture ,ω spatial Represent the weights of color, texture and spatial position features respectively, F′ color , F′ texture , F′ spatial Represent the normalized feature values of color, texture, and spatial position, respectively;
[0071] For the generated saliency map, the image is binarized using the Otsu algorithm. Since the saliency score in the saliency map is not always a clear value of 0 or 1, but a continuous value between 0 and 1, the Otsu algorithm determines a threshold T and binarizes the continuous value, that is, marking the area with a higher score as the foreground and the area with a lower score as the background. The Otsu algorithm is an adaptive threshold selection method that determines the optimal binarization threshold T of the image by maximizing the inter-class variance. As shown in formula (20), by calculating the inter-class variance under each possible threshold T Find the between-class variance The largest T is the optimal threshold T max , according to the selected optimal threshold T max , will significantly Figure 2 The area with a score higher than the threshold is the land, and the area with a score lower than the threshold is the sea surface, generating a binary image;
[0072]
[0073] in, is the between-class variance, μ T is the mean saliency of all pixels, μ b is the saliency mean of background pixels, W b is the proportion of foreground pixels; S superpixel [S i ] is the super pixel S i The significance score of
[0074] For the generated binary image, the Canny edge detection algorithm is used to further clarify the boundary between the ocean area and the land area in the binary image and find the sea-land dividing line. The Canny edge detection algorithm is an effective edge detection method, which identifies the edge by finding significant changes in the image gradient. First, the image is smoothed by a Gaussian filter to filter out high-frequency noise and retain the main features of the image. Then, the Sobel operator is used to calculate the gradient of the image to obtain the gradient amplitude map and direction map. Because the edge usually corresponds to the area where the gray value of the image changes rapidly, and the Sobel operator is a discrete differential operator, its core idea is to use the convolution kernel (i.e., matrix) to perform convolution operations on the image in order to highlight the area where the gray value of the image changes greatly, and to calculate the gradient of the image in the horizontal direction x and the vertical direction y; as shown in formula (22):
[0075]
[0076] The Sobel operator calculates the gradient G in the horizontal direction x In the matrix, -1 and +1 are symmetrical, indicating the difference between the left and right sides; -2 and +2 increase the weight of the central column and emphasize the horizontal edge. Its core idea is to obtain the local gradient of the image by subtracting the value of the adjacent pixel from the value of the central pixel. Similarly, as shown in formula (23):
[0077]
[0078] The Sobel operator calculates the gradient G in the vertical direction y , the upper and lower rows of the matrix are [-1,-2,-1] and [1,2,1] respectively. They are also symmetrical and are used to calculate the vertical edge. The difference weight of the center row also increases the detection effect of the vertical edge. Finally, according to the calculation of formula (24):
[0079]
[0080] Get the gradient magnitude G and direction θ;
[0081] Next, non-maximum suppression is needed to extract a single-pixel wide edge line from a wide edge. For each pixel, find its adjacent pixels in the direction according to its gradient direction θ, compare the gradient amplitude G of the pixel with the gradient amplitudes of its two adjacent pixels, and if the gradient amplitude G of the pixel is the local maximum, retain the pixel; otherwise, set it to 0 to suppress the pixel; finally, use dual threshold detection and edge connection steps to further enhance the accuracy of the edge; determine the high threshold and low threshold according to the histogram of the gradient amplitude G, set the high threshold to 80% of the gradient amplitude, and set the low threshold to 50% of the high threshold; then divide the edge into strong edges (the part above the high threshold) and weak edges (the part between the low threshold and the high threshold); strong edges are always retained, while weak edges are only retained when connected to strong edges, and the others are suppressed. At this point, an accurate land-sea segmentation line for the binary image is obtained;
[0082] Finally, the detected land area is masked through the area filling technology, and all its pixel values are set to black to ensure that the land part is completely invisible in the image; this ensures that the subsequent detection algorithm only processes the sea surface part, thereby eliminating the noise and interference that may be caused by the land area.
[0083] An electronic device comprises: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method as described above.
[0084] A computer-readable storage medium stores program codes, and the program codes can be called by a processor to execute the method as described above.
[0085] The beneficial effect of the present invention is that the present invention effectively solves the problem of high false alarm rate and unstable detection performance of the traditional CFAR algorithm in the complex background of ports and land by combining scene classification with adaptive CFAR detection method. The technical solution of the present invention is to design a hybrid expert model, classify pictures by K-means clustering algorithm, and adopt different experts to detect targets for pictures of different scenes. For the inland area, it is judged that there is no ship target and it is directly filtered. VI-CFAR is used for target detection in the offshore area, so that the detection process can be adaptively adjusted, and the detection parameters are optimized according to the complexity of different scene backgrounds, so as to ensure that the CFAR algorithm can still maintain a constant false alarm rate in the sea clutter background and significantly improve the robustness of target detection. The saliency model and CFAR combination are used for target detection in the inshore area, and the Otsu algorithm and the Canny edge detection algorithm are combined to effectively distinguish the ocean area and the land area in the image, and the land area is shielded. This technical solution solves the problem that the traditional CFAR detection algorithm is interfered by the complex land background when detecting ships on the sea.
[0086] The technical advantages and effects of the present invention are as follows:
[0087] 1. No need for manual annotation and training: This invention extracts the features of SAR images by using a pre-trained deep learning model and automatically classifies the scenes in combination with the K-means clustering algorithm, which is completely independent of manually annotated data sets and time-consuming model training processes. This approach avoids the large amount of data preparation and manual annotation workload in traditional methods, reduces dependence on the quality of data set annotation, and thus reduces labor costs and time costs. In addition, this unsupervised processing method can better cope with the changing marine environment and ensure the adaptability and universality of the algorithm.
[0088] 2. Reduce false alarm rate: The present invention classifies the scenes of the image and adaptively adjusts the CFAR detection parameters according to the characteristics of different scenes, thus avoiding the false alarm problem caused by background interference in traditional methods under complex backgrounds (such as ports, land, etc.). In particular, by combining the VI-CFAR algorithm and the saliency model technology, the false alarm rate in complex environments is effectively reduced, and the reliability of the detection results is enhanced.
[0089] 3. Ensure that the detection algorithm focuses on the target area: Through the sea-land segmentation and area filling technology, the present invention can effectively shield the interference of non-target areas, so that the detection algorithm can focus on the location where the target may exist on the sea surface, thereby improving the detection efficiency and reliability. Especially in the task of detecting ships on the sea surface, the present invention can significantly reduce the false alarm rate caused by complex land areas, so that the CFAR detection algorithm can focus more on ship targets on the sea surface, greatly improving the efficiency of target detection.
[0090] In summary, the present invention is particularly suitable for the accurate detection of ship targets in synthetic aperture radar (SAR) images. It can more accurately distinguish targets from backgrounds, reduce false alarms caused by background complexity, and ultimately improve the accuracy and reliability of target detection. It has practical value and technical advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 It is a flow chart of the method of the present invention.
[0092] Figure 2 is a schematic diagram of VI-CFAR.
[0093] Figure 3 It is a schematic diagram of the mean-type CFAR algorithm.
[0094] Figure 4 It is a flowchart of CFAR target detection using saliency map model. DETAILED DESCRIPTION
[0095] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0096] Step 1: Use K-means clustering algorithm and perform scene classification on the input SAR image.
[0097] By clustering, the SAR images are divided into three data sets: inland, inshore, and offshore (respectively referring to the land area accounting for 100%, 0-100%, and 0% of the image). After obtaining the three types of images, the inland images are screened out and target detection is not performed. The target detection of step 2 is performed on the offshore images, and the target detection of step 3 is performed on the inshore images.
[0098] The specific steps of step 1 are as follows:
[0099] Step 1-1: Extract image features using a pre-trained deep learning network;
[0100] MobileNetV2 pre-trained based on the ImageNet dataset is used as the feature extraction model. The input SAR image X is passed through the model to extract its feature vector f. The feature vector extraction formula is expressed as follows:
[0101] f i =MobileNetV2(X i ) (25)
[0102] Among them, X i represents the input data of the i-th image, f i is the image X extracted by the MobileNetV2 model i The eigenvector of
[0103] Step 1-2: Cluster the feature vector into K categories using the K-means algorithm;
[0104] The extracted feature vector f is input into the K-means algorithm, and the feature centers of different categories are calculated as shown in formula (2). The K-means algorithm calculates the Euclidean distance d between each feature vector f and the center of each category through formula (3), and uses the Euclidean distance d as the similarity measure to calculate the distance between samples and assign the image to the closest category.
[0105]
[0106] Among them, C k represents the number of all feature vectors in the kth category, c k is the center vector of the kth category;
[0107]
[0108] Where M represents the dimension of the feature vector; f i,j The feature vector f represents the i-th data point i The value in the jth dimension; c k,j represents the kth cluster center c k The value in the jth dimension; d(f i ,c k ) represents the feature vector f of the i-th image i and the kth cluster center c k The Euclidean distance between
[0109] In K-means clustering, in order to determine the optimal number of clusters K, the silhouette coefficient (Silhouette Score) is used to evaluate the clustering effect of different K values. The formula of the silhouette coefficient is as follows:
[0110]
[0111] Among them, a is the average distance within the same cluster, and b is the average distance to the nearest cluster. Finally, the K value with the highest silhouette coefficient S is selected as the optimal number of clusters.
[0112] By calculating the silhouette coefficient, the clustering effect is optimized to ensure that the sum of the squares of the distances between each data point and the center of its category is minimized, thereby achieving the best clustering effect. The experiment was conducted based on the SARDet-100K dataset. After optimization, the K value was 3, and the dataset was correctly divided into three categories: inland, inshore, and offshore.
[0113] Step 2: Use VI-CFAR to detect targets in the offshore area classified in step 1;
[0114] The CFAR strategy adopted by VI-CFAR is to select different mean-type CFAR strategies through VI value and MR value. Among them, the unit average constant false alarm (CA-CFAR) averages the data of adjacent reference units around the unit to be detected as the background clutter power estimation to obtain the detection threshold, which is suitable for the situation of average background clutter; the unit minimum selection constant false alarm (SO-CFAR) selects the smaller one after the sum of the front and back half windows and then takes the average as the background clutter estimation to prevent the background estimation from being too large and thus avoid missing the target; the unit maximum constant false alarm (GO-CFAR) selects the half-window reference unit with larger clutter power and takes the average as the background clutter estimation to improve the false alarm improvement problem at the edge of the clutter.
[0115] The VI algorithm first calculates the VI value and MR value of the reference window. VI stands for the Variance Index, which is used to determine whether the reference window sampling value is uniform. MR stands for the Mean Ratio of the reference window, which is used to determine whether the power mean values of the previous and next reference windows are consistent. The calculation method of the VI value and MR value is as follows:
[0116]
[0117] In the formula, x i represents the value of the i-th sample in the reference window, represents the mean of all samples in the reference window, σ 2 Represents the variance of the sample values within the reference window, μ 2 for The square of , n is the number of half-window reference units; represents the mean of the samples in the front window, Represents the mean of the samples in the rear window.
[0118] After obtaining the VI value and MR value, the VI value and MR value are compared with the decision threshold K VI and KMR Compare to determine the type of clutter background, the judgment criteria are: if VI <K VI , then the reference window is uniform, otherwise it is non-uniform; if If the means of the front and rear windows are the same, then the means are different. After VI judgment and MR judgment, VI-CFAR adaptively selects the corresponding CFAR method to calculate the detection threshold according to the judgment results as shown in the following table.
[0119]
[0120] Among them, α N / 2 and α N The threshold product factors corresponding to all reference units and half reference units of CA-CFAR are:
[0121]
[0122] Where P fa represents the probability of false alarm, that is, the probability of mistakenly detecting noise as a target when there is no target, and N represents the number of units in the entire reference window.
[0123] For a uniform environment, the front and rear reference windows are uniform and the mean values of the front and rear reference windows are consistent. In this case, the backgrounds of the front and rear reference windows are considered to be consistent, and option 1 is applicable. The CA-CFAR idea is selected, and the background power level is estimated using the sampling values in all reference windows to obtain the detection threshold. In fact, this is the calculation method of CA-CFAR. For a clutter edge environment, when the reference units of a reference window on one side belong to clutter areas of two different power levels, one side of the reference window is uniform and the other side is non-uniform. Since the unit to be detected and the reference window on the uniform side are in the same level of clutter area, option 3 or 4 is applicable to obtain a single-sided CA-CFAR, and the detection threshold is obtained. The mean of the sampling values of the uniform side reference window is used as the power level estimation to avoid the influence of the clutter sampling values of other levels on the detection threshold; when the reference windows on both sides belong to or are close to belonging to two power level clutters (that is, the number of reference units occupied by the two clutter areas is a certain number of changes in the single-side window length, and the number is small), the front and rear reference windows are uniform, but the mean values do not belong to the same power level. At this time, it is considered that the front and rear reference windows belong to two clutters with different average powers, and the option of number 2 is applicable. At this time, the idea of GO-CFAR is used to control the false alarm probability, and the side with a larger mean value is selected as the background power level estimate, and then the detection threshold is obtained. In fact, α CA,N / 2 Under the same parameters, it is greater than α GO,N / 2 , so the control ability of false alarm probability is further improved.
[0124] For multi-target environment, No. 3, 4 and No. 5 belong to two cases. No. 3 and 4 are applicable when one side window is uniform and the other side window is non-uniform, indicating that there is an interference target or clutter edge on only one side. At this time, the mean value of the uniform side reference window is used as the power level estimate. In theory, the detection performance similar to that of CA-CFAR in a uniform environment with half the number of reference units can be obtained, which greatly guarantees that it will not be affected by the high-power sampling value of the non-uniform side reference window. When the reference windows on both sides are non-uniform, it means that both sides of the reference windows may contain interference targets or clutter edges. No. 5 is applicable. At this time, the SO-CFAR idea is selected, and the smaller side mean value is selected as the background power level estimate, and because α CA,N / 2 Under the same parameters, it is smaller than α SO,N / 2 , so the probability of successful detection may be further enhanced.
[0125] Step 3: Use the saliency model to perform CFAR detection on the inshore area obtained in step 1;
[0126] Using a saliency model for CFAR detection is a method that combines saliency feature extraction with constant false alarm rate detection technology. This method is particularly suitable for target detection in complex backgrounds such as coastal port environments, especially for ship target detection in synthetic aperture radar images. This method can more accurately distinguish between targets and backgrounds, thereby improving detection accuracy and reducing false alarms.
[0127] The specific steps of step 3 are as follows:
[0128] Step 3-1: Use SLIC algorithm to perform superpixel segmentation;
[0129] Superpixel segmentation is a method in image processing that divides an image into multiple small areas with similar features. These small areas are called "superpixels". When using the SLIC algorithm for superpixel segmentation, it is first necessary to initialize the cluster center in each grid area of the image to ensure that the initial center is evenly distributed in the image. The grid spacing B is:
[0130]
[0131] Where N is the total number of pixels in the image and K is the desired number of superpixels;
[0132] At the same time, each pixel is represented by a feature (x, y, l, a, b), where (x, y) represents the pixel's position coordinates, (l, a, b) represents the color value in the Lab space, where l is the brightness, representing the grayscale value from black to white, a represents the color value from green to red, and b represents the color value from blue to yellow. This feature representation combines the spatial position information and color information of the pixel, so that when calculating the distance, not only the color similarity is considered, but also the spatial proximity, thereby better maintaining the structure of the image.
[0133] Then the distance D between each pixel and the cluster center is calculated. The distance metric comprehensively considers the similarity of position and color. The calculation formula is as follows:
[0134]
[0135] Among them, d c is the Euclidean distance between the pixel and the cluster center in Lab color space, d s is the spatial distance between the pixel and the cluster center, and m is a parameter that balances color and spatial similarity. A larger m focuses more on color and ignores spatial distance.
[0136] Each pixel is assigned to the nearest cluster center, and then the position and color of each cluster center are updated to the average value of all its pixels until the cluster center no longer changes significantly or the predetermined number of iterations is reached. Each small area generated by clustering is a superpixel S.
[0137] Step 3-2: Generate a saliency map and perform land-sea segmentation;
[0138] For each superpixel S generated in step 3-1 i Perform feature extraction. First, obtain each superpixel S by calculating the color histogram of the Lab color space i Color feature F color The color histogram is a statistical representation of color distribution, which can capture the frequency and distribution of colors in the superpixel region. i , we calculate its Lab color histogram H L (S i ), H a (S i ), H b (S i ), the color histogram of each superpixel is normalized to eliminate the influence of the histogram caused by the different sizes of superpixels. The normalization process is usually to divide each value of the histogram by the total number of pixels |S i |, respectively get H′ L (S i ), H′ a (Si ), H′ b (S i ), color feature vector F color (S i ) is H′ L (S i ), H′ a (S i ), H′ b (S i ) connection.
[0139]
[0140] F color (S i )=[H′ L (S i ), H′ a (S i ), H′ b (S i )] (37)
[0141] Where δ is the Dirac delta function, which is used to calculate the matching degree between the pixel value p and the color values L, a, b in the histogram.
[0142] Secondly, the LBP algorithm is used to obtain each superpixel S i The texture feature F texture For superpixel S i , calculate the difference LBP(p) between the central pixel and each pixel in the neighborhood, and then count the LBP values in the entire superpixel area to generate the LBP histogram H LBP (S i ) is used to describe the texture pattern distribution of the region. Then the LBP histogram H LBP (S i ) is normalized to obtain H′ LBP (S i ) to eliminate the influence of different super-pixel area sizes, so that the LBP features of different super-pixels can be compared on the same scale, then F texture Equal to H′ LBP (S i ).
[0143]
[0144] Among them, g c is the gray value of the center pixel, g iis the grayscale value of the ith pixel in the neighborhood, s(x) is the sign function, v is the possible value of the LBP mode, and δ is the Dirac delta function used to count the number of times each LBP mode appears in the superpixel area.
[0145] Then, calculate the superpixel area S i The spatial position feature F spatial For each superpixel region S i , calculate the centroid position of the area (C x (S i ), C y (S i )), and normalize the centroid position by dividing it by the width and height of the image, respectively, to obtain (C′ x (S i ), C′ y (S i )), then F spatial is [C′ x (S i ), C′ y (S i )].
[0146]
[0147] in, and They represent superpixels S i The position of the centroid on the x-axis and y-axis, x(p) and y(p) are the coordinates of pixel p in the image.
[0148] Finally, for the obtained superpixel feature F color , F texture , F spatial , as shown in formula (18), Z-score standardization is performed respectively, each feature is standardized by mean and standard deviation, and the value of each feature is scaled to the range of [0, 1] to keep the relative proportion of the features consistent. After processing, F′ is obtained color , F′ texture , F′ spatial .
[0149]
[0150] Among them, μ is the mean, σ is the standard deviation, F is the extracted eigenvalue, and F′ is the standardized eigenvalue;
[0151] The significance score is calculated using formula (19), and different weights are assigned to each standardized feature. Then, the weighted sum is calculated and the calculated comprehensive significance score S is calculated as superpixelMapped to each pixel in the superpixel to form a complete saliency map, and then the saliency map is post-processed as smoothing or threshold segmentation to further optimize the effect of target detection.
[0152] S superpixel =ω color ·F′ color +ω texture ·F′ texture +ω spatial ·F′ spatial (43)
[0153] where ω color ,ω texture ,ω spatial Represent the weights of color, texture and spatial position features respectively, F′ color , F′ texture , F′ spatial Represents the standardized feature values of color, texture and spatial position, S superpixel is the saliency score of the superpixel.
[0154] The spatial position features in the saliency map are used to separate the coastal areas with higher saliency scores from the sea surface areas to ensure that CFAR detection is only performed on the sea surface areas.
[0155] For the generated saliency map, the image is binarized using the Otsu algorithm. Because the saliency score in the saliency map is not always a clear value of 0 or 1, but a continuous value between 0 and 1. The Otsu algorithm determines a threshold T and binarizes these continuous values, that is, marking the area with a higher score as the foreground and the area with a lower score as the background. The Otsu algorithm is an adaptive threshold selection method that determines the optimal binarization threshold T of the image by maximizing the inter-class variance. As shown in formula (20), by calculating the inter-class variance under each possible threshold T Find the between-class variance The largest f is the optimal threshold T max According to the selected optimal threshold T max , will significantly Figure 2 The area with a score higher than the threshold is the land, and the area with a score lower than the threshold is the sea, generating a binary image.
[0156]
[0157] in, is the inter-class variance, μT is the saliency mean of all pixels, μb is the saliency mean of background pixels, and W b is the proportion of foreground pixels; S superpixel [S i ] is the super pixel Si The significance score of .
[0158] For the generated binary image, the Canny edge detection algorithm is used to further clarify the boundaries between the ocean area and the land area in the binary image and find the sea-land dividing line. The Canny edge detection algorithm is an effective edge detection method that identifies edges by looking for significant changes in image gradients. First, the image is smoothed by a Gaussian filter to filter out high-frequency noise and retain the main features of the image. Then, the Sobel operator is used to calculate the gradient of the image to obtain the gradient amplitude map and direction map. Because the edge usually corresponds to the area where the grayscale value of the image changes rapidly, and the Sobel operator is a commonly used discrete differential operator, its core idea is to use the convolution kernel (i.e., matrix) to perform convolution operations on the image in order to highlight the areas where the grayscale changes of the image are large, and to calculate the gradient of the image in the horizontal direction x and the vertical direction y. As shown in formula (22), the Sobel operator calculates the gradient G in the horizontal direction x In the matrix, -1 and +1 are symmetrical, indicating the difference between the left and right sides; -2 and +2 increase the weight of the central column and emphasize the horizontal edge. Its core idea is to obtain the local gradient of the image by subtracting the value of the adjacent pixel from the value of the central pixel. Similarly, as shown in formula (23), the Sobel operator calculates the gradient G in the vertical direction y , the upper and lower rows of the matrix are [-1,-2,-1] and [1,2,1] respectively, which are also symmetrical and used to calculate the vertical edge. The difference weight of the center row also increases the detection effect of the vertical edge. Finally, the gradient amplitude G and direction θ are obtained according to formula (24).
[0159]
[0160] Next, non-maximum suppression is needed to extract a single-pixel wide edge line from a wide edge. For each pixel, find its neighboring pixels in the direction according to its gradient direction θ, compare the gradient amplitude G of the pixel with the gradient amplitudes of its two neighboring pixels, and if the gradient amplitude G of the pixel is the local maximum, retain the pixel; otherwise, set it to 0 to suppress the pixel. Finally, use dual threshold detection and edge connection steps to further enhance the accuracy of the edge. According to the histogram of the gradient amplitude G, determine the high threshold and the low threshold, set the high threshold to 80% of the gradient amplitude, and the low threshold can be set to 50% of the high threshold. Then divide the edge into a strong edge (the part above the high threshold) and a weak edge (the part between the low threshold and the high threshold). Strong edges are always retained, while weak edges are only retained when connected to strong edges, and the others are suppressed. So far, we have obtained an accurate land-sea segmentation line for the binary image.
[0161] Finally, the detected land area is masked by using the area filling technique, and all its pixel values are set to black, ensuring that the land part is completely invisible in the image. This operation ensures that the subsequent detection algorithm only processes the sea surface, thereby eliminating the noise and interference that may be caused by the land area.
[0162] Step 3-3: Use VI-CFAR in step 2 to perform target detection on the inshore area after the above processing to shield the land interference.
Claims
1. An adaptive CFAR detection method based on scene classification, characterized in that The steps include: Step 1: Use K-means clustering algorithm to classify the input SAR image; Through clustering, the SAR images are divided into three data sets: inland, coastal, and sea areas, which respectively refer to the land area accounting for 100%, 0-100%, and 0% of the image. After obtaining the three types of images, the inland images are screened out and target detection is not performed. The target detection in step 2 is performed on the sea area images, and the target detection in step 3 is performed on the seaside images. Step 2: Use VI-CFAR to perform target detection on the sea area classified in step 1; The CFAR strategy adopted by VI-CFAR is to select different mean-type CFAR strategies through VI value and MR value. Among them, the unit average constant false alarm CA-CFAR averages the data of the adjacent reference units around the unit to be detected as the background clutter power estimation to obtain the detection threshold, which is suitable for the situation of average background clutter; the unit minimum selection constant false alarm SO-CFAR selects the smaller of the sum of the front and back half windows and then takes the average as the background clutter estimation to prevent the background estimation from being too large and thus avoid missing the target; the unit maximum constant false alarm GO-CFAR selects the half-window reference unit with larger clutter power and takes the average as the background clutter estimation to improve the false alarm improvement problem at the edge of the clutter; Step 3: Use the saliency model to perform CFAR detection on the coastal area obtained in step 1.
2. The adaptive CFAR detection method based on scene classification according to claim 1, characterized in that: The specific steps of step 1 are as follows: Step 1-1: Extract image features using a pre-trained deep learning network; Use MobileNetV2 pre-trained based on the ImageNet dataset as the feature extraction model, and extract the feature vector f from the input SAR image X through the feature extraction model. The feature vector extraction formula is expressed as follows: f=MobileNetV2(X i ) (1) Among them, X i represents the input data of the i-th image, f i is the image X extracted by the MobileNetV2 model i The eigenvector of Step 1-2: Cluster the feature vector into K categories using the K-means algorithm; The extracted feature vector f is input into the K-means algorithm, and the feature centers of different categories are calculated according to formula (2). The K-means algorithm calculates the Euclidean distance d between each feature vector f and the center of each category through formula (3), and uses the Euclidean distance d as the similarity metric to calculate the distance between samples and assign the image to the closest category. Among them, C k represents the number of all feature vectors in the kth category, c k is the center vector of the kth category; Where M represents the dimension of the feature vector; f i,j The feature vector f represents the i-th data point i The value in the jth dimension; c k,j Represents the center vector c of the kth cluster k The value in the jth dimension; d(f i ,c k ) represents the feature vector f of the i-th image i and the center vector c of the kth cluster k The Euclidean distance between In K-means clustering, in order to determine the optimal number of clusters K, the clustering effect of different K values is evaluated by the silhouette coefficient. The calculation formula of the silhouette coefficient is as follows: Among them, a is the average distance within the same cluster, b is the average distance to the nearest cluster, max is the maximum value, and finally the K value with the highest silhouette coefficient S is selected as the optimal number of clusters; By calculating the silhouette coefficient and optimizing the clustering effect, we ensure that the sum of the squares of the distances between each data point and the center of its category is minimized, thereby achieving the best clustering effect. Experiments are conducted based on the SARDet-100K dataset. After optimization, the K value is 3, and the dataset is correctly divided into three categories: inland, coastal, and sea areas.
3. The adaptive CFAR detection method based on scene classification according to claim 1, characterized in that: In step 2, the VI algorithm first calculates the VI value and MR value of the reference window, where VI represents a variable index, which is used to determine whether the reference window sampling value is uniform, and MR represents a relative average value ratio of the reference window, which is used to determine whether the power mean values of the previous and next reference windows are consistent; the VI value and MR value are calculated as follows: In the formula, σ 2 Represents the variance of the sample values within the reference window, μ 2 for The square of n is the number of half-window reference units, x i represents the value of the i-th sample in the reference window, represents the mean of all samples in the reference window; represents the mean of the samples in the front window, Represents the mean of the samples in the rear window, A represents the samples in the front window, and B represents the samples in the rear window; After obtaining the VI value and MR value, the VI value and MR value are respectively compared with the VI judgment threshold K VI and MR decision threshold K MR Compare and judge the type of clutter background. The judgment criteria are: if VI <K VI , then the reference window is uniform, otherwise it is non-uniform; if If the mean values of the front and rear windows are the same, then it is judged that the mean values are different. After VI judgment and MR judgment, VI-CFAR adaptively selects the corresponding CFAR method to calculate the detection threshold according to the judgment results as shown in the following table. Among them, α N / 2 and α N The threshold product factors corresponding to all reference units and half reference units of CA-CFAR are: Where P fa represents the probability of false alarm, that is, the probability of mistakenly detecting noise as a target when there is no target, and N represents the number of units in the entire reference window.
4. The adaptive CFAR detection method based on scene classification according to claim 3 is characterized in that: In the step 2, for a uniform environment, the front and rear reference windows are uniform and the mean values of the front and rear reference windows are consistent, and the background of the front and rear reference windows is considered to be consistent. The option numbered 1 is applicable, and the sampling values in all reference windows are used to estimate the background power level, thereby obtaining the detection threshold. For a clutter edge environment, when the reference units of a reference window on one side belong to clutter areas of two different power levels, the reference window on one side is uniform and the other side is non-uniform. Since the unit to be detected and the reference window on the uniform side are in the same level of clutter area at this time, the one-sided CA-CFAR is obtained by using the mean of the sampling values of the reference window on the uniform side as the power level estimation, thereby avoiding the influence of the clutter sampling values of other levels on the detection threshold. When the reference windows on both sides belong to or are close to belonging to clutter of two power levels, the front and rear reference windows are uniform, but the mean values do not belong to the same power level, and the front and rear reference windows are considered to belong to two clutters of different average powers, respectively. The option numbered 2 is applicable, and the idea of GO-CFAR is used to control the false alarm probability, and the side with the larger mean value is selected as the background power level estimation, thereby obtaining the detection threshold. In fact, α CA,N / 2 Under the same parameters, it is greater than α GO,N / 2 , so the control ability of false alarm probability is further improved.
5. The adaptive CFAR detection method based on scene classification according to claim 3, characterized in that: For multi-target environment, numbers 3, 4 and 5 belong to two cases. The cases where numbers 3 and 4 are applicable are when one side window is uniform and the other side window is non-uniform, indicating that there is an interference target or clutter edge on only one side. The mean value of the uniform side reference window is used as the power level estimate. In theory, the detection performance is similar to that of CA-CFAR in a uniform environment with half the number of reference units, which is largely guaranteed not to be affected by the high-power sampling value of the non-uniform side reference window. When the reference windows on both sides are non-uniform, indicating that both sides of the reference windows may contain interference targets or clutter edges, number 5 is applicable. At this time, the SO-CFAR idea is selected, and the smaller side mean value is selected as the background power level estimate, and because α CA,N / 2 Under the same parameters, it is smaller than α SO,N / 2 , further enhancing the probability of successful detection.
6. The scene classification-based adaptive CFAR detection method according to claim 1, characterized in that: The specific steps of step 3 are as follows: Step 3-1: Use SLIC algorithm to perform superpixel segmentation; Step 3-2: Generate a saliency map and perform land-sea segmentation; Step 3-3: Use the VI-CFAR in step 2 to detect targets in the inshore area that has shielded land interference.
7. The adaptive CFAR detection method based on scene classification according to claim 6, characterized in that: The specific steps of using the SLIC algorithm to perform superpixel segmentation in step 3-1 are: Superpixel segmentation is a method in image processing that divides an image into multiple small areas with similar features. The small areas are called "superpixels". When using the SLIC algorithm for superpixel segmentation, it is first necessary to initialize the cluster center in each grid area of the image to ensure that the initial center is evenly distributed in the image. The grid spacing B is: Where P is the total number of pixels in the image and K is the desired number of superpixels; At the same time, each pixel is represented by a feature (x, y, l, a, b), where (x, y) represents the position coordinates of the pixel, and (l, a, b) represents the color value in the Lab space. l is the brightness, representing the grayscale value from black to white, a represents the color value from green to red, and b represents the color value from blue to yellow. The feature representation combines the spatial position information and color information of the pixel. When calculating the distance, not only the color similarity but also the spatial proximity is considered, so as to better maintain the structure of the image. Then the distance D between each pixel and the cluster center is calculated. The distance metric comprehensively considers the similarity of position and color. The calculation formula is as follows: Among them, d c is the Euclidean distance between the pixel and the cluster center in Lab color space, d s is the spatial distance between the pixel and the cluster center, and m is a parameter that balances color and spatial similarity; Each pixel is assigned to the nearest cluster center, and then the position and color of each cluster center are updated to the average value of all its pixels until the cluster center no longer changes significantly or the predetermined number of iterations is reached. Each small area generated by clustering is a superpixel S.
8. The scene classification-based adaptive CFAR detection method according to claim 6, characterized in that: The steps of generating a saliency map and performing land-sea segmentation in step 3-2 are as follows: For the i-th superpixel S generated in step 3-1 i Perform feature extraction; first obtain each superpixel S by calculating the color histogram of the Lab color space i Color feature F color ; The color histogram is a statistical representation of color distribution, which can capture the frequency and distribution of colors in the superpixel area. i , calculate its Lab color histogram H L (S i ), H a (S i ) and H b (S i ), the color histogram of each superpixel is normalized to eliminate the influence of the histogram caused by the different sizes of superpixels; The normalization process is to divide each value of the histogram by the total number of pixels |S i |, respectively get H′ L (S i ), H′ a (S i ) and H′ b (S i ), color feature vector F color (S i ) is H′ L (S i ), H′ a (S i ) and H′ b (S i ) F color (With i )=[H′ L (Si),H′ a (With i ),H′ b (Si)] (13) Where δ is the Dirac delta function, which is used to calculate the matching degree between the pixel value p and the color values L, a, b in the histogram; Secondly, the LBP algorithm is used to obtain each superpixel S i The texture feature F texture ; For superpixel S i , calculate the difference LBP(p) between the central pixel and each pixel in the neighborhood, and then count the LBP values in the entire superpixel area to generate the LBP histogram H LBP (S i ) is used to describe the texture pattern distribution of the region; then the LBP histogram H LBP (S i ) is normalized to obtain H′ LBP (S i ) to eliminate the influence of different super-pixel area sizes, so that the LBP features of different super-pixels can be compared on the same scale. texture Equal to H′ LBP (S i ); Among them, g c is the gray value of the center pixel, g i is the gray value of the i-th pixel in the neighborhood, s(x) is the sign function, v is the possible value of the LBP mode, and δ is the Dirac delta function used to count the number of times each LBP mode appears in the superpixel area; Then, calculate the superpixel area S i The spatial position feature F spatial ; For each superpixel S i , calculate the centroid position of the area (C x (S i ),C y (S i )), and normalize the centroid position by dividing it by the width and height of the image, respectively, to obtain (C′ x (S i ),C′ y (S i )), then F spatial is [C′ x (S i ),C′ y (S i )]; Among them, C x(si) and C y(si) They represent superpixels S i The position of the centroid on the x-axis and y-axis, x(p) and y(p) are the coordinates of pixel p in the image; Finally, for the obtained superpixel feature F color 、F texture and F spatial , as shown in formula (18), Z-score standardization is performed respectively, each feature is standardized by mean and standard deviation, and the value of each feature is scaled to the range of [0,1] to keep the relative proportion of the features consistent. After processing, F′ is obtained color , F′ texture and F′ spatial ; Among them, μ is the mean, σ is the standard deviation, F is the extracted eigenvalue, and F′ is the standardized eigenvalue; The significance score is calculated using formula (19), and different weights are assigned to each standardized feature. Then, the weighted sum is calculated and the calculated comprehensive significance score S is calculated as superpixel Map to each pixel in the superpixel to form a complete saliency map, and then post-process the saliency map, which is smoothed or threshold segmented to further optimize the effect of target detection; S superpixel =ω color ·F′ color +oh texture ·F′ texture +oh spatial ·F′ spatial (19) Where S superpixel is the saliency score of the superpixel, ω color ,ω texture ,ω spatial Represent the weights of color, texture and spatial position features respectively, F′ color , F′ texture , F′ spatial Represent the normalized feature values of color, texture, and spatial position, respectively; For the generated saliency map, the image is binarized using the Otsu algorithm. The Otsu algorithm determines a threshold T and binarizes the continuous value, that is, the area with a higher score is marked as the foreground, and the area with a lower score is marked as the background. The Otsu algorithm determines the optimal binarization threshold T of the image by maximizing the inter-class variance, as shown in formula (20). By calculating the inter-class variance under each possible threshold T, Find the between-class variance The largest T is the optimal threshold T max , according to the selected optimal threshold T max , binarize the saliency map into foreground and background, the area with a score higher than the threshold is the land, and the area with a score lower than the threshold is the sea surface, generating a binary image; in, is the between-class variance, μ T is the mean saliency of all pixels, μ b is the saliency mean of background pixels, W b is the proportion of foreground pixels; S superpixel [S i ] is the super pixel S i The significance score of For the generated binary image, the Canny edge detection algorithm is used to further clarify the boundary between the ocean area and the land area in the binary image and find the sea-land dividing line. First, the image is smoothed by a Gaussian filter to filter out high-frequency noise and retain the main features of the image. Then, the Sobel operator is used to calculate the gradient of the image to obtain the gradient amplitude map and direction map. Because the edge usually corresponds to the area where the gray value of the image changes rapidly, and the Sobel operator is a discrete differential operator, its core idea is to use the convolution kernel to perform a convolution operation on the image in order to highlight the area where the gray value of the image changes greatly, and to calculate the gradient of the image in the horizontal direction x and the vertical direction y. As shown in formula (22): The Sobel operator calculates the gradient G in the horizontal direction x In the matrix, -1 and +1 are symmetrical, indicating the difference between the left and right sides; -2 and +2 increase the weight of the central column. The local gradient of the image is obtained by subtracting the value of the adjacent pixel from the value of the central pixel. Similarly, as shown in formula (23): The Sobel operator calculates the gradient G in the vertical direction y , the upper and lower rows of the matrix are [-1,-2,-1] and [1,2,1] respectively. They are also symmetrical and are used to calculate the vertical edge. The difference weight of the center row also increases the detection effect of the vertical edge. Finally, according to the calculation of formula (24): Get the gradient magnitude G and direction θ; Perform non-maximum suppression. For each pixel, find its adjacent pixels in the direction according to its gradient direction θ, compare the gradient amplitude G of the pixel with the gradient amplitudes of its two adjacent pixels, and if the gradient amplitude G of the pixel is the local maximum, retain the pixel; otherwise, set it to 0 to suppress the pixel; finally, use double threshold detection and edge connection steps to further enhance the accuracy of the edge; determine the high threshold and low threshold according to the histogram of the gradient amplitude G, set the high threshold to 80% of the gradient amplitude, and the low threshold to 50% of the high threshold; then divide the edge into strong edges and weak edges; strong edges are always retained, while weak edges are only retained when connected to strong edges, and the others are suppressed. At this point, an accurate land-sea segmentation line of the binary image is obtained; Finally, the detected land area is masked through the area filling technology, and all its pixel values are set to black to ensure that the land part is completely invisible in the image; this ensures that the subsequent detection algorithm only processes the sea surface part, thereby eliminating the noise and interference that may be caused by the land area.
9. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, and the program codes can be called by a processor to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Segmentation combination-based adaptive constant false alarm rate target detection method for SAR image
CN101975940A
SAR image residential area detection method based on significance analysis and background prior
CN110310263A
Multi-feature fusion complex background mid-infrared weak and small target detection method and system
CN113935984A
Distance extension target adaptive constant false alarm detection method based on improved VI
CN116482642A
Apparatus and method for identifying drones in radar signals
EP4030184A1
Cited By
Low-power-consumption acquisition and transmission system for industrial visual inspection
CN121010604A
SAR image ship target Wilcoxon-GO nonparametric detection method based on large selection logic
CN121028083A
CFAR detection method and system based on multiple screening modules and adaptive weighting
CN121208754A
Physical scattering mechanism-based cavity model scattering center extraction method
CN121351573A