Ocean
Ocean::Tracking::MultiViewPlaneFinder Class Reference

This class implements a 3D plane finder that determines a plane within several frames taken from different camera positions. More...

Inheritance diagram for Ocean::Tracking::MultiViewPlaneFinder:

Public Member Functions

bool determinePlane (const PinholeCamera &pinholeCamera, Plane3 &plane, HomogenousMatrices4 &poses, const HomogenousMatrix4 &initialPose=HomogenousMatrix4(Vector3(0, 0, 1)), const Plane3 &initialPlane=Plane3(Vector3(0, 0, 1), 0)) const
 Determines the initial 3D plane and the corresponding 6DOF poses of the camera. More...
 
 operator bool () const
 Returns whether this plane finder object holds at least two sets of corresponding image points. More...
 
- Public Member Functions inherited from Ocean::Tracking::PlaneFinder
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...
 

Static Protected Member Functions

static bool determinePlaneFromTwoViews (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &poseFirst, const Plane3 &roughPlane, const ConstIndexedAccessor< Vector2 > &imagePointsFirst, const ConstIndexedAccessor< Vector2 > &imagePointsSecond, HomogenousMatrix4 &poseSecond, Plane3 &plane)
 Determines the initial plane from two individual views. More...
 
static bool determineInitialPoses (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &poseFirst, const Plane3 &plane, const Vectors2 &imagePointsFirst, const std::vector< Vectors2 > &imagePointsSuccessive, HomogenousMatrices4 &posesSuccessive)
 Determines the poses that correspond to the given sets of image point correspondences and the given rough plane. More...
 

Additional Inherited Members

- Protected Types inherited from Ocean::Tracking::PlaneFinder
typedef CorrespondenceSet< Vector2ImagePointCorrespondenceSet
 Definition of a correspondence set object with handling 2D vectors. More...
 
- Protected Member Functions inherited from Ocean::Tracking::PlaneFinder
 PlaneFinder ()
 Creates a new plane finder object. More...
 
virtual ~PlaneFinder ()=default
 Destructs this object. More...
 
- Protected Attributes inherited from Ocean::Tracking::PlaneFinder
ImagePointCorrespondenceSet imagePointCorrespondences
 The set of image point correspondences. More...
 

Detailed Description

This class implements a 3D plane finder that determines a plane within several frames taken from different camera positions.

Member Function Documentation

◆ determineInitialPoses()

static bool Ocean::Tracking::MultiViewPlaneFinder::determineInitialPoses ( const PinholeCamera pinholeCamera,
const HomogenousMatrix4 poseFirst,
const Plane3 plane,
const Vectors2 imagePointsFirst,
const std::vector< Vectors2 > &  imagePointsSuccessive,
HomogenousMatrices4 posesSuccessive 
)
staticprotected

Determines the poses that correspond to the given sets of image point correspondences and the given rough plane.

Parameters
pinholeCameraThe pinhole camera object that is applied for the projection
poseFirstFirst pose that is associated with the image points from the first view
plane3D plane on that all 3D object points visible in the first view are located
imagePointsFirstImage points in the first view associated with the first pose
imagePointsSuccessiveThe sets of image points visible in the successive views
posesSuccessiveResulting poses for the successive views
Returns
True, if succeeded

◆ determinePlane()

bool Ocean::Tracking::MultiViewPlaneFinder::determinePlane ( const PinholeCamera pinholeCamera,
Plane3 plane,
HomogenousMatrices4 poses,
const HomogenousMatrix4 initialPose = HomogenousMatrix4(Vector3(0, 0, 1)),
const Plane3 initialPlane = Plane3(Vector3(0, 0, 1), 0) 
) const

Determines the initial 3D plane and the corresponding 6DOF poses of the camera.

The plane and camera positions can be determined only up to an unknown scale factor.
This function needs at least two corresponding sets of image points.

Parameters
pinholeCameraThe pinhole camera object that is applied for the projection
planeResulting 3D plane
posesResulting poses that correspond to the given image points
initialPosePose of the first camera position
initialPlaneInitial plane that will be determined more accurate (the plane can be very rough while it should be in front of the initial pose)
Returns
True, if succeeded

◆ determinePlaneFromTwoViews()

static bool Ocean::Tracking::MultiViewPlaneFinder::determinePlaneFromTwoViews ( const PinholeCamera pinholeCamera,
const HomogenousMatrix4 poseFirst,
const Plane3 roughPlane,
const ConstIndexedAccessor< Vector2 > &  imagePointsFirst,
const ConstIndexedAccessor< Vector2 > &  imagePointsSecond,
HomogenousMatrix4 poseSecond,
Plane3 plane 
)
staticprotected

Determines the initial plane from two individual views.

Parameters
pinholeCameraThe pinhole camera object that is applied for the projection
poseFirstFirst pose that is associated with the image points from the first view
roughPlaneRough plane that should be a very rough guess of the resulting initial plane (at least the plane should lie in front of the camera)
imagePointsFirstImage points in the first view associated with the first pose
imagePointsSecondImage points in the second view associated with the resulting second pose, each point corresponds to a point in the first view (by index)
poseSecondResulting second pose
planeResulting initial plane best matching to the given image point correspondences
Returns
True, if succeeded

◆ operator bool()

Ocean::Tracking::MultiViewPlaneFinder::operator bool ( ) const
inlineexplicit

Returns whether this plane finder object holds at least two sets of corresponding image points.

Returns
True, if so

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