kl3m3n's blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Create a range image in LabView from 3D point cloud using PCL Z-buffering

Klemen
Active Participant

Hello,

it is often of great value to compare the difference in depth of two objects after the 3D alignment of two point clouds. Obviously, this cannot be performed directly on the acquired depth images, since after the alignment (ICP for example) the indices from one depth image do not neccessarily correspond to the other depth image. Thus the depth calculation difference is erroneous.

This can be performed correctly using Z-buffering. I use a 3D viewer (developed at my company) that is able to obtain depth images from the specified viewpoint in the viewer. This makes it possible for me to correctly determine the deviation between two surfaces after the ICP alignment. Sadly, I cannot share the above mentioned viewer code, so I have prepared an alternative using the functionalities of the Point Cloud Library. The core of the code is basically taken from here:

http://pointclouds.org/documentation/tutorials/range_image_creation.php

and

http://pointclouds.org/documentation/tutorials/range_image_visualization.php

The screenshots below show the example. The code creates a pose of the virtual sensor using a specified coordinate system and creates a range image from a 3D point cloud(for more information, check the text in the first link above). I suggest using such setup that the axes of the measured object are aligned (as much as possible) to the axes of the coordinate system.


Figure 1. 3D of the measured surface.

depth.png

Figure 2. Depth image (Z-coordinate) from Figure 1 (top) and the range image taken form the 3D point cloud from Figure 1 (bottom).

Please don't ask why the depth scale is different for both cases and it really should not matter, when comparing two range images taken with the same setup parameters, since only the difference is relevant.

The code I am attaching is the source code (c++), built .dll (release version) and a LabView example that uses the .dll.

The code was built using PCL 1.6.0 and the LabView version is 2010.

Like always, please leave any comments below!

Hope this helps somebody.

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Comments