A method for merging multiple feature regions of SAR images based on SLIC superpixels
By using the SLIC superpixel algorithm and similarity coefficient calculation method in SAR image segmentation, the problems of poor contour fit and low operating efficiency in the prior art are solved, and more efficient and accurate SAR image segmentation is achieved.
Patent Information
- Application Number
- CN202211072177.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-09-02
AI Technical Summary
The prior art has poor contour fit and low operating efficiency during the preliminary segmentation of SAR images, which affects subsequent merge accuracy.
The SAR image is segmented using the SLIC superpixel algorithm, the grayscale features and texture features of each superpixel are extracted, and the similarity of adjacent superpixels is calculated by the similarity coefficient. The superpixel pair to be merged is determined by the k-mean clustering algorithm, and the merging index is calculated for merging.
The efficiency and accuracy of SAR image segmentation are improved, and the generated superpixels can better fit the area contour, reduce oversegmentation, and improve the accuracy of segmentation results.
Smart Images

Figure CN115423838B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and relates to a SAR image segmentation method, and in particular to a SAR image multi-feature region merging method based on SLIC superpixels. Background Art
[0002] Synthetic aperture radar (SAR) is a technology that applies high-resolution radar imaging to radar detection, tracking and imaging functions. SAR has the characteristics of high resolution, strong penetration, all-day and all-weather, so compared with infrared and optical equipment, SAR can not only obtain terrain and topography, as well as surface information of objects, but also obtain information covered by the surface or vegetation. Even in very bad lighting and climatic conditions, it can obtain high-resolution images. In the SAR imaging process, in order to obtain high azimuth resolution, the SAR system uses coherent detection technology to perform coherent summation calculations on the backscattered signals. It is precisely because of this randomness that a large amount of coherent speckle noise is caused, which poses a considerable challenge to the segmentation of SAR images.
[0003] Rent and Malik proposed the concept of superpixel in 2003. Superpixel refers to an irregular pixel block with certain visual significance composed of adjacent pixels with similar texture, color, brightness and other characteristics. It uses the similarity of features between pixels to group pixels, and uses a small number of superpixels to replace a large number of pixels to express image features, which greatly reduces the complexity of image post-processing, so it is usually used as a preprocessing step for segmentation algorithms. Based on the importance of superpixel segmentation, people have proposed a large number of algorithms for generating superpixels. Their models are relatively complex, and the running time is generally long. In addition, the generated superpixel boundaries cannot match the original image boundaries well. In response to these problems, Achanta et al. proposed the simple linear iterative clustering algorithm SLIC in 2012, using an improved kmeans clustering algorithm to generate superpixels. The resulting superpixel boundaries have a strong dependence on the original boundaries of the image, and the processing speed and storage efficiency are also better than other superpixel segmentation algorithms.
[0004] Traditional superpixel segmentation algorithms often have a lot of over-segmentation, and the result is not the final result of image segmentation. It is necessary to merge the over-segmented superpixels in the ground object to get the final segmentation result. The merging algorithm based on superpixel segmentation effectively inherits the advantages of superpixels, improves the over-segmentation phenomenon of superpixels, and improves segmentation efficiency and accuracy.
[0005] At present, some superpixel merging methods have been proposed. For example, the patent application with application publication number CN104794730A and titled "SAR image segmentation method based on superpixels" discloses a SAR image segmentation method based on superpixels, which mainly solves the problem that the existing technology has high computational complexity and cannot distinguish small targets. The implementation steps of the invention are: 1. SAR image input, completing the input of the SAR image to be segmented and obtaining image information; 2. Generating superpixels for the input SAR image to obtain a superpixel image; 3. Extracting texture features and spatial features of the superpixel image; 4. Clustering texture features and merging superpixels in combination with spatial features, and outputting the final segmentation result of the SAR image. This method can effectively reduce the computational complexity of traditional algorithms, shorten the processing time of SAR image segmentation, distinguish small targets, and improve the accuracy of segmentation. However, in the second step, the invention uses the level set evolution method of seed expansion to generate superpixels. Although the algorithm has low computational complexity, it has poor contour fit and low operating efficiency, which affects the subsequent merging accuracy. Summary of the invention
[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and propose a SAR image multi-feature region merging method based on SLIC superpixel to solve the technical problems of poor contour fit and low operating efficiency during superpixel initial segmentation in the prior art.
[0007] In order to achieve the above object, the technical solution adopted by the present invention comprises the following steps:
[0008] (1) Use the SLIC superpixel algorithm to segment SAR images:
[0009] Input a SAR image of size m×n, and use the simple linear iterative clustering SLIC superpixel algorithm to segment the SAR image to obtain K superpixels S={S1,S2,...,S k ,...,S K},in, p is the preset superpixel size, 20≤p≤25, S k Indicates that Q is included k pixels and the perimeter is λ k The kth superpixel of
[0010] (2) Let the number of iterations be num, and let num = 0;
[0011] (3) Extract the grayscale features and texture features of each superpixel:
[0012] Extract each superpixel S k The grayscale histogram H includes b gray levels k, H k As a super pixel S k Grayscale features, get K superpixels S k The corresponding grayscale feature set H = {H1, H2, ..., H k ,...,H K}, and the texture feature T of each superpixel Sk is extracted through the gray level co-occurrence matrix k = {R k ,E k ,D k}, get K superpixels S k The corresponding texture feature set T = {T1, T2, ..., T k ,...,T K}, where Rk, Ek, and Dk represent the contrast, energy, and entropy of Sk, respectively;
[0013] (4) Obtain the similarity coefficient between every two adjacent superpixels:
[0014] (4a) Calculate every two superpixels S i With S j The gray feature similarity coefficient G between H i,j , texture feature similarity coefficient G T i,j , and through G H i,j and G T i,j Calculate S i With S j The similarity coefficient G i,j :
[0015] G i,j =α(G H i,j +G T i,j )
[0016]
[0017]
[0018]
[0019]
[0020] Among them, i∈[1,K], j∈[1,K], and i≠j, α represents the adjacent factor, β i represents the i-th superpixel S i The normalization coefficient of Hi(f) represents the i-th superpixel S iThe grayscale histogram H i The value of the fth interval, G R i,j , G E i,j , G D i,j Represents every two superpixels S i With S j The contrast similarity coefficient, energy similarity coefficient and entropy similarity coefficient between them, ω1, ω2, ω3 represent G R i,j , G E i,j , G D i,j The weight of
[0021] (4b) The similarity coefficients of U adjacent superpixels in the K superpixels S are combined into a set of similarity coefficients of adjacent superpixel pairs G = {G1, G2, ..., G u ,...,G U};
[0022] (5) Determine the superpixel pairs to be merged:
[0023] The k-means clustering algorithm kmeans is used to cluster the similarity coefficient set G of adjacent superpixel pairs into c classes, and the average similarity coefficient of each class is calculated. Then, the similarity coefficients of the Y adjacent superpixel pairs contained in the class with the smallest average similarity coefficient are X={G1,G2,...,G y ,...,G Y} corresponding to the adjacent superpixel pair O = {W1, W2, ..., W y ,...,W Y} as the superpixel pair to be merged;
[0024] (6) Calculate the merging index of each superpixel pair to be merged:
[0025] Calculate each superpixel pair W to be merged y The enveloping coefficient z y , and through z y and W y The similarity coefficient G y Calculate W y The combined index A y , and obtain the combined index set A={A1,A2,...,A y ,...,A Y},in:
[0026]
[0027] A y =Gy × y
[0028] Among them, λ ρ and λ τ Represents adjacent superpixel pairs W y The perimeter of each of the two superpixels in y Denotes the adjacent superpixel pair W y The common perimeter of the two superpixels in ;
[0029] (7) Obtain the SAR image multi-feature region merging results:
[0030] Merge the adjacent superpixel pairs with the smallest index value in the merging index set A, and determine whether num ≥ 95% K is true. If so, output a SAR image containing 5% K newly merged superpixels. Otherwise, set num = num + 1 and execute step (3).
[0031] Compared with the prior art, the present invention has the following advantages:
[0032] The present invention adopts a simple linear iterative clustering SLIC superpixel algorithm when preliminarily segmenting the SAR image. The SLIC algorithm has a high running speed, and the generated superpixels are compact and neat like cells, which can fit the regional contour well, and the neighborhood features are relatively easy to express. In addition, by default, only the number of pre-segmented superpixels needs to be set, and more errors caused by artificially set parameters will not be introduced. Subsequently, the space, grayscale and texture features of the SAR image are used when merging adjacent regions, and the mutual fusion of different features can provide additional information for each other. Compared with the prior art, the segmentation efficiency and accuracy of the SAR image are effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of the implementation of the present invention;
[0034] Figure 2 is a synthetic SAR image used in the simulation experiment of the present invention;
[0035] Figure 3 It is the synthetic SAR image of 2, 4, 6, 8, 10 Look used in the simulation experiment of the present invention;
[0036] Figure 4 It is a simulation experiment result diagram of the present invention;
[0037] Figure 5 Graph showing the SA scores of the present invention. DETAILED DESCRIPTION
[0038] The present invention is further described in detail below with reference to the accompanying drawings and specific examples.
[0039] Reference Figure 1 , the present invention comprises the following steps:
[0040] Step 1) Use the SLIC superpixel algorithm to segment the SAR image:
[0041] Input a synthetic SAR image of size m×n, such as Figure 2 As shown in Figure 2, due to the characteristics of SAR images, Figure 2 On the basis of adding coherent speckle noise of different looks, SAR images of different looks are generated. The results are as follows Figure 3 As shown in the figure, the simple linear iterative clustering SLIC superpixel algorithm is used to Figure 3 The SAR image in is preliminarily segmented to obtain K superpixels S = {S1, S2, ..., S k ,...,S K}, the implementation process is:
[0042] (1a) In the SAR image, according to the expected number of superpixels K, K pixels are uniformly used as the initial cluster centers of K superpixels. The distance between adjacent initial cluster centers is
[0043] (1b) Calculate the grayscale gradient values of all pixels in the l×l neighborhood of each cluster center, move the cluster center to the pixel with the smallest grayscale gradient in the neighborhood, and obtain a new cluster center. Suppose the position coordinates of the new cluster center are (xr, yl) and the grayscale is θ;
[0044] (1c) Calculate the area around each cluster center The color distance dc and spatial distance ds between the pixel points in the neighborhood of and the cluster center, the expected superpixel size is Set the search scope to In order to accelerate the convergence of the algorithm, their distance DN is then calculated, and each pixel is divided into the superpixel corresponding to the cluster center closest to it. The calculation formula is:
[0045]
[0046] dc=θ-θ'
[0047]
[0048] Where (xr', yl') is the position coordinate of the pixel, θ' is the gray value of the pixel, Ns is the maximum spatial distance within the class, Nc is the maximum color distance, Nc = max(dc),
[0049] (1d) After the division is completed, repeat steps (1b) and (1c) for iteration. The iteration stops when the number reaches 10. Finally, K superpixels S = {S1, S2, ..., Sk, ..., SK} are obtained, where p is the preset superpixel size, 20≤p≤25, S k It means that it contains Qk pixels and has a perimeter of λ k The kth superpixel of
[0050] In this embodiment, m=n=512, p=20, l=3.
[0051] Step 2) Set the number of iterations to num, and set num = 0;
[0052] Step 3) Extract the grayscale features and texture features of each superpixel:
[0053] Extract each superpixel S k The grayscale histogram H includes b gray levels k , H k As a super pixel S k The grayscale features of K superpixels Sk are obtained by obtaining the grayscale feature set H = {H1, H2, ..., H k ,...,H K}, and calculate each superpixel S k The gray-level co-occurrence matrix is used to extract each superpixel S k The texture feature T k = {R k ,E k ,D k}, get K superpixels S k The corresponding texture feature set T = {T1, T2, ..., T k ,...,T K}, where R k 、E k , D k Respectively represent S k The contrast, energy, and entropy of are realized as follows;
[0054] (3a) Construct each superpixel S k The dimension of the gray-level co-occurrence matrix is Θ×Φ. The element of the gray-level co-occurrence matrix is the joint probability of the gray-level values of two pixels with a distance of ε appearing at the same time in a certain translation direction. In other words, θ and Respectively represent the row and column number to which the array element belongs;
[0055] (3b) Calculate the contrast R using the elements of the gray level co-occurrence matrix k, energy E k , entropy D k , the calculation formulas are:
[0056]
[0057]
[0058]
[0059] In this embodiment, b=64, Θ=Φ=8.
[0060] Step 4) Get the similarity coefficient between every two adjacent superpixels:
[0061] Step 4a) Calculate every two superpixels S i With S j The gray feature similarity coefficient G between H i,j , texture feature similarity coefficient G T i,j , and through G H i,j and G T i,j Calculate S i With S j The similarity coefficient G i,j :
[0062] G i,j =α(G H i,j +G T i,j )
[0063]
[0064]
[0065]
[0066]
[0067] Among them, i∈[1,K], j∈[1,K], and i≠j, α represents the adjacent factor, β i represents the i-th superpixel S i The normalization coefficient, H i (f) represents the i-th superpixel S i The grayscale histogram H i The value of the fth interval, G R i,j , G E i,j , G Di,j Represents every two superpixels S i With S j The contrast similarity coefficient, energy similarity coefficient and entropy similarity coefficient between them are calculated as follows:
[0068] G R i,j =|R i -R j |
[0069] G E i,j =|E i -E j |
[0070] G D i,j =|D i -D j |
[0071] ω1, ω2, ω3 represent G R i,j , G E i,j , G D i,j The weight is calculated as:
[0072] ω1=1
[0073]
[0074]
[0075] (4b) U similarity coefficients not equal to zero are obtained, corresponding to the similarity coefficients of U adjacent superpixels in the K superpixels S, and they are combined into a similarity coefficient set of adjacent superpixel pairs G = {G1, G2, ..., G u ,...,G U};
[0076] Step 5) Determine the superpixel pairs to be merged:
[0077] The k-means clustering algorithm kmeans is used to cluster the similarity coefficient set G of adjacent superpixels into c categories. The implementation process is as follows:
[0078] (5a) Randomly select c similarity coefficients as the initial cluster centers of the three types of similarity coefficients;
[0079] (5b) Calculate the absolute value of the difference between each element in G and each cluster center, use it as the distance between each element and each cluster center, and divide the element into the class corresponding to the cluster center closest to it;
[0080] (5c) After a clustering is completed, the mean of all elements in each class is calculated and the current cluster center is replaced with the mean to become the new cluster center;
[0081] (5d) Repeat steps (4b) and (4c) until the value of the cluster center no longer changes, and finally cluster the similarity coefficient set G of adjacent superpixel pairs into c categories.
[0082] Calculate the average similarity coefficient of each class, sort them by size, and take the class with the smallest average similarity coefficient as the merge object, and merge the similarity coefficients of the Y adjacent superpixel pairs it contains into X = {G1, G2, ..., G y ,...,G Y} corresponding to the adjacent superpixel pair O = {W1, W2, ..., W y ,...,W Y} as the superpixel pair to be merged;
[0083] In this embodiment, c=3.
[0084] Step 6) Calculate the merging index of each superpixel pair to be merged:
[0085] In the same class, two adjacent superpixels with surrounding relationships are preferentially merged. The strength of the surrounding relationship is determined by the surrounding coefficient z. y To represent, calculate each superpixel pair W to be merged in O y The enveloping coefficient z y , and through z y and W y The similarity coefficient G y Calculate W y The combined index A y , and obtain the combined index set A={A1,A2,...,A y ,...,A Y},in:
[0086]
[0087] A y =G y × y
[0088] Among them, λ ρ and λ τ Represents adjacent superpixel pairs W y The perimeter of each of the two superpixels in y Denotes the adjacent superpixel pair W y The common perimeter of the two superpixels in ;
[0089] Step 7) Obtain the SAR image multi-feature region merging result:
[0090] Merge the adjacent superpixel pairs with the smallest index value in the merging index set A, and determine whether num ≥ 95% K is true. If so, output a SAR image containing 5% K newly merged superpixels. Otherwise, set num = num + 1 and execute step (3).
[0091] The following is a further description of the technical effects of the present invention in combination with simulation experiments:
[0092] 1. Simulation conditions:
[0093] The simulation experiment of the present invention is carried out in a computer configured with a core i5-10400 2.9GHZ processor, 16G running memory, Windows 11 system and the computer software is configured with MATLAB R2019b environment. The method of the present invention is used to carry out experiments under the above simulation conditions, and different degrees of noise are added to a synthetic SAR image to obtain synthetic SAR images of 2, 4, 6, 8, and 10 Looks, such as Figure 2 As shown, the size of the synthetic SAR image is 512×512.
[0094] 2. Simulation content and results:
[0095] The method of the present invention is used to segment the synthetic SAR images of 2, 4, 6, 8, and 10 Looks. The segmentation results are as follows: Figure 4 As shown in the figure, it can be seen that the present invention can merge regions with the same texture together, and the boundaries between different regions can also fit well. The supervised segmentation evaluation method SA is used to evaluate the segmentation results. The higher the SA score, the more accurate the segmentation and the better the effect. The SA scores obtained by segmenting five images with different noises are shown in Figure 2. Figure 5 As shown, the horizontal axis is the number of views of the SAR image, and the vertical axis is the SA score of the five images. The scores of the five images are all above 90, which proves that the segmentation method of the present invention has good accuracy.
Claims
1. A method for merging multiple feature regions of SAR images based on SLIC superpixels, characterized in that: The steps include: (1) Use the SLIC superpixel algorithm to segment SAR images: Input a SAR image of size m×n, and use the simple linear iterative clustering SLIC superpixel algorithm to segment the SAR image to obtain K superpixels S={S1,S2,...,S k ,...,S K },in, p is the preset superpixel size, 20≤p≤25, S k Indicates that Q is included k pixels and a perimeter of λ k The kth superpixel of (2) Let the number of iterations be num, and let num = 0; (3) Extract the grayscale features and texture features of each superpixel: Extract each superpixel S k The grayscale histogram H includes b gray levels k , H k As a super pixel S k Grayscale features, get K superpixels S k The corresponding grayscale feature set H = {H1, H2, ..., H k ,...,H K }, and extract each superpixel S through the gray level co-occurrence matrix k The texture feature T k = {R k ,E k ,D k }, get K superpixels S k The corresponding texture feature set T = {T1, T2, ..., T k ,...,T K }, where R k 、E k , D k Respectively represent S k Contrast, energy, entropy; (4) Obtain the similarity coefficient between every two adjacent superpixels: (4a) Calculate every two superpixels S i With S j The gray feature similarity coefficient G between H i,j , texture feature similarity coefficient G T i,j , and through G H i,j and G T i,j Calculate S i With S j The similarity coefficient G i,j : G i,j =α(G H i,j +G T i,j ) Among them, i∈[1,K], j∈[1,K], and i≠j, α represents the adjacent factor, β i represents the i-th superpixel S i The normalization coefficient, H i (f) represents the i-th superpixel S i The grayscale histogram H i The value of the fth interval, G R i,j , G E i,j , G D i,j Represents every two superpixels S i With S j The contrast similarity coefficient, energy similarity coefficient and entropy similarity coefficient between them, ω1, ω2, ω3 represent G R i,j , G E i,j , G D i,j The weight of (4b) The similarity coefficients of U adjacent superpixels in the K superpixels S are combined into a set of similarity coefficients of adjacent superpixel pairs G = {G1, G2, ..., G u ,...,G U }; (5) Determine the superpixel pairs to be merged: The k-means clustering algorithm kmeans is used to cluster the similarity coefficient set G of adjacent superpixel pairs into c classes, and the average similarity coefficient of each class is calculated. Then, the similarity coefficients of the Y adjacent superpixel pairs contained in the class with the smallest average similarity coefficient are X={G1,G2,...,G y ,...,G Y } corresponding to the adjacent superpixel pair O = {W1, W2, ..., W y ,...,W Y } as the superpixel pair to be merged; (6) Calculate the merging index of each superpixel pair to be merged: Calculate each superpixel pair W to be merged y The enveloping coefficient z y , and through z y and W y The similarity coefficient G y Calculate W y The combined index A y , and obtain the combined index set A={A1,A2,...,A y ,...,A Y },in: A y =G y ×z y Among them, λ ρ and λ τ Represents adjacent superpixel pairs W y The perimeter of each of the two superpixels in y Denotes the adjacent superpixel pair W y The common perimeter of the two superpixels in ; (7) Obtain the SAR image multi-feature region merging results: Merge the adjacent superpixel pairs with the smallest index value in the merging index set A, and determine whether num ≥ 95% K is true. If so, output a SAR image containing 5% K newly merged superpixels. Otherwise, set num = num + 1 and execute step (3).
2. The method for merging multiple feature regions of SAR images based on SLIC superpixels according to claim 1, characterized in that: The SAR image is segmented using the simple linear iterative clustering (SLIC) superpixel algorithm described in step (1), and the implementation steps are as follows: (1a) In the SAR image, according to the expected number of superpixels K, K pixels are uniformly used as the cluster centers of K superpixels, and the distance between adjacent cluster centers is (1b) Calculate the grayscale gradient values of all pixels in the l×l neighborhood of each cluster center, move the cluster center to the pixel with the smallest grayscale gradient in the neighborhood, and obtain a new cluster center. Suppose the position coordinates of the new cluster center are (xr, yl) and the grayscale is θ; (1c) Calculate the area around each cluster center The color distance dc and spatial distance ds between the pixel points in the neighborhood and the cluster center are calculated, and then the distance DN between the pixel points in the neighborhood and the cluster center is calculated, and each pixel is divided into the superpixel corresponding to the cluster center closest to it, where: dc=θ-θ' Where (xr', yl') is the position coordinate of the pixel in the neighborhood, θ' is the gray value of the pixel in the neighborhood, Ns is the maximum spatial distance within the class, Nc is the maximum color distance, Nc = max(dc); (1d) Repeat steps (1b) to (1c) and stop when the number reaches 10. Finally, K superpixels S = {S1, S2, ..., S k ,...,S K }.
3. The method for merging multiple feature regions of SAR images based on SLIC superpixels according to claim 1, characterized in that: The gray level co-occurrence matrix is used to extract each superpixel S as described in step (3). k The texture feature T k = {R k ,E k ,D k }, the implementation steps are: (3a) Construct each superpixel S k The dimension of the gray-level co-occurrence matrix is Θ×Φ. The array element of the gray-level co-occurrence matrix is the joint probability of the gray-level values of two pixels with a distance of ε appearing at the same time in a certain translation direction. In other words, θ and Respectively represent the row and column number to which the array element belongs; (3b) Contrast R k , energy E k , entropy D k The calculation formulas are:
4. The method for merging multiple feature regions of SAR images based on SLIC superpixels according to claim 1, characterized in that: Each two superpixels S in step (4a) i With S j The contrast similarity coefficient G R i,j , energy similarity coefficient G E i,j and entropy similarity coefficient G D i,j , the calculation formulas are: G R i,j =|R i -R j | G E i,j =|E i -E j | G D i,j =|D i -D j |。 5. The method for merging multiple feature regions of SAR images based on SLIC superpixels according to claim 1, characterized in that: The k-means clustering algorithm kmeans described in step (5) is used to cluster the similarity coefficient set G of adjacent superpixels into c categories, and the implementation steps are: (5a) Randomly select c similarity coefficients as the initial cluster centers; (5b) Calculate the absolute value of the difference between each element in G and each cluster center as the distance between each element and each cluster center, and divide the element into the class corresponding to the cluster center closest to it; (5c) Calculate the mean of all elements in each class and use the mean as the new cluster center; (5d) Repeat steps (5b) and (5c) until the cluster center no longer changes, and finally cluster the similarity coefficient set G of adjacent superpixel pairs into c categories.
Citation Information
Patent Citations
Superpixel-based SAR image segmentation method
CN104794730A
A Single Tree Crown Segmentation Algorithm Based on Super-pixels and Topological Features in Aerial Images
AU2020103026A4
Remote-sensing image segmentation oriented image object merging method
CN102915531A