{'fraction_non_alphanumeric': 0.024521271986829563, 'fraction_numerical': 0.006238627501949571, 'mean_word_length': 4.852603110209601, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Adaptive Segmentation of Remote Sensing Images Based on Global Spatial Information

The problem of image segmentation can be reduced to the clustering of pixels in the intensity space. The traditional fuzzy c-means algorithm only uses pixel membership information and does not make full use of spatial information around the pixel, so it is not ideal for noise reduction. Therefore, this paper proposes a clustering algorithm based on spatial information to improve the anti-noise and accuracy of image segmentation. Firstly, the image is roughly clustered using the improved Lévy grey wolf optimization algorithm (LGWO) to obtain the initial clustering center. Secondly, the neighborhood and non-neighborhood information around the pixel is added into the target function as spatial information, the weight between the pixel information and non-neighborhood spatial information is adjusted by information entropy, and the traditional Euclidean distance is replaced by the improved distance measure. Finally, the objective function is optimized by the gradient descent method to segment the image correctly.


Introduction
In recent years, clustering technology has played an important role in remote sensing image segmentation. The technique uses visual features such as image color, texture and shape to gather together areas with large similarity, so that the pixels in the same area are as similar as possible, and the pixels in different areas are as different as possible [1][2][3][4]. The fuzzy c-means (FCM) algorithm has the advantages of conforming to human cognitive characteristics, easy implementation, simple description and good segmentation effect [5]. Due to the FCM algorithm using fuzzy membership to measure the degree of pixels belonging to a certain class relative to the other segmentation algorithms, it can retain the original image information as much as possible [6]. It has been widely used in medicine and remote sensing image segmentation [7][8][9][10]. But the traditional FCM algorithm fails to consider the correlation between the grey features of each point and its neighborhood pixels in image segmentation, which makes the algorithm more sensitive to noise, low contrast, intensity inconsistency, and so on [11]. When imaging remote sensing images, due to the constraints of satellite imaging technology, problems such as unclear pixels, discrete pixels or block-forming pixels appear, which seriously affect the segmentation effect of FCM algorithm. In order to effectively solve these problems, researchers have proposed many improved FCM algorithms. Ahmed et al. [12] added spatial neighborhood information around pixels to the FCM algorithm, proposing the FCM_S algorithm. The objective function is modified to increase the robustness of the algorithm to noise points and improve the precision of the segmentation results.
However, the FCM_S algorithm takes a long time to calculate the relationship between each pixel point and the surrounding neighborhood, resulting in high computational complexity and low efficiency. So, Chen and Zhang [13] proposed improved algorithms, FCM_S1 and FCM_S2. Before iterative calculation, these algorithms first evaluate the influence of neighborhood pixels on the center pixel, which is equivalent to filtering the image. The algorithm avoids repeated computation in iterations and reduces the time complexity of the algorithm effectively. Mean filtering and median filtering are used respectively in FCM_S1 and FCM_S2, which have good segmentation effect for images with Gauss noise and salt and pepper noise. Cai et al. [14] introduced a new local similarity measurement method, combined with local spatial distance and grey difference, and proposed the fast generalized fuzzy -means (FGFCM) clustering algorithms. This algorithm not only considers the spatial information of neighborhood pixels in the filtering function, but also considers the grey information of neighborhood pixels, which can better preserve the details of the image while filtering. In the above improved FCM algorithm, there are parameter settings, which have a significant impact on the segmentation results. Krinidis et al. [15] defined a new fuzzy factor, combining local spatial information and grey level information, and proposed the fuzzy local information C-Means (FLICM) algorithm. The algorithm effectively integrates the spatial information and grey level information of the neighborhood pixels, enhances the insensitivity of the algorithm to noise, and controls the weight between denoising and image details through adaptive adjustment of parameters. When the image noise is relatively serious, the neighborhood information of the pixel may also be polluted, so the neighborhood information based on the local space of the image cannot play an active guiding role in the image segmentation, making the fuzzy clustering algorithm that integrates the local space information unable to meet the requirements of high-precision image segmentation. To solve this problem, Zhao et al. [16] proposed a fuzzy c-means clustering algorithm based on non-local spatial information (the FCM_NLS algorithm). The algorithm first uses the non-local spatial information of image pixels to filter the original image, and then directly calls the result in the iteration, narrowing the time complexity of the algorithm. However, the FCM_NLS algorithm ignores the non-uniformity of noise distribution, so it is sensitive to noise and still has yet to be improved. Gong et al. [17] proposed a fuzzy c-means clustering algorithm based on local information and kernel metric (the KWFLICM algorithm). On the basis of the FLICM algorithm, this algorithm introduces kernel space and a similarity measurement factor, which greatly improve the segmentation effect and denoising ability. Although the FLICM and KWFLICM algorithms do not need to set additional parameters, their estimation of pixel attenuation in the neighborhood is still inaccurate, and part of the image information is not fully utilized, resulting in unsatisfactory anti-noise performance of the algorithm and inaccurate cutting results.
It is worth mentioning that nature-inspired computing is attracting more and more attention. Metaheuristic algorithms can find the segmentation threshold more accurately in image segmentation [18]. Two of the most popular algorithms are swarm intelligence (SI) and evolutionary algorithms (EAs). The stability and accuracy of the grey wolf optimization (GWO) algorithm has been clearly proved to be better than particle swarm optimization (PSO), gravitational search algorithm (GSA), differential evolution (DE), evolutionary programming (EP) and evolution strategy (ES), which are all well-known meta-heuristics [19]. Using the GWO algorithm to find the initial clustering center of the image is very beneficial. The initial clustering center can be found more accurately and stably to be prepared for subsequent calculations. However, in some cases, due to the lack of diversity of wolves, the GWO algorithm still faces the risk of local extreme stagnation when the traditional GWO algorithm cannot realize the smooth transition from exploration potential to development potential through multiple iterations. In the literature [20], the improved differential evolution grey wolf optimization (DEGWO) algorithm is used to find the segmentation threshold of synthetic aperture radar (SAR) images, and good segmentation effect is obtained. The Lévy GWO (LGWO) algorithm [21] is utilized to solve the global problem by introducing Lévy flight algorithm and balancing the exploration and development stage of the algorithm.
In this paper, an adaptive fuzzy c-means segmentation image algorithm based on global spatial information (the AFCM_GSI algorithm) is proposed. The LGWO algorithm was adopted to calculate the initial clustering center. By combining the neighborhood and non-neighborhood information of the image, the corresponding weight was calculated adaptively, and neighborhood spatial information was added to the clustering model. The information entropy is utilized to automatically balance the relationship between the pixel information and the non-neighborhood spatial information. The segmentation results of different images show that this algorithm can achieve better segmentation performance under intense noise.

Traditional FCM Algorithm
The fuzzy clustering algorithm (FCM) was first proposed by Dunn, then expanded by Bezdek et al. and has been applied in many fields. In essence, the FCM algorithm classifies samples according to the intensity of membership, and the objective function is weighted distance sum, which is defined as follows: where c is the number of clusters, n is the number of pixels in the image, u ij denotes the membership degree of x j in the i th cluster, has a value inside [0,1] and satisfies the condition 0 ≤ u ij ≤ 1, m is the fuzzy weight index and is generally a value of 2, d x j , v i represents the Euclidean distance from the j th pixel x j to the i th clustering center v i . While the FCM algorithm is built on the initial parameter set, it determines the minimum objective function J FCM through an iterative process. u and v are described as in Equations (2) and (3): where u ij , v i denote the membership function and cluster centers, respectively. The FCM algorithm calculates the membership of each pixel in the image by minimizing the objective function, but the FCM algorithm ignores the contribution of neighborhood pixels to the clustering center, so it is sensitive to noise.

FCM_S Algorithm
The FCM_S algorithm [12] overcomes the influence of noise on image clustering to a certain extent by introducing neighborhood space constraints. The objective function of FCM_S is as follows: where c is the number of clusters, n is the number of pixels in the image, u ij denotes the membership degree of x j in the i th cluster, has a value inside [0,1] and t satisfies the condition 0 ≤ u ij ≤ 1, is the fuzzy weight index and is generally a value of 2, x j − v i represents the Euclidean distance from the j th pixel x j to the i th clustering center v i , N R is the window cardinality, x r denotes the neighborhood pixel set centered on the j th pixel x j , α is the influence factor of neighborhood spatial information on the center pixel. The larger the value of α, the greater the role of neighborhood spatial information in the clustering process, and vice versa. When α is 0, the FCM_S algorithm reverts to the FCM algorithm.
The FCM_S algorithm has a certain inhibitory effect on noise, but the algorithm needs to set up the parameters between the noise removal and the preservation of the image details; in general, different parameters are required for different images, and as these parameters are selected by a large number of experiments, the adaptive ability of the algorithm is poor. Because the FCM_S algorithm needs to calculate the neighborhood information of the pixels in each iteration, the time complexity of the FCM_S algorithm is high. It is still a difficult and hot topic to reduce the computation time of the algorithm under the premise of ensuring segmentation precision.

FLICM Algorithm
The FLICM algorithm [15] avoids the introduction of supervised parameters and enhances the practicability of the algorithm when calculating the contribution of neighborhood information to the pixels of the center. The FLICM algorithm combines the spatial and grey information about the neighborhood pixels by constructing the fuzzy factor G ki , which strengthens the insensitivity of the algorithm to the noise. The expression of G ki is as follows: where d ij is the Euclidean distance between neighborhood pixels x j and center pixel x i , 1/ d ij + 1 denotes the spatial action intensity of neighborhood pixels on central pixels, u k j is the membership strength of neighborhood pixels x j relative to the k th cluster center v k , x j − v k denotes the Euclidean distance between neighborhood pixels x j and cluster center v k and m is the fuzzy weight index and is generally a value of 2. The objective function of the FLICM algorithm is defined as follows: The objective function of the FLICM algorithm is different from that of the FCM algorithm, but their clustering centers are the same. By transplanting the cluster center of the FCM algorithm, the iterative updating of the cluster center is completed. Fuzzy membership and the clustering center of FLICM algorithm is as follows: Although FLICM improves the fuzzy factor and makes the algorithm more adaptive, it has the disadvantages of slow convergence speed, more iterations and more sensitive to salt and pepper noise.

Parallel LGWO Algorithm
The LGWO algorithm [21] uses Lévy flight algorithm to help GWO obtain the global optimal solution. It has strong global convergence and robustness and the stagnation problem can also be relieved. By integrating the Lévy flight algorithm into LGWO, the search capabilities are stronger because each pioneer wolf gets the chance to survive and then share its observed info with other hunters during the next steps of the searching process. Using LGWO to search for a set of global optimal centers can significantly explore and localize the possible situations of the victim more effectually. However, the LGWO algorithm is a probabilistic search algorithm, and its performance is affected by control parameters such as the size of the wolves and random mutation probability. As the algorithm requires a large wolf pack size, it needs to continuously calculate the fitness function. In this paper, the computational complexity is related to the number of image clusters, and the computational complexity is O(NP × T_LGWO × C), where NP is the number of wolves, T_LGWO is the total number of iterations, and C is the number of clustering centers of the image. Therefore, this paper proposes a parallel LGWO algorithm to improve the reliability and efficiency of the algorithm. The computation time of the algorithm is greatly reduced.
In nature, wolves can be thought of as being made up of several subgroups, so groups can be divided into several subgroups. Each subgroup contains multiple individuals, and each subgroup is allocated a processor to execute the search process independently in parallel. The best individuals in each subgroup migrate to neighboring subgroups after a certain period of time, a phenomenon known as "drift". This is the coarse-grained parallel LGWO algorithm and its block diagram is shown in Figure 1: In this paper, parallel computing is used to speed up the computation of the program. Parallel LGWO algorithm flow is shown in Figure 1. Each wolf subpopulation is assigned a processing core to perform the search independently, and the optimal individuals are recorded after each iteration. The best individuals in each subpopulation will migrate to the adjacent subpopulation after a certain number of iterations. The optimal individual will be obtained after the completion of the iteration.

Initial Cluster Center
A parallel LGWO algorithm is used to solve the initial clustering center of the original image. The pseudo-code of the initial image clustering center estimated by the parallel LGWO algorithm is as follows: Input: Image data (1) Determine the initial swarm size NP and the number of iterations T_LGWO. The population is initialized into NP_s subpopulations, and the corresponding number of threads is opened up. Each thread is responsible for one subpopulation. Each subpopulation is iterated L times to transfer its best individuals to the adjacent subpopulation. (2) Randomly generate the initial subpopulations of wolves (3) Initialize temporal parameter a, random value p, random vectors A, C (4) Compute the fitness of each wolf (5) Set to be the best wolf (6) Set to be the second best wolf

Fast Non-Local Mean Denoising
Non-local mean (nl-means) [22] is a useful denoising technique. This method makes full use of the redundant information in the image and can preserve the details of the image to the greatest extent while denoising. The basic idea is that the current pixel estimate is a weighted average of pixels in the image with similar neighborhood structures. nl-means use the non-local spatial information of image pixels to filter the original image, and the formula is as follows: where η j is the pixel of the filtered image, W r j denotes the pixel area with pixel j as the center and window size is r × r, x p is the neighborhood pixel in the window, w jp is the weight determined by non-local spatial information, and its size depends on the similarity between the center pixel block and the neighborhood pixel block, and 0 ≤ w jp ≤ 1, p∈W r j w jp = 1.
The formula of w jp is as follows: where N j is the pixel region centered on pixel x j , x N j denotes the vector composed of all pixels in the central pixel region, x N p denotes the vector composed of all pixels in the neighborhood pixel region, 2,α is the similarity between the center pixel block and the neighborhood pixel block, α is the standard deviation of the gaussian kernel function, reflecting the spatial structure between the center pixel and the neighborhood pixel, and h j and h p are the filtering attenuation parameters of the central pixel region and the adjacent pixel region, respectively, which can be adjusted appropriately according to the noise intensity. The filtering attenuation parameter h j is obtained according to the adaptive grey level difference in the pixel block [23], and the formula is as follows: where x j is the center pixel of the pixel block N j , x N jl is the neighborhood pixel x l of x j in the same pixel block, and h j reflects the similarity between the neighborhood pixel and the center pixel through the grey level difference in the pixel block. h p can also be calculated using the same principle. The greater the difference between the neighborhood pixel and the center pixel in the pixel block, the more serious the noise pollution of the pixel block will be, and the greater the filtering intensity of the pixel block, and vice versa. Z j is the normalized constant, defined as follows: where h j and h p make use of the greyscale statistical information of the central pixel block and the neighboring pixel block, respectively, and adjust the filtering attenuation parameters adaptively. w jp is to determine the similarity between the center pixel and the neighborhood pixel by using the redundant information of the image. The closer the center pixel is to the neighborhood pixel, the greater the weight w jp corresponding to the neighborhood pixel will be, and vice versa. Non-local spatial information can avoid the loss of detail information caused by the larger local neighborhood window, and this method can play a better guiding role in the noisy image. nl-means has good denoising effect, but the maximum defect of this algorithm is too high in computational complexity. Assuming that the image is a total of M pixels, the size of the search window is R × R, the neighborhood window size is r × r. The complexity of the nl-means algorithm is O MR 2 r 2 . Therefore, integral image technology is used to accelerate this algorithm [24]. First, an integral image about pixel difference is constructed: where the search window side length is R = 2 * Rs + 1, and the search window side half-length is RS. The neighborhood window side length is r = 2 * rs + 1,and the neighborhood window side half-length is rs. In order to reduce the space complexity, the above algorithm takes the offset as the outermost loop, and only needs to calculate the integral image in one offset direction at a time, and then process the integral image. After the above processing, the complexity of the whole algorithm will be reduced to O MR 2 .

Improved Value Function
The AFCM_GSI algorithm makes full use of the neighborhood and non-neighborhood information about pixels and adaptively adjusts the corresponding weight. The main objective function is as follows: where c is the number of clusters, N is the number of pixels in the image, u k j denotes the membership degree of x j in the i th cluster and has a value inside [0,1], m is the weighting exponent on each fuzzy membership and generally has a value of 2,v k is the i th cluster center, η j is the pixel of the image after fast non-local mean processing and filtering, β j is the adjustment parameter calculated by information entropy, and d 2 r (x i , v k ) is the improved distance measure. Using the Lagrange multiplier method to minimize the value function, the fuzzy membership degree u k j and clustering center v k can be obtained as: Traditional Euclidean distance cannot solve the problem of noise sensitivity of the algorithm [25]. Although nuclear induced distance [26] can make up for the deficiency of Euclidean distance to some extent, it is sometimes difficult to overcome the influence of noise on clustering performance and it cannot fundamentally solve the problem of noise sensitivity. In order to make up for this deficiency, an improved distance measurement method is adopted in this paper, specifically as follows: The improved distance measurement method is based on robust statistics theory and has strong stability to noise or outliers. Although the distance measurement is similar to the nuclear induced distance in form, its essence is still processed in the original image space, and the pixels are not mapped to the high-dimensional feature space [27].
Parameter β j can adjust the balance between pixel information and non-neighborhood spatial information. The calculation method of this parameter is as follows: where E j represents the information entropy of the j th pixel, and E max and E min respectively represent the maximum and minimum information entropy of all pixel points. Equation (25) can map the range of information entropy to [0,1]. If the j th point belongs to a certain class explicitly, the entropy corresponding to that point is relatively small. If the membership degree of this point is average, indicating that it does not clearly belong to a certain class, the corresponding entropy of this point is relatively large, which can increase the weight of non-neighborhood pixel information.
In the literature [15], the fuzzy factor uses the spatial distance between the neighborhood pixel and the center pixel to measure the degree of influence of the neighborhood pixel. The spatial distance is defined as follows: where δ sd denotes the spatial intensity of neighborhood pixels on central pixels. However, spatial distance alone cannot accurately measure the influence of neighborhood points on the center points. By introducing the local variation coefficient that has an important influence on the central pixel, the variation coefficient of the local window is defined as: where V(x) is the variance of grey value in a local window, x denotes the average grey level of neighborhood pixels, C min is the minimum coefficient of variation in all local windows of an image, C max is the maximum value, δ sv denotes the discretization of pixel grey values in the local window of neighborhood points and has a value inside [0,1], δ sv is inversely proportional to ϕ j when the value of ϕ j is close to 0, the δ sv value is close to 1, and the logarithmic function can ensure that when the ϕ j is far away from 0, δ sv decreases rapidly; when ϕ j is close to 1, δ sv is close to 0. That is to say, when the neighborhood point is seriously affected by the noise or at the edge, the value of the δ sv is close to 0 and the influence of the neighborhood point on the center point is also close to 0, and the value of δ sv is larger when neighborhood points of the window are smooth, the influence of the neighborhood point on the center point is larger. Based on testing and analysis, the influence of neighborhood pixels on the center point is redefined as follows: According to Equation (31), the influence of a pixel's neighborhood spatial information on image segmentation is defined as: The specific steps of the AFCM_GSI algorithm are as follows: Step 1: Determine the number of clusters c, fuzzy weighted index m, the number of iterations T_max, the iterative termination threshold ε, the size of the search window R * R, the size of the neighborhood window r * r, and the number of current iterations t = 1; Step 2: The initial clustering center V (0) is obtained by the LGWO algorithm, calculate the filtered image η j .
Step 3: Initialization of the membership degree matrix U (0) .
Step 5: Compute the new objective function value J.
Step 8: If J (t+1) − J (t) < ε or the current iteration number t > T _max, then terminate the iteration, output the membership matrix U and the cluster center V; otherwise, return Step 4 and continue the next iteration.

Evaluation Index of Fuzzy Clustering Algorithm
In order to verify the effectiveness of the clustering algorithm, scholars have proposed a variety of evaluation indicators [28][29][30][31][32][33]. SA (segmentation accuracy) and CS (comparison score) are widely used and approved.
where SA represents the proportion of pixels in the region detected by the segmentation algorithm in the whole region and CS is a measure of similarity. The area of the given annotation is represented by G. The pixel area detected by the algorithm is represented by S. As the natural image has no standard segmentation results, the corresponding segmentation accuracy and comparison scores cannot be calculated. In order to effectively evaluate the segmentation results of natural images, the PSNR (peak signal to noise ratio) and MSSIM (mean structural similarity) are introduced in this paper.
where MSE denotes the mean square error of the current image X and the reference image Y, and H and W are the height and width of the image respectively. The unit of PSNR is dB; the larger the value, the smaller the distortion. N is equal to the number of bits per pixel, and the average grey level image is 8; that is, the grey scale of pixels is 256. ω ij is the weight of each window, H and W are the height and width of the image respectively, µ X and µ Y are the mean values of images X and Y respectively. σ X and σ Y denote the variance of X and Y respectively, and σ XY indicates the covariance of image X and Y. C 1 ,C 2 and C 3 are constants; in order to avoid the denominator being 0, they are usually defined as C 1 = (K 1 * L) 2 ,C 2 = (K 2 * L) 2 , C 3 = C 2 /2, and K 1 = 0.01, K 2 = 0.03, L = 255. In practical applications, the image can be partitioned by a sliding window. The total number of blocks is N. Considering the influence of window shape to the partition, the mean, variance and covariance of each window are calculated by weighting. The Gauss kernel is usually used, the structure similarity of the corresponding block is computed, and the structure similarity (SSIM) of the corresponding block is calculated. Finally, the average value (MSSIM) is used to measure the structural similarity of two images. PSNR is the most widely used image objective evaluation index, but it is based on the error between the corresponding pixels, which is based on the error of sensitive image quality evaluation. Because the human eye is more sensitive to the contrast difference of the spatial frequency, the sensitivity of the human eye to the contrast difference is higher than that of the color, but the perception of the human eye is affected by the surrounding area in a region. Therefore, it often appears that the evaluation results are not consistent with the subjective feelings of the people. MSSIM is used to measure similarity between two images. One of the two images used by SSIM is an unimpressed undistorted image and the other is a distorted image. It is another excellent algorithm for image quality evaluation.

Algorithm Performance Test
In order to verify the effectiveness of the algorithm, synthetic images, optical images, and remote sensing images were used to conduct experiments, respectively. Images polluted by synthetic noise (composed of salt and pepper noise with density = 0.02, speckle noise with variance = 0.005, and Gaussian noise with mean = 0 and variance = 0.01). This algorithm is compared with several algorithms such as FCM_S [12], FGFCM [14], FLICM [15], and KWFLICM [17] to test the segmentation effect of the algorithm. The parameters in numerous comparison algorithms are set according to corresponding documents. In order to achieve good experimental results, the relevant parameters in this experiment are set as follows: m = 2, ε = 10 −5 , T_max = 300, search window size R = 5 and neighborhood window size r = 3. Among them, the iteration termination threshold ε is a smaller number, and its value is usually selected based on human experience. The results obtained from experiments are the mean value of the algorithm running several times.
In the segmentation and comparison experiment of synthetic image 1 and 2, clustering numbers of all algorithms are set as 3 and 4, respectively. These synthetic images and their noise-polluted images are shown in Figure 2. In the comparison experiment of synthetic images, Figure 3 shows the segmentation effect of several different segmentation methods. The SA and CS of different methods can be more intuitively compared through Table 1 and Figure 4. Moreover, the more complex the image is, the lower the segmentation accuracy will be. The values of SA and CS in the proposed method are the largest and the segmentation effect is the best. By combining the neighborhood and non-neighborhood information of pixels, the relationship between noise suppression and edge preservation can be well balanced. The segmentation result is very similar to the original image and is superior to other algorithms in visual quality and segmentation performance. Among several algorithms, the FCM_S algorithm has the weakest noise reduction ability. Although the FCM_S algorithm introduces the neighborhood spatial information, the processed image has too much noise. The segmentation performance is not high enough under the noise condition, and the segmentation result is not ideal. The segmentation effect of the FGFCM algorithm is better than that of the FCM_S algorithm, but there are still more noise points in the image and the edges are more fuzzy, so the ideal segmentation effect and anti-noise performance cannot be obtained. The FLICM algorithm and the KWFLICM algorithm better consider the neighborhood information of the pixel, with higher segmentation quality and better visual effect. To sum up, the algorithm proposed in this paper can achieve a better segmentation effect and anti-noise ability.   In the segmentation and comparison experiment of natural images and a remote sensing image 1, in order to achieve a better segmentation effect, the clustering number of all algorithms is set to 2. In the segmentation and comparison experiment of natural image 2 and remote sensing image 1, the clustering number of all algorithms is set to 3. These images are public images on the Internet. These images and their noise-polluted images are shown in Figure 5. In the segmentation and contrast experiment of different kinds of remote sensing images 2-6, the clustering number of all algorithms is set as 3. These images were manually extracted from large images from the United States Geological Survey (USGS) National Map Urban Area Imagery collection for various urban areas around the country [34]. These images and their synthetic noise-polluted images are shown as follows: In the comparison experiment of optical images and remote sensing images, the segmentation effect of different algorithms can be observed in Figure 6. PSNR and MSSIM of different algorithms can be compared more clearly and intuitively through Table 2 and Figure 7. In order to verify the availability of the proposed algorithm, segmentation experiments are carried out for different types of remote sensing images in Figure 8. Experimental results in Table 3 and Figure 9 demonstrate the advantages of the proposed algorithm. By comparing the segmentation results of optical images and remote sensing images, the segmentation method proposed in this paper achieves very good segmentation results. Due to the need to balance the denoising performance and image details of the algorithm, the PSNR value of the AFCM_GSI algorithm is sometimes not the highest among all algorithms, but the MSSIM value is the highest among all algorithms. Since PSNR does not consider the visual characteristics of human eyes, the similarity measure (MSSIM) between two images can represent the quality of image segmentation. Experimental results show that the proposed algorithm has strong denoising ability and the segmented image is very similar to the original image. The algorithm has the highest MSSIM value and the best visual effect of image segmentation.     . PSNR and MSSIM of five algorithms on noisy remote sensing images 2-6.

Conclusions
In this paper, an adaptive image segmentation algorithm based on global spatial information is proposed to improve the anti-noise and precision of image segmentation. By introducing neighborhood and non-neighborhood information of pixels, this method adaptively adjusts the corresponding weight and has good denoising performance. This method uses the LGWO algorithm to roughly cluster the image and get the initial clustering center and utilizes a fast non-local mean algorithm to filter the original image. The adaptive weight assignment strategy is adopted to assign a corresponding weight to each pixel in the neighborhood window and make full use of the local information of the image. The information entropy is used to balance the relationship between the pixel and the non-neighborhood information, and the neighborhood and non-neighborhood information around the pixel is added to the target function as spatial information. The improved distance measure is also used to replace the traditional Euclidean distance. Experimental results show that the above improvements can make the segmentation results more accurate. This paper proves the feasibility of this algorithm, which has the advantages of high segmentation accuracy and good denoising effect.
Author Contributions: M.L. Algorithm design, experimental design, writing paper; L.P.X. idea generation, validates theories, gets financial support; S.G. Literature search, making charts; N.X. Experimental simulation, data collection and collation; B.Y. Data analysis, project management.