zivid / zivid-python-samples

Python code samples for Zivid
https://zivid.com
BSD 3-Clause "New" or "Revised" License
39 stars 16 forks source link

Replace pptk visualizer with open3D #110

Closed chrisasc closed 3 years ago

chrisasc commented 3 years ago

Replacing PPTK with Open3D visualizer, since PPTK does not support Python 3.8. Open3D supports all python versions from 3.5 and is updated on a regular basis.

I'm planning on updating all our visualization samples with the same function. but before I do that I want to make sure that the _display_pointcloud() function is good enough.

chrisasc commented 3 years ago

I am happy with the code now. We just have to agree on what we do with 'np.nan_to_num(xyz)' - after that you can merge and go ahead modifying rest of visualizations.

Perfect. What do you mean with "agree on what we do with 'np.nan_to_num(xyz)'"? We need to convert from NaN to 0. Previously we did this: point_cloud_to_view[np.isnan(xyz[:, :, 2])] = 0 But I think that the np.nan_to_numb() is a nicer way of doing this.

SatjaSivcev commented 3 years ago

I am happy with the code now. We just have to agree on what we do with 'np.nan_to_num(xyz)' - after that you can merge and go ahead modifying rest of visualizations.

Perfect. What do you mean with "agree on what we do with 'np.nan_to_num(xyz)'"? We need to convert from NaN to 0. Previously we did this: point_cloud_to_view[np.isnan(xyz[:, :, 2])] = 0 But I think that the np.nan_to_numb() is a nicer way of doing this.

I meant this: https://github.com/zivid/zivid-python-samples/pull/110#discussion_r574364214 But if this is what we have already been doing, then I am ok, you can merge.

chrisasc commented 3 years ago

Updated README and dependencies.txt too

robertkt1 commented 3 years ago

Is there a reason we chose to copy xyz and rgb outside of _display_pointcloud?