| 38 | RigReprojErrorConstantRigCostFunctor<CameraModel>>; |
| 39 | |
| 40 | void BindCostFunctions(py::module& m_parent) { |
| 41 | py::module_ m = m_parent.def_submodule("cost_functions"); |
| 42 | IsPyceresAvailable(); // Try to import pyceres to populate the docstrings. |
| 43 | |
| 44 | m.def( |
| 45 | "ReprojErrorCost", |
| 46 | &CreateCameraCostFunction<ReprojErrorCostFunctor, const Eigen::Vector2d&>, |
| 47 | "camera_model_id"_a, |
| 48 | "point2D"_a, |
| 49 | "Reprojection error."); |
| 50 | m.def("ReprojErrorCost", |
| 51 | &CreateCameraCostFunction<CovarianceWeightedReprojErrorCostFunctor, |
| 52 | const Eigen::Matrix2d&, |
| 53 | const Eigen::Vector2d&>, |
| 54 | "camera_model_id"_a, |
| 55 | "point2D_cov"_a, |
| 56 | "point2D"_a, |
| 57 | "Reprojection error with 2D detection noise."); |
| 58 | |
| 59 | m.def("ReprojErrorCost", |
| 60 | &CreateCameraCostFunction<ReprojErrorConstantPoseCostFunctor, |
| 61 | const Eigen::Vector2d&, |
| 62 | const Rigid3d&>, |
| 63 | "camera_model_id"_a, |
| 64 | "point2D"_a, |
| 65 | "cam_from_world"_a, |
| 66 | "Reprojection error with constant camera pose."); |
| 67 | m.def("ReprojErrorCost", |
| 68 | &CreateCameraCostFunction< |
| 69 | CovarianceWeightedReprojErrorConstantPoseCostFunctor, |
| 70 | const Eigen::Matrix2d&, |
| 71 | const Eigen::Vector2d&, |
| 72 | const Rigid3d&>, |
| 73 | "camera_model_id"_a, |
| 74 | "point2D_cov"_a, |
| 75 | "point2D"_a, |
| 76 | "cam_from_world"_a, |
| 77 | "Reprojection error with constant camera pose and 2D detection noise."); |
| 78 | |
| 79 | m.def("ReprojErrorCost", |
| 80 | &CreateCameraCostFunction<ReprojErrorConstantPoint3DCostFunctor, |
| 81 | const Eigen::Vector2d&, |
| 82 | const Eigen::Vector3d&>, |
| 83 | "camera_model_id"_a, |
| 84 | "point2D"_a, |
| 85 | "point3D"_a, |
| 86 | "Reprojection error with constant 3D point."); |
| 87 | m.def("ReprojErrorCost", |
| 88 | &CreateCameraCostFunction< |
| 89 | CovarianceWeightedReprojErrorConstantPoint3DCostFunctor, |
| 90 | const Eigen::Matrix2d&, |
| 91 | const Eigen::Vector2d&, |
| 92 | const Eigen::Vector3d&>, |
| 93 | "camera_model_id"_a, |
| 94 | "point2D_cov"_a, |
| 95 | "point2D"_a, |
| 96 | "point3D"_a, |
| 97 | "Reprojection error with constant 3D point and 2D detection noise."); |
no test coverage detected