B1ueber2y · GitHub

@B1ueber2y

Copy link Copy Markdown

Contributor

@B1ueber2y

@B1ueber2y

Copy link Copy Markdown

Contributor Author

Example:

import pycolmap
p = pycolmap.Point2D()
p.point3D_id = pycolmap.INVALID_POINT3D_ID

sarlinpe

@B1ueber2y

@B1ueber2y

Copy link Copy Markdown

Contributor Author

On the other hand, I have made several attempts to improve the doc rendering of Image class (e.g., B1ueber2y@ e205e62 ). But no luck so far.

@ahojnnes

Copy link Copy Markdown

Contributor

Thanks. Nit: For consistency across Python, I would suggest calling it INVALID_POINT3D_ID etc. It could also make sense to adjust the str __repr__ to print out kInvalidPoint3DId or INVALID_POINT3D_ID instead of -1?

@B1ueber2y

ahojnnes

@B1ueber2y

Copy link Copy Markdown

Contributor Author

Thanks. Nit: For consistency across Python, I would suggest calling it INVALID_POINT3D_ID etc. It could also make sense to adjust the str __repr__ to print out kInvalidPoint3DId or INVALID_POINT3D_ID instead of -1?

Thanks. I have updated the names to upper cases. Now the __repr__ is controlled in the C++ side after the recent update: https://github.com/colmap/colmap/blob/main/src/colmap/scene/image.cc#L107 (while the one for point2D is missing still), so the pybind part does not help.

@sarlinpe

Copy link Copy Markdown

Member

On the other hand, I have made several attempts to improve the doc rendering of Image class (e.g., B1ueber2y@e205e62). But no luck so far.

You need to replace

"camera_id"_a = kInvalidCameraId,

by

py::arg_v("camera_id", kInvalidCameraId, "pycolmap.INVALID_CAMERA_ID"),

and so on.

@B1ueber2y

Copy link Copy Markdown

Contributor Author

On the other hand, I have made several attempts to improve the doc rendering of Image class (e.g., B1ueber2y@e205e62). But no luck so far.

You need to replace

"camera_id"_a = kInvalidCameraId,

by

py::arg_v("camera_id", kInvalidCameraId, "pycolmap.INVALID_CAMERA_ID"),

and so on.

Thanks. Updated.

sarlinpe

Copy link Copy Markdown

Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, can you also update this one?

"point3D_id"_a = kInvalidPoint3DId)

@B1ueber2y

Copy link Copy Markdown

Contributor Author

@sarlinpe

Copy link Copy Markdown

Member

I missed it, sorry.

@B1ueber2y

@B1ueber2y

HernandoR pushed a commit to HernandoR/colmap that referenced this pull request

Dec 30, 2024

Merged

Read the original on github.com ↗