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

transform rgbd image to point cloud #57

Open
benchun123 opened this issue Nov 22, 2020 · 0 comments
Open

transform rgbd image to point cloud #57

benchun123 opened this issue Nov 22, 2020 · 0 comments

Comments

@benchun123
Copy link

Hi,

Thanks for the work, I try to use this library but meet some problem, I will appreciate if you can give me some suggestions:

1, I test the ransac plane estimation function with my own point cloud files (.ply) as following. I want to know if the function works, because it finds the 158492 out of 258733 points that belongs to a plane, the problems maybe the visualization. the original point clouds are shown in other format as fig 2. I also check the header of two files (.ply)
image
image
test.ply
format binary_little_endian 1.0
element vertex 573663
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
property float nx
property float ny
property float nz
property float radius

0000_pcl.ply
format binary_little_endian 1.0
comment PCL generated
element vertex 258733
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element camera 1
property float view_px
property float view_py
property float view_pz
property float x_axisx
property float x_axisy
property float x_axisz
property float y_axisx
property float y_axisy
property float y_axisz
property float z_axisx
property float z_axisy
property float z_axisz
property float focal
property float scalex
property float scaley
property float centerx
property float centery
property int viewportx
property int viewporty
property float k1
property float k2

  1. it seems different, so I also try to load original rgbd images and want to converse to points cloud, when I just change the uri, I met the error with running, the second element of uri can not find the files...

Warning: Video Channels have unequal number of files
terminate called after throwing an instance of 'pangolin::VideoException'
what(): No files found for wildcard ' /path/data/depth_imgs/depth_*.png'
Aborted (core dumped)

3, I also try to split the uri try to load them in respectively, load the rgb image firstly, and use following code to load depth image:
// std::string uri2 = "/path/data/depth_imgs/depth_.png";
// std::unique_ptrpangolin::VideoInterface dok2 = pangolin::OpenVideo(uri2);
// unsigned char
img2 = new unsigned char[dok2->SizeBytes()];
// pangolin::Image depth_img((unsigned short )img2, w, h, wsizeof(unsigned short));
it works but the result can not read the depth image, Is there anything I do wrong?
image

Thanks for your time and suggestions.
Best regards,
Benchun

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

1 participant