I made this object a while ago to track red and blue, but it can be extended to track other pure colors:<div><br></div><div><a href="http://www.jaimeoliver.pe/archives/645">http://www.jaimeoliver.pe/archives/645</a></div><div>
<br></div><div>best,</div><div><br></div><div>J<br><br><div class="gmail_quote">On Sun, May 23, 2010 at 1:00 PM, Mathieu Bouchard <span dir="ltr">&lt;<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Sat, 22 May 2010, Ryan Trigg wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>



</blockquote>
<br></div>
[pix_colormatrix] is very good for that stuff. Optionally you can combine it with [pix_threshold] or others.<br>
<br>
[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&#39;d make a column with constants 1, -1, -1.<br>



<br>
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).<br><font color="#888888">
<br>
 _ _ __ ___ _____ ________ _____________ _____________________ ...<br>
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801</font><br>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jaime E Oliver LR<br><br><a href="http://www.jaimeoliver.pe" target="_blank">www.jaimeoliver.pe</a><br><br>858 750 0924 (cel)<br>858 202 1522 (home)<br>9168 Regents Rd. Apt. G<br>

La Jolla, CA 92037<br>
USA<br>
</div>