Count the amount of depth pixels ther are when there mesurments fall within a set range RRS feed

  • General discussion

  • I am loading an array with the individule depth mesurments for each pixel comming from my Kinect V2. Whats the best way to count how maney pixels in the array  fall with in a specified mesurment range that I can set.


    Tuesday, March 31, 2015 12:55 AM

All replies

  • I am sure you can find a searching algorithm that would work for your needs, but there isn't a best way. You are going to have to look at each pixel from the frame anyway, so making sure that can done in parallel. If you find a depth in a pixel that meets your criteria, increment a counter. 

    Carmine Sirignano - MSFT

    Tuesday, March 31, 2015 5:49 PM
  • if you work with C# then you may consider using Parallel LINQ (PLINQ) for that.

    For unmanaged code you may consider find_if (or other functions from algorithm.h). However, best results you can achieve by using C++ AMP or CUDA

    Tuesday, March 31, 2015 6:54 PM