View source: R/las_slice_circle_fitting.R
| las_slice_circle_fitting | R Documentation |
this function takes in a las slice from dbscan that has labeled points to tree ids and returns a data frame of tree ids, the x, y, and z coordinates for the circle fit on a slice, the radius fo the circle fit, the mean squared error of the points and the percent inclusion of each point within the tree
las_slice_circle_fitting(las_slice, iterations, threshold, inclusion)
las_slice |
A slice from dbscan that has points labled with tree ids |
iterations |
the max number of iterations to preform ransac circle fits |
threshold |
the minimum distance a point needs to be within the circle circumference to be considered an inlier |
inclusion |
the desired inclusion to be considered a good circle fit to the data |
It preforms ransac circle fitting by:
transform the las object into a matrix
loop through the tree ids one at a time
perform robust pca using package rospca to find tree slice centers and eigenvectors(loadings)
use center and loadings to project the 3d point cloud onto a 2d principal component space
call the rcpp function ransac circle fit to preform circle fitting in parallel with given parameters
return a data frame that contains tree information
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.