Forums > Jitter

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

August 18, 2013 | 4: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:

– Pasted Max Patch, click to expand. –

(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


August 18, 2013 | 8:46 am

Here’s a little progress, something a bit "dirty":

– Pasted Max Patch, click to expand. –

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…


August 18, 2013 | 9:12 am

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.

HTH

Brendan


Viewing 3 posts - 1 through 3 (of 3 total)