Factor_ImageReprojCalib.h
Go to the documentation of this file.
1 /*
2  * OpenVINS: An Open Platform for Visual-Inertial Research
3  * Copyright (C) 2018-2023 Patrick Geneva
4  * Copyright (C) 2018-2023 Guoquan Huang
5  * Copyright (C) 2018-2023 OpenVINS Contributors
6  * Copyright (C) 2018-2019 Kevin Eckenhoff
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef OV_INIT_CERES_IMAGEREPROJCALIB_H
23 #define OV_INIT_CERES_IMAGEREPROJCALIB_H
24 
25 #include <Eigen/Dense>
26 #include <ceres/ceres.h>
27 #include <ceres/rotation.h>
28 #include <deque>
29 #include <iostream>
30 #include <map>
31 
32 #include "cam/CamEqui.h"
33 #include "cam/CamRadtan.h"
34 #include "utils/quat_ops.h"
35 
36 namespace ov_init {
37 
41 class Factor_ImageReprojCalib : public ceres::CostFunction {
42 public:
43  // Measurement observation of the feature (raw pixel coordinates)
44  Eigen::Vector2d uv_meas;
45 
46  // Measurement noise
47  double pix_sigma = 1.0;
48  Eigen::Matrix<double, 2, 2> sqrtQ;
49 
50  // If distortion model is fisheye or radtan
51  bool is_fisheye = false;
52 
53  // If value of 1 then this residual adds to the problem, otherwise if zero it is "gated"
54  double gate = 1.0;
55 
62  Factor_ImageReprojCalib(const Eigen::Vector2d &uv_meas_, double pix_sigma_, bool is_fisheye_);
63 
65 
74  bool Evaluate(double const *const *parameters, double *residuals, double **jacobians) const override;
75 };
76 
77 } // namespace ov_init
78 
79 #endif // OV_INIT_CERES_IMAGEREPROJCALIB_H
ov_init::Factor_ImageReprojCalib::Evaluate
bool Evaluate(double const *const *parameters, double *residuals, double **jacobians) const override
Error residual and Jacobian calculation.
Definition: Factor_ImageReprojCalib.cpp:46
quat_ops.h
ov_init::Factor_ImageReprojCalib::pix_sigma
double pix_sigma
Definition: Factor_ImageReprojCalib.h:47
ov_init::Factor_ImageReprojCalib::gate
double gate
Definition: Factor_ImageReprojCalib.h:54
ov_init::Factor_ImageReprojCalib::~Factor_ImageReprojCalib
virtual ~Factor_ImageReprojCalib()
Definition: Factor_ImageReprojCalib.h:64
CamRadtan.h
ov_init
State initialization code.
Definition: Factor_GenericPrior.h:27
ov_init::Factor_ImageReprojCalib::is_fisheye
bool is_fisheye
Definition: Factor_ImageReprojCalib.h:51
ov_init::Factor_ImageReprojCalib::Factor_ImageReprojCalib
Factor_ImageReprojCalib(const Eigen::Vector2d &uv_meas_, double pix_sigma_, bool is_fisheye_)
Default constructor.
Definition: Factor_ImageReprojCalib.cpp:28
ov_init::Factor_ImageReprojCalib::sqrtQ
Eigen::Matrix< double, 2, 2 > sqrtQ
Definition: Factor_ImageReprojCalib.h:48
CamEqui.h
ov_init::Factor_ImageReprojCalib::uv_meas
Eigen::Vector2d uv_meas
Definition: Factor_ImageReprojCalib.h:44
ov_init::Factor_ImageReprojCalib
Factor of feature bearing observation (raw) with calibration.
Definition: Factor_ImageReprojCalib.h:41


ov_init
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Dec 16 2024 03:06:51