Kinect Point Cloud Normals Rendering – Part 2

Having shown you how to create a 3D point cloud from a Kinect depth map in Part 1 I will now go on to explain how to calculate the normals for that point cloud and then render that in 2D by mapping the (x,y,z) normal vector values to R-G-B channel values. To calculate the normal for a given 3D point in the point cloud we will use the point directly to the left of it (i.e. at the point (x-1,y)) and the point directly above it (i.e. at the point (x,y-1)). We will create a triangle of the 3 points…
Read more →

Parallel Processing and Lambda expressions in C++11 – Part 2

If you’ve made the changes to the code from Part 1 then you already have code that should be working dramatically faster. In the next steps I’m going to use C++ templates to further enhance the code. I love C++ templates! I try and use them whenever I can. One of the great things about them is that only the code that is actually used gets generated and compiled. And with C++11 you’ve got the ability to use lambda functions in templates. This is useful if you’re using STL. It’s also useful for us here. Before I do that I…
Read more →

Parallel Processing and Lambda expressions in C++11 – Part 1

One of the exciting new features introduced with C++11 is lambda expressions. .NET has had these for a while so its nice to be able to use them in C++ too. A common task in video processing and graphics is to perform some operation over an image. When doing this you’ll typically process the image buffer a row at a time as this speeds up processing. Microsoft have introduced the Concurrency Runtime with their C++11 compiler. This gives you the ability to process the image in a parallel fashion. If you’ve got Visual Studio 2013 and have installed the help,…
Read more →