commit
151923cf3b
|
|
@ -127,16 +127,19 @@ Point2 Cal3Bundler::calibrate(const Point2& pi,
|
||||||
// Dcal = -inv(H_uncal_pn) * df/pi = -inv(H_uncal_pn) * (-I) = inv(H_uncal_pn)
|
// Dcal = -inv(H_uncal_pn) * df/pi = -inv(H_uncal_pn) * (-I) = inv(H_uncal_pn)
|
||||||
// Dp = -inv(H_uncal_pn) * df/K = -inv(H_uncal_pn) * H_uncal_K
|
// Dp = -inv(H_uncal_pn) * df/K = -inv(H_uncal_pn) * H_uncal_K
|
||||||
Matrix23 H_uncal_K;
|
Matrix23 H_uncal_K;
|
||||||
Matrix22 H_uncal_pn;
|
Matrix22 H_uncal_pn, H_uncal_pn_inv;
|
||||||
|
|
||||||
if (Dcal || Dp) {
|
if (Dcal || Dp) {
|
||||||
// Compute uncalibrate Jacobians
|
// Compute uncalibrate Jacobians
|
||||||
uncalibrate(pn, Dcal ? &H_uncal_K : nullptr, H_uncal_pn);
|
uncalibrate(pn, Dcal ? &H_uncal_K : nullptr, H_uncal_pn);
|
||||||
|
|
||||||
if (Dp) *Dp = H_uncal_pn.inverse();
|
H_uncal_pn_inv = H_uncal_pn.inverse();
|
||||||
if (Dcal) *Dcal = -H_uncal_pn.inverse() * H_uncal_K;
|
|
||||||
|
if (Dp) *Dp = H_uncal_pn_inv;
|
||||||
|
if (Dcal) *Dcal = -H_uncal_pn_inv * H_uncal_K;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return pn;
|
return pn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1106,7 +1106,7 @@ typedef gtsam::PinholeCamera<gtsam::Cal3_S2> PinholeCameraCal3_S2;
|
||||||
//TODO (Issue 237) due to lack of jacobians of Cal3DS2_Base::calibrate, PinholeCamera does not apply to Cal3DS2/Unified
|
//TODO (Issue 237) due to lack of jacobians of Cal3DS2_Base::calibrate, PinholeCamera does not apply to Cal3DS2/Unified
|
||||||
//typedef gtsam::PinholeCamera<gtsam::Cal3DS2> PinholeCameraCal3DS2;
|
//typedef gtsam::PinholeCamera<gtsam::Cal3DS2> PinholeCameraCal3DS2;
|
||||||
//typedef gtsam::PinholeCamera<gtsam::Cal3Unified> PinholeCameraCal3Unified;
|
//typedef gtsam::PinholeCamera<gtsam::Cal3Unified> PinholeCameraCal3Unified;
|
||||||
//typedef gtsam::PinholeCamera<gtsam::Cal3Bundler> PinholeCameraCal3Bundler;
|
typedef gtsam::PinholeCamera<gtsam::Cal3Bundler> PinholeCameraCal3Bundler;
|
||||||
|
|
||||||
#include <gtsam/geometry/StereoCamera.h>
|
#include <gtsam/geometry/StereoCamera.h>
|
||||||
class StereoCamera {
|
class StereoCamera {
|
||||||
|
|
@ -2769,8 +2769,7 @@ class SfmTrack {
|
||||||
class SfmData {
|
class SfmData {
|
||||||
size_t number_cameras() const;
|
size_t number_cameras() const;
|
||||||
size_t number_tracks() const;
|
size_t number_tracks() const;
|
||||||
//TODO(Varun) Need to fix issue #237 first before this can work
|
gtsam::PinholeCamera<gtsam::Cal3Bundler> camera(size_t idx) const;
|
||||||
// gtsam::PinholeCamera<gtsam::Cal3Bundler> camera(size_t idx) const;
|
|
||||||
gtsam::SfmTrack track(size_t idx) const;
|
gtsam::SfmTrack track(size_t idx) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue