Kinect to Point... Clouds
This article is the follow-up of my article on grabbing a point cloud using the Microsoft Kinect v2. What's new is:
- display of the point cloud in a OpenGL control.
- Point Cloud generation tools for geometric objects
- Point cloud manipulation tools for rotation, translation, scaling
I use the Kinect v2 to extract point clouds, and needed a simple code to display and handle point clouds. For this I did not find a simple utility in the internet.
I tried to use the Point Cloud Library, but a simple interface for .NET is missing. Using it in C++ is also not quite easy, compiling means that you include about 1 million header files. Compilation is slow and there are a lot of things to take care, a lot of group entries to read until you get it running on your particular system. Perhaps it is easier with Linux, but at least with Windows 64 bit you spend some time to get it running. This overhead is large, if you want to simply load a point cloud, and do some operations on it.
The VTK library seemed to be an alternative, but unfortunately the community is not that active any more, so it is seldom updated and the current version is quite old. I gave it a try however, see the link of my Kinect article. Using the VTK in .NET is not very nice since the C++ implementation is not well encapsulated in the C# port (Activiz), so that for instance you are not able to check values in the debugger very well, or need to take care of destroying objects yourself. Things that slow down your development.
These are only the top two of my trials.
Then I found a very nice C# program which does almost everything I wanted, from Douglas Andrade at cmsoft. He gave me the permission to take his code and extract a part of it to use it as a user control.
Now that I have extracted this user control, perhaps it is useful also for other people doing point clouds handling. I think, many people engaged in scientific 3D investigations are interested in having a simple library.
The disadvantage might be that it is currently relying on a MS Windows operating systems, but it could be ported also to Mono.
The great advantage is that you can start right away using the code, and do not need days of work for finding dependencies or other overhead which you have to do with most of the other existing project.
Features of the user control
For a brief description of the features please follow the steps
1. Start the test program
2. Load a point cloud e.g. the bunny.obj file, this is available in the bin/TestData folder of the source and exe distribution. (The bunny.obf file is a freely available point cloud from the Stanford university, used in a lot of projects in the web: Link).