# 3D point cloud to 2.5D graycale image (metric) [Halcon?]

I have a problem ragarding transferring a point cloud to a 2.5D metric grayscale image (gray value gives depth information). I start with a three channel image of 32bit floats with each pixel representing the three coordinates in mm (metric).

Halcon is the preferred library, but not necessary.

I hope that someone can help me.

Greetings from Stuttgart, Germany

Max

• What was the problem? Apr 3 '15 at 5:27
• I do not know how to transfer a point cloud to 2.5D metric grayscale image. (operators??) Apr 7 '15 at 14:08
• Here's a good place to start: en.wikipedia.org/wiki/3D_projection Apr 8 '15 at 5:03
• If I misunderstood the question, I'm sorry. Apr 8 '15 at 5:03

Your 3 channels already give you the 3D coordinates, and from that 3 images, you already know which pixels locations the 3D data are projected. So you don't need to do anything. If you like to get a depth image, just set: $$depth(i,j) = z(i,j)$$ In Halcon, you just select the Z-channel using access_channel. If you desire a distance image, then: $$distance(i,j) = \lVert (x,y,z)^T \rVert$$ The norm defines the distance metric you would like to use. Traditionally, I would say Euclidean $$\|\cdot\|=\sqrt{x^2+y^2+z^2}$$. You could do this in any language by using operations like addition, multiplication and square roots.