<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>REDBLIND &#187; motion detection</title>
	<atom:link href="http://redblind.com/blog/topic/motion-detection/feed/" rel="self" type="application/rss+xml" />
	<link>http://redblind.com/blog</link>
	<description>Blog of Jonathan Cipriano</description>
	<lastBuildDate>Mon, 27 Dec 2010 21:21:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Color Tracking Source</title>
		<link>http://redblind.com/blog/2009/11/19/color-tracking-source/</link>
		<comments>http://redblind.com/blog/2009/11/19/color-tracking-source/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 19:02:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[color isolation]]></category>
		<category><![CDATA[color tracking]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[motion detection]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://redblind.com/blog/?p=261</guid>
		<description><![CDATA[When I was researching color tracking with Flash, there were surprisingly few examples. The examples I did find did not have any source to download. So, I am offering up my source code from  my color tracking experiment. The ColorIsolator class is based on an old AS2 algorithm by Mario Klingemann (Quasimondo) for selective color. I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>When I was researching color tracking with Flash, there were surprisingly few examples. The examples I did find did not have any source to download. So, I am offering up my source code from  <a title="color tracking" href="http://redblind.com/blog/2009/09/09/color-tracking/" target="_self">my color tracking experiment</a>. The ColorIsolator class is based on an old <a title="quasimondo - selective color" href="http://www.quasimondo.com/archives/000614.php" target="_blank">AS2 algorithm by Mario Klingemann</a> (Quasimondo) for selective color. I&#8217;ve translated it here to AS3 and applied it to video from the webcam.</p>
<p>It works like this. Once a color is selected from the video, using a seriess of thresholds, the ColorIsolator drops all pixels that don&#8217;t fall within the defined range of the target color. The remaining pixels are set to the target color and getColorBoundsRect is used to pinpoint the remaining blob of color. It&#8217;s really simple. I had the general idea, but I didn&#8217;t understand how to define a range of  color until I found Klingermann&#8217;s code.</p>
<p>I would consider this just a starting point. It actually works very well, but there are a number of things that can be done to improve it. Here are my recommendations to try out:</p>
<ol>
<li>Try using HSV color values rather than RGB.</li>
<li>Introduce a palleteMap in place of or in addition to the saturation/contrast ColorMatrixFilter.</li>
<li>Add blob detection to ignore anomalies/artifacts of the target color.</li>
</ol>
<p><a title="Color Tracking Source" href="http://redblind.com/codesamples/REDBLIND_ColorTracking.zip">Download source here.</a></p>
<p><a title="Color Tracking Source" href="ftp://joncipriano.com@redblind.com/domains/redblind.com/html/codesamples/REDBLIND_ColorTracking.zip"></a>All I ask is for constructive criticism and to let me know if and where you use this. A credit to myself and Mario in your source code comments would be nice.</p>
<p>Thanks to <a title="soulwire - justin windle" href="http://blog.soulwire.co.uk/" target="_blank">Justin Windle</a> (soulwire) for a great exchange of ideas for this.</p>
]]></content:encoded>
			<wfw:commentRss>http://redblind.com/blog/2009/11/19/color-tracking-source/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

