[PD] Isolating RGB colours in GEM

Mathieu Bouchard matju at artengine.ca
Sun May 23 22:00:12 CEST 2010


On Sat, 22 May 2010, Ryan Trigg wrote:

> 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] is very good for that stuff. Optionally you can combine 
it with [pix_threshold] or others.

[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


More information about the Pd-list mailing list