I have a project to develop and I am new with structure sensors and I can not find any example that can help me.

What I need is a code or an example of how to make 3D solids of what my sensors are visualizing and to be able to export it in .obj or .stl format.

I do not want to use software that does it, what I need is the code either in opencv or openni2 that is functional, someone could guide me in what I need or a base code so that I can visualize in visual studio, I’m using USB Hacker Cable in windows 10 with opencv and visual studio.

Thank you, I would appreciate your help.


You might want to look at the code for the NiViewer:

Here’s a list of all the samples seen with OpenNI2 and their code:

Also, for reference:


is practically what I want to do with a raspberry pi 3, I do not know how to start, can you help me?


Once you are able to sample the sensor with OpenNI2, I suggest you to use these libraries to generate a solid object:

Point cloud management (PCL):

Visualization Toolkit:

They are well documented and you can find many examples.