File linear_reprojection_delta.h

namespace sym

Functions

template<typename Scalar>
void LinearReprojectionDelta(const sym::Pose3<Scalar> &source_pose, const sym::LinearCameraCal<Scalar> &source_calibration, const sym::Pose3<Scalar> &target_pose, const sym::LinearCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 2, 1> &source_pixel, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const reprojection_delta = nullptr, Scalar *const is_valid = nullptr)

Reprojects the landmark into the target camera and returns the delta from the correspondence to the reprojection.

The landmark is specified as a pixel in the source camera and an inverse range; this means the landmark is fixed in the source camera and always has residual 0 there (this 0 residual is not returned, only the residual in the target camera is returned).

Args: source_pose: The pose of the source camera source_calibration: The source camera calibration target_pose: The pose of the target camera target_calibration: The target camera calibration source_inverse_range: The inverse range of the landmark in the source camera source_pixel: The location of the landmark in the source camera target_pixel: The location of the correspondence in the target camera epsilon: Small positive value camera_model_class: The subclass of CameraCal to use as the camera model

Outputs: res: 2dof pixel reprojection error valid: is valid projection or not