Blob detection with cv.jit - finding out where the biggest part of a blob is
Hello,
I am working on a patch right now for a interactive sound installation in a special education school. Basically what I am doing is creating two sound atmospheres. One is "over water" and one "under water". I get the "over water" data by using a kinect depth image, filtering out the distance and then using blob detection. So when there is a blob detectet, that means, the person is "over water".
So far the patch is working fine. What I want to do now is trigger different sounds in different regions of the "over water" atmosphere. So let's say I divide the video Input in 4 equal squares. To detect if a person is located in part I, II, III or IV my idea is, that somehow I could find out in which part of the picture there is the biggest part of the blob. (I drew a picture to illustrate what I mean) Could anyone help me to accomplish this task. Or if anyone has another idea on how to achieve what I'm trying to do, this would also help me a lot.
Andy
Hey Andy, if you use blobs.centroids you will get an xy coordinate that is the centre of the blob, then you can just test which boundaries x and y are within? Possibly I am not getting it...
Hey, yes thank you, that's exactly what I wanted. Did not get the idea on my own.
But I also have another problem. Most of the time I do not have one big blob like in the picture, but a few more that are not combined. Any suggestions on how I could find out where there is the most "blob surface" when there are smaller blobs in different locations?
Yes, this can be a problem. You can process the image somewhat to get a better blob. I do this with a floor projection system I built for a special needs school using an IR camera. The pasted patch goes in between the video feed and the blob centroids section. If you have trouble using it then maybe post a patch and I'll see what I can do. The third plane of blobs centroids is the area of the blob so you can work out which the biggest one is and discard the rest if that works for you.