Road Extraction Method from Remote Sensing Images Based on Fuzzy C-means Clustering
By improving the fuzzy C-mean clustering method, combining filtering processing, local binary mode and context information, the problems of noise pollution and low contrast in remote sensing images are solved, and efficient, accurate and robust road information extraction of remote sensing images are achieved.
Patent Information
- Application Number
- CN202310588429.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2043-05-23
AI Technical Summary
The existing fuzzy C-mean clustering method is sensitive to visual content with low noise pollution and low contrast in remote sensing image road extraction, making it difficult to effectively extract clear road information, and lacks consideration of the context information of the target area, resulting in lost road information and unclear details.
The method based on fuzzy C mean clustering is adopted, through filtering processing, grayscale calculation of local binary mode, increasing neighborhood radius and number of samples, obtaining spatial context information, determining clustering number and fuzzy weight index, combining local binary mode and uniform mode with constant rotation, the feature anti-image rotation recognition capability is optimized, and neighborhood pixel reliability index and global context module are introduced to construct context correlation and optimize the objective function to automatically adjust membership.
Effectively reduce the impact of noise on normal pixel classification, improve the accuracy of road extraction and the retention of detailed information, reduce false alarm rate, optimize road boundary blur and spatial information loss, and improve the robustness and accuracy of remote sensing images road extraction.
Smart Images

Figure CN116664899B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of remote sensing image road extraction, and in particular relates to a remote sensing image road extraction method based on fuzzy C-means clustering. Background Art
[0002] With the development of remote sensing technology, image semantic segmentation has become increasingly important in the field of computer vision and has become of practical significance for target extraction. In particular, in urban planning, transportation, geographic information systems (GIS), geological disasters, and other areas, the rapid, accurate, and efficient extraction of clear roads from remote sensing imagery has become a key research topic in the field. Road extraction from remote sensing images is a crucial method for obtaining traffic information, and its significance is evident from both ecological and socioeconomic perspectives.
[0003] Fuzzy C-means (FCM) is an object-based road extraction method that has the ability to simultaneously process image segmentation and remove noise. It is one of the most widely used unsupervised road detection methods. Fuzzy C-means can effectively model data uncertainty, but it is sensitive to noise pollution and low-contrast visual content, and it is difficult to obtain good detection results when used directly. Yang et al. proposed using the distance between neighborhood pixels and the cluster center to adjust the membership degree and segment the image. However, their neighborhood pixel weighting uses a uniform weight, ignoring the position differences between pixels. Wang Fengping et al. used a constrained fuzzy clustering method to improve the accuracy of the segmentation algorithm by adding a spatial neighborhood constraint term to the objective function of fuzzy C-means clustering. Existing methods fully utilize the local spatial information of the image and propose fuzzy clustering methods based on local information. However, they lack consideration of the contextual information of the target area and cannot effectively extract boundary information. Summary of the Invention
[0004] The purpose of the present invention is to provide a remote sensing image road extraction method based on fuzzy C-means clustering, which solves the problems of loss of road information and unclear details in the prior art.
[0005] The technical solution adopted by the present invention is:
[0006] The road extraction method of remote sensing images based on fuzzy C-means clustering is specifically carried out in the following steps: Step 1: filter the remote sensing image; Step 2: obtain the grayscale value of the local binary pattern of the central pixel based on the grayscale value of the pixel neighborhood; Step 3: increase the radius of the neighborhood and the number of samples, and propose the grayscale value of the local binary pattern unique to each texture feature; Step 4: obtain the spatial context information of the road image under the local binary pattern, and obtain the contextual correlation between two pixels belonging to the same category; Step 5: determine the number of clusters, the fuzzy weight index, and start the loop; Step 6, calculate the cluster center and the membership value; Step 7: calculate the objective function, segment each pixel according to the maximum membership principle, and if the termination condition is reached, stop the iteration, obtain the pixel classification information of the road, extract the information and obtain a binary image; otherwise, return to step 4 and recalculate.
[0007] The present invention is also characterized in that:
[0008] Specifically, step 1 is to perform a convolution operation on the image, scan it with a moving window, take the average grayscale value of all pixels in the neighborhood of each pixel instead of the pixel value at the center of the neighborhood, perform window scanning and operation on the entire image, and obtain an image after mean filtering.
[0009] Step 2 is specifically as follows: comparing the grayscale values of the neighborhood pixels of the filtered image with the grayscale value of the central pixel, and arranging the comparison results into a binary string, which is the grayscale value of the local binary pattern of the central pixel.
[0010] In step 3, the pixel grayscale value of the local binary pattern of the central pixel is calculated by replacing the rectangular neighborhood with the circular neighborhood and extracting the pixel grayscale value in the circular neighborhood of the image using the following formula (1):
[0011]
[0012] Among them, g c is the grayscale value of the center pixel of the image, ROR is a binary string with a length of P bits that is cyclically shifted right n times, LBP R is the grayscale value of the LBP of pixel R; the above formula cyclically right-shifts the binary string in the local binary pattern by n in the range of 0 to 8R-1, where R is the radius of the circular neighborhood. Finally, the binary string corresponding to the smallest decimal value is used as the rotation-invariant LBP grayscale value of the pixel, ensuring the rotation invariance of the road image and obtaining the minimum grayscale value of the local binary pattern.
[0013] In step 4, the global context module is embedded in our road extraction method to construct the contextual correlation between two pixels belonging to the same k categories based on the spatial context information;
[0014] Combining the spatial context information of road images, a neighborhood pixel reliability index ρ is proposed j , the formula is:
[0015]
[0016] Among them, τ is the variation coefficient matrix, which is The coefficient of change of the neighborhood window τ j Defined as:
[0017]
[0018] The pixel values of pixels j and p are and N R and μ(N j ) is the number and mean of pixels in the neighborhood;
[0019] Combined with the neighborhood pixel reliability index, a reliability measurement model based on context information is proposed, using RC ij (k) represents the contextual relevance of pixels i and j belonging to the kth category, and its formula is:
[0020]
[0021] ρ j is the pixel reliability index, d ij Calculate the Euclidean distance between the kth cluster center and the i-th data point, u ik is the membership degree of i belonging to the Kth category, u jk is the membership degree of j to the Kth class.
[0022] In step 5, an algorithm for finding the number of clusters C based on the co-occurrence matrix is proposed. The diagonal values of the co-occurrence matrix are selected, and the local maximum value is found from the diagonal values, and is determined as the final number of clusters: specifically:
[0023] Step 5.1: Read the image;
[0024] Step 5.2: Convert image I to HSV color space;
[0025] Step 5.3: Calculate the co-occurrence matrix T of H values based on contextual relevance;
[0026] Step 5.4: Select the diagonal values of the co-occurrence matrix and store them in d;
[0027] Step 5.5: Find the local maxima from the diagonal values by:
[0028] Find the mean of the diagonal values of the co-occurrence matrix;
[0029] Define C as the number of values greater than or equal to the mean;
[0030] Step 5.6: C is the final number of clusters.
[0031] In step 6, d ik Calculate the Euclidean distance between the kth cluster center and the i-th data point to construct the objective function, membership degree and cluster center:
[0032]
[0033] V i is the cluster center of fuzzy group K, is the pixel value of the cluster center in the rotation-invariant uniform mode;
[0034] The Lagrange multiplier method is used to construct a new objective function, and the partial derivatives of u, v, and λ of L are obtained to obtain the membership degree u ik and cluster center v k The new objective function L is defined as follows:
[0035]
[0036] u ik is the membership degree of i belonging to the Kth category, λ i Find the parameters of possible extreme points for Lagrangian, d ik Calculate the Euclidean distance between the kth cluster center and the i-th data point, where c is the number of cluster centers and n is the number of data points;
[0037] Membership value u ik for:
[0038]
[0039] d ik Calculate the Euclidean distance between the kth cluster center and the i-th data point, d ij Calculate the Euclidean distance between the jth data point and the i-th data point, LBP i riu2 is the grayscale value of the cluster center in the rotation-invariant uniform mode, ν k is the cluster center k, ν j is the cluster center j, m is the weighted index;
[0040] Similarly, find the cluster center ν k The expression is:
[0041]
[0042] u ik is the membership degree of i belonging to the Kth category, LBPi riu2 is the pixel value of the cluster center in the rotation-invariant uniform mode, c is the number of cluster centers, and m is the weighted index.
[0043] In step 7, a new objective function is defined to determine the conditions for terminating the iteration and update the membership value and cluster center;
[0044] The new objective function J(U,V) can be expressed as:
[0045]
[0046] u ik is the membership degree of i belonging to the kth category, is the pixel value of the cluster center in the rotation-invariant uniform mode, c is the number of cluster centers, n is the number of data, m is the weighted index, V i is the cluster center of fuzzy group k, RC ij (k) indicates that pixels i and j belong to the contextual relevance of the kth category, N R is the number of pixels in the neighborhood;
[0047] if Or t≥loop, then stop the iteration, otherwise return to step 4 to recalculate the context relevance, cluster center and membership degree;
[0048] New cluster center ν′ i for:
[0049]
[0050] u ik is the membership degree of i belonging to the kth category, and is the pixel value of the cluster center in the rotation-invariant uniform mode, n is the number of data, m is the weighted index, RC ij (k) indicates that pixels i and j belong to the contextual relevance of the kth category, N R is the number of pixels in the neighborhood, u′ ik is the new membership value;
[0051] New membership value u′ ik for:
[0052]
[0053] is the pixel value of the cluster center in the rotation-invariant uniform mode, m is the weighted index, RC ij (k) indicates that pixels i and j belong to the contextual relevance of the kth category, N R is the number of pixels in the neighborhood, u′ik is the new membership value, ν i is the value of cluster center i, ν j is the value of cluster center j.
[0054] In step 3, the radius of the circular neighborhood and the number of samples in the neighborhood are changed, and the rotation-invariant local binary pattern and the uniform local binary pattern are combined to optimize the feature's anti-image rotation recognition ability and obtain the pixel value under the stable local binary pattern;
[0055] Uniform local binary pattern:
[0056]
[0057] Among them, g c Represents the grayscale value of the center pixel of the image, g p is the grayscale value of the neighboring pixels around the central pixel, P is the number of neighbors, U(LBP R (g c )) Calculate the number of bit-by-bit transitions between two adjacent values in a binary string from 0 to 1, or from 1 to 0, to describe the uniformity metric of the local texture structure of the image;
[0058] The rotation-invariant unified pattern combines the rotation-invariant and uniform local binary patterns, and its mathematical description is defined as shown in the formula;
[0059]
[0060] g c Represents the grayscale value of the center pixel of the image, g p is the grayscale value of the neighborhood pixels around the central pixel, P is the number of neighborhoods, is the pixel value under the uniform local binary pattern.
[0061] In step 5, the weighted index m is set to 2, and the number of cluster centers C is used to initialize the membership matrix U with a dimension of N data:
[0062]
[0063] n is the number of data, u ik is the membership matrix.
[0064] The beneficial effect of the present invention is that the remote sensing image road extraction method based on fuzzy C-means clustering is reasonably designed so that when a noise point is a central pixel of a neighborhood, its membership can be automatically adjusted under the influence of a large number of normal pixels in the surrounding neighborhood, thereby better avoiding missegmentation; in addition, the present invention can also minimize the impact of neighborhood noise points on normal pixel classification, improve the algorithm's ability to suppress noise, effectively reduce the false alarm rate, and has certain practical significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 This is a flow chart of the method for extracting roads from remote sensing images based on fuzzy C-means clustering of the present invention;
[0066] Figure 2 It is a commonly used mean filter template image of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0067] Figure 3 This is a flow chart of LBP value calculation of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0068] Figure 4 It is a circular neighborhood system of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0069] Figure 5 It is the LBP mode of different radii and pixel points of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0070] Figure 6 It is a rotation-invariant LBP example of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0071] Figure 7 These are all the rotationally invariant LBP pattern graphs when P=8 in the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0072] Figure 8 These are all examples of rotationally invariant unified patterns when P=8 in the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0073] Figure 9 This is an example of a hybrid mode when P=8 in the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0074] Figure 10 It is a context-based reliability measurement model diagram of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0075] Figure 11It is a scatter plot of data clustering of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0076] Figure 12 The data of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention are distributed in different cluster centers;
[0077] Figure 13 It is an artificially synthesized image of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0078] Figure 14 It is a synthetic image after adding noise in the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0079] Figure 15 It is a composite image after FCM clustering of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0080] Figure 16 It is a natural image of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0081] Figure 17 It is a natural image after adding noise in the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0082] Figure 18 It is a natural image after FCM clustering of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention;
[0083] Figure 19 It is an evaluation parameter for the FCM segmentation results of the remote sensing image road extraction method based on fuzzy C-means clustering in the present invention. DETAILED DESCRIPTION
[0084] The following describes in detail the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention in conjunction with the accompanying drawings and specific embodiments.
[0085] Example 1, the specific process of the remote sensing image road extraction method based on fuzzy C-means clustering of the present invention is as follows Figure 1 shown.
[0086] Step 1: Perform convolution operation on the image, scan it step by step using a moving window, take the average value of all pixel grayscale values in each pixel neighborhood instead of the pixel value at the center of the neighborhood, and perform window scanning and operation on the entire image to achieve the purpose of removing sharp noise and smoothing the image. Commonly used mean filter templates are as follows: Figure 2 shown.
[0087] Step 2: The original Local Binary Pattern (LBP) is obtained by encoding the relative intensity value between the gray value of the central pixel and the gray value of the 8 neighboring pixels in the surrounding rectangular area of 3×3 (i.e., radius R=1), and the LBP-based 2D image is obtained. 8R The histogram of the pattern is used as the texture representation of the image. Taking any point in the grayscale image as the center pixel, the grayscale values of the 8 neighboring pixels in the 3×3 rectangular neighborhood are compared with the grayscale value of the center pixel. If the value is greater than or equal to the threshold, the corresponding position is encoded as 1, otherwise it is encoded as 0.
[0088] Then select a certain position as the starting point, encode the binary image in the mode in a clockwise direction, get a binary string, convert it into decimal, which is the LBP value of the center pixel. Figure 3 As shown, the grayscale values 1, 2, 3, 4 are compared with 5, and the corresponding positions are encoded as 0. The grayscale values 6, 7, 8, 9 are compared with 5, and the corresponding positions are encoded as 1. Therefore, the binary string after clockwise encoding is 00111100, and its LBP value is 60.
[0089] After the rectangular neighborhood is changed to a circular neighborhood, the LBP mode calculation formula defined on the circular neighborhood system is:
[0090]
[0091] In the above formula, Φ(x) is a symbolic function, g c Represents the grayscale value of the center pixel (i, j) of the image, g p It is the grayscale value of the neighborhood pixels around the central pixel, and is defined as shown in the following formula.
[0092]
[0093] Step 3: Each pixel in the grayscale image can obtain an LBP value through the above encoding process, and then obtain the LBP feature map. Finally, the probability of each LBP value in the LBP feature map is counted, and a histogram is obtained to uniquely identify the image. In order to improve the limitation of the original LBP that cannot obtain large-scale texture structure features, it is proposed to use a circular neighborhood instead of a rectangular neighborhood to calculate the LBP value. The encoding flow chart of the LBP of the circular neighborhood is as follows: Figure 4 As shown in the figure, the only difference from the rectangular neighborhood calculation is that the position of the neighborhood pixels in the circular area is obtained by interpolation. If the coordinates of the center pixel are (0,0), then the coordinates of the neighborhood pixels in its circular area are expressed as (-rsin(2πn / 8r),rcos(2πn / 8r)). However, when the circular neighborhood radius R increases, the number of neighborhood pixels P will increase. The local binary patterns of different radii and pixels are as follows: Figure 5 As shown, LBP mode type 2P The number of pixels in the neighborhood increases exponentially, which in turn causes a huge increase in feature dimensions, affecting the computational speed and recognition efficiency of feature extraction. Therefore, the rotation-invariant local binary pattern (LBP) is proposed. ri ), uniform local binary pattern (LBP u2 ) and rotation-invariant uniform local binary pattern (LBP riu2 ).
[0094] According to the definition of LBP, LBP P,R Can produce 2 P There are different values, and the corresponding P pixels form 2 P Different binary patterns exist. When an image undergoes rotational transformation, the neighboring pixels within a circular region around a central pixel will shift accordingly along the circumference of the circle, causing the original LBP value of that point to differ from the rotated LBP value. To achieve rotational invariance, a subset of LBP patterns is used to describe image features. This means that each rotationally invariant local binary pattern is assigned a unique identifier, leading to the rotationally invariant local binary pattern. Its definition is shown in the formula.
[0095]
[0096] Example 2, as an example, where ROR(x,n) represents a cyclic right shift of n times on a binary string x of length P bits. For the pixels of an image, the above formula converts LBP R Shift right by n (n = 0, 1, ..., 8R-1) bits in sequence, and finally use the binary string corresponding to the smallest decimal number as the rotation-invariant LBP value of the pixel, such as Figure 6 For example, when R=1, the LBP corresponding to a central pixel R is 00110000, then the rotation-invariant LBP values of 00110000, 00011000, 0000110, 00000011, 10000001, 11000000, and 01100000 are all 00000011. When P = 8, all the rotation-invariant patterns are as follows Figure 7 shown.
[0097] Uniform Local Binary Pattern (LBP) u2 ) is the basic attribute describing texture. The frequency of these specific patterns is significantly higher than other patterns, sometimes even exceeding 90%. These specific patterns have a common feature, that is, there are few spatial transformations. Their structure is as follows Figure 8These specific patterns can be used to describe typical local image structures, such as bright spots (00000000), flat areas, or dark spots (11111111). Its mathematical description is shown in the formula.
[0098]
[0099] Among them, U(LBP R (g c )) Calculate the number of bit-by-bit transitions between two adjacent values in a binary string from 0 to 1, or from 1 to 0, to describe the uniformity of the local texture structure of the image. Because there are few spatial transitions in the uniform pattern, U(LBP) is specified. R (g c ))<=2 is the uniform mode, and U(LBP R (g c ))>2 is a non-uniform pattern. U(LBP R (g c The smaller the value of )), the less spatial transformation, the more uniform the local structure of the image it represents, and the more low-frequency information it contains; U(LBP R (g c The larger the value of )), the more spatial transformations there are, the more uneven the local structure of the image it represents, and the more high-frequency information it contains. For example, in the case of R = 1, the LBP corresponding to a central pixel R If it is 00101000, then U(00101000)=4, and 00101000 is a non-uniform pattern. LBP u2 The feature dimension is 8R(8R-1)+3, of which there are 8R(8R-1)+2 uniform modes and the remaining non-uniform modes are collectively referred to as 1.
[0100] Example 3, as an example, in order to maintain the low-dimensional characteristics of LBP and optimize the anti-image rotation recognition ability of the feature, the rotation-invariant local binary pattern LBP ri and uniform local binary pattern LBP u2 Based on this, a rotation-invariant uniform local binary pattern (LBP) riu2 ). Specifically, the rotation-invariant local binary pattern is further subdivided into rotation-invariant uniform local binary pattern and rotation-invariant non-uniform local binary pattern, and their mathematical description is defined as shown in the formula.
[0101]
[0102] For example, in the case of R=1, the LBP corresponding to a central pixel R is 00110000, its U(00110000)=2, then The value of LBP is 2. riu2 The feature dimension is P+2, of which there are P+1 types of rotationally invariant uniform local binary patterns ( The value of is from 0 to P), and the rest of the rotationally invariant non-uniform local binary patterns are collectively referred to as 1 type, that is, The value is defined as P+1, and the mixing mode when P=8 is as follows Figure 9 shown.
[0103] Step 4: The global context block (GC block) is embedded in our road extraction method as a module for building global context information. It consists of three parts: context modeling, feature transformation, and feature aggregation. Context modeling uses global attention pooling to model context and establish a long-distance dependency mechanism between features, thereby extracting global context information. Transform uses bottlenecks to capture inter-channel dependencies, and introduces layer normalization operations to reduce the optimization difficulty of the network and improve the generalization of the network as a regularizer. Fusion performs feature fusion through broadcast element-wise addition.
[0104] Combining the spatial context information of road images, a neighborhood pixel reliability index ρ is proposed j , the formula is:
[0105]
[0106] Among them, τ is the variation coefficient matrix, which is The coefficient of change of the window τ j Defined as:
[0107]
[0108] Among them, N R and μ(N j ) respectively represent The number and mean of pixels in the neighborhood, the pixel values of pixels j and p are and
[0109] Combined with the neighborhood pixel reliability index, a reliability measurement model based on context information is proposed, using RC ij (k) represents the contextual relevance of pixels i and j belonging to the kth category, and its formula is:
[0110]
[0111] Among them, ρ j The value range is [0,1], RC ij (k) The impact on the central pixel and u ik 、u jk and ρ j Proportional to Inversely proportional.
[0112] Example 4, as an example, based on the context reliability measurement model diagram as shown Figure 10 As shown in Figure 2 , the main consideration is the impact of neighboring pixels on the clustering of the central pixel. Here, the impact of the neighboring pixels and in the red 3×3 pixel window on the central pixel N5 is used as an example. Assume that A and B in the blue 3×3 pixel window are noise pixels, and assume that the grayscale values of the neighboring pixels and in the red 3×3 pixel window are equal. If only grayscale value and spatial distance are considered, then these two pixels and have the same impact on the central pixel. However, due to the interference of A and B, the actual pixel value is the result of the combined effects of noise and ground objects, so the impact on the central pixel needs to be reduced.
[0113] This model calculates the reliability of each neighborhood pixel to reduce the impact of noise-affected pixels on the central pixel cluster. At the same time, the model expands the scope of the original neighborhood to consider more details, which will help balance noise reduction and image detail preservation.
[0114] In step 5, the fuzzy C-means clustering algorithm introduces membership, which indicates the likelihood that a single pixel belongs to a particular cluster. Clustering is the process of grouping data by finding similarities between data based on their characteristics. The goal of clustering is to identify natural groupings within a large amount of data to generate a concise representation of the system. Therefore, an algorithm for calculating the number of clusters, C, based on the co-occurrence matrix is proposed.
[0115] 1) Read the image;
[0116] 2) Convert image I to HSV color space;
[0117] 3) Calculate the co-occurrence matrix T of H value;
[0118] 4) Select the diagonal values of the co-occurrence matrix and store them in d;
[0119] 5) Find the local maximum from the diagonal values by:
[0120] a) Find the mean of the diagonal values of the co-occurrence matrix,
[0121] b) Define C as the number of items greater than or equal to the mean;
[0122] 6) C is the final number of clusters.
[0123] The main advantage of FCM clustering is that it allows data points to gradually belong to clusters with a metric between 0 and 1, which provides the flexibility that a data point can belong to multiple clusters. Figure 11 As shown, from Figure 11 It is possible to roughly see which class center the sample data belongs to, but it is not possible to clearly and intuitively see which data sample belongs to which class center. Figure 12 shown, but in Figure 12 It can be clearly seen that each data sample belongs to a class center very well.
[0124] FCM put x i (i=1,2,…,n) is divided into c fuzzy groups, and the basis of division is:
[0125]
[0126]
[0127] m is a weighting exponent, also known as a smoothing parameter, and is in the range [1, +∞), but is usually set to 2. C is used to initialize the membership matrix U of dimension N. N is the number of data points, and C is the number of cluster centers.
[0128] Step 6: Incorporate local spatial and grayscale information into the objective function of conventional FCM to improve the accuracy of image segmentation. ik is the membership degree, between 0 and 1, v k is the cluster center of fuzzy group K, d ik is the Euclidean distance between the kth cluster center and the i-th data point.
[0129]
[0130] The Lagrange multiplier method is used to construct a new objective function. The partial derivatives of L are calculated for u, v, and λ respectively, and then the partial derivatives are set to 0. The membership degree u can be obtained by solving the three equations together. ik and cluster center v k The new objective function L is defined as follows:
[0131]
[0132] According to formula (9) (10), u ik The derivative is:
[0133]
[0134] We will find u ik Substituting into (9) and (10) we get:
[0135]
[0136] λ is found as:
[0137]
[0138] Substitute the obtained λ into (12) and simplify it to get the membership value:
[0139]
[0140] Similarly, the expression for obtaining the cluster center is:
[0141]
[0142] Step 7. When the algorithm processes a noisy image, if the noise point is the center pixel of the neighborhood, it can better avoid missegmentation by automatically adjusting its membership because it is affected by a large number of normal pixels in the surrounding neighborhood. In addition, the algorithm can also minimize the impact of neighborhood noise points on the classification of normal pixels, improve the algorithm's ability to suppress noise, and effectively reduce the false alarm rate.
[0143] 1) The new objective function J(U,V) can be expressed as:
[0144]
[0145] if Or t≥loop, stop the iteration, otherwise return to step 4 to recalculate the context relevance, cluster center and membership.
[0146] The new cluster centers are:
[0147]
[0148] New membership value u′ ik for:
[0149]
[0150] 2) When the improvement of the objective function between two consecutive iterations is less than the minimum improvement specified by the convergence value, the clustering process stops.
[0151] 3) Clustering output: The membership function matrix U contains the membership level of each data point in each cluster.
[0152] 4) For each data point in the dataset, find the point with the largest membership value:
[0153]
[0154] 5) Assign an identity to x i The highest membership value.
[0155] 6) Segment the image according to the clusters identified in step 5).
[0156] The feasibility of the proposed method is demonstrated from two aspects: first, the simplicity of the LBP theory, its robustness to illumination, and its high computational efficiency. Second, the fuzzy C-means clustering algorithm, combined with spatial information, effectively suppresses noise interference and exhibits excellent robustness.
[0157] Robustness testing;
[0158] Select a composite image such as Figure 13 As shown, and natural images as Figure 16 As shown, the image sizes are 128*128 and 512*512, with two categories and grayscale values of 40 and 120 respectively. The images after adding noise are as follows: Figure 14 As shown and Figure 17 As shown in the figure, the effect of clustering using FCM is as follows Figure 15 As shown and Figure 18 The accuracy of FCM segmentation results and other evaluation parameters are as follows Figure 19 As shown in Figure 2. The confusion matrix is used to determine whether other classes are mixed in, and the parameters such as true positive, true negative, false positive, and false negative are used to evaluate the segmentation results.
[0159] The remote sensing image road extraction method based on fuzzy C-means clustering in the present invention improves the extraction of road detail information and the integrity of the topological structure by integrating LBP value and context information into the fuzzy C-means clustering algorithm process, optimizes the problems of road boundary fuzziness and spatial information loss, and has certain applicability.
Claims
1. A remote sensing image road extraction method based on fuzzy C-means clustering, characterized by: The specific steps are as follows: Step 1: Filter the remote sensing image; Step 2: Obtain the grayscale value of the local binary pattern of the central pixel based on the grayscale value of the pixel neighborhood; Step 3: Increase the radius of the neighborhood and the number of samples to obtain the grayscale value of the local binary pattern unique to each texture feature; Step 4: Obtain the spatial context information of the road image under the local binary pattern to obtain the contextual correlation between two pixels belonging to the same class; Step 5: Determine the number of clusters and the fuzzy weight index, and start the loop; Step 6: Calculate the cluster center and membership value; Step 7: Calculate the objective function and segment each pixel according to the maximum membership principle. If the termination condition is met, stop the iteration and obtain the pixel classification information of the road. Extract the information to obtain a binary image; otherwise, return to step 4 and recalculate. In step 4, the global context module is embedded in our road extraction method to construct the contextual correlation between two pixels belonging to the same k categories based on the spatial context information; Combining the spatial context information of road images, a neighborhood pixel reliability index is proposed , the formula is: (2); in, is the coefficient matrix of variation, which is The coefficient of variation of the neighborhood window Defined as: (3); The pixel values of pixels j and p are and , N R and is the number and mean of pixels in the neighborhood; Combined with the neighborhood pixel reliability index, a reliability measurement model based on context information is proposed. Represents pixel points and Belong to the The contextual relevance of a class is given by: (4); is the pixel reliability index, d ij Calculate the Euclidean distance between the kth cluster center and the i-th data point, u ik is the membership degree of i belonging to the Kth category, u jk is the membership degree of j to the Kth class; In step 6, d ik Calculate the Euclidean distance between the kth cluster center and the i-th data point to construct the objective function, membership degree and cluster center: (5); V i is the cluster center of fuzzy group K, is the pixel value of the cluster center in the rotation-invariant uniform mode; The Lagrange multiplier method is used to construct a new objective function, and the partial derivatives of u, v, and λ of L are obtained to obtain the membership degree u ik and cluster center v k The new objective function L is defined as follows: (6); u ik is the membership degree of i belonging to the Kth category, λ i Find the parameters of possible extreme points for Lagrangian, d ik Calculate the Euclidean distance between the kth cluster center and the i-th data point, where c is the number of cluster centers and n is the number of data points; Membership value u ik for: (7); d ik Calculate the Euclidean distance between the kth cluster center and the i-th data point, d ij Calculate the Euclidean distance between the j-th data point and the i-th data point, is the grayscale value of the cluster center in the rotation-invariant uniform mode, is the cluster center k, is the cluster center j, m is the weighted index; Similarly, find the cluster center The expression is: (8); u ik is the membership degree of i belonging to the Kth category, is the pixel value of the cluster center in the rotation-invariant uniform mode, c is the number of cluster centers, and m is the weighted index.
2. The method for extracting roads from remote sensing images based on fuzzy C-means clustering according to claim 1, characterized in that: Specifically, step 1 is to perform a convolution operation on the image, scan it with a moving window, take the average grayscale value of all pixels in the neighborhood of each pixel instead of the pixel value at the center of the neighborhood, perform window scanning and operation on the entire image, and obtain an image after mean filtering.
3. The method for extracting roads from remote sensing images based on fuzzy C-means clustering according to claim 1, characterized in that: Step 2 is specifically as follows: comparing the grayscale values of the neighborhood pixels of the filtered image with the grayscale value of the central pixel, and arranging the comparison results into a binary string, which is the grayscale value of the local binary pattern of the central pixel.
4. The method for extracting roads from remote sensing images based on fuzzy C-means clustering according to claim 1, characterized in that: In step 3, the pixel grayscale value of the local binary pattern of the central pixel is calculated by replacing the rectangular neighborhood with the circular neighborhood and extracting the pixel grayscale value in the circular neighborhood of the image using the following formula (1): (1); Among them, g c is the grayscale value of the center pixel of the image, ROR is a binary string with a length of P bits that is cyclically shifted right n times, LBP R is the grayscale value of the LBP of pixel R; the above formula cyclically right-shifts the binary string in the local binary pattern by n in the range of 0 to 8R-1, where R is the radius of the circular neighborhood. Finally, the binary string corresponding to the smallest decimal value is used as the rotation-invariant LBP grayscale value of the pixel, ensuring the rotation invariance of the road image and obtaining the minimum grayscale value of the local binary pattern.
5. The method for extracting roads from remote sensing images based on fuzzy C-means clustering according to claim 1, characterized in that: In step 5, an algorithm for finding the number of clusters C based on the co-occurrence matrix is proposed. The diagonal values of the co-occurrence matrix are selected, and the local maximum value is found from the diagonal values, and is determined as the final number of clusters: specifically: Step 5.1: Read the image; Step 5.2: Convert image I to HSV color space; Step 5.3: Calculate the co-occurrence matrix T of H values based on contextual relevance; Step 5.4: Select the diagonal values of the co-occurrence matrix and store them in d; Step 5.5: Find the local maxima from the diagonal values by: Find the mean of the diagonal values of the co-occurrence matrix; Define C as the number greater than or equal to the mean; Step 5.6: C is the final number of clusters.
6. The method for extracting roads from remote sensing images based on fuzzy C-means clustering according to claim 1, characterized in that: In step 7, a new objective function is defined to determine the conditions for terminating the iteration and update the membership value and cluster center; New objective function It can be expressed as: (9); u ik is the membership degree of i belonging to the kth category, is the pixel value of the cluster center in the rotation-invariant uniform mode, c is the number of cluster centers, n is the number of data, m is the weighted index, V i is the cluster center of fuzzy group k, Represents pixel points and Belong to the Contextual relevance of the class, N R is the number of pixels in the neighborhood; if or , then stop the iteration, otherwise return to step 4 to recalculate the context relevance, cluster center and membership degree; New cluster centers for: (10); u ik is the membership degree of i belonging to the kth category, and is the pixel value of the cluster center in the rotation-invariant uniform mode, n is the number of data, m is the weighted index, Represents pixel points and Belong to the Contextual relevance of the class, N R is the number of pixels in the neighborhood, is the new membership value; New membership value for: (11); is the pixel value of the cluster center in the rotation-invariant uniform mode, m is the weighted index, Represents pixel points and Belong to the Contextual relevance of the class, N R is the number of pixels in the neighborhood, is the new membership value, is the value of cluster center i, is the value of cluster center j.
7. The method for extracting roads from remote sensing images based on fuzzy C-means clustering according to claim 4, characterized in that: In step 3, the radius of the circular neighborhood and the number of samples in the neighborhood are changed, and the rotation-invariant local binary pattern and the uniform local binary pattern are combined to optimize the feature's anti-image rotation recognition ability and obtain the pixel value under the stable local binary pattern; Uniform local binary pattern: (12) Among them, g c Represents the grayscale value of the center pixel of the image, g p is the grayscale value of the neighborhood pixels around the central pixel, P is the number of neighborhoods, Calculate the number of bit-by-bit transitions between two adjacent values in a binary string from 0 to 1, or from 1 to 0, to describe the uniformity measure of the local texture structure of the image; The rotation-invariant unified pattern combines the rotation-invariant and uniform local binary patterns, and its mathematical description is defined as shown in the formula; (13); g c Represents the grayscale value of the center pixel of the image, g p is the grayscale value of the neighborhood pixels around the central pixel, P is the number of neighborhoods, is the pixel value under the uniform local binary pattern.
8. The method for extracting roads from remote sensing images based on fuzzy C-means clustering according to claim 5, characterized in that: In step 5, the weighted index m is set to 2, and the number of cluster centers C is used to initialize the membership matrix U with a dimension of N data: (14); n is the number of data, u ik is the membership matrix.
Citation Information
Patent Citations
Remote sensing image sea-land automatic segmentation method
CN111582198A
Automatic image segmentation method based on superpixels and improved fuzzy C-means clustering
CN115131566A