compare kinect v2 pixel rgb values and set a bit to 0 or 1 in a array if it meets a criteria RRS feed

  • Question

  •  I am collecting X,Y and RGB values for a group of pixels from a kinect v2 and sorting them into 5 individual arrays (X_array, Y_array, R_array, G_array and B_array.  What im trying to do for example is to scan the  R_value array and if a number in that array meets a certain criteria set a bit to 0 or 1 in a array that mirrors the length and position of  R_value array

    Any Ideas

    Saturday, November 26, 2016 9:19 PM

All replies

  • Ideas about what exactly? Sounds pretty straightforward to me. You have access to the rgb image and you know how many pixels it is and you also know the region you want to look at. But I don't see what the problem is. You are not saying what you can't do or what goes wrong.

    Saturday, November 26, 2016 10:36 PM
  • lets say I have the R value (example 154) extracted from one  pixel. What I want to do is set a limit of say 175 and if that pixel goes above 175 a bit is set to 1 and if the pixel goes below 175 the same bit is set to zero. What I'm trying to do is send data to a PLC. I can already sent the extracted RGB values to the PLC. What I would prefer to to is just send an array of 1's and  0's determined by a threshold I set instead of the array of rgb values
    Sunday, November 27, 2016 12:35 AM
  • If you are asking if there is an API method in Kinect SDK to perform this operation, then the answer is no. You need to write the algorithm yourself.

    Sunday, November 27, 2016 11:33 AM
  • You can implement a BitArray/Mask in both C++/C#(in c# it's a bit more of a hassle but doable) and you can find solutions for it by googling. Also since there's no Point Cloud feature in the SDK and it's a third party library, you can only do it yourself.
    Sunday, November 27, 2016 11:45 AM