Test field plot segmentation method based on point cloud
Through the point cloud-based experimental field plot segmentation method, combined with the K-means and DBSCAN algorithm, the problem of low segmentation accuracy caused by mutual hiding of crop canopies between experimental field plots is solved, and high-precision plot segmentation and adhesion plot segmentation are achieved.
Patent Information
- Application Number
- CN202411383758.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-28
AI Technical Summary
The crop canopies between the experimental field plots were covered with each other, resulting in a low accuracy of plot segmentation.
The experimental field plot segmentation method based on point cloud is used to obtain three-dimensional point cloud data through lidar scanning, and segmentation is combined with K-means and DBSCAN clustering algorithm. First, the initial point cloud data is clustered using the K-means algorithm, divided multiple regions, and then the canopy point cloud data is secondary clustered, and finally the adhesion plot is divided through the terrain change curve.
The fine clustering segmentation of experimental field plots is realized, and the interference of cross-growth of vegetation between plots is effectively removed. It is suitable for plot segmentation throughout the growth period, improving the accuracy of plot segmentation.
Smart Images

Figure CN119540546A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of experimental field plot segmentation methods, and in particular to an experimental field plot segmentation method based on point cloud. Background Art
[0002] The accurate segmentation of experimental field plots is crucial for crop growth monitoring, yield estimation and resource management. However, the mutual coverage of crop canopies often makes it difficult to identify the boundaries of plots, thus affecting the accuracy of plot segmentation. At present, high-precision land information extraction and segmentation mainly rely on manual processing and segmentation, which is a manual activity that requires a lot of manpower and financial resources, and has low segmentation efficiency. Some target-based image analysis relies heavily on image segmentation methods. In the process of superpixel segmentation, the acquisition distance of remote sensing images is too far and the environment is complex during acquisition, such as when collected in foggy and rainy days. It will make it difficult to achieve accurate segmentation of land plots using traditional image segmentation methods. In addition, due to the mutual coverage of crop canopies between experimental field plots, the accuracy of plot segmentation will also be low. Summary of the invention
[0003] In order to solve the problem of low accuracy of plot segmentation due to mutual covering of crop canopies between experimental field plots, the present invention provides an experimental field plot segmentation method based on point cloud.
[0004] The technical solution adopted by the present invention to solve the above technical problems is: a method for segmenting a test field plot based on point cloud, comprising the following steps: Step 1: Scan the test field with a laser radar to obtain initial point cloud data, including a series of three-dimensional point cloud coordinates (x, y, z); Step 2: Cluster the initial point cloud data using the K-means algorithm First, randomly select K data points as the initial cluster centers, then calculate the distance from each data point to the K initial cluster centers, and assign the data points to the initial cluster centers with the closest distance to form K data point clusters. Then calculate the point with the smallest mean distance from other points in each data point cluster as the centroid, and replace the K initial cluster centers with K centroids to update the cluster centers. The above process is repeated until the maximum number of iterations is reached, or the change between the updated cluster center and the cluster center of the previous iteration is less than the threshold, then the iteration is stopped and data points are allocated to obtain a cluster point cloud data, thereby dividing the experimental field into multiple areas; Step 3: Set height thresholds for different areas divided in step 2, divide the primary clustering point cloud data into upper and lower layers by the height thresholds, and retain the upper layer data as canopy point cloud data; Step 4: Secondary clustering of canopy point cloud data using the DBSCAN algorithm First, randomly select a data point and calculate the number of other data points in the neighborhood of the data point. When the number of points is less than the threshold, the data point is marked as a noise point. When the number of points is not less than the threshold, the data point is marked as a core point and other data points in the neighborhood are added to the data point cluster of the core point. Then the data point cluster is expanded, and the number of points in the neighborhood range of other added data points is calculated respectively. When the number of points is not less than the threshold number, the newly calculated data point in the neighborhood range is added to the data point cluster, and the number of points in the neighborhood range of the newly added data point is continued to be calculated until the number of points in the neighborhood range of all the newly added data points in the data point cluster is less than the threshold number, and the expansion of the data point cluster is stopped; A data point that does not belong to a data point cluster and is not marked as a noise point is randomly selected again, and the above process is repeated until all data points belong to a data point cluster or are marked as noise points, and the secondary clustering point cloud data is obtained, thereby clustering and segmenting the experimental field; Step 5: Draw a point cloud bounding box for the secondary clustering point cloud data to obtain multiple test field bounding boxes corresponding to the test fields segmented by clustering, and the coordinates of four vertices of each bounding box; Step 6: Calculate the horizontal width of each test field boundary box by vertex coordinates, divide the area of the test field boundary box whose horizontal width is within the standard width threshold range into a test field plot, divide the area of the test field boundary box whose horizontal width exceeds the standard width threshold range into an adhesion plot, and then segment the adhesion plot, so as to complete the segmentation of the entire test field plot; The method for segmenting the adhesion plot is to obtain the terrain change curve of the experimental field through the initial point cloud data of step one, correspond the terrain change curve with the boundary box of the experimental field, select the point with the lowest height from the range of the terrain change curve corresponding to the adhesion plot, and use this point as the segmentation point to segment the adhesion plot into two parts along the horizontal width direction.
[0005] Preferably, in step 2, the distance calculation formula from the data point to the initial cluster center is: ; In the above formula, x i is the data point, μ j is the cluster center.
[0006] Preferably, in step 2, the calculation formula of the centroid is: ; In the above formula, C j represents all data points belonging to the jth cluster, μ jis the centroid of the cluster.
[0007] According to the above technical solution, the beneficial effects of the present invention are: The present invention comprehensively utilizes two clustering segmentation algorithms, Kmeans and DBSCAN, to realize fine clustering segmentation of experimental field plots. The reference of height information removes the interference of cross-growth of vegetation between plots to a certain extent, and is suitable for the segmentation of plots in the entire growth period of the experimental field. Aiming at the phenomenon of adhesion plots between experimental field plots, the adhesion plots are segmented by using the terrain change curves between the adhesion plots, and finally the plot segmentation distances of all experimental field plots can be obtained, effectively solving the problem of low plot segmentation accuracy due to mutual covering of crop canopies between experimental field plots. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 It is a schematic diagram of the processing flow of the present invention. DETAILED DESCRIPTION
[0009] A method for segmenting a test field plot based on point cloud comprises the following steps: Step 1: Scan the test field with lidar to obtain initial point cloud data, including a series of three-dimensional point cloud coordinates (x, y, z).
[0010] Step 2: Cluster the initial point cloud data using the K-means algorithm First, K data points are randomly selected as the initial cluster centers. Then the distance from each data point to the K initial cluster centers is calculated respectively, and the data point is assigned to the initial cluster center with the closest distance to form K data point clusters.
[0011] The distance calculation formula from the data point to the initial cluster center is: ; In the above formula, x i is the data point, μ j is the cluster center.
[0012] Then, the point with the smallest mean distance from other points in each data point cluster is calculated as the centroid, and the K initial cluster centers are replaced by K centroids to update the cluster centers.
[0013] The formula for calculating the centroid is: ; In the above formula, C j represents all data points belonging to the jth cluster, μ j is the centroid of the cluster.
[0014] The above process is repeated until the maximum number of iterations is reached, or the change between the updated cluster center and the cluster center of the previous iteration is less than the threshold, then the iteration is stopped and data points are allocated to obtain a cluster point cloud data, thereby dividing the experimental field into multiple areas.
[0015] Step 3: Set height thresholds for the different areas divided in step 2, and use the height thresholds to segment the primary clustered point cloud data into upper and lower layers, and retain the upper layer data as the canopy point cloud data.
[0016] Step 4: Secondary clustering of canopy point cloud data using the DBSCAN algorithm First, a data point is randomly selected and the number of other data points in the neighborhood of the data point is calculated. When the number of points is less than the threshold number, the data point is marked as a noise point. When the number of points is not less than the threshold number, the data point is marked as a core point and other data points in the neighborhood are added to the data point cluster of the core point.
[0017] Then the data point cluster is expanded, and the number of points in the neighborhood range of other added data points is calculated. When the number of points is not less than the threshold number, the newly calculated data points in the neighborhood range are added to the data point cluster, and the number of points in the neighborhood range of the newly added data points is continued to be calculated until the number of points in the neighborhood range of all newly added data points in the data point cluster is less than the threshold number, and then the expansion of the data point cluster is stopped.
[0018] A data point that does not belong to a data point cluster and is not marked as a noise point is randomly selected again, and the above process is repeated until all data points belong to a data point cluster or are marked as noise points, and the secondary clustering point cloud data is obtained, thereby clustering and segmenting the experimental field.
[0019] Step 5: Draw a point cloud bounding box for the secondary clustering point cloud data to obtain multiple test field bounding boxes corresponding to the clustered test fields and the four vertex coordinates of each bounding box.
[0020] Step 6. Calculate the horizontal width of each test field boundary box through vertex coordinates, divide the area of the test field boundary box whose horizontal width is within the standard width threshold range into a test field plot, divide the area of the test field boundary box whose horizontal width exceeds the standard width threshold range into an adhesion plot, and then segment the adhesion plot to complete the segmentation of the entire test field plot.
[0021] The method for segmenting the adhesion plot is to obtain the terrain change curve of the experimental field through the initial point cloud data of step one, correspond the terrain change curve with the boundary box of the experimental field, select the point with the lowest height from the range of the terrain change curve corresponding to the adhesion plot, and use this point as the segmentation point to segment the adhesion plot into two parts along the horizontal width direction.
[0022] This embodiment uses a combination of Kmeans and DBSCAN clustering segmentation algorithms to achieve fine clustering segmentation of experimental field plots. In view of the phenomenon of adhesion between experimental field plots, the terrain change curve between adhesion plots is used to segment the adhesion plots, and finally the plot segmentation distance of all experimental field plots can be obtained, which effectively solves the problem of low plot segmentation accuracy due to mutual covering of crop canopies between experimental field plots. This embodiment is suitable for plot segmentation during the entire growing period of the experimental field.
Claims
1. A method for segmenting experimental field plots based on point cloud, characterized in that: The following steps are involved: Step 1: Scan the test field with a laser radar to obtain initial point cloud data, including a series of three-dimensional point cloud coordinates (x, y, z); Step 2: Cluster the initial point cloud data using the K-means algorithm First, randomly select K data points as the initial cluster centers, then calculate the distance from each data point to the K initial cluster centers, and assign the data points to the initial cluster centers with the closest distance to form K data point clusters. Then calculate the point with the smallest mean distance from other points in each data point cluster as the centroid, and replace the K initial cluster centers with K centroids to update the cluster centers. The above process is repeated until the maximum number of iterations is reached, or the change between the updated cluster center and the cluster center of the previous iteration is less than the threshold, then the iteration is stopped and data points are allocated to obtain a cluster point cloud data, thereby dividing the experimental field into multiple areas; Step 3: Set height thresholds for different areas divided in step 2, divide the primary clustering point cloud data into upper and lower layers by the height thresholds, and retain the upper layer data as canopy point cloud data; Step 4: Secondary clustering of canopy point cloud data using the DBSCAN algorithm First, randomly select a data point and calculate the number of other data points in the neighborhood of the data point. When the number of points is less than the threshold, the data point is marked as a noise point. When the number of points is not less than the threshold, the data point is marked as a core point and other data points in the neighborhood are added to the data point cluster of the core point. Then the data point cluster is expanded, and the number of points in the neighborhood range of other added data points is calculated respectively. When the number of points is not less than the threshold number, the newly calculated data point in the neighborhood range is added to the data point cluster, and the number of points in the neighborhood range of the newly added data point is continued to be calculated until the number of points in the neighborhood range of all the newly added data points in the data point cluster is less than the threshold number, and the expansion of the data point cluster is stopped; A data point that does not belong to a data point cluster and is not marked as a noise point is randomly selected again, and the above process is repeated until all data points belong to a data point cluster or are marked as noise points, and the secondary clustering point cloud data is obtained, thereby clustering and segmenting the experimental field; Step 5: Draw a point cloud bounding box for the secondary clustering point cloud data to obtain multiple test field bounding boxes corresponding to the test fields segmented by clustering, and the coordinates of four vertices of each bounding box; Step 6: Calculate the horizontal width of each test field boundary box by vertex coordinates, divide the area of the test field boundary box whose horizontal width is within the standard width threshold range into a test field plot, divide the area of the test field boundary box whose horizontal width exceeds the standard width threshold range into an adhesion plot, and then segment the adhesion plot, so as to complete the segmentation of the entire test field plot; The method for segmenting the adhesion plot is to obtain the terrain change curve of the experimental field through the initial point cloud data of step one, correspond the terrain change curve with the boundary box of the experimental field, select the point with the lowest height from the range of the terrain change curve corresponding to the adhesion plot, and use this point as the segmentation point to segment the adhesion plot into two parts along the horizontal width direction.
2. The method for segmenting a test field plot based on point cloud according to claim 1, characterized in that: In step 2, the distance calculation formula from the data point to the initial cluster center is: ; In the above formula, x i is the data point, μ j is the cluster center.
3. The method for segmenting a test field plot based on point cloud according to claim 1, characterized in that: In step 2, the centroid calculation formula is: ; In the above formula, C j represents all data points belonging to the jth cluster, μ j is the centroid of the cluster.