Perception Tool Kit (PTK) API Guide

Introduction

Collaboration diagram for PTK Point Cloud based RANSAC:

Functions

uint32_t PTK_PointCloud_ransacPlane (const PTK_PointCloud *pc, const uint32_t *__restrict ids, uint32_t N, float tol, uint32_t iters, float *nd, uint32_t *__restrict foundInliers)
 

Function Documentation

◆ PTK_PointCloud_ransacPlane()

uint32_t PTK_PointCloud_ransacPlane ( const PTK_PointCloud pc,
const uint32_t *__restrict  ids,
uint32_t  N,
float  tol,
uint32_t  iters,
float *  nd,
uint32_t *__restrict  foundInliers 
)
Parameters
[in]pcInput point cloud.
[in]idsarray of length N. Indices of the points in the point cloud pc that should be considered for ransac fit.
[in]NLength of ids array.
[in]tolRANSAC tolerance (if error < tol ? inlier, otherwise ? outlier). Error is computed as Euclidean distance from the proposed plane.
[in]itersNumber of RANSAC iterations to perform.
[out]ndArray of length 4. First 3 elements are unit normal vector of the plane, 4th element is the plane distance from the origin.

A point (x,y,z) on the plane satisfies nd[0]*x + nd[1]*y + nd[2]*z - nd[3]==0.

Parameters
[out]foundInliersArray of length "return value" with indices in point cloud pc found to be inliers
Returns