[jit.openni] usermap filtering issue or: how to filter the nearest pixel

    Aug 18 2013 | 11:18 am
    Hello everybody, I'm trying to filter users in jit.openni's usermap in order to make further separate masking on each silouhette. However, I'm encountering an issue, as I noticed that jit.openni does correctly output users IDs for every pixel, but it also creates an edge of value "1" around every user. So, tracking user 1 results in showing a full user's silouhette sorrounded by the "ghosts" of other users, while tracking users >1 obviously works fine. This patch should explain:
    (the attached file is an example matrix frame showing a usermap of two users, I'm also attaching a screenshot for the lazy people ;) )
    I think a solution to this issue would be an algorithm like: "for every pixel value >1, check the nearest pixel, and if it is == 1, set pixel to 0, otherwise pass it".
    I was trying to achieve this in jit.gen, but I'm currently stuck with filtering values and then sampling the nearest...maybe someone could give me some hints?
    thank you

    • Aug 18 2013 | 3:46 pm
      Here's a little progress, something a bit "dirty":
      basically, I am passing the ">1" part into cv.jit.dilate and then subtracting it to the "==1" part. And it kinda works, with some occasional spare pixels left by the subtraction. Anyway, I'm still looking for a more "elegant" solution...
    • Aug 18 2013 | 4:12 pm
      Hi lska
      Straight up I'll say Jitter is a closed book to me, but Sam shows some manipulation of "nearest pixel" logic in his video reverb tutorial. Look for "Delicious Max 6" on YouTube.