microsoft / HoloLensForCV

Sample code and documentation for using the Microsoft HoloLens for Computer Vision research
MIT License
472 stars 156 forks source link

Is it possible to create a colored point cloud from the resulting data? #133

Open Dsai1006 opened 4 years ago

Dsai1006 commented 4 years ago

Is it possible to create a colored point cloud from the obtained data? If you can, could you please give us some tips on how to do this?

emeraldy commented 4 years ago

hi, yes, it is definitely possible. basically, you reconstruct 3d points from depth data provided by the depth sensor frames. the sdk here has all the api's you need for this process. you can refer to this issue post (https://github.com/microsoft/HoloLensForCV/issues/64) as starting point.

CKunz commented 4 years ago

Hi,

this is possible and not so difficult. But you need to know how. There are several important things to consider. The short (long) throw depth don´t give you the real depth value. It gives you the distance from the clipping plane to the points. You need to perform a unprojection mapping using the u and v matrices.

This is described here: https://github.com/Microsoft/HoloLensForCV/issues/63

Often mistakes are done when not using the right encoding for the depth data: https://github.com/microsoft/HoloLensForCV/issues/56

Also very important as a starting point is the HoloLensForCV project: https://github.com/Microsoft/HoloLensForCV/blob/87c5eeb436ae909894a8049cb2584e60dcad13b0/Shared/HoloLensForCV/SensorFrameRecorder.cpp#L243

Greetings