las_slice_circle_fitting: slice circle fit (PCA / bisecting cords)

View source: R/las_slice_circle_fitting.R

las_slice_circle_fittingR Documentation

slice circle fit (PCA / bisecting cords)

Description

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

Usage

las_slice_circle_fitting(las_slice, iterations, threshold, inclusion)

Arguments

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

Details

It preforms ransac circle fitting by:

  1. transform the las object into a matrix

  2. loop through the tree ids one at a time

  3. perform robust pca using package rospca to find tree slice centers and eigenvectors(loadings)

  4. use center and loadings to project the 3d point cloud onto a 2d principal component space

  5. call the rcpp function ransac circle fit to preform circle fitting in parallel with given parameters

  6. return a data frame that contains tree information


tommywhitney/mobile_lidar documentation built on May 12, 2022, 7:38 p.m.