Kinect Depth Smoothing, updated for Kinect for Windows SDK v1.7

Sign in to queue


Well over a year ago we highlighted a project by Karl Sanford that helps with one of the common questions/issues encountered with Kinect, "noise" in Say No to the noise... Real-Time Kinect depth frame smoothing

Karl is continuing to improve his project and has recently moved it to CodePlex and updated with the Kinect for Windows v1.7 SDK.

Kinect Depth Smoothing

Removes noise from the Kinect Depth Frames in real-time using pixel filters and weighted moving average techniques.

More here:

This uses version 1.7 of the Kinect for Windows SDK:

Project Information URL:

Project Download URL:

Project Source URL:


Contact Information:

The Discussion

  • User profile image

    Thanks for sharing Greg!

  • User profile image

    Nice!, thanks for sharing

  • User profile image

    Thanks, very useful ^^

  • User profile image

    Hello guys.
    Thank you very much for sharing: this is a nice piece of code for real.
    I have a question: I'm trying to translate this in C++ to have the possibility to use this with the native methods and create a library.
    I'm having troubles with the lambda expression.

    This is the C# version of the code:

    // Process each row in parallel
    Parallel.For(0, height, depthArrayRowIndex => {
    // Process each pixel in the row
    for (int depthArrayColumnIndex = 0; depthArrayColumnIndex < width; depthArrayColumnIndex++) {
    var index = depthArrayColumnIndex + (depthArrayRowIndex * width);

    and this is my C++ version:

    // We process each row in parallel
    concurrency::parallel_for(0, (int)depthWidth, [&widthBound, &heightBound, &smoothDepthArray] () {
    // Process each pixel in the row
    for (int depthArrayColumnIndex = 0; depthArrayColumnIndex < depthWidth; depthArrayColumnIndex++) {
    int depthIndex = depthArrayColumnIndex + (depthArrayRowIndex * depthWidth);

    but obviously depthArrayRowIndex is not recognized and my code is not compiling. Have you got any suggestion on how I can fix this? Probably I've not get the point on how the C# code is working: is depthArrayRowIndex a recursive call? If not, can you please explain me what is it and how can I replicate the code in C++?

    Thank you very very much !!!

Add Your 2 Cents