-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 color and depth image to a pcd file #680
Conversation
Hi, this looks like a really nice addition. Can you adopt it to the PCL style guide? https://github.com/PointCloudLibrary/pcl/blob/master/CONTRIBUTING.md#pull-requests |
@jspricke I have modified the commit message to adopt the PCL style guide. Please check it. Or somewhere else not adopted to the guide? Thanks. |
pixel[0] = image_data->GetScalarComponentAsDouble(x, y, 0, 0); | ||
for (int x = 0; x < dimensions[0]; x++) | ||
{ | ||
pixel[0] = color_image_data->GetScalarComponentAsDouble(x, y, 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a space before the bracket here. (And in the next line).
I added a few inline comments about missing spaces. Actually there are more of them missing in similar lines, but I stopped in order not to flood, hope you got the point. Also I noticed there are always outer loops over the third dimension: |
Thanks @taketwo |
We'll need to squash this in one commit, please see our wiki page in case you are not sure how to do this. |
Hi, @taketwo commits squashed. |
Use pcl_png2pcd to convert color and depth image to a pcd file. Example: pcl_png2pcd color.png depth.png out.pcd --intensity_type FLOAT Tested with RGB-D dataset from http://rgbd-dataset.cs.washington.edu/dataset/rgbd-scenes
convert color and depth image to a pcd file
I use rgbd dataset from http://rgbd-dataset.cs.washington.edu/dataset/rgbd-scenes/ to test this.
Color image:
Depth image:
Gray image:
Test case 1: color + depth -> pcd(color)
Test case 2: color + depth -> pcd(force gray)
Test case 3: gray + depth -> pcd(gray)
pcl_png2pcd desk_1_10_gray.png desk_1_10_depth.png out.pcd --intensity_type FLOAT
Test case 4: gray + depth -> pcd(force color)