From 48fd71a7681c7a03e12bfc17275caa3bb213672e Mon Sep 17 00:00:00 2001 From: Rainer Kuemmerle Date: Sun, 17 Nov 2024 11:06:43 +0100 Subject: [PATCH] Extend python bindings Extend EdgeSE3ProjectXYZOnlyPose and EdgeStereoSE3ProjectXYZ to read/write access to the camera parameters. --- python/types/sba/py_types_six_dof_expmap.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/python/types/sba/py_types_six_dof_expmap.cpp b/python/types/sba/py_types_six_dof_expmap.cpp index 97ae2f260..9fa5eace9 100644 --- a/python/types/sba/py_types_six_dof_expmap.cpp +++ b/python/types/sba/py_types_six_dof_expmap.cpp @@ -98,7 +98,12 @@ void declareTypesSixDofExpmap(py::module& m) { .def("compute_error", &EdgeSE3ProjectXYZOnlyPose::computeError) .def("is_depth_positive", &EdgeSE3ProjectXYZOnlyPose::isDepthPositive) .def("linearize_oplus", &EdgeSE3ProjectXYZOnlyPose::linearizeOplus) - .def("cam_project", &EdgeSE3ProjectXYZOnlyPose::cam_project); + .def("cam_project", &EdgeSE3ProjectXYZOnlyPose::cam_project) + .def_readwrite("fx", &EdgeSE3ProjectXYZOnlyPose::fx) + .def_readwrite("fy", &EdgeSE3ProjectXYZOnlyPose::fy) + .def_readwrite("cx", &EdgeSE3ProjectXYZOnlyPose::cx) + .def_readwrite("cy", &EdgeSE3ProjectXYZOnlyPose::cy) + .def_readwrite("Xw", &EdgeSE3ProjectXYZOnlyPose::Xw); // Projection using focal_length in x and y directions stereo py::class_(