Learn R Programming

TreeLS (version 2.0.2)

sgt.bf.cylinder: Stem segmentation algorithm: Brute Force cylinder fit

Description

This function is meant to be used inside stemSegmentation. It applies a least squares cylinder fit algorithm in a RANSAC fashion over stem segments. More details are given in the sections below.

Usage

sgt.bf.cylinder(tol = 0.1, n = 10, conf = 0.95, inliers = 0.9, z_dev = 30)

Arguments

tol

numeric - tolerance offset between absolute radii estimates and hough transform estimates.

n

numeric - number of points selected on every RANSAC iteration.

conf

numeric - confidence level.

inliers

numeric - expected proportion of inliers among stem segments' point cloud chunks.

z_dev

numeric - maximum angle deviation for brute force cylinder estimation (bf), i.e. angle, in degrees (0-90), that a cylinder can be tilted in relation to a perfect vertival axis (Z = c(0,0,1)).

Brute Force Cylinder Fit

The brute force cylinder fit approach estimates the axis rotation angles by brute force combined with 2D ransac circle fit. The coordinates of a point cloud representing a single cylinder are iteratively rotated up to a pre defined threshold, and for every iteration a circle is estimated after rotation is performed. The rotation that minimizes the circle parameters the most is used to describe the axis direction of the cylinder with the circle's radius.

The parameters returned by the brute force cylinder fit method are:

  • X,Y: 2D circle center coordinates after rotation

  • Radius: 3D circle radius, in point cloud units

  • Error: model circle error from the RANSAC least squares fit, after rotation

  • DX,DY: absolute rotation angles (in degrees) applied to the X and Y axes, respectively

  • AvgHeight: average height of the stem segment's points

  • N: number of points belonging to the stem segment