A method and system for high-precision crop mapping
Through a high-precision mapping method based on a random forest classifier, Landsat surface reflectance images and morphological processing are used to solve the problem of insufficient accuracy in crop spatial distribution mapping, achieve accurate monitoring and assessment of crop distribution areas, and improve Cartographic accuracy.
Patent Information
- Application Number
- CN202111643634.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-12-29
AI Technical Summary
Due to the difficulty in collecting high-quality samples and the interference of spatiotemporal heterogeneity, the existing technology has insufficient accuracy in crop spatial distribution mapping and is difficult to meet the needs of food security and environmental sustainable development.
A high-precision mapping method based on Landsat surface reflectance images is used, and a random forest classifier training model is used to obtain monthly average time-series synthetic images to conduct precise monitoring and evaluation of crop spatial distribution, combined with morphological image processing and grid unit division. Automatically collect crop sampling points to improve mapping accuracy.
It achieves more precise monitoring and assessment of crop distribution areas, improves mapping accuracy, meets the needs of agricultural remote sensing production estimation, and reduces the uncertainty in extracting crop sampling points.
Smart Images

Figure CN114419367B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of agricultural remote sensing technology, and in particular to a method and system for high-precision crop mapping. Background Art
[0002] Rapid population growth and complex climate change have brought tremendous pressure to global food security. Monitoring the spatial distribution of crops is one of the important foundations for regulating agricultural production and adjusting planting structure. Timely and accurate mapping of high-precision crop distribution is crucial to food security and environmental sustainable development.
[0003] With the increasing maturity of satellite remote sensing and ground monitoring technologies, crop monitoring is becoming more and more accurate. Remote sensing technology is playing a positive role in crop mapping and evaluation. However, since high-quality crop samples are difficult to collect and mapping of large-scale crop distribution areas is also interfered by obvious spatiotemporal heterogeneity, the accuracy of crop spatial distribution mapping is severely limited.
[0004] Therefore, there is an urgent need for a high-precision crop mapping method and system to solve the above problems. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides a method and system for high-precision crop mapping.
[0006] The present invention provides a method for high-precision crop mapping, comprising:
[0007] Based on the land satellite surface reflectance images of the target area in a preset year, a set of monthly mean time-series synthetic images corresponding to the target area is obtained;
[0008] The monthly mean time series synthetic image set is input into a trained classification model to obtain a spatial distribution mapping result of crops in the target area within the preset year, wherein the trained classification model is obtained by training a random forest classifier using crop sampling points having pixel features of monthly mean time series synthetic images of crops.
[0009] According to a high-precision crop mapping method provided by the present invention, the trained classification model is obtained by the following steps:
[0010] Performing mean processing on sample land satellite surface reflectance images of target crops within the growth period to obtain a sample monthly mean time series synthetic image set, and obtaining historical crop distribution area remote sensing image data of the area corresponding to the sample land satellite surface reflectance images;
[0011] Performing morphological image processing on the remote sensing image data of the historical crop distribution area to obtain an image of the crop planting area, and determining all the crop sampling points in the image of the crop planting area;
[0012] Based on the types of crops in the crop planting area image, labeling the crop sampling points with corresponding crop sampling point type labels to obtain labeled crop sampling points;
[0013] According to the pixel values of the images in the sample monthly mean time series synthetic image set, the pixel features of the corresponding crop monthly mean time series synthetic images are matched to the labeled crop sampling points to construct a training sample set;
[0014] The training sample set is input into a random forest classifier for training to obtain a trained classification model.
[0015] According to a high-precision crop mapping method provided by the present invention, the morphological image processing is performed on the remote sensing image data of the historical crop distribution area to obtain the crop planting area image, and all the crop sampling points in the crop planting area image are determined, including:
[0016] Determine the sample image of the initial crop planting area based on the intersection area images between the remote sensing image data of the historical crop distribution areas in different years;
[0017] Performing image corrosion processing on the initial crop planting area sample image to obtain an image of the crop planting area;
[0018] Extracting the centroid of the crop planting area image to determine a first initial crop sample sampling point in the crop planting area image;
[0019] Deleting a second initial crop sample sampling point in the first initial crop sample sampling point, and acquiring a third initial crop sample sampling point; wherein the second initial crop sample sampling point is a first initial crop sample sampling point outside the boundary of the crop area in the crop planting area image;
[0020] The third initial crop sample sampling points are judged, and the third initial crop samples that meet the preset segmentation threshold are determined as the corresponding crop sampling points in the crop planting area image.
[0021] According to a method for high-precision mapping of crops provided by the present invention, before performing morphological image processing on the remote sensing image data of the historical crop distribution area to obtain the image of the crop planting area, the method further includes:
[0022] Dividing the remote sensing image data of the historical crop distribution area into a plurality of grid units of the same specification;
[0023] The step of inputting the training sample set into a random forest classifier for training to obtain a trained classification model comprises:
[0024] Step S1, based on the preset selection conditions and the training sample set, determine the initial grid unit, and construct an initial sampling point sample library through the crop sampling points and non-crop sampling points in the initial grid unit;
[0025] Step S2, inputting the sampling points in the initial sampling point sample library into a random forest classifier to obtain an initial classification model;
[0026] Step S3, determining the crop sampling area grid unit of the sample monthly mean time series synthetic image set according to the initial grid unit, obtaining a crop sampling area sample image set constructed based on the crop sampling area grid unit, and inputting the crop sampling area sample image set into the initial classification model, outputting the prediction accuracy corresponding to each crop sampling area grid unit in the crop sampling area sample image set, and obtaining a second classification model;
[0027] Step S4, storing the crop sampling points and non-crop sampling points of the grid unit of the crop sampling area with the lowest prediction accuracy in the initial sampling point sample library to obtain the target sampling point sample library;
[0028] Step S5, inputting the crop sampling points and non-crop sampling points in the target sampling point sample library into the second classification model for training;
[0029] Step S6, after the current round of training is completed, the crop sampling points and non-crop sampling points in the grid unit of the crop sampling area with the lowest prediction accuracy are added to the target sampling point sample library again to obtain an updated target sampling point sample library, and steps S5 to S6 are repeated to obtain a trained classification model after the preset training conditions are met.
[0030] According to a high-precision crop mapping method provided by the present invention, the method of obtaining a set of monthly mean time-series synthetic images corresponding to a target area based on a land satellite surface reflectance image of the target area in a preset year comprises:
[0031] Obtain monthly Landsat surface reflectance images of the target area within a preset year;
[0032] Performing mean processing on the monthly land satellite surface reflectance images respectively, and determining the band characteristics of the land satellite surface reflectance images after the mean processing, to obtain a set of monthly mean time series synthetic images corresponding to the target area;
[0033] The band characteristics include a red band, a green band, a blue band, a near infrared band, a shortwave infrared 1 band, a shortwave infrared 2 band and a normalized vegetation index band, and the normalized vegetation index band is calculated based on the red band and the near infrared band.
[0034] According to a method for high-precision crop mapping provided by the present invention, after inputting the training sample set into a random forest classifier for training to obtain a trained classification model, the method further includes:
[0035] Based on the sample monthly mean time series synthetic image set of the target crop each year, the sample monthly mean time series synthetic image set of each year is sequentially input into the trained classification model according to the time series relationship to obtain the prediction results corresponding to each sample monthly mean time series synthetic image set of each year;
[0036] According to the prediction results, determine a target sample monthly mean time series synthetic image set, wherein the target sample monthly mean time series synthetic image set is a sample monthly mean time series synthetic image set of the year corresponding to the lowest prediction accuracy;
[0037] Determine the target historical crop distribution area remote sensing image data of the corresponding year according to the target sample monthly mean time series synthetic image set, and optimize the parameters of the trained classification model through the target historical crop distribution area remote sensing image data to obtain the crop annual classification model for crop time series distribution mapping;
[0038] A set of monthly mean time-series synthetic images of multiple preset years is input into the crop annual classification model to obtain a crop time-series distribution mapping result of the target area.
[0039] The present invention also provides a high-precision crop mapping system, comprising:
[0040] A crop remote sensing image acquisition module is used to acquire a set of monthly average time-series synthetic images corresponding to a target area based on a land satellite surface reflectance image of the target area in a preset year;
[0041] The crop distribution area mapping module is used to input the monthly mean time series synthetic image set into the trained classification model to obtain the crop spatial distribution mapping result of the target area in the preset year, wherein the trained classification model is obtained by marking the crop sampling points with the pixel characteristics of the monthly mean time series synthetic image of the crop, and training the random forest classifier.
[0042] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for high-precision crop mapping are implemented.
[0043] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for high-precision crop mapping.
[0044] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for high-precision crop mapping.
[0045] The present invention provides a high-precision crop mapping method and system, which obtains land satellite surface reflectance images of crop areas, classifies the land satellite surface reflectance images based on a classification model trained by a random forest classifier, and obtains a more accurate spatial distribution map of the crop areas, thereby more accurately monitoring and evaluating the crop distribution areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A schematic diagram of the process flow of the high-precision crop mapping method provided by the present invention;
[0048] Figure 2 A schematic diagram of the crop sampling point extraction process provided by the present invention;
[0049] Figure 3 A schematic diagram of the spatial classification process of crop sampling points provided by the present invention;
[0050] Figure 4 A schematic diagram of the time series classification process of crop sampling points provided by the present invention;
[0051] Figure 5 A schematic diagram of the structure of the high-precision crop mapping system provided by the present invention;
[0052] Figure 6 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Agricultural planting structures are diverse, and plots are small and scattered. The spatial resolution of crop distribution maps based on existing remote sensing images often brings about the problem of mixed pixels. There are also many uncertainties in factors such as training samples, atmospheric interference, image preprocessing, and machine learning algorithms in classification. These factors significantly limit the accuracy of crop spatial distribution mapping, making it difficult for mapping accuracy to meet the needs of agricultural remote sensing yield estimation. Based on an adaptive strategy, the present invention automatically collects crop sampling points through a machine learning method to achieve high-precision mapping of crop distribution areas, thereby conducting more accurate crop monitoring.
[0055] Figure 1 A schematic diagram of the process of the high-precision crop mapping method provided by the present invention is shown in FIG. Figure 1 As shown, the present invention provides a method for high-precision crop mapping, comprising:
[0056] Step 101, based on the land satellite surface reflectance image of the target area in a preset year, obtain a set of monthly mean time-series synthetic images corresponding to the target area.
[0057] In the present invention, a certain area where corn crops are grown is used as the target area for illustration, so that the corn crop distribution area and non-corn crop areas (including other crop areas other than corn crops and non-crop areas) in the area are reflected in the final crop spatial distribution map.
[0058] First, determine the mapping year of the target area, for example, it is necessary to make a corn crop distribution map of the target area in 2017. Specifically, according to the land satellite surface reflectance image of the target area in the preset year, obtain the monthly mean time series synthetic image set corresponding to the target area, including:
[0059] Obtain monthly Landsat surface reflectance images of the target area within a preset year;
[0060] Performing mean processing on the monthly land satellite surface reflectance images respectively, and determining the band characteristics of the land satellite surface reflectance images after the mean processing, to obtain a set of monthly mean time series synthetic images corresponding to the target area;
[0061] The band characteristics include a red band, a green band, a blue band, a near infrared band, a shortwave infrared 1 band, a shortwave infrared 2 band and a normalized vegetation index band, and the normalized vegetation index band is calculated based on the red band and the near infrared band.
[0062] In the present invention, the Landsat Surface Reflectance images of each month in the corresponding mapping year of the target area are collected to construct the monthly average time series synthetic images of the mapping year, that is, the average of the images of each month from January to December is calculated according to the month to obtain 12 monthly average time series synthetic images; further, the red band, green band, blue band, near infrared band, short wave infrared 1 band, short wave infrared 2 band and Normalized Difference Vegetation Index (NDVI) band in the 12 monthly average time series synthetic images are selected to construct the monthly average time series synthetic image set of the target area in 2017, wherein the NDVI band is calculated from the red band and the near infrared band by the following formula:
[0063] NDVI = (NIR-R) / (NIR+R);
[0064] Among them, NDVI is the normalized vegetation index, NIR is the reflectance value of the near-red band, and R is the reflectance value of the red band.
[0065] Step 102, input the monthly mean time series synthetic image set into the trained classification model to obtain the spatial distribution mapping result of crops in the target area in the preset year, wherein the trained classification model is obtained by training a random forest classifier with crop sampling points having pixel characteristics of the monthly mean time series synthetic images of crops.
[0066] In the present invention, the trained classification model is obtained by training a random forest classifier. After the monthly average time series synthetic image set of the target area in 2017 is input into the classification model, the spatial distribution mapping result of the corn crop in the target area is output, that is, the classification model can classify the images in the monthly average time series synthetic image set, so that the output spatial distribution mapping can more accurately reflect the distribution area of the corn crop.
[0067] The high-precision crop mapping method provided by the present invention obtains land satellite surface reflectance images of crop areas, and classifies the land satellite surface reflectance images based on a classification model trained by a random forest classifier to obtain a more accurate spatial distribution map of the crop areas, thereby more accurately monitoring and evaluating the crop distribution areas.
[0068] Based on the above embodiment, the trained classification model is obtained by the following steps:
[0069] Step 201, perform mean processing on sample land satellite surface reflectance images of target crops within the growth cycle to obtain a sample monthly mean time series synthetic image set, and obtain historical crop distribution area remote sensing image data of the area corresponding to the sample land satellite surface reflectance images.
[0070] In the present invention, sample land satellite surface reflectance images are obtained during the growth cycle of corn crops (in months), and then seven bands, namely red band, green band, blue band, near infrared band, shortwave infrared 1 band, shortwave infrared 2 band and normalized vegetation index, are selected from the images to construct a sample monthly mean time series synthetic image set. Preferably, in order to reduce the uncertainty of the model in extracting crop sampling points, considering the farming method of crop rotation, samples are obtained in consecutive odd or even years. For example, taking the stable corn crop sampling points in 2017 as an example, sample land satellite surface reflectance images of corn crops in 2015, 2017 and 2019 are obtained, and the historical crop distribution area remote sensing image data of the corresponding years are obtained at the same time for constructing subsequent training sample sets. It should be noted that in the present invention, remote sensing images of actual months can be selected according to the growth cycle of different crops. For example, sample land satellite surface reflectance images from January to December in a certain area are obtained. Furthermore, according to the growth cycle of corn crops, sample land satellite surface reflectance images from April to October are selected.
[0071] Furthermore, based on the area corresponding to the sample land satellite surface reflectance image, the historical crop distribution area remote sensing image data of the area is simultaneously obtained. In the present invention, the resolution of the sample land satellite surface reflectance image and the historical crop distribution area remote sensing image data are consistent, so that when the sampling points and pixel features are subsequently matched, the pixel features corresponding to the sampling points can be more accurately assigned.
[0072] Step 202, performing morphological image processing on the remote sensing image data of the historical crop distribution area, obtaining an image of the crop planting area, and determining all the crop sampling points in the image of the crop planting area.
[0073] The crop sampling points can be determined based on historical crop classification data. Preferably, in the present invention, after morphological image processing is performed on the remote sensing image data of the historical crop distribution area, the crop planting area images between the remote sensing images are determined, and then the corresponding crop sample sampling points in the target area image are determined by image centroid extraction and threshold comparison. In the present invention, based on the 7 bands in the land satellite surface reflectance image, the pixel characteristics of the target crops in the growth cycle are corresponding, and according to these pixel characteristics, the band pixel values of different months of the growth period corresponding to the location are added to the crop sample sampling points, so that the crop sampling points have the pixel characteristics of the monthly average time series synthetic image of the crops. It should be noted that in the present invention, each sampling point also includes corresponding longitude and latitude information.
[0074] Preferably, in the present invention, when extracting crop sampling points from the remote sensing image data of the historical crop distribution area, a crop sampling point automatic extraction model can be constructed, and the model can be implemented based on the crop sampling point extraction method. Specifically, after the remote sensing image data of the historical crop distribution area of corn crops is input into the crop sampling point automatic extraction model, the model first preliminarily determines a corn crop planting area image based on the intersection between the remote sensing image data of the historical crop distribution area of corn crops in different years; then, the preliminarily obtained corn crop planting area image is subjected to relevant image processing (for example, image corrosion processing) to obtain a stable corn crop planting area image; then, the centroid of the stable corn crop planting area image is extracted to preliminarily determine the corn crop sampling points on the area image, and the corn crop sampling points outside the corn crop planting area boundary on the corn crop planting area image are removed, and the corn crop sampling points within the corn crop planting area boundary are retained; finally, based on the preset segmentation threshold, the corn crop sampling points within the corn crop planting area boundary are screened, and the final corn sampling points are output.
[0075] Step 203, based on the types of crops in the crop planting area image, the crop sampling points are marked with corresponding crop sampling point type labels to obtain the marked crop sampling points;
[0076] Step 204, according to the pixel values of the images in the sample monthly mean time series synthetic image set, the pixel features of the corresponding crop monthly mean time series synthetic images are matched to the labeled crop sampling points to construct a training sample set.
[0077] In the present invention, based on the crop sampling points determined in the above embodiment, the crop sampling points are marked with corresponding type labels according to the crop types. Preferably, the historical crop distribution area remote sensing image data used in the present invention is CDL (Cropland Data Layer) data, that is, by obtaining the CDL data corresponding to the sample monthly average time series synthetic image, the type labels are marked for the crop sampling points in the crop planting area image corresponding to the CDL data, thereby completing the crop sampling point type label marking of the historical crop distribution area remote sensing image data; further, according to the pixel value of the corresponding position of the crop sampling point in the sample monthly average time series synthetic image (determined based on the latitude and longitude coordinate information of the crop sampling point), the crop sampling point is matched with the corresponding crop monthly average time series synthetic image pixel feature, thereby giving features to each crop sampling point, and constructing a training sample set with these crop sampling points after giving features. In the training sample set, the crop sampling points contain the crop growth period pixel features extracted from the sample monthly average time series synthetic image set, and the crop sampling points are all marked with crop sampling point type labels.
[0078] Step 204: input the training sample set into a random forest classifier for training to obtain a trained classification model.
[0079] In the present invention, when the number of training times reaches a preset number, the training is stopped to obtain a trained classification model. Preferably, in each training process, if the result output by the model meets a preset accuracy threshold, for example, the prediction accuracy reaches more than 90%, the model is judged to have completed training.
[0080] Based on the above embodiment, the morphological image processing is performed on the remote sensing image data of the historical crop distribution area to obtain the crop planting area image, and all the crop sampling points in the crop planting area image are determined, including:
[0081] Determine the sample image of the initial crop planting area based on the intersection area images between the remote sensing image data of the historical crop distribution areas in different years;
[0082] Performing image corrosion processing on the initial crop planting area sample image to obtain an image of the crop planting area;
[0083] Extracting the centroid of the crop planting area image to determine a first initial crop sample sampling point in the crop planting area image;
[0084] Deleting a second initial crop sample sampling point in the first initial crop sample sampling point, and acquiring a third initial crop sample sampling point; wherein the second initial crop sample sampling point is a first initial crop sample sampling point outside the boundary of the crop area in the crop planting area image;
[0085] The third initial crop sample sampling points are judged, and the third initial crop samples that meet the preset segmentation threshold are determined as the corresponding crop sampling points in the crop planting area image.
[0086] In the present invention, there are crop intersection areas between the remote sensing image data of historical crop distribution areas in different years. For example, as the time series changes, the planting area in a certain area in the remote sensing image data will change, but there will be certain stable areas overall, that is, in the growth cycle of crops, there will be a certain range of planting areas where the same crop is stably planted. Therefore, the intersection area is determined from the remote sensing image data of the historical crop distribution area, and the image corresponding to the intersection area is used as the initial crop planting area sample image.
[0087] Furthermore, the morphological image processing method is used to process the boundary of the initial crop planting area sample image through corrosion operation, further reducing the stable corn crop distribution area, so as to continue to reduce the uncertainty of extracting crop sampling points and output the stable corn crop planting area. Then, the first initial crop sample sampling point in the crop planting area image is obtained by extracting the centroid of the crop planting area image after the corrosion boundary.
[0088] Furthermore, in actual crop areas, there may be some concave polygonal crop areas, resulting in some of the extracted first initial crop sample sampling points being distributed outside the concave polygons. The present invention defines the first initial crop sample sampling points distributed outside the boundary of the concave polygonal crop area as second initial crop sample sampling points. It is necessary to delete these sampling points distributed outside the crop area from the first initial crop sample sampling points, and use the remaining sampling points as third initial crop sample sampling points.
[0089] Then, the mean and standard deviation of the monthly NDVI corresponding to all the third initial crop sample sampling points are calculated respectively, and the corn crop sampling points and non-corn crop sampling points of each month in the third initial crop sample sampling points are determined by presetting the segmentation threshold, and the corn crop sampling points are stored in the crop sampling point sample library, and the non-corn crop sampling points (non-crop sampling points) are stored in the non-crop sampling point sample library.
[0090] Specifically, according to the normalized vegetation index mean and the normalized vegetation index standard deviation of all the third initial crop sample sampling points in different months, a preset segmentation threshold is constructed, and the preset segmentation threshold includes a first threshold TH1 and a second threshold TH2, and the formula is:
[0091]
[0092]
[0093] in, and They are the two segmentation thresholds (0≤TH1 <TH2≤1),μ m and δ m are the mean NDVI and standard deviation of NDVI in the mth month at all sampling points of the third initial crop samples, and n is 1.5. Figure 2 This is a schematic diagram of the crop sampling point extraction process provided by the present invention. The specific process of automatic extraction of corn crop sampling points can be referred to Figure 2 As shown, the sampling points are screened month by month according to the growing season of crops.
[0094] If the normalized vegetation index corresponding to the third initial crop sample sampling point is greater than or equal to the first threshold and less than or equal to the second threshold, it is determined that the third initial crop sample sampling point is a crop sampling point in the crop planting area image; otherwise, it is determined that the third initial crop sample sampling point is an uncertain crop sampling point. That is, the third initial crop sample sampling point whose time series NDVI is between TH1 and TH2 during the growth period is retained as an accurate corn crop sampling point (crop sampling point).
[0095] On the basis of the above embodiment, before performing morphological image processing on the remote sensing image data of the historical crop distribution area to obtain the crop planting area image, the method further includes:
[0096] A plurality of grid units of the same specification are divided in the remote sensing image data of the historical crop distribution area.
[0097] In the present invention, the historical crop distribution area remote sensing image data is divided into multiple grid units through a preset range grid, and its basic unit is a square with a size of 50km×50km. It should be noted that the present invention does not specifically limit the size and shape of the grid unit, and it can also be a rhombus or triangle. Correspondingly, the sample monthly mean time series synthetic image set corresponding to the historical crop distribution area remote sensing image data is also divided into grid units of the same specifications. It should be noted that since the resolution of the sample land satellite surface reflectance image and the historical crop distribution area remote sensing image data is consistent, it can be understood that any grid unit in the historical crop distribution area remote sensing image data also has a grid unit at the corresponding position in the sample land satellite surface reflectance image or the sample monthly mean time series synthetic image, representing the same area.
[0098] The step of inputting the training sample set into a random forest classifier for training to obtain a trained classification model comprises:
[0099] Step S1, based on preset selection conditions and the training sample set, determine the initial grid unit, and construct an initial sampling point sample library through the crop sampling points and non-crop sampling points in the initial grid unit;
[0100] Step S2, inputting the sampling points in the initial sampling point sample library into a random forest classifier to obtain an initial classification model.
[0101] In the present invention, based on the historical crop distribution area remote sensing image data that has been divided into grid units in the early stage, the crop planting area image is obtained, and the grid unit with a relatively concentrated corn crop planting area (there are many crop sampling points, and the present invention does not specifically limit the selection requirements. Selecting grid units with relatively concentrated sampling points can improve the model classification performance) is selected from the crop planting area image as the preliminary corn crop sampling area, that is, the initial grid unit. At the same time, a preset crop sampling area range is set, which is used to determine the required crop sampling area grid unit based on the preset crop sampling area range when constructing the crop sampling area sample image later.
[0102] After determining the initial grid unit, an initial sampling point sample library is constructed through the crop sampling points and non-crop sampling points in the initial grid unit, wherein the initial sampling point sample library includes a crop sampling point sample library and a non-crop sampling point sample library; then, the sampling points in the initial sampling point sample library are input into a random forest classifier for training, thereby obtaining an initial classification model.
[0103] Step S3, determining the crop sampling area grid unit of the sample monthly mean time series synthetic image set according to the initial grid unit, obtaining a crop sampling area sample image set constructed based on the crop sampling area grid unit, and inputting the crop sampling area sample image set into the initial classification model, outputting the prediction accuracy corresponding to each crop sampling area grid unit in the crop sampling area sample image set, and obtaining a second classification model;
[0104] Step S4, storing the crop sampling points and non-crop sampling points of the grid unit of the crop sampling area with the lowest prediction accuracy in the initial sampling point sample library to obtain the target sampling point sample library;
[0105] Step S5, inputting the crop sampling points and non-crop sampling points in the target sampling point sample library into the second classification model for training;
[0106] Step S6, after the current round of training is completed, the crop sampling points and non-crop sampling points in the grid unit of the crop sampling area with the lowest prediction accuracy are added to the target sampling point sample library again to obtain an updated target sampling point sample library, and steps S5 to S6 are repeated to obtain a trained classification model after the preset training conditions are met.
[0107] In the present invention, the initial grid unit is used as a reference, and according to the preset crop sampling area range, the required crop sampling area grid unit is determined at the corresponding crop area position in the sample monthly average time series synthetic image that has also been divided into grid units. For example, the crop sampling area grid unit range is determined in the sample monthly average time series synthetic image of each month through the initial grid unit (the range contains multiple crop sampling area grid units), and then the sample monthly average time series synthetic image corresponding to this crop sampling area grid unit range is used to form a crop sampling area sample image set. Next, the crop sampling area sample image set obtained in the above embodiment is input into the initial classification model to train the initial classification model. The initial classification model outputs the classification accuracy (prediction accuracy) of each crop sampling area grid unit. Figure 3 The schematic diagram of the spatial classification process of crop sampling points provided by the present invention can be referred to Figure 3As shown in the figure, when selecting the initial grid unit, the selected grid unit has more crop sampling points, and then according to the initial grid unit, the corresponding image area is determined from the sample monthly mean time series synthetic image set to construct the image sample, and input it into the initial classification model, so that the initial classification model outputs the prediction accuracy corresponding to each crop sampling area grid unit, and then according to the crop sampling area grid unit corresponding to the lowest prediction accuracy (i.e. 0.19), the input for the next round of training is constructed; at the same time, after the image sample is input, the initial classification model obtains the second classification model through training for the subsequent iterative training process.
[0108] Furthermore, the lowest crop sampling area grid unit is used as the target grid unit, and the crop sampling points and non-crop sampling points in the target grid unit are stored in the initial sampling point sample library, the target sampling point sample library is constructed, and input into the second classification model for training; after each round of training, the target sampling point sample library needs to be updated, that is, the crop sampling points and non-crop sampling points in the target grid unit are added to the target sampling point sample library again, so that in each training process, the number of sampling points in the target sampling point sample library input into the second classification model gradually increases, and a small number of sampling points are added each time, so as to optimize the model through a small amount of training data. When the prediction accuracy of the model output reaches the preset accuracy threshold, the training is completed. In the present invention, the preset accuracy threshold can be set according to actual needs. For example, the training can be stopped when the classification prediction accuracy of the corresponding images of all grid units reaches more than 90%.
[0109] The present invention provides a spatial adaptive classification method for crops. During the training process of a random forest classifier, the sampling points required for each training are based on the sampling points of local grid units (i.e., grid units with the lowest prediction accuracy) to update the sample library, which greatly reduces the number of sampling points required in the training process and improves the model classification performance.
[0110] On the basis of the above embodiment, after inputting the training sample set into the random forest classifier for training to obtain a trained classification model, the method further includes:
[0111] Based on the sample monthly mean time series synthetic image set of the target crop each year, the sample monthly mean time series synthetic image set of each year is sequentially input into the trained classification model according to the time series relationship to obtain the prediction results corresponding to each sample monthly mean time series synthetic image set of each year;
[0112] According to the prediction results, determine a target sample monthly mean time series synthetic image set, wherein the target sample monthly mean time series synthetic image set is a sample monthly mean time series synthetic image set of the year corresponding to the lowest prediction accuracy;
[0113] Determine the target historical crop distribution area remote sensing image data of the corresponding year according to the target sample monthly mean time series synthetic image set, and optimize the parameters of the trained classification model through the target historical crop distribution area remote sensing image data to obtain the crop annual classification model for crop time series distribution mapping;
[0114] A set of monthly mean time-series synthetic images of multiple preset years is input into the crop annual classification model to obtain a crop time-series distribution mapping result of the target area.
[0115] In the present invention, the trained classification model is extended with the crop time series distribution function, so that the classification model can be applied to crop time series distribution mapping, that is, based on the monthly average time series synthetic image set of multiple years, the crop distribution area mapping in time series is adaptively generated. Specifically, Figure 4 A schematic diagram of the crop sampling point time series classification process provided by the present invention, such as Figure 4 As shown, a set of monthly average time series synthetic images of multiple preset years (for example, 2001 to 2020) is input into the optimal corn crop spatial classification model of a certain year (i.e., the classification model trained in the above embodiment), the corn crop time series prediction accuracy is calculated, and the corn crop image of the year with the worst corn crop time series prediction accuracy (i.e., the preliminary crop time series distribution mapping result) is output, so as to obtain a set of target sample monthly average time series synthetic images. In the present invention, the accuracy of corn crop time series prediction can be determined based on the ratio between the predicted area of the predicted region and the actual area of the crop in that year; then, according to the year of the target sample monthly average time series synthetic image set, the corresponding target historical crop distribution area remote sensing image data is obtained (for example, if it is determined that the prediction accuracy in 2011 is the worst, the remote sensing image of 2011 is obtained), and a new training sample set is constructed through the remote sensing image data of the target historical crop distribution area, and based on the crop sampling point extraction process and the random forest classifier training process in the above embodiment, the remote sensing image of the target historical crop distribution area is extracted. The crop sampling points corresponding to the grid units in the image data are added to the target sampling point sample library and input into the classification model (i.e., the trained classification model) again to optimize the model parameters. The optimization process can refer to the training process of steps S1 to S6 in the above embodiment, which will not be repeated here, so as to obtain a classification model after parameter optimization, that is, a crop annual classification model for crop time series distribution mapping, so that the model is expanded, and a set of monthly average time series synthetic images of multiple preset years can be input, and the crop time series distribution mapping results of the target crop area in multiple preset years can be output.
[0116] The high-precision crop mapping system provided by the present invention is described below. The high-precision crop mapping system described below and the high-precision crop mapping method described above can be referenced to each other.
[0117] Figure 5 The schematic diagram of the structure of the high-precision crop mapping system provided by the present invention is as follows: Figure 5 As shown, the present invention provides a high-precision crop mapping system, including a crop remote sensing image acquisition module 501 and a crop distribution area mapping module 502, wherein the crop remote sensing image acquisition module 501 is used to obtain a set of monthly mean time-series synthetic images corresponding to the target area based on the land satellite surface reflectivity image of the target area in a preset year; the crop distribution area mapping module 502 is used to input the set of monthly mean time-series synthetic images into a trained classification model to obtain a crop spatial distribution mapping result of the target area in the preset year, wherein the trained classification model is obtained by training a random forest classifier with crop sampling points having pixel characteristics of the monthly mean time-series synthetic images of crops.
[0118] The high-precision crop mapping system provided by the present invention obtains land satellite surface reflectance images of crop areas, and classifies the land satellite surface reflectance images based on a classification model trained by a random forest classifier to obtain a more accurate spatial distribution map of the crop areas, thereby more accurately monitoring and evaluating the crop distribution areas.
[0119] The system provided by the present invention is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the specific processes and detailed contents, which will not be repeated here.
[0120] Figure 6 A schematic diagram of the structure of an electronic device provided by the present invention, such as Figure 6As shown, the electronic device may include: a processor (Processor) 601, a communication interface (Communications Interface) 602, a memory (Memory) 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604. The processor 601 can call the logic instructions in the memory 603 to execute the high-precision crop mapping method, which includes: according to the land satellite surface reflectivity image of the target area in a preset year, obtaining the monthly mean time series synthetic image set corresponding to the target area; inputting the monthly mean time series synthetic image set into the trained classification model to obtain the crop spatial distribution mapping result of the target area in the preset year, wherein the trained classification model is obtained by training the random forest classifier with the crop sampling points having the pixel characteristics of the monthly mean time series synthetic image.
[0121] In addition, the logic instructions in the above-mentioned memory 603 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0122] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the high-precision crop mapping method provided by the above-mentioned methods, and the method includes: based on the land satellite surface reflectivity image of the target area in a preset year, obtaining a set of monthly mean time-series synthetic images corresponding to the target area; inputting the set of monthly mean time-series synthetic images into a trained classification model to obtain a spatial distribution mapping result of crops in the target area in the preset year, wherein the trained classification model is obtained by training a random forest classifier with crop sampling points having pixel characteristics of monthly mean time-series synthetic images.
[0123] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the high-precision crop mapping method provided in the above-mentioned embodiments, the method comprising: obtaining a set of monthly mean time-series synthetic images corresponding to the target area based on the land satellite surface reflectivity image of the target area in a preset year; inputting the set of monthly mean time-series synthetic images into a trained classification model to obtain a spatial distribution mapping result of crops in the target area in the preset year, wherein the trained classification model is obtained by training a random forest classifier using crop sampling points with pixel features of monthly mean time-series synthetic images.
[0124] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for high-precision crop mapping, characterized in that: include: Based on the land satellite surface reflectance images of the target area in a preset year, a set of monthly mean time-series synthetic images corresponding to the target area is obtained; Inputting the monthly mean time series synthetic image set into a trained classification model to obtain a crop spatial distribution mapping result of the target area in the preset year, wherein the trained classification model is obtained by training a random forest classifier using crop sampling points having pixel features of the monthly mean time series synthetic image of crops; The trained classification model is obtained by the following steps: Performing mean processing on sample land satellite surface reflectance images of target crops within the growth period to obtain a sample monthly mean time series synthetic image set, and obtaining historical crop distribution area remote sensing image data of the area corresponding to the sample land satellite surface reflectance images; Performing morphological image processing on the remote sensing image data of the historical crop distribution area to obtain an image of the crop planting area, and determining all the crop sampling points in the image of the crop planting area; Based on the types of crops in the crop planting area image, marking the crop sampling points with corresponding crop sampling point type labels to obtain labeled crop sampling points; According to the pixel values of the images in the sample monthly mean time series synthetic image set, the pixel features of the corresponding crop monthly mean time series synthetic images are matched to the labeled crop sampling points to construct a training sample set; The training sample set is input into a random forest classifier for training to obtain a trained classification model.
2. The method for high-precision crop mapping according to claim 1, characterized in that: The performing morphological image processing on the remote sensing image data of the historical crop distribution area to obtain the crop planting area image and determine all the crop sampling points in the crop planting area image includes: Determine the sample image of the initial crop planting area based on the intersection area images between the remote sensing image data of the historical crop distribution areas in different years; Performing image corrosion processing on the initial crop planting area sample image to obtain an image of the crop planting area; Extracting the centroid of the crop planting area image to determine a first initial crop sample sampling point in the crop planting area image; Deleting a second initial crop sample sampling point in the first initial crop sample sampling point, and acquiring a third initial crop sample sampling point; wherein the second initial crop sample sampling point is a first initial crop sample sampling point outside the boundary of the crop area in the crop planting area image; The third initial crop sample sampling points are judged, and the third initial crop samples that meet the preset segmentation threshold are determined as the corresponding crop sampling points in the crop planting area image.
3. The method for high-precision crop mapping according to claim 1, characterized in that: Before performing morphological image processing on the remote sensing image data of the historical crop distribution area to obtain the crop planting area image, the method further includes: Dividing the remote sensing image data of the historical crop distribution area into a plurality of grid units of the same specification; The step of inputting the training sample set into a random forest classifier for training to obtain a trained classification model comprises: Step S1, based on the preset selection conditions and the training sample set, determine the initial grid unit, and construct an initial sampling point sample library through the crop sampling points and non-crop sampling points in the initial grid unit; Step S2, inputting the sampling points in the initial sampling point sample library into a random forest classifier to obtain an initial classification model; Step S3, determining the crop sampling area grid unit of the sample monthly mean time series synthetic image set according to the initial grid unit, obtaining a crop sampling area sample image set constructed based on the crop sampling area grid unit, and inputting the crop sampling area sample image set into the initial classification model, outputting the prediction accuracy corresponding to each crop sampling area grid unit in the crop sampling area sample image set, and obtaining a second classification model; Step S4, storing the crop sampling points and non-crop sampling points of the grid unit of the crop sampling area with the lowest prediction accuracy in the initial sampling point sample library to obtain the target sampling point sample library; Step S5, inputting the crop sampling points and non-crop sampling points in the target sampling point sample library into the second classification model for training; Step S6, after the current round of training is completed, the crop sampling points and non-crop sampling points in the grid unit of the crop sampling area with the lowest prediction accuracy are added to the target sampling point sample library again to obtain an updated target sampling point sample library, and steps S5 to S6 are repeated to obtain a trained classification model after the preset training conditions are met.
4. The method for high-precision crop mapping according to claim 1, characterized in that: The step of obtaining a set of monthly mean time-series synthetic images corresponding to the target area based on the land satellite surface reflectance images of the target area in a preset year includes: Obtain monthly Landsat surface reflectance images of the target area within a preset year; Performing mean processing on the monthly land satellite surface reflectance images respectively, and determining the band characteristics of the land satellite surface reflectance images after the mean processing, to obtain a set of monthly mean time series synthetic images corresponding to the target area; The band characteristics include a red band, a green band, a blue band, a near infrared band, a shortwave infrared 1 band, a shortwave infrared 2 band and a normalized vegetation index band, and the normalized vegetation index band is calculated based on the red band and the near infrared band.
5. The method for high-precision crop mapping according to claim 1, characterized in that: After inputting the training sample set into the random forest classifier for training to obtain a trained classification model, the method further includes: Based on the sample monthly mean time series synthetic image set of the target crop each year, the sample monthly mean time series synthetic image set of each year is sequentially input into the trained classification model according to the time series relationship to obtain the prediction results corresponding to each sample monthly mean time series synthetic image set of each year; According to the prediction results, determine a target sample monthly mean time series synthetic image set, wherein the target sample monthly mean time series synthetic image set is a sample monthly mean time series synthetic image set of the year corresponding to the lowest prediction accuracy; Determine the target historical crop distribution area remote sensing image data of the corresponding year according to the target sample monthly mean time series synthetic image set, and optimize the parameters of the trained classification model through the target historical crop distribution area remote sensing image data to obtain the crop annual classification model for crop time series distribution mapping; A set of monthly mean time-series synthetic images of multiple preset years is input into the crop annual classification model to obtain a crop time-series distribution mapping result of the target area.
6. A high-precision crop mapping system, characterized in that: include: A crop remote sensing image acquisition module is used to acquire a set of monthly average time-series synthetic images corresponding to a target area based on a land satellite surface reflectance image of the target area in a preset year; A crop distribution area mapping module is used to input the monthly mean time series synthetic image set into a trained classification model to obtain a crop spatial distribution mapping result of the target area in the preset year, wherein the trained classification model is obtained by training a random forest classifier by marking crop sampling points with pixel features of the monthly mean time series synthetic image of crops; The trained classification model is obtained by the following steps: Performing mean processing on sample land satellite surface reflectance images of target crops within the growth period to obtain a sample monthly mean time series synthetic image set, and obtaining historical crop distribution area remote sensing image data of the area corresponding to the sample land satellite surface reflectance images; Performing morphological image processing on the remote sensing image data of the historical crop distribution area to obtain an image of the crop planting area, and determining all the crop sampling points in the image of the crop planting area; Based on the types of crops in the crop planting area image, marking the crop sampling points with corresponding crop sampling point type labels to obtain labeled crop sampling points; According to the pixel values of the images in the sample monthly mean time series synthetic image set, the pixel features of the corresponding crop monthly mean time series synthetic images are matched to the labeled crop sampling points to construct a training sample set; The training sample set is input into a random forest classifier for training to obtain a trained classification model.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the high-precision crop mapping method according to any one of claims 1 to 5 are implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for high-precision crop mapping as described in any one of claims 1 to 5 are implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for high-precision crop mapping as described in any one of claims 1 to 5 are implemented.
