Ray tracing 3D Models

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Ray tracing 3D Models

somnath
Hello
 I am trying ray trace 3D models to generate kind of depth map ,i.e to have
pixel indices along with 3d point. Is there any functionality in pcl to
achieve the same. I actually need such data to create ground truth point
cloud inorder to test registration algorithms. Any help would be highly
appreciated



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Ray tracing 3D Models

alcantara
To generate ground truth data, one good way is to use blensor http://www.blensor.org/

You can generate the .pcd files and then test your algorithms.

bests,

2018-03-07 17:11 GMT-03:00 somnath <[hidden email]>:
Hello
 I am trying ray trace 3D models to generate kind of depth map ,i.e to have
pixel indices along with 3d point. Is there any functionality in pcl to
achieve the same. I actually need such data to create ground truth point
cloud inorder to test registration algorithms. Any help would be highly
appreciated



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users



--
Engenheiro/Pesquisador de Robótica Offshore | Engineer/Researcher of Offshore Robotics
Universidade Federal do Rio de Janeiro | 
Federal University of Rio de Janeiro
Gabriel Alcantara Costa Silva

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Ray tracing 3D Models

Sérgio Agostinho
In reply to this post by somnath

Ray tracking is a concept which doesn't make sense unless you have an actual mesh. That being said we have the following class at your disposal

VoxelGridOcclusionEstimation

and this one uses an intermediate voxel representation to achieve the ray tracing effect.


Cheers


On 07-03-2018 20:11, somnath wrote:
Hello
 I am trying ray trace 3D models to generate kind of depth map ,i.e to have
pixel indices along with 3d point. Is there any functionality in pcl to
achieve the same. I actually need such data to create ground truth point
cloud inorder to test registration algorithms. Any help would be highly
appreciated



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ray tracing 3D Models

somnath
Hello Sergio
Thanks for your reply. I could find a pcl tool (mesh2pcd.cpp) that actually
converts a CAD model( polymesh) to a pointCloud model using ray tracing
technique , however i also need the pixel coordinates for points of each
individual point cloud. To be specific  all the points that are present in
each point cloud  should have a valid corresponding pixel index. I am not
sure if i could get hold of those pixel values using some pcl functionality.



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Ray tracing 3D Models

Sérgio Agostinho

Have you looked into the point clouds `views_xyz` returned from this function, to check if they're organized, i.e. have a height and width properly set?

Cheers

On 11-03-2018 11:00, somnath wrote:
Hello Sergio
Thanks for your reply. I could find a pcl tool (mesh2pcd.cpp) that actually
converts a CAD model( polymesh) to a pointCloud model using ray tracing
technique , however i also need the pixel coordinates for points of each
individual point cloud. To be specific  all the points that are present in
each point cloud  should have a valid corresponding pixel index. I am not
sure if i could get hold of those pixel values using some pcl functionality. 



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ray tracing 3D Models

somnath
The cloud does not seems to be organized as returned from the function. Each
point cloud in "views_xyz" has width equal to  no. of points and height as
1.



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Ray tracing 3D Models

Sérgio Agostinho

Yep. Those dimensions express exactly that, which is somewhat unfortunate. Since they are ray traced there's no reason not to encode that information.

Have you tried changing this following lines to populate them with the proper dimension and assign the points correctly, aka assign NaNs if the ray  doesn't hit anything. If I'm not mistaken and please double check this, the points vector is organized in "height\row major" order.

If this solves it for you please file a pull request in the issue tracker proposing the change.

Cheers



_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ray tracing 3D Models

Sérgio Agostinho
I just noticed there's some more stuff down that method which you'll
need to have a look at but I still believe what you want to do be possible.

Cheers





_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (836 bytes) Download Attachment