8 #ifndef META_OCEAN_TRACKING_POINT_FRAME_2_FRAME_TRACKER_H
9 #define META_OCEAN_TRACKING_POINT_FRAME_2_FRAME_TRACKER_H
59 template <
unsigned int tSize>
60 static bool determinePose(
const PinholeCamera& pinholeCamera,
const HomogenousMatrix4& previousPose,
const Frame& previousFrame,
const Frame& currentFrame,
const Vectors3& previousObjectPoints,
const Vectors2& previousImagePoints,
const bool distortImagePoints,
const unsigned int maximalOffset,
HomogenousMatrix4& currentPose,
Indices32* validIndices =
nullptr,
Worker* worker =
nullptr);
63 template <
unsigned int tSize>
64 bool Frame2FrameTracker::determinePose(
const PinholeCamera& pinholeCamera,
const HomogenousMatrix4& previousPose,
const Frame& previousFrame,
const Frame& currentFrame,
const Vectors3& previousObjectPoints,
const Vectors2& previousImagePoints,
const bool distortImagePoints,
const unsigned int maximalOffset,
HomogenousMatrix4& currentPose,
Indices32* validIndices,
Worker* worker)
71 ocean_assert(previousObjectPoints.size() >= 3);
72 ocean_assert(previousObjectPoints.size() == previousImagePoints.size());
74 Vectors2 copyPreviousImagePoints(previousImagePoints);
83 if (internalValidIndices.size() < 3)
95 *validIndices = std::move(internalValidIndices);
This class implements advanced motion techniques (mainly with sub-pixel accuracy or binary masks) all...
Definition: AdvancedMotion.h:69
@ DM_FILTER_14641
Down sampling is realized by a 5x5 Gaussian filter.
Definition: FramePyramid.h:72
This class implements an indexed-based constant accessor providing access to a subset of elements sto...
Definition: Accessor.h:1141
This class implements Ocean's image class.
Definition: Frame.h:1792
const FrameType & frameType() const
Returns the frame type of this frame.
Definition: Frame.h:3775
bool isValid() const
Returns whether this frame is valid.
Definition: Frame.h:4448
static bool optimizePose(const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &world_T_camera, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, const bool distortImagePoints, HomogenousMatrix4 &world_T_optimizedCamera, const unsigned int iterations=20u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, Scalar *initialError=nullptr, Scalar *finalError=nullptr)
Deprecated.
Definition: NonLinearOptimizationPose.h:282
bool isValid() const
Returns whether this matrix is a valid homogeneous transformation.
Definition: HomogenousMatrix4.h:1806
bool isValid() const
Returns whether this camera is valid.
Definition: PinholeCamera.h:1572
This class implements simple functions allowing to track or to determine the camera motion from one f...
Definition: point/Frame2FrameTracker.h:41
static bool determinePose(const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &previousPose, const Frame &previousFrame, const Frame ¤tFrame, const Vectors3 &previousObjectPoints, const Vectors2 &previousImagePoints, const bool distortImagePoints, const unsigned int maximalOffset, HomogenousMatrix4 ¤tPose, Indices32 *validIndices=nullptr, Worker *worker=nullptr)
Determines the camera pose for a current camera frame by tracking image points from the previous fram...
Definition: point/Frame2FrameTracker.h:64
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition: Base.h:96
float Scalar
Definition of a scalar type.
Definition: Math.h:128
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition: Vector2.h:64
std::vector< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition: Vector3.h:65
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15