 |
AliceVision
Photogrammetric Computer Vision Framework
|
9 #include <aliceVision/types.hpp>
10 #include <aliceVision/geometry/Pose3.hpp>
19 using sptr = std::shared_ptr<CameraPose>;
32 : _transform(transform),
51 inline bool isLocked()
const {
return _locked; }
56 inline bool operator==(
const CameraPose& other)
const {
return (_transform == other._transform && _locked == other._locked); }
67 inline void lock() { _locked =
true; }
72 inline void unlock() { _locked =
false; }
74 void initializeState()
78 _state = EEstimatorParameterState::CONSTANT;
82 _state = EEstimatorParameterState::REFINED;
90 bool isRotationOnly()
const
101 _rotationOnly = partial;
110 _removable = removable;
122 inline void updateFromEstimator(
const std::array<double, 6> & data)
125 if (getState() != EEstimatorParameterState::REFINED)
130 const Vec3 r_refined(data.at(0), data.at(1), data.at(2));
131 const Vec3 c_refined(data.at(3), data.at(4), data.at(5));
133 const Mat3 R_refined = SO3::expm(r_refined);
141 geometry::Pose3 _transform;
143 bool _locked =
false;
145 bool _rotationOnly =
false;
147 bool _removable =
true;
CameraPose(const geometry::Pose3 &transform, bool locked=false)
CameraPose constructor.
Definition: CameraPose.hpp:31
EEstimatorParameterState
Defines the state of a parameter for an estimator.
Definition: types.hpp:38
bool isLocked() const
Get the lock state of the camera.
Definition: CameraPose.hpp:51
const geometry::Pose3 & getTransform() const
Get the 3d transformation of the camera.
Definition: CameraPose.hpp:45
bool operator==(const CameraPose &other) const
operator ==
Definition: CameraPose.hpp:56
Definition: checkerDetector.cpp:32
void setRotationOnly(bool partial)
Definition: CameraPose.hpp:99
Definition: CameraPose.hpp:15
void unlock()
unlock the camera pose
Definition: CameraPose.hpp:72
CameraPose()=default
CameraPose default constructor.
void setTransform(const geometry::Pose3 &transform)
Set the 3d transformation of the camera.
Definition: CameraPose.hpp:62
bool isRemovable() const
Can this pose be removed from sfmdata given heuristics ?
Definition: CameraPose.hpp:117
void lock()
lock the camera pose
Definition: CameraPose.hpp:67
void setRemovable(bool removable)
Can this pose be removed from sfmdata given heuristics ?
Definition: CameraPose.hpp:108