Jump to content

Help with pcd importer


bandini

Recommended Posts

I started to write a .pcd importer in python to import files using the point cloud data format (http://pointclouds.org/documentation/tutorials/pcd_file_format.php).

I have xyz position taken care of, but I don't exactly understand how to extract the color information from the file. Hoping someone here can provide a short code snippet.

The documentation indicates that the color is encoded as a packed uint32_t rgba value.

Their packing and unpacking method is easy to see in C++, as described here: http://docs.pointclouds.org/1.3.0/structpcl_1_1_r_g_b.html

However, since I have the packed data written out as an ACSII file, what would be the code needed to unpack that in python?

For instance, just the value 4.2108e+06

How to go about unpacking that into color values? That value comes from the test file in the first link above.

Thanks!

Adam

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...