<?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>Metal Fish Eggs &#187; Research</title>
	<atom:link href="http://blog.zincroe.com/category/research/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zincroe.com</link>
	<description>Ramblings from the team at zinc Roe</description>
	<lastBuildDate>Fri, 23 Jul 2010 20:45:25 +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>Mirrored Video Object in Flash</title>
		<link>http://blog.zincroe.com/2010/07/mirrored-video-object-in-flash/</link>
		<comments>http://blog.zincroe.com/2010/07/mirrored-video-object-in-flash/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 20:29:34 +0000</pubDate>
		<dc:creator>Carlo</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://blog.zincroe.com/?p=674</guid>
		<description><![CDATA[When using the webcam in your flash applications, it can be handy to flip the video object so it acts like a mirror. Many of the flash webcam demos out there does exactly this, usually by setting the scaleX property&#8230;]]></description>
			<content:encoded><![CDATA[<p>When using the webcam in your flash applications, it can be handy to flip the video object so it acts like a mirror. Many of the flash webcam demos out there does exactly this, usually by setting the scaleX property of the video object to -1. Unfortunately, because the registration point of the video object is set on the top left corner, setting the scaleX property to a negative value moves the display object like flipping a page in a book from right to left.</p>
<div id="attachment_675" class="wp-caption aligncenter" style="width: 478px"><a href="http://blog.zincroe.com/wp-content/uploads/2010/07/reg_point.jpg"><img src="http://blog.zincroe.com/wp-content/uploads/2010/07/reg_point.jpg" alt="Setting scaleX to -1 on a display object" title="Setting scaleX to -1 on a display object" width="468" height="257" class="size-full wp-image-675" /></a><p class="wp-caption-text">Setting scaleX to -1 on a display object</p></div>
<p>Of course, you can easily place the video object back to where it was by compensating for the flip and adding the video object&#8217;s width to it&#8217;s current x value. While this solution works for most applications, there is one annoying thing about this method. If you ever want to move the video object around the stage or play with it&#8217;s scaleX value, there&#8217;s going to be a lot of compensating going on and it can get messy quick depending on the complexity of your application.</p>
<p>So to make it easier, here&#8217;s a class that extends the Video object and adds a &#8220;flipped&#8221; property. I don&#8217;t think I need to explain what the property does, but the class overrides the x and scaleX properties of Video so that it takes care of all the positioning when flipping the display object. Check out the demo [webcam required]:</p>
<p><object id="MirrorDemo" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#cccccc" /><param name="src" value="http://blog.zincroe.com/wp-content/uploads/2010/07/HardwareDetection.swf" /><param name="name" value="MirrorDemo" /><param name="allowfullscreen" value="false" /><embed id="MirrorDemo" type="application/x-shockwave-flash" width="550" height="400" src="http://blog.zincroe.com/wp-content/uploads/2010/07/HardwareDetection.swf" name="MirrorDemo" bgcolor="#cccccc" quality="high" allowfullscreen="false" allowscriptaccess="sameDomain" align="middle"></embed></object></p>
<p>Even when flipped, the x property always references the left side of the video object and the scaleX remains the same. Here&#8217;s the source: <a href='http://blog.zincroe.com/wp-content/uploads/2010/07/MirrorDemo.zip'>MirrorDemo.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zincroe.com/2010/07/mirrored-video-object-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Motion &amp; Activity Tracking in Flash</title>
		<link>http://blog.zincroe.com/2009/07/motion-activity-tracking-in-flash/</link>
		<comments>http://blog.zincroe.com/2009/07/motion-activity-tracking-in-flash/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 15:28:08 +0000</pubDate>
		<dc:creator>Carlo</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Show and Tell]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blog.zincroe.com/?p=282</guid>
		<description><![CDATA[With the introduction of <em>FLARToolkit</em> and other means of tracking user input through a webcam in flash, I recently had a chance to read up on some of the other ways we can interact with flash applications using a webcam.
<strong>Camera.activityLevel</strong>
The&#8230;]]></description>
			<content:encoded><![CDATA[<p>With the introduction of <em>FLARToolkit</em> and other means of tracking user input through a webcam in flash, I recently had a chance to read up on some of the other ways we can interact with flash applications using a webcam.</p>
<p><strong>Camera.activityLevel</strong></p>
<p>The most basic way to detect activity through a webcam in flash is by accessing the Camera object&#8217;s <em>activityLevel</em> property. This returns a number from 0 to 100, depending on how much activity is going on. While useful in simple applications, this doesn&#8217;t give us a way to check for specific gestures or a way to check a specific section of the video for activity.</p>
<p><strong>BitmapData.getPixel()</strong></p>
<p>A popular way to detect motion is by using the <em>BitmapData</em> object in flash. By taking &#8220;snapshots&#8221; of the video coming in from the webcam constantly (using either <em>Event.ENTER_FRAME</em>, or the <em>Timer</em> object), we end up with frames that we can compare by looping through each pixel and checking to see which has changed. This technique is useful for checking which areas of the video has activity. We can use it to interact with buttons or other display objects by simply waving our hand over it. Though it can be very intensive (specially when working with video that has large dimensions), it is one of the best and most reliable way to detect motion in flash.</p>
<p><strong>Augmented Reality &amp; Marker Tracking</strong></p>
<p>As mentioned earlier, another option is to use <a title="FLARToolkit" href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en" target="_blank">saqoosha&#8217;s FLARToolkit</a>. If you haven&#8217;t played with it before, you should definitely check it out&#8230;after reading my blog post to the end, of course. From what I understand (and correct me if I&#8217;m wrong), this neat library also uses the BitmapData object to take stills of the video from the webcam. It then manipulates the bitmaps in order to detect and extract the position of a marker in 3D space. You can then use flash 3D libraries like Papervision to apply those coordinates to a 3D object and display it on top of the marker as if it&#8217;s a physical object. This method requires the user to print out a specific symbol and display it in front of a webcam. The wicked thing about FLARToolkit is that it doesn&#8217;t restrict you to using just Papervision, you can use Away3D or no 3D at all!</p>
<p>Though it comes packaged with Papervision and Away3D, with a bit of &#8220;code spelunking&#8221;, you can strip out the 3D stuff and gain access to the marker&#8217;s x,y, and z properties. By doing this, you end up with a basic marker tracking library which you can use for pretty much anything your nerdy heart desires. In my case, my nerdy heart and I created a very basic game where you have to catch falling apples using only simple vector MovieClips. Check it out below:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/1Rc1rBC9rd4&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="340" src="http://www.youtube.com/v/1Rc1rBC9rd4&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://blog.zincroe.com/wp-content/uploads/2009/07/FallingApples.zip">Download Source</a></p>
<p><strong>Moving MovieClips with your hand (or other limbs) using the webcam</strong></p>
<p>Now after playing with the BitmapData motion detection and the FLARToolkit, I went on a mission. A mission to find/figure out a way to interact with display objects on the stage using the webcam, BUT without using markers. After a bit of searching, I was able to find this <a title="Bubble Demo" href="http://www.youtube.com/watch?v=u8tGiV6M2qY&amp;feature=related" target="_blank">demo on youtube</a> which is close to what I want but with more control over the display object&#8217;s reaction.</p>
<p>Using what I&#8217;ve learned, and some inspiration from the youtube demo, I threw a quick example together as a learning exercise for myself. By checking for activity where our &#8220;box&#8221; movieclip is located, we can check which side has the most activity and move the box in the proper direction as if it&#8217;s a physical box you can push around. Though it&#8217;s not perfect and could DEFINITELY use some more code optimization, I was very satisfied with the result.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/mBNhxPyJs6I&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="340" src="http://www.youtube.com/v/mBNhxPyJs6I&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://blog.zincroe.com/wp-content/uploads/2009/07/MotionDetect.zip">Download Source</a></p>
<p><strong>AS3 Real-Time Face Detection</strong></p>
<p>Another technique worth mentioning is face detection in flash. Here&#8217;s a snippet taken from <a title="AS3 Face Detection" href="http://www.quasimondo.com/archives/000687.php" target="_blank">Mario Klingemann&#8217;s blog</a> about the subject:</p>
<blockquote><p><em>&#8220;Yesterday Seb-Lee Delisle pointed us via Twitter to this great example of a Flash based real-time face detection. It turns out that already more than half a year ago Ohtsuka Masakazu had been porting the face detection part of OpenCV to AS3 and added the source code to the Spark project &#8211; which is like a Actionscript candy box full of surprises.&#8221;</em></p></blockquote>
<p>He then explains how it works and how to optimize it, it&#8217;s a good read for those interested in the subject.</p>
<p>So there you have it, we went from detecting basic general webcam activity in flash to complex face detection algorithms. Big kudos to the folks mentioned in this post as they&#8217;ve put in many hours coding in order for the rest of us to create awesome and engaging content with ease.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zincroe.com/2009/07/motion-activity-tracking-in-flash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Zimmer Twins at Dust or Magic</title>
		<link>http://blog.zincroe.com/2008/11/zimmer-twins-at-dust-or-magic/</link>
		<comments>http://blog.zincroe.com/2008/11/zimmer-twins-at-dust-or-magic/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 15:34:49 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Kids Media]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://blog.zincroe.com/?p=58</guid>
		<description><![CDATA[My quick walkthrough of the Zimmer Twins. Loads of articles, ideas and videos from Dust or Magic is available on the <a href="http://dustormagic.wikispaces.com/">Dust or Magic Wiki</a>.
 
]]></description>
			<content:encoded><![CDATA[<p>My quick walkthrough of the Zimmer Twins. Loads of articles, ideas and videos from Dust or Magic is available on the <a href="http://dustormagic.wikispaces.com/">Dust or Magic Wiki</a>.</p>
<p><embed src="http://blip.tv/play/AdiXXIb3Rg" type="application/x-shockwave-flash" width="480" height="390" allowscriptaccess="always" allowfullscreen="true"></embed> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zincroe.com/2008/11/zimmer-twins-at-dust-or-magic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Real Page Turner</title>
		<link>http://blog.zincroe.com/2008/04/a-real-page-turner/</link>
		<comments>http://blog.zincroe.com/2008/04/a-real-page-turner/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 17:40:22 +0000</pubDate>
		<dc:creator>Davin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://blog.zincroe.com/?p=3</guid>
		<description><![CDATA[A few years ago, zinc Roe began working with the <a href="http://www.torontopubliclibrary.ca/">Toronto Public Library</a> to develop a tool for displaying archival books from their various special collections branches. The library’s inspiration was <a href="http://www.bl.uk/onlinegallery/ttp/ttpbooks.html"><em>Turning the Pages</em></a>; a tool created by the British Library&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.zincroe.com/wp-content/uploads/2008/04/vbook-300x184.jpg" alt="Ontario Time Machine page Turner example" title="Ontario Time Machine - Page Turner example" width="300" height="184" class="alignright" />A few years ago, zinc Roe began working with the <a href="http://www.torontopubliclibrary.ca/">Toronto Public Library</a> to develop a tool for displaying archival books from their various special collections branches. The library’s inspiration was <a href="http://www.bl.uk/onlinegallery/ttp/ttpbooks.html"><em>Turning the Pages</em></a>; a tool created by the British Library that, at the time, required the Shockwave plug-in (The British Library has recently produced <a href="http://www.bl.uk/ttp2/ttp2.html"><em>Turning the Pages 2.0</em></a> as a Windows Vista / Silverlight application). <em>Turning the Pages</em> was available for license through the British Library, but the Toronto Public Library saw the benefit of developing a tool from the ground up which would share the same basic premise but expand the feature set with the main goal being a well presented source document that could be supplemented with further text, images, audio, and video.</p>
<p>We also knew that we wanted to create both the book assembly and viewing tool in Flash as opposed to Director. The tool is written in <abbr title="ActionScript 1">AS1</abbr> and uses Screentime Media’s MProjector software to create a standalone tool for creating the bundles of assets and text that are loaded into the viewer which works equally well locally or online.</p>
<p>What we see now as a version 1.0 tool has been used successfully by the Toronto Public Library in a public touch-screen kiosk format at the Metro Reference Library and had it’s widest release just recently as the core of a jointly produced project called <a href="http://www.ontariotimemachine.ca/"><em>Ontario Time Machine</em></a>.</p>
<p>At this year’s <a href="http://www.sxsw.com/">SXSWi</a> and the <a href="http://www.archimuse.com/mw2008/index.html">Museums and the Web</a> conferences, the “VirtualBook” or “Page Turner” (it needs a real name) was greeted with interest by quite a few people from libraries and museums and it got us thinking about the possibility of a version 2.0 which would build upon the functionality and strengths of the existing version.</p>
<p>We know some of our basic goals in working towards a new version:</p>
<ul>
<li>Author in <abbr title="ActionScript 3">AS3</abbr> (bitmap handling and more structured code just a couple of the reasons)</li>
<li>Streamline the book assembly process and application (cross-platform desktop application and/or hosted process)</li>
<li>Make the viewing interface relatively “skinnable”</li>
<li>Expand the display/export options (Flash viewer, HTML view, text only, PDF, etc.)</li>
<li>Open the process and the product up to benefit from outside knowledge, criticism, and development</li>
</ul>
<p>The first step in this is this post. We know there are a number of projects with similar goals out there in varying stages of production and we certainly have our personal opinions of where those tools succeed and fail but we would love some direct public feedback on what we have done with version 1.0 and on an on-going basis as we work towards a new version.</p>
<p>As an aside, here are a few companies and organizations with related goals or technology: <a href="http://www.openlibrary.org/">Open Library</a>, <a href="http://books.google.com/">Google Book Search</a>, <a href="http://www.zoomify.com/">Zoomify</a>, and <a href="http://issuu.com/">Issuu</a>, Any others?</p>
<p><em>P.S. Please excuse the extremely punny title of this post. I shall endeavour to keep humour reigned-in during all future internet ramblings. Some may say it has been suitable reigned in that they noticed no humour present herein. To them, point taken.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zincroe.com/2008/04/a-real-page-turner/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
