Ocean
|
This class implements a 3D plane finder that determines a plane within several frames taken from different camera positions. More...
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 Vectors2 & | firstImagePoints () const |
Returns the first set of image points. More... | |
const Vectors2 & | lastImagePoints () 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< Vector2 > | ImagePointCorrespondenceSet |
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... | |
This class implements a 3D plane finder that determines a plane within several frames taken from different camera positions.
|
staticprotected |
Determines the poses that correspond to the given sets of image point correspondences and the given rough plane.
pinholeCamera | The pinhole camera object that is applied for the projection |
poseFirst | First pose that is associated with the image points from the first view |
plane | 3D plane on that all 3D object points visible in the first view are located |
imagePointsFirst | Image points in the first view associated with the first pose |
imagePointsSuccessive | The sets of image points visible in the successive views |
posesSuccessive | Resulting poses for the successive views |
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.
pinholeCamera | The pinhole camera object that is applied for the projection |
plane | Resulting 3D plane |
poses | Resulting poses that correspond to the given image points |
initialPose | Pose of the first camera position |
initialPlane | Initial plane that will be determined more accurate (the plane can be very rough while it should be in front of the initial pose) |
|
staticprotected |
Determines the initial plane from two individual views.
pinholeCamera | The pinhole camera object that is applied for the projection |
poseFirst | First pose that is associated with the image points from the first view |
roughPlane | Rough plane that should be a very rough guess of the resulting initial plane (at least the plane should lie in front of the camera) |
imagePointsFirst | Image points in the first view associated with the first pose |
imagePointsSecond | Image points in the second view associated with the resulting second pose, each point corresponds to a point in the first view (by index) |
poseSecond | Resulting second pose |
plane | Resulting initial plane best matching to the given image point correspondences |
|
inlineexplicit |
Returns whether this plane finder object holds at least two sets of corresponding image points.