A Watershed-Segmentation-Based Improved Algorithm for Extracting Cultivated Land Boundaries

: To accurately extract cultivated land boundaries based on high-resolution remote sensing imagery, an improved watershed segmentation algorithm proposed herein based on a combination of pre- and post-improvement procedures. Image contrast enhancement was used as the pre-improvement, while the color distance of the Commission Internationale l Eclairage (CIE) color space, including the Lab and Luv, was used as the regional similarity measure for region merging as the post-improvement. Furthermore, the area relative error criterion ( δ A ), the pixel quantity error criterion ( δ P ), and the consistency criterion ( K hat ) were used for evaluating the image segmentation accuracy. The region merging in Red–Green–Blue (RGB) color space was selected to compare the proposed algorithm by extracting cultivated land boundaries. The validation experiments were performed using a subset of Chinese Gaofen-2 (GF-2) remote sensing image with a coverage area of 0.12 km 2 . The results showed the following: (1) The contrast-enhanced image exhibited an obvious gain in terms of improving the image segmentation effect and time efﬁciency using the improved algorithm. The time efﬁciency increased by 10.31%, 60.00%, and 40.28%, respectively, in the RGB, Lab, and Luv color spaces. (2) The optimal segmentation and merging scale parameters in the RGB, Lab, and Luv color spaces were C for minimum areas of 2000, 1900, and 2000, and D for a color difference of 1000, 40, and 40. (3) The algorithm improved the time efﬁciency of cultivated land boundary extraction in the Lab and Luv color spaces by 35.16% and 29.58%, respectively, compared to the RGB color space. The extraction accuracy was compared to the RGB color space using the δ A , δ P , and K hat , that were improved by 76.92%, 62.01%, and 16.83%, respectively, in the Lab color space, while they were 55.79%, 49.67%, and 13.42% in the Luv color space. (4) Through the visual comparison, time efﬁciency, and segmentation accuracy, the comprehensive extraction effect using the proposed algorithm was obviously better than that of RGB color-based space algorithm. The established accuracy evaluation indicators also consistent with the visual (5) The proposed method has a satisfying transferability by a wider test area with a coverage area of 1 km 2 . In addition, the proposed method, based on the image contrast enhancement, was to perform the region merging in the CIE color space according to the simulated immersion watershed segmentation results. It is a useful attempt for the watershed segmentation algorithm to extract cultivated land boundaries, which provides a reference for enhancing the watershed algorithm.


Introduction
Sustainable agriculture is of paramount importance, since agriculture is the backbone of many nations' economic development [1]. Cultivated land is one of the most important areas of concern for the agricultural sector, which is the basis for analyzing the utilization of land resources and the basis for human survival [2]. Rapid and accurate extraction of cultivated land boundary information is of great technical significance for land resource supervision, precision agriculture development, and strict observance of China's cultivated land red line [3]. The development of remote sensing technology provides a more rapid means for the boundary extraction of cultivated land [4][5][6][7]. At present, there is much research on cultivated land boundary extraction based on image classification [8][9][10] and image segmentation methods [11][12][13]. However, the extraction of cultivated land information by remote sensing imaging still requires manual visual interpretation based on GIS software. This not only requires technicians to have rich geoscience knowledge and interpretation experience, but also requires a large amount of manpower and high time investment, resulting in low production efficiency and greater subjectivity in the extracted farmland boundary.
In recent years, remote sensing technology has been well developed in the field of intelligent agriculture [14][15][16][17]. Cultivated land extraction based on remote sensing visual interpretation [18] has gradually developed to automatic extraction with image classification technology at its core. For example, [19] used the SVM algorithm to classify satellite remote sensing images of a prefecture-level city in Jiangsu province, as well as identified and divided cultivated land, resulting in the classification accuracy of cultivated land reaching over 90%. These studies are mainly classified as unsupervised classification [20], supervised classification [21], decision tree supervised classification [22], and supervised classification of support vector machines [19], while other methods have been used to carry out research on cultivated land information extraction for technical purposes, or have explored the promotion of automatic cultivated land extraction technology based on remote sensing. However, these methods are mainly applied to the extraction of cultivated land at the regional scale. Such studies mainly reflect the spatial distribution and evolution characteristics of cultivated land, while the accuracy of the extraction results of cultivated land boundaries is low.
More importantly, the resolution of remote sensing images has improved continuously, and object-oriented classification for information extraction of high-resolution remote sensing images has become mainstream technology [7,23]. Since then, some studies have been carried out [12,24]. Automatic extraction of cultivated land boundaries based on image segmentation technology has made rapid progress [25,26]. This research mainly focuses on object-oriented classification technology, and eCognition software based on multi-resolution segmentation has been used for experimental research [26], which has gradually developed into random forest [27], neural networks [28], machine learning [29], and deep learning [30,31]-making the technology of remote sensing information extraction of cultivated land more accurate and rapid. However, most of these methods have complex rules and processes, for which processed results already exist that require post-processing techniques, such as the segmentation process. At the same time, machine learning and deep learning require a large training sample. Thus, these methods are not conducive to normal application.
The segmentation boundary of cultivated land images is required to be clear and continuous. The watershed segmentation algorithm results in a closed and connected region with a single pixel. At the same time, the contour line has a better fit with the segmentation object and is introduced into the cultivated land information extraction process [13,32]. This is beneficial for attempts to use watershed segmentation algorithm to extract cultivated land information. Although the above achievements have been made, these methods have certain applicability, and cannot completely solve the problem of rapid automatic extraction of the cultivated land boundaries of high-resolution remote sensing images [7,33]. Meanwhile, the characteristics of cultivated land images, such as high homogeneity in cultivated land and high heterogeneity with neighboring features, are very suitable for the extraction of watersheds. The improved regional merging watershed algorithm can better solve the fragmentation of excessive segmentation and can realize the integration of segmentation and post-processing [34,35]. This is a feasible method to simplify the process of remote sensing image-based cultivated land boundary extraction. Therefore, an improved watershed segmentation algorithm was proposed based on a combination of pre-and post-improvement procedures. A Gaofen-2 (GF-2) remote sensing image was used to validate the algorithm. The pre-processing-based contrast-enhanced and post-processing-based region merging methods were jointly used to improve traditional simulated immersion watershed algorithm. Finally, the complete Commission Internationale de l Eclairage (CIE) color space-based region merging watershed segmentation (RMWS) (hereafter referred to as Lab-RMWS and Luv-RMWS) was developed to extract cultivated land boundaries. The Red-Green-Blue (RGB) color space-based region merging watershed segmentation (RGB-RMWS) was used to compare the proposed algorithm.

Study Area
The study area is located in Taiyuan City, Shanxi Province, China, specifically including Xiaodian District, Yingze District, Xinghualing District, Jiancaoping District, Wanbailin District, and Jinyuan District, with a total area of 1416 km 2 ( Figure 1). It is the alluvial plain formed by Fenhe River, with a wide and flat terrain. Surrounded by mountains in the north, east, and west side, the elevation gradually decreases from north to south, with an average altitude of 800 m. It belongs to the semi-arid continental climate in the warm temperate zone, with the average annual temperature of 9.5 • C, the average annual wind speed of 2.5 m/s, the average annual precipitation of 483.5 mm, and the average annual evaporation of 1709.7 mm. A lot of cultivated lands are widely distributed in the study area. Three adjacent cultivated lands in the piedmont plain area of Jinyuan District were selected as the primary experimental area to extract cultivated land boundaries. Its geographical coordinates are located between 112 • 24 3.708 E and 112 • 24 20.198

Data Sources
A GF-2 remote sensing image was used as the experimental data (Table 1). It was obtained on 24 August 2015, with a spatial resolution of 1 m. A small subset of 400 × 300 pixels was randomly selected to extract cultivated land boundaries (Figure 2a). The image contrast enhancement was performed to show the edges of cultivated lands more clearly (Figure 2b). A larger GF-2 image acquired on 16 June 2015, with a subset size of 1000 × 1000 pixels, was used to validate the transferability of the proposed algorithm (Figure 2c). There were primary land cover types including cultivated land, village road, built-up

Data Sources
A GF-2 remote sensing image was used as the experimental data (Table 1). It was obtained on 24 August 2015, with a spatial resolution of 1 m. A small subset of 400 × 300 pixels was randomly selected to extract cultivated land boundaries (Figure 2a). The image contrast enhancement was performed to show the edges of cultivated lands more clearly (Figure 2b). A larger GF-2 image acquired on 16 June 2015, with a subset size of 1000 × 1000 pixels, was used to validate the transferability of the proposed algorithm ( Figure 2c). There were primary land cover types including cultivated land, village road, built-up area, and uncultivated land. The cultivated lands were fallow without the coverage of crops after harvesting the winter wheat. The data preprocessing procedures were first carried out including geometric correction, image fusion, and image cropping.

Data Sources
A GF-2 remote sensing image was used as the experimental data (Table 1). It w obtained on 24 August 2015, with a spatial resolution of 1 m. A small subset of 400 × 3 pixels was randomly selected to extract cultivated land boundaries (Figure 2a). The ima contrast enhancement was performed to show the edges of cultivated lands more clea (Figure 2b). A larger GF-2 image acquired on 16 June 2015, with a subset size of 100 1000 pixels, was used to validate the transferability of the proposed algorithm ( Figure 2 There were primary land cover types including cultivated land, village road, builtarea, and uncultivated land. The cultivated lands were fallow without the coverage crops after harvesting the winter wheat. The data preprocessing procedures were fi carried out including geometric correction, image fusion, and image cropping.

Technical Procedure
In comparison with RGB color space, the CIE color space is independent of the device, which is a better improvement for the color distance measurement. At present, some studies have adopted the Euclidean distance between two regions of CIE color space as the color difference to measure the color similarity. Better segmentation results are obtained by improving the regional similarity measure after finishing the watershed segmentation [34,35].
The improved algorithm was compared with the RGB color space-based algorithm. It involved in three major processes based on a combination of pre-and post-improvement procedures ( Figure 3): (1) Pre-processing improvement module, which is image contrast enhancement; (2) post-processing improvement means that the color difference of CIE color space is used as the evaluation criterion for region merging; (3) evaluating the segmentation accuracy module, which include the δ A , δ P , and K hat .
The image segmentation and merging experiments were performed on the CIE color space-based region merging watershed image segmentation system (hereafter referred to as CIE-WS). The system was developed based on the VC++, including three methods of RGB-RMWS, Lab-RMWS, and Luv-RMWS). The running time of image segmentation and merging experiments were respectively recorded using the CIE-WS's built-in timing variable. All the experiments were operated by an Acer S40-51 computer with a 64-bit operating system, an Intel(R) Core(TM) i5-10210U CPU, a main frequency of 1.60 GHz, and an 8.00 GB memory.

Contrast Enhancement
Contrast enhancement is a kind of point operation on an image. The pixel value of the input image is converted to a new value through mapping transformation. The operation result will not change the spatial relationship between the pixels in the image, but can increase the contrast of the image and highlight the cultivated land information, which can improve the segmentation effect of the watershed algorithm based on spectral differences [34,35].
Linear grayscale transformation is one of the methods for contrast enhancement. This method assumes that the gray transformation range of the original image [ b a , and that the gray transformation range of the processed image ) , Linear expansion is carried out for the lowest and highest intensity data in the input image data. It can increase the dynamic range of the image, as well as can improve the image contrast of the clarity and features [36]. The ) , ( y x g functions are shown in Equation (1): where a and b represent the gray transformation range of original image; c and d represent the gray transformation range of processed image.
After performing a set of trial-and-error experiments, [0.1, 0.9] is the optimal grayscale range for original image. The default value [0, 1] was used for processed image.

Conversion between RGB and XYZ
CIE1976 specifies the RGB color space can be converted to the XYZ color space, and XYZ color space can be converted to the Lab or Luv color space. The color value of L, a,

Contrast Enhancement
Contrast enhancement is a kind of point operation on an image. The pixel value of the input image is converted to a new value through mapping transformation. The operation result will not change the spatial relationship between the pixels in the image, but can increase the contrast of the image and highlight the cultivated land information, which can improve the segmentation effect of the watershed algorithm based on spectral differences [34,35].
Linear grayscale transformation is one of the methods for contrast enhancement. This method assumes that the gray transformation range of the original image f (x, y) is [a, b], and that the gray transformation range of the processed image g(x, y) is [c, d]. Linear expansion is carried out for the lowest and highest intensity data in the input image data. It can increase the dynamic range of the image, as well as can improve the image contrast of the clarity and features [36].
The g(x, y) functions are shown in Equation (1): where a and b represent the gray transformation range of original image; c and d represent the gray transformation range of processed image. After performing a set of trial-and-error experiments, [0.1, 0.9] is the optimal grayscale range for original image. The default value [0, 1] was used for processed image.

Conversion between RGB and XYZ
CIE1976 specifies the RGB color space can be converted to the XYZ color space, and XYZ color space can be converted to the Lab or Luv color space. The color value of L, a, and b or L, u, and v can be obtained through the color space conversion from each channel of the image [37].
where L is the brightness; X n and Y n are the tristimulus values of standard light source D65.

Color Space Conversion between XYZ and Lab
where a and b represent the chromaticity coordinates; Z n is the tristimulus value of standard light source D65. X n = 95.04, Y n = 100.00, and Z n = 208.88 [34]. The f (t) functions in Equations (4) and (5) are shown in Equation (6):

Color Space Conversion between XYZ and Luv
where u and v represent the chromaticity coordinates; u n and v n are the coordinates of the CIE standard light source and the tristimulus values given by [35]: In the case of 2 • observer and C light source, u n = 0.2009 and v n = 0.4610 [35]. 2 • observer is the spectral tristimulus set by the CIE in 1931, also known as 1931 Standard Chroma Observer. CIE standard light sources include A, C, D50, D65, etc., and the C light source represents average daylight.

Watershed Segmentation Algorithm Based on CIE Color Space Region Merging
At present, the most widely used watershed algorithm is the simulated immersion algorithm, which was proposed by Vincent and Soille [38]. The steps of simulated immersion watershed algorithm are shown as follows [34]: (1) An image is converted from the color to corresponding grayscale.
(2) The gradient of each pixel in the image is calculated. To sort the gradient values from smallest to largest, and the same gradient is located at the same gradient level. (3) To process all the pixels of the first gradient level and check the neighborhoods of a certain pixel. If the neighborhoods have already been identified as a certain area or watershed, add the pixel to a first-in first-out (FIFO) queue. (4) The first pixel would be picked up when the FIFO queue is not empty. To scan the pixel neighborhoods, the identification of pixel is refreshed according to the neighborhood pixel, when the gradient of its neighboring pixels belongs to the same layer. The loop will be continued just the same until the queue is empty. (5) To scan the pixel of current gradient level again, it will be a new minimal area if there are unidentified pixels. Continue to perform step (4) from this pixel until there is no new minimal region. (6) Return to step (3) to continue processing the next gradient level until all levels of pixels have been processed.
Many scholars have proposed different improved watershed segmentation algorithms according to their own research [34,35,[39][40][41]. According to the watershed segmentation algorithm, these improved algorithms can be summarized as pre-and post-improvement, as well a combination of pre-and post-improvement for a traditional watershed segmentation algorithm.
In this study, on the basis of a simulated immersion algorithm, a combination of preand post-improvement procedures was used to improve the region merging watershed algorithm in CIE color space. More specifically, the contrast enhancement by linear grayscale transformation was used as the pre-improvement procedure, while the CIE color space region merging was used as the post-improvement procedure. The specific flowchart of the proposed algorithm can be found in Figure 4. (4) The first pixel would be picked up when the FIFO queue is not empty. To scan the pixel neighborhoods, the identification of pixel is refreshed according to the neighborhood pixel, when the gradient of its neighboring pixels belongs to the same layer. The loop will be continued just the same until the queue is empty. (5) To scan the pixel of current gradient level again, it will be a new minimal area if there are unidentified pixels. Continue to perform step (4) from this pixel until there is no new minimal region. (6) Return to step (3) to continue processing the next gradient level until all levels of pixels have been processed.
Many scholars have proposed different improved watershed segmentation algorithms according to their own research [34,35,[39][40][41]. According to the watershed segmentation algorithm, these improved algorithms can be summarized as pre-and post-improvement, as well a combination of pre-and post-improvement for a traditional watershed segmentation algorithm.
In this study, on the basis of a simulated immersion algorithm, a combination of preand post-improvement procedures was used to improve the region merging watershed algorithm in CIE color space. More specifically, the contrast enhancement by linear grayscale transformation was used as the pre-improvement procedure, while the CIE color space region merging was used as the post-improvement procedure. The specific flowchart of the proposed algorithm can be found in Figure 4.

Segmentation Scale Parameter
The segmentation scale parameter by the watershed segmentation algorithm is the threshold value (A min ) of the minimal region. It is calculated by the following Equation [35]: where M is the row of image; N is the column of image; C is a given constant. If a region is less than the A min , it is a minimal region, otherwise it is not. The A min depends on the value of C. Therefore, C value can be represented the segmentation scale parameters.

Merging Scale Parameters
In region merging after the watershed segmentation, how to determine the color similarity between two adjacent regions is the key problem. Here, the Euclidean distance (d i ) of two regions in the CIE color space was used as the color difference to measure the color similarity of two regions. It is calculated by the following Equation [35]: where |R i | and |R j | are the pixel numbers contained in the image areas R i and R j , respectively; F c (R i ) and F c (R j ) are the average colors of image areas R i and R j ; and n is the number of adjacent areas. Let the merging threshold be D where D = (d i ) 2 . When d i ≤ √ D, the regions are merged; otherwise, the regions do not merge. Therefore, D can be used to represent the merging scale parameters. A smaller D corresponds to greater similarity between the colors, and vice versa.
As observed in Figure 4, the most critical technical problem of the watershed algorithm for region merging is to determine the minimum region and to merge similar regions, which are controlled by the segmentation threshold C values and the merging threshold D values, respectively [35]. At present, it is difficult to adaptively determine the C and D values. The trial-and-error procedure is usually used to conduct repetitive tests to find the optimal C and D values of the image information extraction.

Accuracy Evaluation of Image Segmentation
The segmentation quality of remote sensing image is a guarantee of the reliability of subsequent information analysis [42,43]. The way in which to evaluate the image segmentation results objectively and quantitatively is an important part of the image segmentation algorithm [44,45]. For the evaluation of image segmentation accuracy, many researchers have carried out qualitative and quantitative methods from different perspectives [46][47][48][49], and many evaluation methods and indicator systems have been proposed [50][51][52][53][54][55][56][57][58]. By comparing the evaluation, the segmentation accuracy of remote sensing images is indicated. On the basis of previous studies [34,35], the area relative error criterion (δ A ), the pixel quantity error criterion (δ P ), and the consistency criterion (K hat ) were selected to evaluate the segmentation accuracies. The reference data were obtained by visual interpretation or land use maps, and the segmentation results were obtained by the proposed method.

Area Relative Error Criterion (δ A )
δ A is the area relative error accuracy indicator. A 0 is the true area value of the target region in the benchmark image, and A S is the area value of the target region in the segmentation result. It is calculated by the following equation [35]: A smaller δ A corresponds to higher segmentation accuracy, and vice versa.

Pixel Quantity Error Criterion (δ P )
δ P is the pixel quantity error accuracy indicator. Let P t is the correct number of pixels of the target region in the segmentation result, and P w is the incorrect number. δ P is calculated by the following equation [35]: A smaller δ P corresponds to higher segmentation accuracy, and vice versa.

Consistency Criterion (K hat )
K hat is mainly used for accuracy evaluation and image consistency judgment. In this paper, K hat was selected as the accuracy evaluation criterion for the consistency between the segmentation results and the benchmark data. Respectively, then, the K hat is given by [59,60]: where r represents the total number of columns in the error matrix; X ii is the number of pixels in the row i and column i in the error matrix; x i+ and x +i are the total number of pixels in row i and column I, respectively; N is the total number of pixels used for accuracy evaluation. The higher segmentation accuracy is indicated by a higher K hat , and vice versa.

Image Segmentation before and after Contrast Enhancement
The segmented images were, respectively, obtained based on the pre-and postcontrast-enhanced image ( Figure 5). To increase the comparability, the same C and D values were adopted in the experiments. The statistical results of the comparative experiments are provided in Table 2.
A smaller δA corresponds to higher segmentation accuracy, and vice versa.

Pixel Quantity Error Criterion (δP)
δP is the pixel quantity error accuracy indicator. Let Pt is the correct number of pixels of the target region in the segmentation result, and Pw is the incorrect number. δP is calculated by the following equation [35]: A smaller δP corresponds to higher segmentation accuracy, and vice versa.

Consistency Criterion (Khat)
Khat is mainly used for accuracy evaluation and image consistency judgment. In this paper, Khat was selected as the accuracy evaluation criterion for the consistency between the segmentation results and the benchmark data. Respectively, then, the Khat is given by [59,60]: where r represents the total number of columns in the error matrix; Xii is the number of pixels in the row i and column i in the error matrix; xi+ and x+i are the total number of pixels in row i and column I, respectively; N is the total number of pixels used for accuracy evaluation.
The higher segmentation accuracy is indicated by a higher hat K , and vice versa.

Image Segmentation Before and After Contrast Enhancement
The segmented images were, respectively, obtained based on the pre-and post-contrast-enhanced image ( Figure 5). To increase the comparability, the same C and D values were adopted in the experiments. The statistical results of the comparative experiments are provided in Table 2.  As observed in Figure 5, the blue boxes showed that the middle road of the cultivated land failed to maintain a continuous position in the segmentation results of Figure 5(a0,b0,c0). The corresponding positions remained continuous in Figure 5a-c. Meanwhile, Table 2 shows that the number of image spots in the contrast-enhanced image after segmentation and merging was higher than that in the original image. This can be also found by comparing the improvement of the road segmentation results in Figure 5. The contrast-enhanced image effectively avoided under-segmentation of the original image to the road. The results showed that contrast enhancement could improve the quality of image segmentation.  Table 2 shows that the initial image segmentation time was consistent. However, the time of the region merging varied greatly. The region merging time of the three methods was greatly reduced compared to that of the original image. The time efficiency of the contrast-enhanced image segmentation and merging in the Lab-RMWS method was 60.00% higher than that of original images. The Luv-RMWS and RGB-RMWS methods were improved by 10.31% and 40.28%, respectively. Therefore, contrast enhancement could improve the time efficiency of region merging watershed segmentation.

The Optimal Scale Parameters in the Three Methods
The optimal segmentation and merging scale parameters are the C and D values in the three watershed segmentation methods. The trial-and-error multiscale segmentation experiments were performed on the test contrast-enhanced images with the combinations of different C and D values.     The C value varied between 100 and 5000 at intervals of 50, and the D value varied between 10 and 500 at intervals of 10. Some important segmentation results are shown in Figure 8. The statistical results of the combinations of different C and D values are provided in Table 3. The statistical results of the combinations of different C and D values are provided in Table 3. As observed from Figures 6-8 and Table 3, with the gradual increase in C values, the number of sliver polygons in the image segmentation results increased, and the image tended to be over-segmented. As the D values gradually increased, the number of sliver polygons decreased and the image tended to be under-segmented. Thus, a bivariate orthogonal scale parameter space was formed. The image to be segmented achieved the optimal segmentation result when the

Extraction of Cultivated Land Boundaries
The reference data of the cultivated land boundaries in the experimental area were obtained by visual interpretation, and the optimal C and D values of the three methods were obtained by experiment. The segmentation results were taken as the results of the cultivated land boundary extraction. To compare the extraction effect derived from the three methods, the optimal experimental results, benchmark data, and experimental images are overlaid and displayed (Figure 9).

Extraction of Cultivated Land Boundaries
The reference data of the cultivated land boundaries in the experimental area were obtained by visual interpretation, and the optimal C and D values of the three methods were obtained by experiment. The segmentation results were taken as the results of the cultivated land boundary extraction. To compare the extraction effect derived from the three methods, the optimal experimental results, benchmark data, and experimental images are overlaid and displayed (Figure 9). As shown in Figure 9, there are some sliver polygons on the edge of and in the cultivated lands, and they are 28, 9, and 14, respectively, for the three methods. Therefore, the Lab-RMWS method was the best of the three methods. Its cultivated land boundary provided the best result. On the contrary, the RGB-RMWS method results were worst. It is obvious that there were many sliver polygons in cultivated lands. The post-processing was implemented by manual intervention. Some additional time was required to merge As shown in Figure 9, there are some sliver polygons on the edge of and in the cultivated lands, and they are 28, 9, and 14, respectively, for the three methods. Therefore, the Lab-RMWS method was the best of the three methods. Its cultivated land boundary provided the best result. On the contrary, the RGB-RMWS method results were worst. It is obvious that there were many sliver polygons in cultivated lands. The post-processing was implemented by manual intervention. Some additional time was required to merge them. It is observed from Figure 9b,c that the Lab-RMWS and Luv-RMWS methods not only extract better cultivated land boundaries, but also merge sliver polygons in the cultivated land. Both the cultivated land boundaries and road in the cultivated land are continuous and complete. The extracted cultivated land boundaries are rarely affected by vegetation, trees, roads, bare areas, and constructions. The segmentation results are better than the RGB-RMWS method. However, as shown in Figure 9b,c, some over-and under-segmentation phenomena still exist. There were still segmented patches all around and inside the cultivated land, and the patches of trees along the middle road were attached and mis-divided, affecting the overall extraction effect.

Running Time of Segmentation Experiments
To compare the running time of the three methods during segmentation experiments, the statistical results are provided in Table 4.  Table 4 shows that the RGB-RMWS, Lab-RMWS, and Luv-RMWS methods all had higher time efficiencies. Among them, the RGB-RMWS method used the most time of 2.796 s. Meanwhile, the Lab-RMWS and Luv-RMWS methods had similar time efficiencies, which were 1.813 s and 1.969 s, respectively. These results are better than those of the RGB-RMWS method without improving the color space. Meanwhile, the time efficiency of the Lab-RMWS and Luv-RMWS methods were improved by 35.16% and 29.58%, respectively, compared to the RGB-RMWS method.

Extraction Accuracy
The proposed method was compared with the RGB-RMWS. For fair comparison, the same accuracy evaluation factors were adopted by all comparison methods. For each method, the result of δ A , δ P , and K hat can be found in Table 5.  Table 5 shows that both the Lab-RMWS and Luv-RMWS methods had higher image segmentation precision. All the δ A , δ P , and K hat were superior to the RGB-RMWS method without improving the color space. The δ A , δ P , and K hat of the Lab-RMWS method were 2.37%, 3.48%, and 90.96%, respectively, which are superior to those of the Luv-RMWS method. The Lab-RMWS method was the most accurate segmentation method among the three methods. The δ A , δ P , and K hat of the Lab-RMWS method were 76.92%, 62.01%, and 16.83%, respectively, higher than those of the RGB-RMWS method. The δ A , δ P , and K hat of the Luv-RMWS method were 55.79%, 49.67%, and 13.42%, respectively, higher than those of the RGB-RMWS method.

Comparison Experiment with a Larger Image
To test the transferability of the proposed method to another type of parcel, a larger image was used to perform the comparison experiment. To increase the comparability, the same optimal C and D values were adopted in the experiments. The segmented images were obtained based on the contrast-enhanced image of Figure 2c. The reference data of cultivated land boundaries were derived from visual interpretation ( Figure 10). The statistics of the comparison experiments are provided in Table 6.
Remote Sens. 2021, 13, x FOR PEER REVIEW 16 of 20 cultivated lands by the three methods to a certain degree. The post-processing was implemented by manual intervention, so additional time was required to merge them.  For each method, the quantitative evaluation indicators could be found in Table 7. It showed that both the Lab-RMWS and Luv-RMWS methods had higher image segmentation precision, and all the δA, δP, and Khat were superior to the RGB-RMWS method. The improved algorithm based on the Lab color space performed better than the improved algorithm based on the Luv color space. 6. Discussion

Analysis of the Contrast Enhancement Image Segmentation
As shown in Figure 5 and Table 2, contrast enhancement could improve the image segmentation quality and the image segmentation time efficiency. It is an effective technique to improve the pre-processing of the watershed algorithm. At present, there are many methods for image enhancement [61,62]. In the future, comparative experiments on various image enhancement methods should be carried out. The best image enhancement method should be selected to assist the improvement of the CIE color space region merging watershed algorithm in order to improve the image segmentation quality and time efficiency.

Analysis of the Optimal Scale Parameters
The optimal scale parameter selection of the region merging watershed algorithm  It could be found that the segmentation results of 7, 8, 11, and 12 cultivated lands were better, with higher integrity, continuous boundaries, and less silver polygons. Conversely, they were bad for other cultivated lands with a lot of sliver polygons. In comparison with Figure 2c, it can be seen that the internal homogeneity of 7, 8, 11, and 12 cultivated lands are higher, while the internal heterogeneity of other cultivated lands is higher. It is obvious that the segmentation effect is significantly affected by the internal homogeneity and heterogeneity of cultivated lands. As shown in Figure 10 and Table 6, Lab-RMWS had the best performance among the three methods. On the contrary, RGB-RMWS-based segmentation results were the worst. There were some sliver polygons in cultivated lands by the three methods to a certain degree. The post-processing was implemented by manual intervention, so additional time was required to merge them.
For each method, the quantitative evaluation indicators could be found in Table 7. It showed that both the Lab-RMWS and Luv-RMWS methods had higher image segmentation precision, and all the δ A , δ P , and K hat were superior to the RGB-RMWS method. The improved algorithm based on the Lab color space performed better than the improved algorithm based on the Luv color space. As shown in Figure 5 and Table 2, contrast enhancement could improve the image segmentation quality and the image segmentation time efficiency. It is an effective technique to improve the pre-processing of the watershed algorithm. At present, there are many methods for image enhancement [61,62]. In the future, comparative experiments on various image enhancement methods should be carried out. The best image enhancement method should be selected to assist the improvement of the CIE color space region merging watershed algorithm in order to improve the image segmentation quality and time efficiency.

Analysis of the Optimal Scale Parameters
The optimal scale parameter selection of the region merging watershed algorithm mainly refers to the selection of the C value and D value [35]. In this paper, a GF-2 remote sensing image has been used to conduct the optimal scale parameter selection trial-anderror experiment on the improved algorithm. The performed experiments showed that the optimal C values of the RGB-RMWS, Lab-RMWS, and Luv-RMWS methods were 2000, 1900, and 2000, while the optimal D values were 1000, 40, and 40, respectively. However, the optimal scale parameters of the three color space region merging watershed algorithms obtained in this study were mainly based on the experiment to obtain the empirical optimal values. It was subjective to a certain extent, and was greatly affected by the image texture, tone, time phase, image contrast enhancement method, etc. Subsequent studies still need to continue to explore the objective acquisition method of the optimal scale parameters.

Analysis of the Extraction Effect
Optimal segmentation results should satisfy the following conditions: (1) The cultivated land boundary is continuous and complete; (2) the road in the cultivated land is continuous and complete; (3) the cultivated land map's internal sliver polygons are as little as possible. Nowadays, the subjective evaluation method is still the most commonly used for evaluation of the segmentation effect [45]. Compared to the original RGB color space, the improved CIE color space watershed algorithm obviously improved the visual comparison of the segmentation results. At the same time, the cultivated land boundaries were divided completely, and less sliver polygons remained in the cultivated land. The basic principle of greater homogeneity in the image spot after segmentation was achieved. A comparison of the accuracy evaluation showed that the improved watershed algorithm of the CIE color space was more accurate than that of the RGB color space. At the same time, Tables 5 and 7 shows that the evaluation indicators of δ A , δ P , and K hat had better consistency in the accuracy evaluation of the three methods. These evaluation indicators are an effective combination of precision evaluation indicators of the watershed segmentation algorithm.

Analysis of the Proposed Method
At present, there is much research on extracting cultivated land boundaries based on remote sensing images [7]. The types of data used for research are varied. The extraction method has gradually transformed from unsupervised [20] and supervised classification [21] with poor effects to support vector machines [19], object-oriented classification [23], random forests [27], neural networks [28], and deep learning [31] with good effects. How-ever, these methods, inevitably, have problems such as complex rules and inadequate applicability. The principle of the watershed algorithm is simple, and the processing process is highly automated, and some attempts have been made in the field of boundary extraction [13,32]. Based on Lab, the Luv color space watershed algorithm is an improved algorithm for region merging in the CIE color space. This improved algorithm has achieved better results in slope hazard boundary extraction [34,35].
In this study, a GF-2 remote sensing image from China was selected. The preprocessing was improved by the enhancement of linear gray scale transformation, while the CIE color space region merging improved the post-processing. The simulated immersion algorithm was improved by combining the "pre + post" improvements. Compared to the original RGB color space region merging watershed algorithm, cultivated land boundary extraction was studied and tested. The δ A , δ P , and K hat was used to construct the segmentation accuracy evaluation indicators combined as evaluation indicators. The comparison experiments showed that the improved algorithm in this study is superior to the unimproved algorithm in terms of the visual comparison, time efficiency, and extraction precision of cultivated land boundaries. The improved algorithm based on the Lab color space performed better than the improved algorithm based on the Luv color space. At the same time, the indicators of δ A , δ P , and K hat had high consistency in the accuracy evaluation. The accuracy evaluation results were completely consistent with that of visual results of accuracy evaluation. The study provides an objective and reliable combination of indicators for improving the accuracy evaluation of the watershed segmentation algorithm.

Conclusions
An improved watershed algorithm system based on "pre + post" processing was proposed for cultivated land boundary extraction. Its includes image contrast enhancement, CIE color space region merging, and segmentation accuracy evaluation criteria based on the area relative error criterion, the pixel quantity error criterion, and the consistency criterion. The experimental results showed that the improved CIE color space region merging watershed algorithm is superior to the unimproved RGB color space region merging watershed algorithm in terms of visual effect, time efficiency, and extraction accuracy. The time efficiency has been improved in the Lab and Luv color spaces by 35.16% and 29.58%, respectively. The δ A , δ P , and K hat indicators were improved by 76.92%, 62.01%, and 16.83% in the Lab color space, respectively, and 55.79%, 49.67%, and 13.42% in the Luv color space. The evaluation results of the three accuracy indicators were consistent. The comparison experiments based on a larger image are still consistent with the small image, showing that the proposed method has satisfying segmentation performance and transferability. The proposed method is easier to be understood than other methods, and the image processing of segmentation and region merging is simple. Its time efficiency and result accuracy perform well, and the degree of automation is higher. It has a certain reference value for the selection of a cultivated land boundary extraction method of highresolution remote sensing images. Furthermore, it extends the application field of the watershed segmentation algorithm.