#include <cost_functors.h>
|
| | BundleAdjustmentError (const Feature &x, const Matrix3d &K) |
| |
| template<typename T > |
| bool | operator() (const T *const rotation, const T *const translation, const T *const point, T *bundle_adjustment_error) const |
| |
|
| static ceres::CostFunction * | Create (const Feature &x, const Matrix3d &K) |
| |
Definition at line 118 of file cost_functors.h.
| bsfm::BundleAdjustmentError::BundleAdjustmentError |
( |
const Feature & |
x, |
|
|
const Matrix3d & |
K |
|
) |
| |
|
inline |
| static ceres::CostFunction* bsfm::BundleAdjustmentError::Create |
( |
const Feature & |
x, |
|
|
const Matrix3d & |
K |
|
) |
| |
|
inlinestatic |
Definition at line 164 of file cost_functors.h.
166 static const int kNumResiduals = 2;
169 static const int kNumRotationParameters = 3;
172 static const int kNumTranslationParameters = 3;
175 static const int kNumLandmarkParameters = 3;
179 kNumRotationParameters,
180 kNumTranslationParameters,
BundleAdjustmentError(const Feature &x, const Matrix3d &K)
template<typename T >
| bool bsfm::BundleAdjustmentError::operator() |
( |
const T *const |
rotation, |
|
|
const T *const |
translation, |
|
|
const T *const |
point, |
|
|
T * |
bundle_adjustment_error |
|
) |
| const |
|
inline |
Definition at line 129 of file cost_functors.h.
139 origin_point[0] = point[0] - translation[0];
140 origin_point[1] = point[1] - translation[1];
141 origin_point[2] = point[2] - translation[2];
145 ceres::AngleAxisRotatePoint(rotation, origin_point, cam_point);
148 const T& depth = cam_point[2];
149 const T normalized_point[2] = {cam_point[0] / depth, cam_point[1] / depth};
152 const T u =
K_(0, 0) * normalized_point[0] +
153 K_(0, 1) * normalized_point[1] +
K_(0, 2);
154 const T v =
K_(1, 1) * normalized_point[1] +
K_(1, 2);
157 bundle_adjustment_error[0] =
x_.
u_ - u;
158 bundle_adjustment_error[1] =
x_.
v_ - v;
| Matrix3d bsfm::BundleAdjustmentError::K_ |
| Feature bsfm::BundleAdjustmentError::x_ |
The documentation for this struct was generated from the following file: