diff --git a/modules/python/bindings/include/vision.hpp b/modules/python/bindings/include/vision.hpp index eaef9011bf..a18078554a 100644 --- a/modules/python/bindings/include/vision.hpp +++ b/modules/python/bindings/include/vision.hpp @@ -50,6 +50,18 @@ void bindings_vpPose(py::class_> &pyPose) [](vpPose &self, vpPose::vpPoseMethodType method, vpHomogeneousMatrix &cMo) -> bool { return self.computePose(method, cMo); }); + + pyPose.def_static("computePlanarObjectPoseFromRGBD", + [](const vpImage &depthMap, const std::vector &corners, + const vpCameraParameters &colorIntrinsics, + const std::vector &point3d) -> std::tuple { + double confidence = 0.0; + vpHomogeneousMatrix cMo; + bool valid = vpPose::computePlanarObjectPoseFromRGBD(depthMap, corners, colorIntrinsics, point3d, cMo, &confidence); + return std::make_tuple(valid, cMo, confidence); + }); + + } diff --git a/modules/python/config/vision.json b/modules/python/config/vision.json index acae54766e..a620749033 100644 --- a/modules/python/config/vision.json +++ b/modules/python/config/vision.json @@ -28,7 +28,15 @@ ] }, "vpPose": { - "additional_bindings": "bindings_vpPose" + "additional_bindings": "bindings_vpPose", + "methods": [ + { + "static": true, + "signature": "bool computePlanarObjectPoseFromRGBD(const vpImage&, const std::vector&, const vpCameraParameters&, const std::vector&, vpHomogeneousMatrix&, double*)", + "ignore": true, + "custom_implem": true + } + ] } } }