8 #ifndef META_OCEAN_TRACKING_RMV_RANDOM_MODEL_VARIATION_H
9 #define META_OCEAN_TRACKING_RMV_RANDOM_MODEL_VARIATION_H
68 template <
bool tLessImagePo
ints>
69 static bool optimizedPoseFromPointCloudsWithOneInitialPoseIF(
const HomogenousMatrix4& initialPoseIF,
const PinholeCamera& pinholeCamera,
const Vector3* objectPoints,
const size_t numberObjectPoints,
const Vector2* imagePoints,
const size_t numberImagePoints,
const size_t numberValidCorrespondences,
RandomGenerator& randomGenerator,
HomogenousMatrix4& poseIF,
const Geometry::Error::ErrorDetermination errorDetermination,
const Scalar targetAverageSqrError =
Scalar(4 * 4),
const Vector3& maximalTranslationOffset =
Vector3(
Scalar(0.3),
Scalar(0.3),
Scalar(0.3)),
const Scalar maximalOrientationOffset =
Numeric::deg2rad(30),
const double timeout = 1,
Scalar* resultingSqrError =
nullptr,
IndexPairs32* correspondences =
nullptr,
bool* explicitStop =
nullptr,
Worker* worker =
nullptr);
106 template <
bool tLessImagePo
ints>
107 static bool optimizedPoseFromPointCloudsWithSeveralInitialPosesIF(
const HomogenousMatrix4* initialPosesIF,
const size_t numberInitialPoses,
const PinholeCamera& pinholeCamera,
const Vector3* objectPoints,
const size_t numberObjectPoints,
const Vector2* imagePoints,
const size_t numberImagePoints,
const size_t numberValidCorrespondences,
RandomGenerator& randomGenerator,
HomogenousMatrix4& poseIF,
const Geometry::Error::ErrorDetermination errorDetermination,
const Scalar targetAverageSqrError =
Scalar(4 * 4),
const Vector3& maximalTranslationOffset =
Vector3(
Scalar(0.3),
Scalar(0.3),
Scalar(0.3)),
const Scalar maximalOrientationOffset =
Numeric::deg2rad(30),
const double timeout = 1,
Scalar* resultingSqrError =
nullptr,
bool* explicitStop =
nullptr,
Worker* worker =
nullptr);
141 template <
bool tLessImagePo
ints>
142 static bool optimizedPoseFromPointCloudsAbortableIF(
const HomogenousMatrix4* initialPoseIF,
const PinholeCamera* pinholeCamera,
const Vector3* objectPoints,
const size_t numberObjectPoints,
const Vector2* imagePoints,
const size_t numberImagePoints,
const size_t numberValidCorrespondences,
RandomGenerator* randomGenerator,
HomogenousMatrix4* poseIF,
const Geometry::Error::ErrorDetermination errorDetermination,
const Scalar targetAverageSqrError =
Scalar(4 * 4),
Vector3 maximalTranslationOffset =
Vector3(
Scalar(0.3),
Scalar(0.3),
Scalar(0.3)),
Scalar maximalOrientationOffset =
Numeric::deg2rad(30),
const double timeout = 1,
Scalar* resultingSqrError =
nullptr,
IndexPairs32* correspondences =
nullptr,
bool* explicitStop =
nullptr,
Lock* lock =
nullptr);
175 template <
bool tLessImagePo
ints>
176 static bool optimizedPoseFromPointCloudsPoseIFSubset(
const HomogenousMatrix4* initialPosesIF,
const unsigned int firstInitialPose,
const unsigned int numberInitialPoses,
const PinholeCamera* pinholeCamera,
const Vector3* objectPoints,
const size_t numberObjectPoints,
const Vector2* imagePoints,
const size_t numberImagePoints,
const size_t numberValidCorrespondences,
RandomGenerator* randomGenerator,
HomogenousMatrix4* poseIF,
const Geometry::Error::ErrorDetermination errorDetermination,
const Scalar targetAverageSqrError,
Vector3 maximalTranslationOffset,
Scalar maximalOrientationOffset,
const double timeout,
Scalar* resultingSqrError,
bool* explicitStop,
Lock* lock);
198 static bool assignBestPoseIF(
const Vector2* smallPointGroup,
const size_t smallPointGroupNumber,
const Vector2* largePointGroup,
const size_t largePointGroupNumber,
const size_t numberValidCorrespondences,
const Scalar candidateSqrError,
const HomogenousMatrix4& poseCandidateIF,
HomogenousMatrix4& poseIF,
const Geometry::Error::ErrorDetermination errorDetermination,
const Scalar targetAverageSqrError,
Scalar* resultingSqrError,
IndexPairs32* correspondences,
bool* explicitStop,
Lock* lock);
ErrorDetermination
Definition of different error determination stages.
Definition: Error.h:41
This class implements a recursive lock object.
Definition: Lock.h:31
static constexpr T deg2rad(const T deg)
Converts deg to rad.
Definition: Numeric.h:3232
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
This class implements random model variation algorithms.
Definition: RandomModelVariation.h:35
static bool optimizedPoseFromPointCloudsWithOneInitialPoseIF(const HomogenousMatrix4 &initialPoseIF, const PinholeCamera &pinholeCamera, const Vector3 *objectPoints, const size_t numberObjectPoints, const Vector2 *imagePoints, const size_t numberImagePoints, const size_t numberValidCorrespondences, RandomGenerator &randomGenerator, HomogenousMatrix4 &poseIF, const Geometry::Error::ErrorDetermination errorDetermination, const Scalar targetAverageSqrError=Scalar(4 *4), const Vector3 &maximalTranslationOffset=Vector3(Scalar(0.3), Scalar(0.3), Scalar(0.3)), const Scalar maximalOrientationOffset=Numeric::deg2rad(30), const double timeout=1, Scalar *resultingSqrError=nullptr, IndexPairs32 *correspondences=nullptr, bool *explicitStop=nullptr, Worker *worker=nullptr)
Returns the optimized camera pose for a given rough pose, a cloud of object points and a cloud of ima...
static bool optimizedPoseFromPointCloudsAbortableIF(const HomogenousMatrix4 *initialPoseIF, const PinholeCamera *pinholeCamera, const Vector3 *objectPoints, const size_t numberObjectPoints, const Vector2 *imagePoints, const size_t numberImagePoints, const size_t numberValidCorrespondences, RandomGenerator *randomGenerator, HomogenousMatrix4 *poseIF, const Geometry::Error::ErrorDetermination errorDetermination, const Scalar targetAverageSqrError=Scalar(4 *4), Vector3 maximalTranslationOffset=Vector3(Scalar(0.3), Scalar(0.3), Scalar(0.3)), Scalar maximalOrientationOffset=Numeric::deg2rad(30), const double timeout=1, Scalar *resultingSqrError=nullptr, IndexPairs32 *correspondences=nullptr, bool *explicitStop=nullptr, Lock *lock=nullptr)
Returns the extrinsic camera matrix by a rough pose, valid object points and image points with a suff...
static bool optimizedPoseFromPointCloudsPoseIFSubset(const HomogenousMatrix4 *initialPosesIF, const unsigned int firstInitialPose, const unsigned int numberInitialPoses, const PinholeCamera *pinholeCamera, const Vector3 *objectPoints, const size_t numberObjectPoints, const Vector2 *imagePoints, const size_t numberImagePoints, const size_t numberValidCorrespondences, RandomGenerator *randomGenerator, HomogenousMatrix4 *poseIF, const Geometry::Error::ErrorDetermination errorDetermination, const Scalar targetAverageSqrError, Vector3 maximalTranslationOffset, Scalar maximalOrientationOffset, const double timeout, Scalar *resultingSqrError, bool *explicitStop, Lock *lock)
Returns the optimized camera pose for a subset of several given rough pose candidates,...
static bool assignBestPoseIF(const Vector2 *smallPointGroup, const size_t smallPointGroupNumber, const Vector2 *largePointGroup, const size_t largePointGroupNumber, const size_t numberValidCorrespondences, const Scalar candidateSqrError, const HomogenousMatrix4 &poseCandidateIF, HomogenousMatrix4 &poseIF, const Geometry::Error::ErrorDetermination errorDetermination, const Scalar targetAverageSqrError, Scalar *resultingSqrError, IndexPairs32 *correspondences, bool *explicitStop, Lock *lock)
Assigns a pose candidate to a target pose if the pose quality is better than the currently known pose...
static bool optimizedPoseFromPointCloudsWithSeveralInitialPosesIF(const HomogenousMatrix4 *initialPosesIF, const size_t numberInitialPoses, const PinholeCamera &pinholeCamera, const Vector3 *objectPoints, const size_t numberObjectPoints, const Vector2 *imagePoints, const size_t numberImagePoints, const size_t numberValidCorrespondences, RandomGenerator &randomGenerator, HomogenousMatrix4 &poseIF, const Geometry::Error::ErrorDetermination errorDetermination, const Scalar targetAverageSqrError=Scalar(4 *4), const Vector3 &maximalTranslationOffset=Vector3(Scalar(0.3), Scalar(0.3), Scalar(0.3)), const Scalar maximalOrientationOffset=Numeric::deg2rad(30), const double timeout=1, Scalar *resultingSqrError=nullptr, bool *explicitStop=nullptr, Worker *worker=nullptr)
Returns the optimized camera pose for several given rough pose candidates, a cloud of object points a...
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
std::vector< IndexPair32 > IndexPairs32
Definition of a vector holding 32 bit index pairs.
Definition: Base.h:144
float Scalar
Definition of a scalar type.
Definition: Math.h:128
VectorT3< Scalar > Vector3
Definition of a 3D vector.
Definition: Vector3.h:22
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15