zivid / zivid-python-samples

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

Replace PPTK #95

Closed SatjaSivcev closed 2 years ago

SatjaSivcev commented 3 years ago

It seems that PPTK is not supported in Python > 3.8, which is the default for Ubuntu 20.04.

Alternatives: vtk (using it already), Open3D

SatjaSivcev commented 3 years ago

Installing VTK was challenging, perhaps Open3D is the solution.

chrisasc commented 3 years ago

PPTK says it supports python 2.6 or newer, but they have not made any packages for 3.8. I want to try Open3D. It is a new library with continous support and updates. PPTK has not been updated since 2018.

The latest update for Open3D has some nice improvements in the visualizer, http://www.open3d.org/2020/12/24/open3d-0-12/

SatjaSivcev commented 3 years ago

Is there any concrete reason to discard VTK? If I am correct we already have (or we had) a code sample that is using VTK so it might be faster to implement it. However, I am not discouraging using Open3D, on the contrary.

We should choose whatever is best and most used. I think we should choose one library to be our default visualization library (Open3D or VTK for example) and then have a sample to demonstrate visualization with the other one (in case some customers want to use it instead of our default one).

chrisasc commented 3 years ago

I agree that we should settle for one standard visualizer in Python. No reason for not choosing vtk, i can read up on VTK as well. Btw, why doesn't we have a visualizer in python? Cant we wrap the c++ visualiser to python?

SatjaSivcev commented 3 years ago

I am sure we could bu that would have to be implemented in zivid-python. Create an issue in that repo if you want. But that will take time, plus we do want to demonstrate using popular 3D point cloud libraries anyway.

chrisasc commented 3 years ago

Did some digging into this. I would go for open_3d as our new standard. it supports Python 3.6, 3.7 and 3.8, and both windows and Ubuntu(18.04 and 20.04) OS.

the code would like something like this: image

And the resulting viewer will look like this: image

Whats nice about Open3D is that its new and updated/improved regularly. Its easy to install and the visualization is fast without any lagging. You can also switch between color image and depth map view inside the 3D viewer, see image below image

chrisasc commented 3 years ago

I tried VTK but found it very complicated to use (maybe i did something wrong...), as well as something called vedo. The last one did not work at all because it could not process 2.3M points.

Open3D is working on developing a new visualizer, where you can do some pretty cool stuff: http://www.open3d.org/2020/12/24/open3d-0-12/

SatjaSivcev commented 3 years ago

Sounds good. Let's go to for open3d then.

chrisasc commented 3 years ago

created a PR for this: https://github.com/zivid/zivid-python-samples/pull/110