Farmland plot automatic extraction method and system, electronic equipment and storage medium
By using an improved RCF network model and watershed segmentation algorithm, the problems of poor generalization ability and insufficient plot closure in the automated extraction of farmland plots were solved, and accurate extraction and efficient automation of complex farmland plots were achieved.
Patent Information
- Application Number
- CN202511354456.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-06
AI Technical Summary
Existing automated methods for farmland plot extraction have shortcomings in generalization ability, feature representation, plot closure and automation level, especially in heterogeneous terrain, and rely heavily on manual intervention.
An automated farmland plot extraction method based on the RCF network model is adopted. Through sample construction, sample augmentation, improved RCF network training and post-processing, combined with the watershed segmentation algorithm, the accurate extraction of farmland plots is achieved.
It improves the ability to express the characteristics of complex farmland plots, obtains complete closed plot boundaries, reduces human intervention, and is suitable for large-area farmland management and monitoring.
Smart Images

Figure CN121280888A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image processing technology, specifically to the field of agricultural remote sensing technology. Background Technology
[0002] Farmland plots are the basic units of agricultural production, management, and operation. Spatial distribution information of farmland plots is essential for various agricultural applications, such as crop area statistics, crop growth monitoring, crop yield estimation, and ecological resource regulation. Remote sensing technology supports the rapid acquisition of large-scale surface information and is a crucial support for extracting regional farmland plot information. In particular, the rapid development of high-resolution remote sensing satellites in recent years allows users to obtain detailed surface information, providing a technological foundation for farmland plot extraction.
[0003] Traditional methods of acquiring land parcel data primarily rely on manual visual interpretation, where operators delineate detailed parcel information on high-resolution imagery based on visual characteristics. This method is labor-intensive and difficult to update, making it more suitable for processing remote sensing data over small areas. To achieve rapid extraction of land parcels over large areas and improve the efficiency of farmland parcel extraction, automated farmland parcel extraction technology has become a key technology for solving these problems. Currently, automated farmland parcel extraction methods are mainly divided into the following two types: The first method uses an object-oriented segmentation algorithm. This algorithm works by merging homogeneous pixels in a high-resolution image into smaller, fragmented regions, gradually segmenting the entire image and enabling rapid extraction of large land parcels. The limitations of this algorithm are that its effectiveness is highly dependent on scale parameters and rule sets. In heterogeneous terrains such as terraces and hills, repeated parameter tuning is required, it has poor generalization ability, and it only considers the homogeneity between pixels during extraction, neglecting the spatial attribute information of the farmland parcels themselves, leading to errors in the segmentation results.
[0004] The second method is to obtain edge-related information by fusing edge detection operators for plot detection. The limitation of this method is that the edge detection operator is essentially a description of pixel gradient differences, which is prone to edge breakage. It is also difficult to capture the geometric structure of complex farmland and the dynamic changes in crop growth over time. In particular, it has a weak ability to distinguish between fragmented small plots and intercropping areas.
[0005] In summary, existing automated methods for extracting farmland plots have limitations such as poor generalization ability, neglect of spatial attributes of farmland plots, and limited feature representation. Summary of the Invention
[0006] This invention enables the precise extraction of farmland plots based on remote sensing imagery. The invention provides the following solution: Option 1: An automated method for extracting farmland plots, comprising the following steps: Step 1: Acquire high-resolution remote sensing images of the target area, construct samples from the high-resolution remote sensing images, and obtain an edge detection sample set; The sample construction includes: data preprocessing, anisotropic sharpening, sample region selection, sample labeling, and sample cropping. Step 2: Perform sample augmentation on the edge detection sample set to obtain an augmented edge detection sample set; The sample augmentation mentioned above is any one or more of the following four augmentation strategies: random scaling, random cropping, random rotation, and random color perturbation. Step 3: Based on the enhanced edge detection sample set, train the improved RCF network model to obtain the final improved RCF network model. Step four: The high-resolution remote sensing image of the target area described in step one is used to infer the edge probability map through the improved RCF network model; Step 5: Post-process the edge probability map to obtain closed plot data of the target area, and complete the automated extraction of farmland plots.
[0007] Furthermore, in one embodiment of the present invention, the improved RCF network model described in step three is specifically as follows: the pooling layers between different stages are removed from the RCF network structure, the network is modified to only obtain the feature map of the last layer of the network in each stage, and the classifier of the network's output layer is the Sigmoid function.
[0008] Furthermore, in one embodiment of the present invention, the post-processing described in step five is as follows: Step 51: Obtain the farmland mask of the target area, and perform vector rasterization on the farmland mask to obtain a binarized farmland mask raster. Step 52: Perform threshold filtering on the edge probability map to obtain the filtered edge probability map; Step 53: Create a new marker image. Divide the marker image into a background region and a potential foreground region based on the farmland mask binarization raster. Divide the potential foreground region of the marker image into a foreground region and an uncertain region based on the farmland mask binarization raster and the filtered edge probability map. Obtain a marker image with divided background, foreground, and uncertain regions. Step 54: The marker image obtained in step 53 and the high-resolution remote sensing image of the target area described in step 4 are segmented using the watershed segmentation algorithm to obtain the farmland plot edge results. Step 55: By adding the farmland mask binarized raster obtained in step 51 and the farmland plot edge results obtained in step 54, a refined farmland plot edge result is obtained. Step 56: Perform a raster conversion operation on the detailed farmland plot edge results to obtain a boundary line vector layer; simplify the boundary line vector layer into lines and vectorize the surface to obtain closed plot data of the target area.
[0009] Furthermore, in one embodiment of the present invention, the method for dividing the potential foreground region of the marker image into a foreground region and an uncertain region in step 53 is as follows: Step 531: Perform image dilation on the filtered edge probability map to obtain a binarized image of the filtered edge probability map. Divide the binarized image into non-edge regions and potential edge regions, and take the potential edge regions as uncertain regions one. Step 532: Based on the aforementioned farmland mask binarized raster, calculate the number of pixels in the region outside the first uncertain region within the potential foreground region, and set the region with less than 200 pixels as the second uncertain region. Step 533: Mask the marker image according to the uncertain region one and uncertain region two to obtain the masked region, divide the masked region into the foreground region, and divide the parts of uncertain region one and uncertain region two that are not the masked region into uncertain regions.
[0010] Furthermore, in one embodiment of the present invention, step 55 includes: Step 551: Extract the edge of the farmland mask binarized grid using the Canny operator to obtain the farmland mask edge result; Step 552: Subtract the farmland plot edge result from the farmland mask edge result, and then use the skeletonize function to obtain the farmland mask edge result after extracting the skeleton line; Step 553: Add the extracted skeleton lines to the binarized raster of the cultivated land mask to obtain the refined edge result of the farmland plot.
[0011] Option 2: An automated farmland plot extraction system, comprising the following modules: Module 1 is used for high-resolution remote sensing images of the target area. Samples are constructed from the high-resolution remote sensing images to obtain an edge detection sample set. The first module further includes: The sample construction submodule is used for data preprocessing, anisotropic sharpening, sample region selection, sample labeling, and sample cropping. Module 2 is used to perform sample augmentation on the edge detection sample set to obtain an augmented edge detection sample set; The second module further includes: The sample augmentation submodule is used for any one or more of the following four augmentation strategies: random scaling, random cropping, random rotation, and random color perturbation. Module 3 is used to train the improved RCF network model based on the enhanced edge detection sample set, and obtain the final improved RCF network model after training. Module 4 is used to infer the high-resolution remote sensing image of the target area described in step 1 through the improved RCF network model to obtain an edge probability map; Module 5 performs post-processing on the edge probability map to obtain closed plot data of the target area, thus completing the automated extraction of farmland plots.
[0012] Option 3: An electronic device according to the present invention includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of any of the methods described above.
[0013] Option 4: A computer-readable storage medium according to the present invention, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of any of the methods described above.
[0014] The automated farmland plot extraction method described in this invention is based on a fusion edge network and segmentation algorithm. It can accurately extract farmland plots from remote sensing imagery, providing effective and reliable plot data support for agricultural activities such as crop classification and yield estimation. Specific beneficial effects include: 1. The automated farmland plot extraction method described in this invention, compared with existing technologies, (1) Existing methods for extracting land parcels have limited feature representation. Specifically, traditional edge detection operators based on texture features struggle to capture the geometric structure of complex farmland and the dynamic changes in crop growth over time, especially in distinguishing fragmented small parcels and intercropping areas. This invention improves feature representation by constructing and enhancing samples based on high-resolution remote sensing images of the target area to obtain an enhanced edge detection sample set.
[0015] (2) The existing land parcel extraction methods are not fully closed, mainly because the edge information is easily affected by the boundary non-closure during the raster vector conversion process, resulting in under-segmentation of the land parcel. This invention solves the problem of non-closed edge information in the edge probability map by designing a complete post-processing process, improves the edge processing effect, and obtains fully closed land parcel boundaries.
[0016] (3) The segmentation robustness of existing land parcel extraction methods is poor because although the segmentation of object-oriented methods can obtain closed land parcel boundaries, its effect is highly dependent on scale parameters and rule sets. In heterogeneous terrains such as terraces and hills, repeated parameter tuning is required, resulting in poor generalization ability. The improved RCF network model obtained by training based on the enhanced edge detection sample set in this invention is suitable for heterogeneous terrains and has strong generalization ability.
[0017] (4) Existing land parcel extraction methods have low automation levels and rely too much on expert experience (such as rule base construction) in the extraction process, which cannot meet the needs of large-scale extraction and has prominent problems of failure when migrating across regions. This invention uses computer programs to process remote sensing data, which can be achieved without human intervention and has a high degree of automation.
[0018] 2. Regarding the improved RCF network model described in this invention, in terms of the sample dataset for model training, this invention uses high-resolution remote sensing images to form the training set, which is beneficial for capturing the complex structure of farmland in the target area and improving the ability to distinguish between fragmented small plots and intercropping areas.
[0019] 3. The improved RCF network model described in this invention, in terms of network structure, is based on the HED image edge detection network and optimized. Compared with the traditional CNN network, this network structure integrates the features of each layer of the backbone network, and its edge extraction effect is better. This invention removes the pooling layer between different stages on the basis of the RCF network structure, reduces the downsampling process of the feature map, and avoids the loss of narrow edges caused by the feature map becoming smaller. In addition, this invention also modifies the network to only obtain the feature map of the last layer of the network in each stage, so as to accelerate the convergence of the model.
[0020] 4. The post-processing workflow described in this invention allows for the acquisition of closed plot data. Existing plot edges, serving as boundaries between different plots, should exhibit a completely closed state. However, often due to factors such as human activity, cloud shadows, and tree shadows, the boundary features between adjacent plots in the original image inevitably become excessively blurred or occluded, leading to discontinuities in some edge information in the edge probability map. This invention designs a complete post-processing workflow based on the edge probability map to solve the problem of non-closed edge information in the edge probability map and obtain completely closed plot boundaries.
[0021] 5. The automated farmland plot extraction method described in this invention selects Changfeng County as an example area. Using this method, farmland plot data of the entire Changfeng County area were extracted. According to statistics, a total of 475,644 plots were extracted, with a total area of 1.24 million mu and an average plot area of 2.6 mu, which verifies the actual effect of this patent in regional plot extraction tasks.
[0022] The method described in this invention is applicable to the automated extraction of farmland plots over large areas and can be applied to large-area farmland management or monitoring technologies to achieve automated extraction of plots. Attached Figure Description
[0023] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of the automated farmland plot extraction method described in Implementation Method 1.
[0024] Figure 2 This is a schematic diagram of the principle framework of the improved RCF network model described in Implementation Method 2.
[0025] Figure 3 is a comparison diagram of the threshold filtering example described in Implementation Method 3, where (a) is the original image, (b) is the edge probability map, and (c) is the effect diagram after threshold filtering.
[0026] Figure 4 is a comparison of a partial edge probability map of Changfeng County as described in Embodiment 1, where (a) is the original partial image of Changfeng County and (b) is the corresponding edge probability map.
[0027] Figure 5 This is a schematic diagram of the land parcel extraction results in Changfeng County as described in Implementation Method 1. (A), (B), and (C) are the location indicators of the three sub-regions for displaying the land parcel extraction results, corresponding to the three regions (AC) highlighted in yellow on the large image.
[0028] Figure 6 is an illustration of the first embodiment. Figure 5 In the schematic diagram of the land extraction results in Zhongchangfeng County, sub-region (A) is shown, where (a) is... Figure 5 (A) Original image of the sub-region, (b) Schematic diagram of the corresponding closed plot data.
[0029] Figure 7 is an illustration of the first embodiment. Figure 5 In the schematic diagram of the extraction results of the land parcel in Zhongchangfeng County, sub-region (B) is shown, where (a) is... Figure 5 (B) Original image of the sub-region, (b) is a schematic diagram of the corresponding closed plot data.
[0030] Figure 8 is an illustration of the first embodiment. Figure 5 In the schematic diagram of the extraction results of the land parcel in Zhongchangfeng County, sub-region (C) is shown, where (a) is... Figure 5 (C) Original image of the sub-region, (b) Schematic diagram of the corresponding closed plot data. Detailed Implementation
[0031] Various embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. The embodiments described with reference to the drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0032] Implementation Method 1: The automated extraction method for farmland plots described in this implementation method, such as... Figure 1 As shown, it includes the following steps: Step 1: Acquire high-resolution remote sensing images of the target area, construct samples from the high-resolution remote sensing images, and obtain an edge detection sample set; The sample construction includes: data preprocessing, anisotropic sharpening, sample region selection, sample labeling, and sample cropping. Step 2: Perform sample augmentation on the edge detection sample set to obtain an augmented edge detection sample set; The sample augmentation mentioned above is any one or more of the following four augmentation strategies: random scaling, random cropping, random rotation, and random color perturbation. Step 3: Based on the enhanced edge detection sample set, train the improved RCF network model to obtain the final improved RCF network model. Step four: The high-resolution remote sensing image of the target area described in step one is used to infer the edge probability map through the improved RCF network model; Step 5: Post-process the edge probability map to obtain closed plot data of the target area, and complete the automated extraction of farmland plots.
[0033] In this embodiment, the high-resolution remote sensing images mentioned in step one preferably consider image resolution, cloud cover, and temporal phase. The specific data selection rules are as follows: For major crop production areas, cloudless data during the crop growth period should be selected when acquiring high-resolution remote sensing images. For example, the key growth period for crops in Northeast my country is July-August, so data from July-August should be acquired. For orchard crop production areas, since the canopy of orchard crops during the vigorous growth period (dense foliage) will block the boundary information of roads, field ridges, etc., resulting in coarse plot extraction results, high-resolution remote sensing images during the fruit tree leaf fall period (e.g., autumn and winter) should be selected.
[0034] In this embodiment, the data preprocessing described in step one includes: radiometric calibration, atmospheric correction, geometric correction, orthorectification, image fusion, and image color balancing to obtain a preprocessed high-resolution remote sensing image.
[0035] In this embodiment, the anisotropic sharpening described in step one employs a direction-sensitive anisotropic sharpening algorithm to sharpen the preprocessed high-resolution remote sensing image, adjusting the sharpening operation according to the direction of the local structure of the image. Anisotropic sharpening performs strong sharpening in the edge direction and weak processing or even smoothing in the direction perpendicular to the edge (i.e., the gradient direction), thereby achieving the effect of enhancing edges while suppressing noise. The specific formula is as follows:
[0036] in, This is a pre-processed high-resolution remote sensing image after sharpening. It is the preprocessed high-resolution remote sensing image, It is the second derivative along the edge direction. It is the second derivative perpendicular to the edge direction. For overall sharpening intensity, It is a noise suppression factor.
[0037] In this embodiment, the sample area selection in step one needs to comprehensively consider multiple factors such as geography, temporal phase, and sensor characteristics; the sample area should include the following characteristics: comprehensiveness, covering different spatial and temporal phase variations; representativeness, accurately reflecting the essential characteristics of ground features; and balance, with a balanced spatial distribution without bias.
[0038] In this embodiment, the sample labeling in step one specifically refers to labeling as vector line features. The boundary information of ground features is mapped onto the remote sensing image as linear pixel distributions (such as field ridges), shadow boundaries, and color elevation difference boundaries (buildings, etc.). The narrow nature of edge information requires that the drawn vectors be closely aligned with the pixels representing the boundary information during sample labeling; otherwise, it will severely affect the model training effect. After the vectors are drawn, the vector label files are converted into raster label data according to the remote sensing image range and spatial resolution.
[0039] In this embodiment, the sample cropping in step one preferably involves cropping the high-resolution remote sensing image and the label raster to a size of 518*518 pixels.
[0040] In this embodiment, the four enhancement strategies described in step two are preferably: ① Random scaling, with a scaling ratio of 0.8-1.2 times the original input; ② Random cropping: the cropping area is a random size between 0.6 and 1.2 of the input, and the aspect ratio is a random size between 0.75 and 1.33. ③ Random rotation, with a rotation angle ranging from 0 to 90 degrees; ④ Random color perturbation, with a 50% probability of adjusting the input brightness and contrast; In this embodiment, step four is specifically as follows: Step 41: The main process divides the remote sensing image according to the inference sliding window size, with 10% pixel overlap between adjacent windows. Then, based on the number of windows, all windows are evenly divided into N parts (N represents the number of GPUs).
[0041] Step 42: The main process creates N child processes and allocates an inference window to each. Subsequently, each child process independently schedules a GPU to perform inference window by window according to its allocated window.
[0042] Step 43: The main process continuously writes the received inference results from the child processes to the disk and waits for all child processes to finish inference.
[0043] Step 44: After all child processes have finished inference, the main process writes the inference results that have not yet been written to disk to disk.
[0044] In this embodiment, the output value of the improved RCF network model described in step three is the probability that the pixel is the edge of the land parcel. The larger the value, the greater the probability that the pixel is the edge of the land parcel.
[0045] This implementation method is a high-quality, large-area-based automated farmland plot extraction method based on fused edge networks and segmentation algorithms. It can capture the geometric structure of complex farmland and the temporal dynamic changes of crop growth. It has a strong ability to distinguish between fragmented small plots and intercropping areas; it has strong segmentation robustness and good segmentation effect in heterogeneous terrains such as terraces and hills; it has good edge processing effect; the plots are closed and intact; and it has a high degree of automation.
[0046] Through a series of steps involving high-resolution remote sensing image selection and sample construction, strong edge information such as farmland roads and field ridges can be extracted. Simultaneously, non-physical edges (soft boundaries) between different crop plots within farmland should be identified, improving the model's robustness. The anisotropic sharpening technique preserves natural texture features and avoids artifacts that cause edge coarsening and false edge phenomena. The sample range selection rules improve the model's generalization ability and accuracy. The improved RCF network model not only accelerates convergence but also achieves better edge extraction. A complete post-processing workflow is designed to address the issue of incomplete edge closure in the edge probability map, obtaining fully closed plot boundaries.
[0047] To verify the actual effectiveness of this implementation method in the task of regional land parcel extraction, Changfeng County was selected as an example area. Changfeng County, under the jurisdiction of Hefei City, Anhui Province, is located in central Anhui Province, northern Hefei City, between the Yangtze and Huai Rivers. It borders Dingyuan County and Feidong County to the east, Shouxian County and Feixi County to the west, the main urban area of Hefei City to the south, and Huainan City to the north. The total area is 1841 square kilometers. The cultivated land area is 840 square kilometers, with both paddy fields and dry land distributed, mainly paddy fields, and the cultivated land is fragmented and complex.
[0048] After manual sample delineation, sample cropping, and feature enhancement, 1980 512*512 edge samples were obtained in Changfeng County. The sample data was input into the improved RCF network model. After 180,000 training iterations, the model achieved a good convergence effect and inferred the edge probability map of the county's land parcel information. Figure 4 shows a partial view of the edge probability map of Changfeng County. As shown in Figure 4, it is a comparison image of the partial view of the edge probability map of Changfeng County. In Figure 4, Figure 4(a) is a partial original image of Changfeng County, which has not been extracted for farmland parcels. Figure 4(b) is the edge probability map of Changfeng County after inference using the improved RCF network model described in this embodiment. Compared with Figure 4(a), the range of farmland parcels can be distinguished. The improved RCF network model fits the boundary information of farmland parcels very well and can basically extract all the usable edge information in the image.
[0049] After extracting the edge probability map, and combining it with the farmland masking data for the region, a segmentation algorithm was used to segment the land parcels, successfully extracting farmland parcel data for the entire Changfeng County. Statistics show that a total of 475,644 parcels were extracted, covering a total area of 1.24 million mu (approximately 86,667 hectares), with an average parcel size of 2.6 mu (approximately 0.04 hectares). The distribution is as follows: Figure 5 As shown in Figure 8. Figure 5 This is a schematic diagram of the land parcel extraction results in Changfeng County. (A), (B), and (C) indicate the locations of three sub-regions showcasing the land parcel extraction results, corresponding to the three highlighted yellow areas (AC) on the larger image. Figure 6 shows... Figure 5 The schematic diagram of the extraction results of the plot in Zhongchangfeng County shows sub-region (A), as shown in Figure 6(a). Figure 5 (A) The original image of the sub-region, which did not extract farmland plots in Changfeng County. Figure 6(b) is a schematic diagram of the closed plot data after extraction using the automated farmland plot extraction method described in this embodiment. Compared with Figure 6(a), this image has extracted farmland plots and obtained complete closed plot boundaries. Figure 7 is Figure 5 The schematic diagram of the extraction results of the plot in Zhongchangfeng County shows sub-region (B), as shown in Figure 7(a). Figure 5 (B) The original image of the sub-region, which did not have farmland plots extracted in Changfeng County. Figure 7(b) is a schematic diagram of the closed plot data after extraction using the automated farmland plot extraction method described in this embodiment. Compared with Figure 7(a), this image has extracted farmland plots and obtained complete closed plot boundaries. Figure 8 is Figure 5 In the schematic diagram of the extraction results of the plot in Zhongchangfeng County, sub-region (C) is shown in Figure 8(a). Figure 5(C) The original image of the sub-region, which did not extract farmland plots in Changfeng County. Figure 8(b) is a schematic diagram of closed plot data after extraction using the automated farmland plot extraction method described in this embodiment. Compared with Figure 8(a), the farmland plots were extracted and the complete closed plot boundaries were obtained.
[0050] Implementation Method Two: This implementation method further defines the automated farmland plot extraction method described in Implementation Method One. In this implementation method, the improved RCF network model described in step three, such as... Figure 2 As shown, specifically, the RCF network structure is divided into 5 stages, the pooling layers between different stages are removed, the network is modified to only obtain the feature map of the last layer of the network in each stage, and the classifier of the network's output layer is the Sigmoid function.
[0051] This implementation method is as follows: Figure 2 As shown, the blue box represents the convolutional module of the model, and the number 1 in the middle right of the black dashed box represents that the output channel of this layer is 1.
[0052] This embodiment further defines step three and describes the improved RCF network model. The improved RCF network model removes the pooling layers between different stages based on the RCF network structure, reduces the downsampling process of the feature maps, and avoids the loss of narrow edges caused by the shrinking of the feature maps. In addition, the network is modified to only obtain the feature maps of the last layer of the network in each stage to speed up model convergence.
[0053] Implementation Method 3: This implementation method further defines the automated farmland plot extraction method described in Implementation Method 1. In this implementation method, the post-processing in step five is as follows: Step 51: Obtain the farmland mask of the target area, and perform vector rasterization on the farmland mask to obtain a binarized farmland mask raster. Step 52: Perform threshold filtering on the edge probability map to obtain the filtered edge probability map; Step 53: Create a new marker image. Divide the marker image into a background region and a potential foreground region based on the farmland mask binarization raster. Divide the potential foreground region of the marker image into a foreground region and an uncertain region based on the farmland mask binarization raster and the filtered edge probability map. Obtain a marker image with divided background, foreground, and uncertain regions. Step 54: The marker image obtained in step 53 and the high-resolution remote sensing image of the target area described in step 4 are segmented using the watershed segmentation algorithm to obtain the farmland plot edge results. Step 55: By adding the farmland mask binarized raster obtained in step 51 and the farmland plot edge results obtained in step 54, a refined farmland plot edge result is obtained. Step 56: Perform a raster conversion operation on the detailed farmland plot edge results to obtain a boundary line vector layer; simplify the boundary line vector layer into lines and vectorize the surface to obtain closed plot data of the target area.
[0054] In this embodiment, the farmland mask mentioned in step 51 is the farmland distribution of the area to be extracted, which is referred to as the farmland mask in this embodiment; the farmland mask uses third-level survey data, and in practical applications, it can be obtained by combining a semantic segmentation model.
[0055] In this embodiment, vector rasterization refers to converting the data into a binary raster with the same size and resolution as the original remote sensing image in the original remote sensing image coordinate system. A raster value of 0 represents non-farmland areas, and a value of 1 represents farmland areas. If the farmland mask data itself is in raster format, this process can be ignored.
[0056] In this embodiment, the threshold filtering is preferably set to a threshold of 80, and the pixel values with a value lower than 80 in the edge probability map are set to 0. 80 is an empirical value, which can be adjusted according to the actual situation in practical applications.
[0057] In this embodiment, the newly created marker image refers to a newly created marker image with an initial value of 0, and whose coordinate system, pixel resolution, and image size are consistent with the original high-resolution image.
[0058] In this embodiment, the farmland mask binarization raster divides the marker image into a background area and a potential foreground area. Specifically, the area with a raster value of 0 in the farmland mask binarization raster is set as the background in the marker image, and its value is 0; the area with a raster value of 1 in the farmland mask binarization raster is set as the potential foreground in the marker image, and its value is 1.
[0059] In this embodiment, the boundary line vector layer described in step 56 is simplified. The optional parameter for line simplification is the distance between the simplification points. The distance parameter setting is related to the shape of the farmland plots in the region. For areas with fragmented plots, the simplification distance is smaller, while for areas with regular plots and larger areas, the simplification distance is larger.
[0060] This implementation further defines step five and provides an example of the post-processing scheme. The method first obtains a farmland mask for the target area and performs threshold filtering on the edge probability map to obtain a filtered edge probability map. Then, the farmland mask data is used as the outer boundary constraint of the plot range. Based on the edge information in the edge probability map, a watershed segmentation algorithm is used to obtain closed farmland plots. This method solves the problem of non-closed edge information in the edge probability map, obtaining closed farmland plots. The threshold filtering can suppress edge noise in the edge probability map, especially suppressing noise at the image inference window boundaries, thus avoiding over-segmentation of narrow-shaped farmland plots due to noise. Figure 3 shows a comparison of the threshold filtering example described in this embodiment. In Figure 3, Figure 3(a) is the original image without farmland plot extraction, Figure 3(b) is the image after inference using the improved RCF network model described in this embodiment, and the range of farmland plots can be distinguished by comparing this image with Figure 3(a), and Figure 3(c) is an example image after threshold filtering described in this embodiment. Compared with Figure 3(b), the reduction of boundary noise can be observed, verifying the effect of threshold filtering on suppressing edge noise in the edge probability map.
[0061] Implementation Method Four: This implementation method further defines the automated farmland plot extraction method described in Implementation Method Three. In this implementation method, the method for dividing the potential foreground region of the marker image into a foreground region and an uncertain region in step 53 is as follows: Step 531: Perform image dilation on the filtered edge probability map to obtain a binarized image of the filtered edge probability map. Divide the binarized image into non-edge regions and potential edge regions, and take the potential edge regions as uncertain regions one. Step 532: Based on the aforementioned farmland mask binarized raster, calculate the number of pixels in the region outside the first uncertain region within the potential foreground region, and set the region with less than 200 pixels as the second uncertain region. Step 533: Mask the marker image according to the uncertain region one and uncertain region two to obtain the masked region, divide the masked region into the foreground region, and divide the parts of uncertain region one and uncertain region two that are not the masked region into uncertain regions.
[0062] In this embodiment, the image dilation in step 531 preferably uses an operator with a convolution kernel of 4×4 and a selection number of 1. Its parameters can be adjusted according to the specific effect. The filtered edge probability map after dilation is a binary image, where 0 represents non-edge regions and 1 represents potential edge regions. The potential edge regions are uncertain regions.
[0063] In this embodiment, the area with fewer than 200 pixels mentioned in step 532 refers to the broken patches in the binary raster of the farmland mask. The range of pixel count should be selected according to the farmland conditions in the target area. In northern areas where farmland is regular in shape and the plot area is large, the threshold should be appropriately increased. In southern areas where the plot shape is broken, the threshold should be appropriately decreased.
[0064] This embodiment further defines step 53 and provides an example of a potential foreground region segmentation scheme for the marker image. This method improves the overall classification accuracy, optimizes processing efficiency and resource allocation by dividing the foreground region and the uncertain region, as well as dividing the uncertain region one and the uncertain region two. It is a refined segmentation method.
[0065] Implementation method five is a further limitation on the automated farmland plot extraction method described in implementation method three. In this implementation method, the segmentation using the watershed segmentation algorithm in step 54 is as follows: Step 541: Use the fndContoms method of cv2 to perform a connected component query on the marker image and obtain the queried marker image; Step 542: Reclassify the queried label image. The reclassification process is to first add 1 to the queried label image, and then use the uncertain region 1 in step 531 and the uncertain region 2 in step 532 to mask the label image. The value of the label image in the masked region is set to 0 to obtain the reclassified label image. Step 543: Use the watershed algorithm of cv2 to perform watershed segmentation on the reclassified marker image and the remote sensing image of the marker image and the target area to obtain the farmland plot edge results.
[0066] Implementation Method Six: This implementation method further defines the automated farmland plot extraction method described in Implementation Method Three. In this implementation method, step 55 includes: Step 551: Extract the edge of the farmland mask binarized grid using the Canny operator to obtain the farmland mask edge result; Step 552: Subtract the farmland plot edge result from the farmland mask edge result, and then use the skeletonize function to obtain the farmland mask edge result after extracting the skeleton line; Step 553: Add the extracted skeleton lines to the binarized raster of the cultivated land mask to obtain the refined edge result of the farmland plot.
[0067] In this embodiment, the parameters of the Canny operator are preferably set to a low-pass threshold of 50 and a high-pass threshold of 100.
[0068] This embodiment further defines step 55 and provides an example of a scheme for obtaining fine farmland plot edge results. This method processes the binarized raster of cultivated land mask and the farmland plot edge results using the Canny operator and the skeletonize function, providing higher resolution and finer cultivated land mask information. Then, by processing the results using the above-mentioned process, the farmland plot edge results described in step 54 can be detected, corrected, and supplemented, ultimately generating fine farmland plot boundaries with significantly improved accuracy.
Claims
1. An automated extraction method for agricultural field parcels, characterized by, The method comprises the following steps: Step one, obtaining high-resolution remote sensing images of a target area, constructing samples of the high-resolution remote sensing images, and obtaining an edge detection sample set; The sample construction comprises data preprocessing, anisotropic sharpening, sample area screening, sample label annotation, and sample cropping; Step two, performing sample enhancement on the edge detection sample set to obtain an enhanced edge detection sample set; The sample enhancement is a combination of any one or more of the following four enhancement strategies: random scale, random cropping, random rotation, and random color disturbance; Step three, training an improved RCF network model based on the enhanced edge detection sample set, and obtaining a final improved RCF network model after training; Step four, performing inference on the high-resolution remote sensing images of the target area in step one by using the improved RCF network model to obtain an edge probability map; Step five, performing post-processing on the edge probability map to obtain closed land data of the target area, and completing automatic extraction of farmland plots.
2. The farm field parcel automated extraction method of claim 1, wherein, The improved RCF network model in step three is specifically obtained by removing the pooling layer between different stages of the RCF network structure, modifying the network to only obtain the feature map of the last layer of each stage, and using a Sigmoid function as the classifier of the output layer of the network.
3. The farm field parcel automated extraction method of claim 1, wherein, The post-processing in step five comprises the following steps: Step 51, obtaining a cultivated land mask of the target area, performing vector rasterization on the cultivated land mask to obtain a binary raster of the cultivated land mask; Step 52, performing threshold filtering on the edge probability map to obtain a filtered edge probability map; Step 53, creating a marker image, dividing the marker image into a background region and a potential foreground region according to the binary raster of the cultivated land mask, dividing the potential foreground region of the marker image into a foreground region and an uncertain region according to the binary raster of the cultivated land mask and the filtered edge probability map, and obtaining a marker image with a divided background region, foreground region, and uncertain region; Step 54, performing watershed segmentation on the marker image obtained in step 53 and the high-resolution remote sensing image of the target area in step four to obtain farmland plot edge results; Step 55, adding the binary raster of the cultivated land mask obtained in step 51 and the farmland plot edge results obtained in step 54 to obtain fine farmland plot edge results; Step 56, performing a raster conversion operation on the fine farmland plot edge results to obtain a boundary line vector layer, performing line simplification and face vectorization on the boundary line vector layer, and obtaining closed land data of the target area.
4. The farm field parcel automated extraction method of claim 3, wherein, The method for dividing the potential foreground region of the marker image into a foreground region and an uncertain region in step 53 comprises the following steps: Step 531, performing image dilation on the filtered edge probability map to obtain a binary image of the filtered edge probability map, dividing the binary image into a non-edge region and a potential edge region, and taking the potential edge region as an uncertain region one; Step 532, based on the cultivated land mask binaryzation grid, calculate the number of pixels in the uncertain region two outside the uncertain region one in the potential foreground region, and set the region with the number of pixels less than 200 as the uncertain region two; Step 533, according to the uncertain region one and the uncertain region two, mask the logo image to obtain a mask region, divide the mask region into a foreground region, and divide the part of the uncertain region one and the uncertain region two which is not the mask region into an uncertain region.
5. The farm field parcel automated extraction method of claim 3, wherein, Step 55 includes: Step 551, the cultivated land mask binaryzation grid is extracted by Canny operator edge, and the cultivated land mask edge result is obtained; Step 552, subtract the farmland plot edge result from the cultivated land mask edge result, and then use the skeetomize function to obtain the cultivated land mask edge result after extracting the skeleton line; Step 553, add the cultivated land mask binaryzation grid to the cultivated land mask edge result after extracting the skeleton line to obtain the fine farmland plot edge result.
6. An automated extraction system for agricultural field parcels, comprising: It includes the following modules: Module one, for the high-resolution remote sensing image of the target region, sample construction is carried out on the high-resolution remote sensing image to obtain an edge detection sample set; The module one further includes: Sample construction submodule: for data preprocessing, anisotropy sharpening, sample region screening, sample label annotation and sample cropping; Module two, for sample enhancement of the edge detection sample set, to obtain an enhanced edge detection sample set; The module two further includes: Sample enhancement submodule, for any one or more combinations of the following four enhancement strategies: random scale, random cropping, random rotation and random color disturbance; Module three, for training the improved RCF network model based on the enhanced edge detection sample set, and obtaining the final improved RCF network model after training; Module four, for passing the high-resolution remote sensing image of the target region in step one through the improved RCF network model for inference to obtain an edge probability map; Module five, post-processing the edge probability map to obtain the closed plot data of the target region, and completing the automatic extraction of farmland plot.
7. An electronic device, comprising: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to execute the programs stored on the memory to realize the farmland plot automatic extraction method in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the farmland plot automatic extraction method in any one of claims 1-5. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the farmland plot automatic extraction method in any one of claims 1-5.
Citation Information
Patent Citations
Image instance segmentation method, device, apparatus, and storage medium
CN109242869A
Remote sensing image plot extraction method and system based on deep learning
CN113763396A
Remote sensing image cultivated land parcel extraction method combining edge detection and multi-task learning
CN114821315A
