Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nerfcapture2nerf.py to allow to run it without depth info #1533

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Konstantysz
Copy link

As written in pybind issue, when passing None to C++ function, numpy actually passes NaN. This leads to access violation as (const float*)depth_buf.ptr in void set_image(int frame_idx, pybind11::array_t<float> img, pybind11::array_t<float> depth_img, float depth_scale) is not nullptr, while being empty.
Other solution would be to make void set_image(int frame_idx, pybind11::array_t<float> img, pybind11::array_t<float> depth_img, float depth_scale) argument depth_img type std::optional<pybind11::array_t<float>>. This would lead to no code duplication, however requires C++17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant