Ocean
Ocean::Tracking::PlaneFinder Class Reference

This class implements a 3D plane finder without any previous knowledge about the plane or the camera poses. More...

Inheritance diagram for Ocean::Tracking::PlaneFinder:

Public Member Functions

size_t size () const
 Returns the number of stored correspondence sets. More...
 
size_t imagePoints () const
 Returns the number of image points within each individual correspondence set. More...
 
const Vectors2firstImagePoints () const
 Returns the first set of image points. More...
 
const Vectors2lastImagePoints () const
 Returns the last set of image points. More...
 
Scalar sqrDistance () const
 Calculates the summed square distance between the first image points and the corresponding image points in the most recent set of image points. More...
 
virtual bool addImagePoint (const Vectors2 &imagePoints)
 Adds new image points as new set of correspondences. More...
 
virtual bool addImagePoint (Vectors2 &&imagePoints)
 Adds new image points as new set of correspondences. More...
 
virtual bool addImagePoint (const Vectors2 &imagePoints, const Indices32 &validIndices)
 Adds a new subset of image points that corresponds to a subset of the stored sets of image points. More...
 
bool reduce (const Indices32 &validIndices)
 Reduces the image points within each set of corresponding image points. More...
 

Protected Types

typedef CorrespondenceSet< Vector2ImagePointCorrespondenceSet
 Definition of a correspondence set object with handling 2D vectors. More...
 

Protected Member Functions

 PlaneFinder ()
 Creates a new plane finder object. More...
 
virtual ~PlaneFinder ()=default
 Destructs this object. More...
 

Protected Attributes

ImagePointCorrespondenceSet imagePointCorrespondences
 The set of image point correspondences. More...
 

Detailed Description

This class implements a 3D plane finder without any previous knowledge about the plane or the camera poses.

The class takes several correspondences of image points that capture corresponding 3D object points lying on the same 3D plane.

Member Typedef Documentation

◆ ImagePointCorrespondenceSet

Definition of a correspondence set object with handling 2D vectors.

Constructor & Destructor Documentation

◆ PlaneFinder()

Ocean::Tracking::PlaneFinder::PlaneFinder ( )
inlineprotected

Creates a new plane finder object.

◆ ~PlaneFinder()

virtual Ocean::Tracking::PlaneFinder::~PlaneFinder ( )
protectedvirtualdefault

Destructs this object.

Member Function Documentation

◆ addImagePoint() [1/3]

virtual bool Ocean::Tracking::PlaneFinder::addImagePoint ( const Vectors2 imagePoints)
virtual

Adds new image points as new set of correspondences.

Beware: The number of provided image points must match with the number of already stored image points within each individual set of correspondences.

Parameters
imagePointsImage points to be added
Returns
True, if succeeded

Reimplemented in Ocean::Tracking::HomographyPlaneFinder.

◆ addImagePoint() [2/3]

virtual bool Ocean::Tracking::PlaneFinder::addImagePoint ( const Vectors2 imagePoints,
const Indices32 validIndices 
)
virtual

Adds a new subset of image points that corresponds to a subset of the stored sets of image points.

This function takes a set of indices which define the valid subset of the given image points.
Only valid image points will be added while also the already stored sets of image points will be reduced so that only valid elements are stored finally.

Parameters
imagePointsLarge set of image points to be added
validIndicesIndices that define a valid subset of the given elements, each index must exist at most once and must lie inside the range [0, elements.size())
Returns
True, if succeeded

Reimplemented in Ocean::Tracking::HomographyPlaneFinder.

◆ addImagePoint() [3/3]

virtual bool Ocean::Tracking::PlaneFinder::addImagePoint ( Vectors2 &&  imagePoints)
virtual

Adds new image points as new set of correspondences.

Beware: The number of provided image points must match with the number of already stored image points within each individual set of correspondences.

Parameters
imagePointsImage points to be added (and moved)
Returns
True, if succeeded

Reimplemented in Ocean::Tracking::HomographyPlaneFinder.

◆ firstImagePoints()

const Vectors2 & Ocean::Tracking::PlaneFinder::firstImagePoints ( ) const
inline

Returns the first set of image points.

Beware: Check whether this object holds at least on set of image points before you call this function.

Returns
Image points

◆ imagePoints()

size_t Ocean::Tracking::PlaneFinder::imagePoints ( ) const
inline

Returns the number of image points within each individual correspondence set.

Returns
Number of image points

◆ lastImagePoints()

const Vectors2 & Ocean::Tracking::PlaneFinder::lastImagePoints ( ) const
inline

Returns the last set of image points.

Beware: Check whether this object holds at least on set of image points before you call this function.

Returns
Image points

◆ reduce()

bool Ocean::Tracking::PlaneFinder::reduce ( const Indices32 validIndices)
inline

Reduces the image points within each set of corresponding image points.

The remaining elements are defined by a set of indices.

Parameters
validIndicesIndices that define a valid subset of the already stored elements, each index must exist at most once and must lie inside the range [0, elements())
Returns
True, if succeeded

◆ size()

size_t Ocean::Tracking::PlaneFinder::size ( ) const
inline

Returns the number of stored correspondence sets.

Returns
Correspondence set size

◆ sqrDistance()

Scalar Ocean::Tracking::PlaneFinder::sqrDistance ( ) const
inline

Calculates the summed square distance between the first image points and the corresponding image points in the most recent set of image points.

Returns
Resulting summed square distance

Field Documentation

◆ imagePointCorrespondences

ImagePointCorrespondenceSet Ocean::Tracking::PlaneFinder::imagePointCorrespondences
protected

The set of image point correspondences.


The documentation for this class was generated from the following file: