Copy link
Copy Markdown
Member
Fix errors when pass an empty list as a vector<Point2D>:
pycolmap.Image(points2D=[])
RuntimeError: instance allocation failed: new instance has no pybind11-registered base types
camera.cam_from_img([])
TypeError: cam_from_img(): incompatible function arguments.
cc @B1ueber2y
Copy link
Copy Markdown
Contributor
I confirm that the fix works in my test. Thanks! However, do we need to put it in the scene/bindings.cc? It does not feel like the ideal place : )
Copy link
Copy Markdown
Member Author
It really needs to be there. Placing it in point2D.cc doesn't work. A working alternative is to place it in both image.cc and camera.cc , which duplicates code.