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

Description

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: http://www.codeproject.com/Articles/317974/KinectDepthSmoothing

This uses version 1.7 of the Kinect for Windows SDK: http://www.microsoft.com/en-us/kinectforwindows/develop/developer-downloads.aspx

Project Information URL: http://kinectdepthsmoothing.codeplex.com

Project Download URL: http://kinectdepthsmoothing.codeplex.com/releases/

Project Source URL: http://kinectdepthsmoothing.codeplex.com/SourceControl/BrowseLatest

image

Contact Information:

The Discussion

  • User profile image
    krsanford

    Thanks for sharing Greg!

  • User profile image
    radityagumay

    Nice!, thanks for sharing

  • User profile image
    kid1412

    Thanks, very useful ^^

  • User profile image
    Apache

    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 !!!

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.