Learn R Programming

CspStandSegmentation (version 0.2.0)

ransac_circle_fit: RANSAC circle fitting algorithm specially adapted for tree DBH estimation

Description

This function fits a circle to a set of points using the RANSAC algorithm it maximizes the points that are in the circle and the number of filled 36 degree angle segments Therefore, this function searches for the most complete circle with the highest number of points represented.

Usage

ransac_circle_fit(
  data,
  n_iterations = 1000L,
  distance_threshold = 0.01,
  min_inliers = 3L
)

Value

a list with the following elements: circle: the center coordinates and radius of the circle inliers: number of points within the circles dist threshold angle_segs: number of populated 10deg angular segments of the circle using the distance_threshold n_iter: number of iterations run

Arguments

data

numeric matrix with 2 columns (X, Y) representing the point cloud

n_iterations

integer maximum number of iterations

distance_threshold

numeric maximum distance from a point to the circle to be considered an inlier

min_inliers

integer minimum number of inliers to consider the circle as valid