# Accurate Parcel Extraction Combined with Multi-Resolution Remote Sensing Images Based on SAM
## 2 Materials and Methods
### Method
#### 2.3.2 GF-7 Image Parcel Extraction  
* Image cropping and histogram equalization Compared to the parcel extraction process using Sentinel images, the extraction of high-resolution parcels involves working with individual parcel images rather than 1024 \(\times\) 1024-sized images. Thus, it is essential to utilize the preprocessed parcels to crop the high-resolution image. This is achieved by traversing the parcels and creating masks to guide the cropping process for each parcel. To mitigate edge errors and ensure internal homogeneity, morphological operations, such as dilation and hole filling, were applied to the masks. These operations help refine the masks and improve the accuracy of the cropping process. Histogram equalization (HE) enhances images by adjusting the grayscale values of pixels based on their histogram. It is a straightforward and effective method, and is commonly used to improve the contrast of images with limited dynamic range [33]. In this study, the contrast-limited adaptive histogram equalization (CLAHE) algorithm [34] was applied to enhance the image. Figure 4a illustrates the results of cropping the parcels and histogram equalization. Figure 3: (**a**) Cropland masks are effective in removing impacts from non-cropland areas. (**b**) Errors in boundaries for non-overlapping predictions. (**c**) Overlapping prediction processes. Downward segmentation features  
When using high-resolution imagery for detailed parcel extraction, it is important to decide which parcels need further subdivision. Based on the results obtained from the 10 m parcels, the parcels can be broadly categorized into three types: single parcels, rice parcels, and mixed parcels. It is evident that the latter two types require continued subdivision. For the parcels that necessitate segmentation, the vit-b model was used too. Conversely, for single parcels, the original results were retained directly. This approach significantly improves efficiency and helps prevent over-segmentation. In this study, two thresholds, namely the histogram feature and the internal edge feature of the parcels, were employed to determine whether further subdivision should be performed or not. The gray histograms of the three types of parcels exhibit distinct characteristics. Single parcels display a single-peaked feature with a narrower range of values. Rice parcels also demonstrate a single peak but have a wider range of values due to the presence of ridges and roads within the parcels. On the other hand, mixed parcels exhibit double or multiple peaks in their gray histograms, with a larger range of values. To differentiate between these three types of parcels, the study calculated the width of their gray histograms from the 3 rd percentile to the 95 th percentile and established threshold values. The histogram feature proved effective in distinguishing mixed parcels from other types of parcels. However, there was a tendency to confuse some rice parcels with single parcels. This can be attributed to the presence of a small proportion of ridges and roads within rice parcels. Additionally, some single parcels may lack internal homogeneity or contain non-cultivated factors, such as roads, at their edges. Therefore, the essential features of the parcels to be divided are considered, that is, the parcels to be divided are more complex inside and have obvious edge features. The edges inside the parcels were extracted by Sobel operator, morphological operations were performed to retain the connected areas with large areas, and the ratio of boundary pixels to the total area of the parcels was calculated as a parameter to judge whether to continue downward segmentation or not. Figure 4b illustrates these three types of parcels and their corresponding features. This is similar to evenly distributing points on the image. If there is a random point distribution on the object to be detected, then it will be detected. The point density determines the minimum size of objects that can be detected and the precision of boundaries.