39 #ifndef INCLUDE_OKVIS_CERES_REPROJECTIONERROR_HPP_
40 #define INCLUDE_OKVIS_CERES_REPROJECTIONERROR_HPP_
44 #include <ceres/ceres.h>
55 template<
class GEOMETRY_TYPE>
60 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
67 typedef ::ceres::SizedCostFunction<2, 7, 4, 7>
base_t;
103 std::shared_ptr<const camera_geometry_t> cameraGeometry)
142 virtual bool Evaluate(
double const*
const * parameters,
double* residuals,
143 double** jacobians)
const;
157 double** jacobiansMinimal)
const;
168 return parameter_block_sizes().size();
176 return base_t::parameter_block_sizes().at(parameterBlockId);
182 return "ReprojectionError";
virtual const covariance_t & covariance() const
Get the covariance matrix.
Definition: ReprojectionError.hpp:129
std::shared_ptr< const camera_geometry_t > cameraGeometry_
The camera model:
Definition: ReprojectionError.hpp:191
Header file for the ErrorInterface class. A simple interface class that other error classes should in...
Header file for the PoseLocalParemerization class.
virtual bool Evaluate(double const *const *parameters, double *residuals, double **jacobians) const
This evaluates the error term and additionally computes the Jacobians.
Definition: ReprojectionError.hpp:77
covariance_t squareRootInformation_
The 2x2 square root information matrix.
Definition: ReprojectionError.hpp:195
virtual std::string typeInfo() const
Residual block type as string.
Definition: ReprojectionError.hpp:180
virtual const measurement_t & measurement() const
Get the measurement.
Definition: ReprojectionError.hpp:115
measurement_t measurement_
The (2D) measurement.
Definition: ReprojectionError.hpp:188
virtual void setMeasurement(const measurement_t &measurement)
Set the measurement.
Definition: ReprojectionError.hpp:95
covariance_t covariance_
The 2x2 covariance matrix.
Definition: ReprojectionError.hpp:196
static const int kNumResiduals
Number of residuals (2)
Definition: ReprojectionError.hpp:70
The 2D keypoint reprojection error.
Definition: ReprojectionError.hpp:56
#define OKVIS_DEFINE_EXCEPTION(exceptionName, exceptionParent)
Macro for defining an exception with a given parent.
Definition: assert_macros.hpp:52
This file contains some useful assert macros.
2D keypoint reprojection error base class.
Definition: ReprojectionErrorBase.hpp:71
covariance_t information_
The 2x2 information matrix.
Definition: ReprojectionError.hpp:194
virtual void setInformation(const covariance_t &information)
Set the information.
Definition: ReprojectionError.hpp:66
Header file for the ReprojectionErrorBase class.
::ceres::SizedCostFunction< 2, 7, 4, 7 > base_t
The base class type.
Definition: ReprojectionError.hpp:67
Eigen::Vector2d keypoint_t
The keypoint type (measurement type).
Definition: ReprojectionError.hpp:73
size_t parameterBlocks() const
Number of parameter blocks.
Definition: ReprojectionError.hpp:166
size_t parameterBlockDim(size_t parameterBlockId) const
Dimension of an individual parameter block.
Definition: ReprojectionError.hpp:174
Eigen::Vector2d measurement_t
Measurement type (2D).
Definition: ReprojectionErrorBase.hpp:75
virtual bool EvaluateWithMinimalJacobians(double const *const *parameters, double *residuals, double **jacobians, double **jacobiansMinimal) const
This evaluates the error term and additionally computes the Jacobians in the minimal internal represe...
Definition: ReprojectionError.hpp:87
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef GEOMETRY_TYPE camera_geometry_t
Make the camera geometry type accessible.
Definition: ReprojectionError.hpp:64
size_t residualDim() const
Residual dimension.
Definition: ReprojectionError.hpp:160
virtual const covariance_t & information() const
Get the information matrix.
Definition: ReprojectionError.hpp:122
void setCameraGeometry(std::shared_ptr< const camera_geometry_t > cameraGeometry)
Set the underlying camera model.
Definition: ReprojectionError.hpp:102
Header implementation file for the ReprojectionError class.
Eigen::Matrix2d covariance_t
Covariance / information matrix type (2x2).
Definition: ReprojectionErrorBase.hpp:78
uint64_t cameraId() const
Camera ID.
Definition: ReprojectionErrorBase.hpp:57