From 76e72a7a0307e60fa9d3d5d375ca79600b5348e9 Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin <15985472+sarlinpe@users.noreply.github.com> Date: Fri, 26 Jan 2024 09:44:23 +0100 Subject: [PATCH] Overload img_from_cam for 3D points (#256) --- pycolmap/scene/camera.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pycolmap/scene/camera.h b/pycolmap/scene/camera.h index 3eab552..d682d3c 100644 --- a/pycolmap/scene/camera.h +++ b/pycolmap/scene/camera.h @@ -176,6 +176,14 @@ void BindCamera(py::module& m) { return image_points; }, "Project list of points from world / infinity to image plane.") + .def( + "img_from_cam", + [](const Camera& self, + const py::EigenDRef& world_points) { + return py::cast(self).attr("img_from_cam")( + world_points.rowwise().hnormalized()); + }, + "Project list of points from world / infinity to image plane.") .def( "img_from_cam", [](const Camera& self, const std::vector& world_points) {