Okay, I have been fighting with this for about 7-8 hours now, and it just isn't working.
The basic outline of the patch, now with gem objects (and leaving out some details) is:
[gemhead]
v
[pix_video]
v
[pix_movement]
v
[pix_crop] -- the x and y offsets are driven by a subpatch that acts like a nested loop
v
[pix_blob] -- mode 4 = alpha channel
... and the x, y and size outlets are packed into a list and sent out by OSC.
The problem is that pix_blob very frequently outputs nothing. This really shouldn't happen, if all the objects were doing what I think. Explanation --
Suppose in one frame, I crop the image to the top left quadrant and calculate pix_blob just for that quadrant. Then, on the next frame, I crop to the top right quadrant and get pix_blob again. The successive frames may have very different blob coordinates, and I'd expect to get the different sets of coordinates each time. Instead, pix_blob goes silent sometimes.
I thought, maybe it goes quiet because there was no change -- but these are different areas of the image, and the likelihood of having the same centroid in two different slices of the image seems rather low.
Or maybe it's because the frames are so different that pix_blob doesn't know what to do. (I have no way to guess, in the absence of documentation of exactly what pix_blob is doing.)
Sorry to keep posting so much about this, but I really have to get this working, documentation is not answering my questions, and my previous thread (link) has gone dead. I'm starting to get a bit desperate. At this point, I may have no choice but to chuck out the vast majority of the data I was hoping to get from the camera and go for just one, simple, dumb centroid. Rather frustrating.
Thanks in advance -- I will give credit in the concert program to people who can help me get this running.
James
PS You also need a 320x240 black image. saved as "black320x240.png" - I made one with GIMP. Or just delete the pix_composite part.