|
Algorithm 1. Radius neighborhood search algorithm. |
|
Input: The point cloud of stem cross-section or rice plant |
| 1: Project the point data onto the X-Y plane |
| 2: Calculate the centroid position of the horizontal projection point: Z()
|
| 3: Count the horizontal projection point cloud: n
|
| 4: Build Kd-tree structure for point clouds |
| 5: Set initial search radius and step size |
| 6: for R in the radius range |
| 7: Neighborhood search with Z() as the center and R as the radius, and record the number of points searched: k
|
| 8: if k = n: |
| 9: return R |
| 10: end
|
|
Output: Calculate the perimeter of stem or crown diameter of rice plant |