Ask Your Question
0

bitmap representation of a point cloud.

asked 2017-10-31 08:57:17 -0600

tomasth gravatar image

updated 2019-12-09 07:49:05 -0600

ojesus gravatar image

I have xyz surface data of an object which I'd like to display on the screen in a similar way as I would be able to in e.g. CloudCompare or MeshLab. My thought was to generate a bitmap using some pre-defined viewpoint.

I've loaded my xyz/pcd into a 3 channel 32 bit float Mat.

Does anyone know of a straightforward way to do this with opencv. I do not have viz.

edit retag flag offensive close merge delete

Comments

you could convert/normalize your z-plane to uchar, and use some heatmap

(assuming, you have a "dense" cloud, like exactly 1 z-value for each (x,y))

berak gravatar imageberak ( 2017-10-31 09:11:12 -0600 )edit

Thank you @berak. Not quite what I had in mind but maybe useful nonetheless. I guess what I want is closer to PCL land.

tomasth gravatar imagetomasth ( 2017-10-31 10:03:46 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-10-31 10:18:13 -0600

Tetragramm gravatar image

You should probably use PCL or something like that to do this. OpenCV isn't really meant for it.

You can do project points, round each result to the nearest pixel, and get the range to each. For pixels with multiple points, keep the closest. Color based on the distance, like berak suggested. Then do inpainting to fill in any holes.

As I said, not really meant for it.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-10-31 08:57:17 -0600

Seen: 630 times

Last updated: Oct 31 '17