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

Convert binary PCD to ascii PCD with RGB column #17

Open
agutif opened this issue Nov 23, 2018 · 2 comments
Open

Convert binary PCD to ascii PCD with RGB column #17

agutif opened this issue Nov 23, 2018 · 2 comments

Comments

@agutif
Copy link

agutif commented Nov 23, 2018

Hi,

I am using pypcd to convert from binary PCD file to ascii PCD file without installing PCL in my system. My original binary PCD file has x, y, z and rgb data and I use the following code to read it and save it with ascii format:

pc = pypcd.PointCloud.from_path('binary_input.pcd')
pc.save_pcd('ascii_output.pcd', compression='ascii')

All works fine except for the rgb column. The output ascii file has all RGB values set to 0.0.

But if I use this snippet of code I can print the RGB values:

rgb_columns = pypcd.decode_rgb_from_pcl(cloud.pc_data['rgb'])

Thanks.

@XinnWang
Copy link

@agutif i met the same problem, have you solved it?

@agutf
Copy link

agutf commented Oct 20, 2020

@agutif i met the same problem, have you solved it?

Finally I solved it by converting only x, y and z with pypcd. Then, I coded a simple program to convert the rgb column and merge it with the previously converted x, y and z file.

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

No branches or pull requests

3 participants