# Concepts

This is for basics of **FindSurface**'s logic.

## What is **FindSurface**

**FindSurface** is a middleware for 3-D point cloud processing.
3-D point cloud is a set of 3-D points subject to measurement errors and density.
**FindSurface** extracts geometric information (i.e. shape, size, 6-D pose) from 3-D point cloud.

## Entire workflow of **FindSurface**

## How to Determine the Inital Shape of Object

FindSurface touches a small patch of point cloud around a seed (gazing) point among the point cloud.

By analyzing the local curvatures, the surface type of the small patch can be determined: planar, elliptic, parabolic, or hyperbolic.

According to the local surface type, the initial shape of object surface is assumed:

- Planar → plane
- Parabolic → cone
- Elliptic → torus
- Hyperbolic → torus

If necessary, e.g. for a point cloud with low measurement accuracy, the initial shape of object surface can be explicitly given by the user: plane, sphere, cylinder, cone, torus.

The user can test multiple shapes of target surface one by one:
plane, sphere, cylinder, cone, torus. Then, the most reliable surface shape can be determined by comparing the results of individual surface shapes tested such as the resultant rms error, the number and density of inliers, etc.

## Region Growing

The values of size (radius, length, width, or vertex angle), position, and rotation parameters can be determined by alternating region growing and surface fitting.

The searching volume for inlier candidates is enlarged (i.e., region growing) in two orthogonal directions:

**Radial expansion** normal to, and
**Lateral extension** along the length/width of the current model surface.

The lateral extension has nothing to do with sphere or torus, but with length/width of planes, cylinders and cones.

## Orthogonal Distance Fitting (ODF)

Orthogonal Distance Fitting (ODF) determines the parameter values of object model surface by minimizing the sum of the squared shortest error distances between the model surface and the measurement points.

## Shape Refinement

After a successful termination of finding a surface, the shape of surface can be converted and fitted to a more refined one.

- A cone of small vertex angle can be converted and fitted to a cylinder.
- A torus of small mean radius (i.e. a spindle torus) can be converted and fitted to a sphere.
- A torus of large mean radius (i.e. a thin ring torus) can be converted and fitted to a cylinder.