Skip to content

Commit

Permalink
Overload img_from_cam for 3D points (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarlinpe authored Jan 26, 2024
1 parent 90ce2c5 commit 76e72a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pycolmap/scene/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<const Eigen::MatrixX3d>& 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<Point2D>& world_points) {
Expand Down

0 comments on commit 76e72a7

Please sign in to comment.