Motion Tracking | Matrix Scanning

snites5000@gmail.com's icon

My project:

Using a camera placed on the top of a room, I want to use frame differencing to determine how many people are in the space. Depending on the amount of people in the space being tracked (or the amount of whitespace on black) I would like Jitter to light a different colored light through a MIDI Light Controller.

My issues:
Has anyone improved upon the frame differencing/threshold so that the camera is not as grainy? Is there anyway to smooth that out?

How do I ask Jitter to scan the matrix and look for what percentage of the pixels are white versus which are black in real time? (Assuming black is the background and white in a mobile entity) This is a way to tell my MIDI Light Controller that the room is, let's say, 75% full, light the red lamp.

Research:
I have completed most of the Jitter tutorials and downloaded the jit.cv library.

I have also done an extensive search in the forums for "frame differencing", "motion tracking", and "optical flow". I have tested patches found in these posts. I have found a few that do frame differencing to my liking, but the smoothness of the background constant and the actual motion was very very grainy.

------------------------

I am very new to Jitter, about three days in, and need a little bit of help. Can anyone point me in the right direction to my issues? I'm primarily interested in the second issue since I have already found/played with/tweaked a quasi-working differencing imaging patch...but any info for getting rid of the graininess of the camera would also be a massive help.

Thanks and sorry for the novel,
~TSG

Curly's icon

If you are using Jean-Marc's cv.jit libraries ,then look at his help
files for cv.jit.open and cv.jit.close to help with noise removal on
the processing side.

also look at his help file for cv.jit.blobs.centroids and try
changing the thresholds to the op object and the cv.jit.label object.

hopethathelps
ed

ps jean-marc rules

On Mar 3, 2008, at 2:37 AM, nk_snyder wrote:

>
> My project:
>
> Using a camera placed on the top of a room, I want to use frame
> differencing to determine how many people are in the space.
> Depending on the amount of people in the space being tracked (or
> the amount of whitespace on black) I would like Jitter to light a
> different colored light through a MIDI Light Controller.
>
> My issues:
> Has anyone improved upon the frame differencing/threshold so that
> the camera is not as grainy? Is there anyway to smooth that out?
>
> How do I ask Jitter to scan the matrix and look for what percentage
> of the pixels are white versus which are black in real time?
> (Assuming black is the background and white in a mobile entity)
> This is a way to tell my MIDI Light Controller that the room is,
> let's say, 75% full, light the red lamp.
>
> Research:
> I have completed most of the Jitter tutorials and downloaded the
> jit.cv library.
>
> I have also done an extensive search in the forums for "frame
> differencing", "motion tracking", and "optical flow". I have tested
> patches found in these posts. I have found a few that do frame
> differencing to my liking, but the smoothness of the background
> constant and the actual motion was very very grainy.
>
> ------------------------
>
> I am very new to Jitter, about three days in, and need a little bit
> of help. Can anyone point me in the right direction to my issues?
> I'm primarily interested in the second issue since I have already
> found/played with/tweaked a quasi-working differencing imaging
> patch...but any info for getting rid of the graininess of the
> camera would also be a massive help.
>
> Thanks and sorry for the novel,
> ~TSG

Curly's icon

and for your second issue, jit.3m is your friend. it will give you the mean value for your black & white tracking video matrix (which will presumably rise as more people are in the room). OR, if you are using a cv.jit.blobs object you could run the cv.jit.label object into a jit.3m and watch the max value to see how many blobs the camera sees.

good luck