addressed final comments
parent
260312af38
commit
653dbbb935
|
@ -313,9 +313,8 @@ public:
|
|||
}
|
||||
|
||||
/// for Linear Triangulation
|
||||
Matrix34 getCameraProjectionMatrix() const {
|
||||
Matrix34 P = Matrix34(PinholeBase::pose().inverse().matrix().block(0, 0, 3, 4));
|
||||
return K_.K() * P;
|
||||
Matrix34 cameraProjectionMatrix() const {
|
||||
return K_.K() * PinholeBase::pose().inverse().matrix().block(0, 0, 3, 4);
|
||||
}
|
||||
|
||||
/// for Nonlinear Triangulation
|
||||
|
|
|
@ -417,7 +417,7 @@ public:
|
|||
}
|
||||
|
||||
/// for Linear Triangulation
|
||||
Matrix34 getCameraProjectionMatrix() const {
|
||||
Matrix34 cameraProjectionMatrix() const {
|
||||
Matrix34 P = Matrix34(PinholeBase::pose().inverse().matrix().block(0, 0, 3, 4));
|
||||
return K_->K() * P;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
|
||||
namespace gtsam {
|
||||
|
||||
/**
|
||||
* Empty calibration. Only needed to play well with other cameras
|
||||
* (e.g., when templating functions wrt cameras), since other cameras
|
||||
* have constuctors in the form ‘camera(pose,calibration)’
|
||||
* @addtogroup geometry
|
||||
* \nosubgrouping
|
||||
*/
|
||||
class GTSAM_EXPORT EmptyCal {
|
||||
public:
|
||||
enum { dimension = 0 };
|
||||
|
@ -42,7 +49,8 @@ class GTSAM_EXPORT EmptyCal {
|
|||
};
|
||||
|
||||
/**
|
||||
* A spherical camera class that has a Pose3 and measures bearing vectors
|
||||
* A spherical camera class that has a Pose3 and measures bearing vectors.
|
||||
* The camera has an ‘Empty’ calibration and the only 6 dof are the pose
|
||||
* @addtogroup geometry
|
||||
* \nosubgrouping
|
||||
*/
|
||||
|
@ -183,7 +191,7 @@ class GTSAM_EXPORT SphericalCamera {
|
|||
}
|
||||
|
||||
/// for Linear Triangulation
|
||||
Matrix34 getCameraProjectionMatrix() const {
|
||||
Matrix34 cameraProjectionMatrix() const {
|
||||
return Matrix34(pose_.inverse().matrix().block(0, 0, 3, 4));
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>
|
|||
projectionMatricesFromCameras(const CameraSet<CAMERA> &cameras) {
|
||||
std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projection_matrices;
|
||||
for (const CAMERA &camera: cameras) {
|
||||
projection_matrices.push_back(camera.getCameraProjectionMatrix());
|
||||
projection_matrices.push_back(camera.cameraProjectionMatrix());
|
||||
}
|
||||
return projection_matrices;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projectionMatricesFrom
|
|||
std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projection_matrices;
|
||||
for (size_t i = 0; i < poses.size(); i++) {
|
||||
PinholePose<CALIBRATION> camera(poses.at(i), sharedCal);
|
||||
projection_matrices.push_back(camera.getCameraProjectionMatrix());
|
||||
projection_matrices.push_back(camera.cameraProjectionMatrix());
|
||||
}
|
||||
return projection_matrices;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue