Having some trouble fully getting to grips with [pix_multiblob]. The patch attached works in the sense that it is recognizing one of my red squares I move into frame. Not really sure what I can do to get it to recognised the second, as I've been working alongside the help file and have got stuck.
Detecting multiple blobs using [pix_multiblob]
@Claire080499 You will have to modify this a little probably........... blobby.pd
The camera doesn't work on my laptop so there is some guesswork.
The right outlet of [pix_multiblob] needs to be routed to as many [pd showblob] as you need.
The messages come in as "matrix... blob number.... data"
Put a [print] on that outlet and you will see them.
I have stripped out "matrix" and then routed the messages by blob number.
But [pd showblob] uses dollars to grab each data from the list.
So after the routing I have put the "matrix blobnumber" back to preserve the data positions in the list.
Also it's "blobSize"..... NOT "blobsize"
@whale-av After fidling around with the patch in my university seminar, my lecture and I noticed that the x value of the showblob is constant at 9, which doesn't make a lot of sense. Any idea why this is?
@Claire080499 My mistake. It is very hard without a camera.
So I misunderstood.
And in the help file [pd showblob] throws away "matrix" as a header anyway (it doesn't count for the dollar numbers).
That is why it's first bit of data is $3 and not $4..... that threw me.
All the data is in one message (not one message for each blob).
matrix columns (no. of blobs detected) rows(always 9) data (9 parts) data (9 parts).......etc.
So for one blob...... matrix(binned) 1 9 $3 $4 $5 $6 $7 $8 $9 $10 $11
For 2 blobs............ matrix(binned) 2 9 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20
And so what you need for [pd showblob] is the first 9 dollars for the first blob and the second 9 for the second.
$3 $4 $5 $6 $7 $8 $9 $10 $11
$12 $13 $14 $15 $16 $17 $18 $19 $20
Sorry again..... it's late..... this should work
The [0 0 0 0 0 0 0 0 0( message sets the values for blob 2 when it does not exist.
You might want to change those values or it might be just fine.
Between my dad and I, we managed to find a much easier solution for my problem as I don't think I explained it very well. I needed to know the number of red objects the patch could see and have this number trigger a specific output. 1 red dot = chord sequence 1, for example. This is what we ended up with chords.mp4