chielk / robot_eyes

Assignments for UvA MSc AI CV Course
0 stars 1 forks source link

Python-PCL not able to visualise 6D (xyzrgb) points #3

Open aukejw opened 10 years ago

aukejw commented 10 years ago

Seems like we'll have to visualise the pointcloud with its RGBdata in the near future.

We should find a workaround, or find out what the pcd format is (and write a custom method to write our own 6D pcd files).

bantmen commented 8 years ago

Did you guys already figure out a way to serialize it?

aukejw commented 8 years ago

Not sure, the course ended two years ago ;) I'm pretty certain we read and write pcd files using these functions in utils.py, so I don't know if this issue is even relevant anymore.

bantmen commented 8 years ago

I see, thanks :)

aukejw commented 8 years ago

If this is still an issue, and you're encountering this: perhaps it is possible to work around it by reading 6D point clouds in matlab, throwing away the rgb-vectors, saving to 3d point cloud and then reading those using python-pcl? It's probably a hassle though, and won't be of any help if you need the rgb data..

bantmen commented 8 years ago

Yeah that could have worked but I actually need the rgb data in my case. My current plan is to split xyzrgb in order to save the xyz component by using python-pcl and the rgb component as csv. Afterwards, C++ side can read both and then concatenate them into PointXYZRGB. It's a hassle but that's the best I got.

aukejw commented 8 years ago

You could perhaps also try subclassing/altering the cython pointcloud implementation, which is currently hardcoded to handle 3D.

Sadly, all solutions require some additional work. If you haven't already, you could open an issue on python-pcl (something I should have done in the first place), someone there might know of a better workaround.

bantmen commented 8 years ago

I actually already opened an issue there about xyzrgb compatibility. Also, I like your subclassing idea. I might actually just do that and then send a pull request, after I am done with my project milestone ofcourse :)

aukejw commented 8 years ago

Right, I didn't notice it before. Link.

Before you start, it may be worth checking whether that file is the only place where 3D is hardcoded. It's not unlikely that other functions have inputs with some set dimensionality. Before you know it, you'll be rewriting the entire lib.

Also, the latest commit was over a year ago, so I don't know how actively used python-pcl is, whether it's compatible with latest pcl, etc.

In any case, good luck!