I made this object a while ago to track red and blue, but it can be extended to track other pure colors:
On Sat, 22 May 2010, Ryan Trigg wrote:[pix_colormatrix] is very good for that stuff. Optionally you can combine it with [pix_threshold] or others.
I am currently trying to find a way to isolate a colour in a live video stream. For example, if I chose red, any object in the video that does not contain red (above a certain threshold) would be black. Does such an object exist in GEM? Thanks for your help.
[pix_colormatrix] allows you, for example, to do things like new_red = old_red - old_green - old_blue, in order to identify redness in a way that excludes yellow, purple and white. You'd make a column with constants 1, -1, -1.
For singling out other colors you would use those numbers in a different order, or the numbers 1, 1, -2 in any order (for secondary colors), or any other combination (for finding other colors).
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list