counting blobs, reacting to groups

Esj's icon

Hi,

i'm fairly new to max and am using jitter for an installation, what i have so far counts the number of people in a space (with a birds eye camera), and i'm using the number of people in the space to affect a sound, one problem i'm running into though, is if several people stand together it counts them as one big blob, this is fine, but i would like the sound to react accordingly, where do i start looking for an object that will give me a number output depending on the size of the blobs that it detects? for example, if there are 10 peopple in the space, 6 of them walking around alone, and 4 walking around in a group, i want the patch to recognise this, at the moment it would just say 7 people (6 plus the group = 1 + 6)

sorry if i am explaining myself badly, i can attach part of my patch if needed

Thanks!

azs's icon

If you just need the sound to be relative to the amount of people, you don't necessarily need to count the people. You could do background subtraction and then scale the average pixel brightness to affect the audio. Therefore, dark pixels = no people, light pixels= people. More people = more light pixels, higher average.

nesa's icon

Hi,

the cv.jit.blobs.centroids outputs x,y and area of each detected blob.

Perhaps you could investigate what is the average area of a one-person blob and compare it to detected blob areas(In this case you'll also have to hope that audience won't spread their hands, lie on the floor or wear bulbous bouffants too much).

If you need just the number of people in the area, perhaps you could use RFID tags or something similar? Lovely design around your tag might be a nice present to your audience as well - everybody likes giveaways!

Esj's icon

asz + mesa, i ended up using the two modes on jit.label, one counting blob numbers and one scaling pixel brightness, and i've clipped it to 50 - there will be an exhibition going on in the space i'm monitoring so it will be packed with people and i don't want the installation to overdrive too much..

thanks for your help!

Joe