8 #ifndef CORELIB_SRC_OPTIMIZER_CERES_BUNDLE_SNAVELY_REPROJECTION_ERROR_H_ 9 #define CORELIB_SRC_OPTIMIZER_CERES_BUNDLE_SNAVELY_REPROJECTION_ERROR_H_ 11 #include "ceres/ceres.h" 12 #include "ceres/rotation.h" 23 : observed_x(observed_x), observed_y(observed_y), fx(fx), fy(fy) {}
32 ceres::AngleAxisRotatePoint(camera, point, p);
43 T predicted_x =
fx * xp;
44 T predicted_y =
fy * yp;
58 return (
new ceres::AutoDiffCostFunction<SnavelyReprojectionError, 2, 6, 3>(
static ceres::CostFunction * Create(const double observed_x, const double observed_y, const double fx, const double fy)
SnavelyReprojectionError(double observed_x, double observed_y, double fx, double fy)
ULogger class and convenient macros.
bool operator()(const T *const camera, const T *const point, T *residuals) const