This function is meant to be used inside stemSegmentation
. It applies a least squares circle fit algorithm in a RANSAC fashion over stem segments. More details are given in the sections below.
sgt.ransac.circle(tol = 0.1, n = 10, conf = 0.99, inliers = 0.8)
numeric
- tolerance offset between absolute radii estimates and hough transform estimates.
numeric
- number of points selected on every RANSAC iteration.
numeric
- confidence level.
numeric
- expected proportion of inliers among stem segments' point cloud chunks.
The RANdom SAmple Consensus algorithm is a method that relies on resampling a data set as many times as necessary to find a subset comprised of only inliers - e.g. observations belonging to a desired model. The RANSAC algorithm provides a way of estimating the necessary number of iterations necessary to fit a model using inliers only, at least once, as shown in the equation: k = log(1 - p) / log(1 - w^n)k = log(1 - p) / log(1 - w^n) where:
k: number of iterations
p: confidence level, i.e. desired probability of success
w: proportion of inliers expected in the full dataset
n: number of observations sampled on every iteration
The models reiterated in TreeLS usually relate to circle or cylinder fitting over a set of 3D coordinates, selecting the best possible model through the RANSAC algorithm
For more information, checkout this wikipedia page.
The circle fit methods applied in TreeLS estimate the circle parameters (its center's XY coordinates and radius) from a pre-selected (denoised) set of points in a least squares fashion by applying either QR decompostion, used in combination with the RANSAC algorithm, or Nelder-Mead simplex optimization combined the IRLS approach.
The parameters returned by the circle fit methods are:
X,Y
: 2D circle center coordinates
Radius
: 2D circle radius, in point cloud units
Error
: model circle error from the least squares fit
AvgHeight
: average height of the stem segment's points
N
: number of points belonging to the stem segment
Olofsson, K., Holmgren, J. & Olsson, H., 2014. Tree stem and height measurements using terrestrial laser scanning and the RANSAC algorithm. Remote Sensing, 6(5), pp.4323<U+2013>4344.
Conto, T. et al., 2017. Performance of stem denoising and stem modelling algorithms on single tree point clouds from terrestrial laser scanning. Computers and Electronics in Agriculture, v. 143, p. 165-176.