<?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>Chris Teso &#187; flash10</title>
	<atom:link href="http://www.christeso.com/blog/index.php/tag/flash10/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christeso.com/blog</link>
	<description>Chris Teso is Director of Interactive Media, Flash Designer Developer and Portland Photographer.</description>
	<lastBuildDate>Sun, 06 Jun 2010 04:59:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tracking Multiple Objects Using a Webcam</title>
		<link>http://www.christeso.com/blog/index.php/lab/tracking-multiple-objects-using-a-webcam/</link>
		<comments>http://www.christeso.com/blog/index.php/lab/tracking-multiple-objects-using-a-webcam/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 22:36:57 +0000</pubDate>
		<dc:creator>chris teso</dc:creator>
				<category><![CDATA[Laboratory]]></category>
		<category><![CDATA[Tracking Multiple Objects Using a Webcam]]></category>
		<category><![CDATA[Webcam Motion Detection]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[flash10]]></category>
		<category><![CDATA[getColorBoundsRect]]></category>
		<category><![CDATA[motion detection]]></category>
		<category><![CDATA[multiple objects]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://www.christeso.com/?p=317</guid>
		<description><![CDATA[lab]]></description>
			<content:encoded><![CDATA[<p><object width="650" height="490"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2337699&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=2337699&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="650" height="490"></embed></object><br /><a href="http://vimeo.com/2337699">Tracking Multiple Objects Using a Webcam</a> from <a href="http://vimeo.com/user824020">chris teso</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>In continuing exploration into motion tracking using flash and a webcam I&#8217;ve created an application that enables you to track multiple objects based on color. The holy grail of the application is of course to track multiple objects without specifying color. However, this is a good step forward and actually opens up many other avenues for use. Color, after all, is ubiquitous.</p>
<p>The truly useful part of the code is getColorBoundsRect. If you&#8217;re unfamiliar with this function, it determines a rectangular region that either fully encloses all the pixels of a specified color within a BitmapData object, or fully encloses all pixels that do not include the color. The function returns a rectangle around the color area. You can then reference this rectangles x and y respectively.</p>
<p>var areaColor:Rectangle = SomeBitmapData.getColorBoundsRect( 0xFFFFFFFF, _colorArray[i].color, true );</p>
<p>The function is rather finicky about the depth of where the object is. Since it&#8217;s only searching for a certain RGB value it tends to lose it if the lighting or the object gets too small in the camera&#8217;s depth of field. To overcome this you could search for similar colors. <a href="http://blog.soulwire.co.uk/flash/actionscript-3/colourutils-bitmapdata-extract-colour-palette/">Soulwire</a> has written a sweet Color utility class that can aid you in this endeavor. However, searching for a range of colors will also come with it&#8217;s challenges, as the more range of color you search on the tougher it will be to pinpoint the exact object you want to track.</p>
<p>Check out the demo here: <a href="http://www.christeso.com/labs/actionscript-3-webcam-track-multiple-objects.asp">Tracking Multiple Objects Using a Webcam</a> [webcam obv required]</p>
<p>Music: My Morning Jacket &#8211; I&#8217;m Amazed</p>
<p>Permalink: http://www.christeso.com/index.php/lab/tracking-multiple-objects-using-a-webcam/</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=Tracking%20Multiple%20Objects%20Using%20a%20Webcam%20-%20http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Ftracking-multiple-objects-using-a-webcam%2F" title="Twitter"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Ftracking-multiple-objects-using-a-webcam%2F&amp;t=Tracking%20Multiple%20Objects%20Using%20a%20Webcam" title="Facebook"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Ftracking-multiple-objects-using-a-webcam%2F&amp;title=Tracking%20Multiple%20Objects%20Using%20a%20Webcam&amp;bodytext=lab" title="Digg"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Ftracking-multiple-objects-using-a-webcam%2F&amp;title=Tracking%20Multiple%20Objects%20Using%20a%20Webcam&amp;notes=lab" title="del.icio.us"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Ftracking-multiple-objects-using-a-webcam%2F&amp;title=Tracking%20Multiple%20Objects%20Using%20a%20Webcam&amp;annotation=lab" title="Google Bookmarks"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="print"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Ftracking-multiple-objects-using-a-webcam%2F&amp;partner=sociable" title="Print"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.christeso.com/blog/index.php/lab/tracking-multiple-objects-using-a-webcam/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
