<?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>kasperkamperman.com : creative media technology &#187; Blog  &#8211; kasperkamperman.com : creative media technology</title>
	<atom:link href="http://www.kasperkamperman.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kasperkamperman.com</link>
	<description>Kasper Kamperman designs and creates interactive and responsive media applications for exhibitions, interior and events. He works as a teacher in the field of Art and Technology</description>
	<lastBuildDate>Mon, 16 Jan 2012 14:52:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Animated Bokeh effect with Processing</title>
		<link>http://www.kasperkamperman.com/blog/animated-bokeh-effect/</link>
		<comments>http://www.kasperkamperman.com/blog/animated-bokeh-effect/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 19:45:11 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=1190</guid>
		<description><![CDATA[Demonstration of the ease of use to use Processing for Compositing, based on the Awesome digital bokeh effect in Photoshop. ]]></description>
			<content:encoded><![CDATA[<p>Demonstration of the ease of use to use Processing for Compositing. A combination of examples of the Gl Graphics library and the SimpleParticleSystem code from Daniel Shiffman. </p>
<p>Example inspired by the &#8220;<a href=" abduzeedo.com/​awesome-digital-bokeh-effect-photoshop">Awesome digital <a href="http://en.wikipedia.org/wiki/Bokeh">bokeh</a> effect in Photoshop</a>&#8221; tutorial by Abduzeedo.</p>
<p><a href="http://www.kasperkamperman.com/blog/animated-bokeh-effect/"><em>Click here to view the embedded video.</em></a></p>
<p>Used tools:</p>
<ul>
<li><a href="http://glgraphics.sourceforge.net/">Gl Graphics 1.0</a></li>
<li><a href="http://www.processing.org/">Processing 1.5.1</a></li>
</ul>
<p>Please note that Gl Graphics doesn&#8217;t work in Processing 2.0 beta yet. </p>
<p>For explanation see comments in the code.</p>
<p><a class="download" href='http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2011/10/BokehParticleSystem.zip'>Dowload BokehParticleSystem code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/animated-bokeh-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scratch OSC Bridge</title>
		<link>http://www.kasperkamperman.com/blog/scratch-osc-bridge/</link>
		<comments>http://www.kasperkamperman.com/blog/scratch-osc-bridge/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 10:42:52 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Scratch]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=1174</guid>
		<description><![CDATA[Send and receive OSC (Open Sound Control) messages with Scratch. You can interface Scratch with external sensors and OSC sending applications/apps. You can also use Scratch to send OSC data to control audio software, VJ software or creative applications.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kasperkamperman.com/blog/scratch-osc-bridge/"><em>Click here to view the embedded video.</em></a></p>
<p>Send and receive OSC (Open Sound Control) messages with Scratch. You can interface Scratch with external sensors and OSC sending applications/apps. You can also use Scratch to send OSC data to control audio software, VJ software or creative applications.</p>
<p>The bridge converts OSC messages to Scratch sensor and broadcast messages. More technical information about this you&#8217;ll find at: <a href="http://wiki.scratch.mit.edu/wiki/Remote_Sensors_Protocol">http://wiki.scratch.mit.edu/wiki/Remote_Sensors_Protocol</a></p>
<p>The application was build in Processing. You can download the application for OSX, Windows and Linux, a Processing Sketch is also available. </p>
<p><a class="download" href='http://code.google.com/p/osc-tools/downloads/list?can=2&#038;q=scratch'>Download Scratch OSC Bridge from Google code</a></p>
<p>The downloads include some Scratch example projects with code commented. I&#8217;ve also implemented a smoothing algorithm to make movement more fluid. </p>
<h2>Scratch TUIO</h2>
<p>Move the Scratch cat with a TUIO client. </p>
<p>Good TUIO trackers:</p>
<ul>
<li><a href="http://market.android.com/details?id=tuioDroid.impl">tuioDroid</a> (tracker for Android)</li>
<li><a href="http://itunes.apple.com/us/app/tuiopad/id412446962">tuioPad</a> (tracker for iOS devices</li>
<li><a href="http://github.com/fajran/tongseng">tongseng</a> (use macbook trackpad as tuio tracker)</li>
</ul>
<p>More TUIO tracker implementations at <a href="http://www.tuio.org/?software">tuio.org
</a></p>
<h2>Scratch TouchOSC</h2>
<p><p><a href="http://www.kasperkamperman.com/blog/scratch-osc-bridge/"><em>Click here to view the embedded video.</em></a></p>
Move the Scratch cat with <a href="http://hexler.net/software/touchosc">TouchOSC</a>. </p>
<p>Use the acceleration sensor data to move the cat.
Change the color with fader5 and change the background with different layouts. </p>
<ul>
<li><a href="http://hexler.net/software/touchosc">touchOSC</a></li>
<li><a href="http://hexler.net/software/touchosc-android">touchOSC for Android</a></li>
<li><a href="http://hexler.net/docs/touchosc-configuration-connections-osc">IP address configuration (Scratch OSC Bridge displays the IP in the left upper-corner)</a></li>
</ul>
<h2>Scratch Bridge configuration</h2>
<p>Configure the Scratch OSC Bridge with broadcast messages from Scratch. Instead of setting everything when starting the client, you can do this with broadcast messages from Scratch.</p>
<h2>More info on OSC</h2>
<p><a href="http://www.osculator.net/doc/manual:the_osc_protocol">the osc protocol</a>
<a href="http://www.max4live.info/content/osc-tutorial-part-1-our-osc-tutorial-series">osc tutorial</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/scratch-osc-bridge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe After Effects Cheat Sheet mac</title>
		<link>http://www.kasperkamperman.com/blog/adobe-after-effects-cs4-cheat-sheet/</link>
		<comments>http://www.kasperkamperman.com/blog/adobe-after-effects-cs4-cheat-sheet/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 21:15:27 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=1163</guid>
		<description><![CDATA[Overview with the most useful keyboard shortcuts for After Effects CS4 (Mac). ]]></description>
			<content:encoded><![CDATA[<p>Cheat Sheet with the most useful keyboard shortcuts for After Effects (Mac). </p>
<p>Download: <a href='http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2011/06/After-Effects-CS4-cheatsheet.pdf'>Adobe After Effects Cheat Sheet</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/adobe-after-effects-cs4-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash as3: Framedifferencing collission detection (hitTest)</title>
		<link>http://www.kasperkamperman.com/blog/flash-as3-framedifferencing-collission-detection-hittest/</link>
		<comments>http://www.kasperkamperman.com/blog/flash-as3-framedifferencing-collission-detection-hittest/#comments</comments>
		<pubDate>Sun, 29 May 2011 14:52:13 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Computer Vision]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=1134</guid>
		<description><![CDATA[Combination of Frame Differencing and hitTest in as3. Inspired by the Processing sketch of Andy Best where you can pop bubbles if there is movement. By checking the difference between two frames (current and the previous one) we know where there was movement. The movement is stored in a bitmap and with that we can [...]]]></description>
			<content:encoded><![CDATA[<p>Combination of Frame Differencing and hitTest in as3. Inspired by the<a href="http://andybest.net/2009/02/processing-opencv-tutorial-2-bubbles/"> Processing sketch of Andy Best</a> where you can pop bubbles if there is movement. By checking the difference between two frames (current and the previous one) we know where there was movement. The movement is stored in a bitmap and with that we can do a collission detection with other bitmap objects in the screen. </p>
<p>In the example below you&#8217;ll see two balls that change colour and position when hit. Code is in the zip-file.</p>
<p>See my post about <a href="http://www.kasperkamperman.com/blog/computer-vision/computervision-framedifferencing/">Frame differencing</a> for other Flash and Processing examples. </p>
<h2>Example (Flash Player 10 or higher)</h2>
<p>You need a webcam and give Flashplayer access to the camera to see the example below :</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_framedifferencing-hittest_1228857689"
			class="flashmovie"
			width="554"
			height="416">
	<param name="movie" value="http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2011/05/framedifferencing-hittest.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2011/05/framedifferencing-hittest.swf"
			name="fm_framedifferencing-hittest_1228857689"
			width="554"
			height="416">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<h2>Used resources</h2>
<ul>
<li><a href="http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/">Using BitmapData.hitTest for Collision Detection by Mike Chambers</a></li>
<li><a href="http://actionsnippet.com/?p=2820">code snippet from Zevan</a></li>
</ul>
<p><a class="download" href='http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2011/05/framedifferencing-hittest.zip'>Download : Framedifferencing collision detection &#8211; source code</a></p>
<p>If you have suggestions for more improvements, please give your feedback in the comments. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/flash-as3-framedifferencing-collission-detection-hittest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MediaLAB Amsterdam: Quartz Composer Flickr stream</title>
		<link>http://www.kasperkamperman.com/blog/medialab-amsterdam-quartz-composer-flickr-stream/</link>
		<comments>http://www.kasperkamperman.com/blog/medialab-amsterdam-quartz-composer-flickr-stream/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 22:29:24 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=1107</guid>
		<description><![CDATA[Flickr to polaroid style picture stream in Quartz Composer.]]></description>
			<content:encoded><![CDATA[<p>For the Projection Infinity project I&#8217;ve created a Flickr to polaroid style picture stream in <a href="http://developer.apple.com/graphicsimaging/quartz/quartzcomposer.html">Quartz Composer</a>. One of my first projects in Quartz and kind of different then programming in Actionscript or Processing. To give you an example: Its essential to understand that a for-loop is an iteration block in Quartz an that everything nested in that block is iterated (I took a while before I got that concept, but now it seems completely logical to me). Luckily you can also use Javascript to program your logic instead of doing everything with visual blocks. </p>
<p>A normal Flickr RSS feed will give you only the 20 most recent pictures (and only in thumb or original format) while we needed all the pictures of a whole week. Thanks to a sample on <a href="http://pipes.yahoo.com/pipes/">Yahoo Pipes</a> I could create a feed with an unlimited amount of pictures and with the format of 500&#215;500 (sufficient resolution for our demands. Unfortunately Yahoo Pipes isn&#8217;t very stable, so in the end we used a downloaded (not realtime) version of the RSS feed as a backup.  </p>
<p>Download the composition: <a class="download" href='http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2011/03/flickr-polaroid-stream.zip'>Flickr Polaroid stream</a></p>
<p>The code is pretty well documented, the graphic design of the polaroids needs some improvement. Let my know in the comments if you used this composition or made an alternation on it. </p>
<p>A video of the Students in Motion projection mapping in Amsterdam (thanks to <a href="http://medialab.hva.nl/">MediaLAB Amsterdam</a> and <a href="http://www.escapation.nl/">Escapation</a>).</p>
<p><a href="http://www.kasperkamperman.com/blog/medialab-amsterdam-quartz-composer-flickr-stream/"><em>Click here to view the embedded video.</em></a></p>
<p>Some links to help you get started with Quartz Composer (included in the developer tools for Mac, so its free when you own a mac). </p>
<ul>
<li><a href="http://developer.apple.com/library/mac/#documentation/graphicsimaging/conceptual/quartzcomposeruserguide/qc_intro/qc_intro.html">Quartz composer userguide</a></li>
<li><a href="http://www.quartzcompositions.com/">Quartzcompositions.com</li>
<li><a href="http://kineme.net/">Kineme.net</li>
<li><a href="http://quartzcomposer.com">Quartzcomposer.com</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/medialab-amsterdam-quartz-composer-flickr-stream/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino Moodlight library</title>
		<link>http://www.kasperkamperman.com/blog/arduino-moodlight-library/</link>
		<comments>http://www.kasperkamperman.com/blog/arduino-moodlight-library/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 17:53:54 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=1092</guid>
		<description><![CDATA[Arduino library to control an RGB led with Hue, Saturation and Brigthness values. ]]></description>
			<content:encoded><![CDATA[<p>Arduino library to control an RGB led with Hue, Saturation and Brigthness values. </p>
<p>Steps:</p>
<ul>
<li>Download the library : <a class="download" href='http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2011/02/MoodLight.zip'>Arduino Moodlight library</a></li>
<li>
Unpack the library in the Arduino libraries folder (standard in documents, arduino). </li>
<li>Restart Arduino if it was running. </li>
<li>
Open the moodlight file in File > Examples > MoodLight > moodlight. </li>
</ul>
<p>You can see and use the original code in this example:
<a href="http://www.kasperkamperman.com/blog/arduino/arduino-programming-hsb-to-rgb/">Arduino Programming – HSB to RGB</a></p>
<p>You can find more information about using Arduino libraries on the <a href="http://arduino.cc/en/Guide/Environment#libraries">Arduino Environment page</a>.<br/><br/>
Moodlight.pde :</p>
<pre>
<div class="codecolorer-container arduino default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br /></div></td><td><div class="arduino codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// Include the MoodLight library.</span><br />
<span style="color: #339933;">#include &lt;MoodLight.h&gt;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// inputs</span><br />
<span style="color: #993333;">int</span> sensorPin <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// outputs</span><br />
<span style="color: #993333;">int</span> ledPinR <span style="color: #339933;">=</span> <span style="color: #0000dd;">9</span><span style="color: #339933;">;</span> &nbsp;<span style="color: #666666; font-style: italic;">// pwm pin with red led</span><br />
<span style="color: #993333;">int</span> ledPinG <span style="color: #339933;">=</span> <span style="color: #0000dd;">10</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// pwm pin with green led</span><br />
<span style="color: #993333;">int</span> ledPinB <span style="color: #339933;">=</span> <span style="color: #0000dd;">11</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// pwm pin with blue led</span><br />
<br />
<span style="color: #666666; font-style: italic;">// other variables</span><br />
<span style="color: #993333;">int</span> sensorVal<span style="color: #339933;">;</span> &nbsp; <span style="color: #666666; font-style: italic;">// store value from sensorPin</span><br />
<br />
<span style="color: #993333;">int</span> hue<span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// use value between 0 - 359</span><br />
<span style="color: #993333;">int</span> saturation<span style="color: #339933;">;</span> &nbsp;<span style="color: #666666; font-style: italic;">// use value between 0 - 255</span><br />
<span style="color: #993333;">int</span> brightness<span style="color: #339933;">;</span> &nbsp;<span style="color: #666666; font-style: italic;">// use value between 0 - 255</span><br />
<br />
<span style="color: #666666; font-style: italic;">// create MoodLight object</span><br />
MoodLight ml <span style="color: #339933;">=</span> MoodLight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
<br />
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> &nbsp;<br />
&nbsp; <br />
&nbsp; &nbsp;<span style="color: #000066;">pinMode</span><span style="color: #009900;">&#40;</span>ledPinR<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">OUTPUT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp;<span style="color: #000066;">pinMode</span><span style="color: #009900;">&#40;</span>ledPinG<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">OUTPUT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp;<span style="color: #000066;">pinMode</span><span style="color: #009900;">&#40;</span>ledPinB<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">OUTPUT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; <br />
&nbsp; &nbsp;<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; <br />
&nbsp; <span style="color: #666666; font-style: italic;">// read the sensor (potmeter)</span><br />
&nbsp; sensorVal <span style="color: #339933;">=</span> <span style="color: #000066;">analogRead</span><span style="color: #009900;">&#40;</span>sensorPin<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
&nbsp; <br />
&nbsp; <span style="color: #666666; font-style: italic;">// map the value from 0-1023 to a value between 0 and 359</span><br />
&nbsp; hue &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=</span> <span style="color: #000066;">map</span><span style="color: #009900;">&#40;</span>sensorVal<span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1023</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">359</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; saturation <span style="color: #339933;">=</span> <span style="color: #0000dd;">255</span><span style="color: #339933;">;</span> <br />
&nbsp; brightness <span style="color: #339933;">=</span> <span style="color: #0000dd;">255</span><span style="color: #339933;">;</span> <br />
&nbsp; <br />
&nbsp; <span style="color: #666666; font-style: italic;">// set the Moodlight values &nbsp;</span><br />
&nbsp; ml.<span style="color: #202020;">setHSB</span><span style="color: #009900;">&#40;</span>hue<span style="color: #339933;">,</span> saturation <span style="color: #339933;">,</span> brightness<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">// read the Red, Green and Blue values</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// and write them to the led pins</span><br />
&nbsp; <span style="color: #000066;">analogWrite</span><span style="color: #009900;">&#40;</span>ledPinR<span style="color: #339933;">,</span> ml.<span style="color: #202020;">getRed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066;">analogWrite</span><span style="color: #009900;">&#40;</span>ledPinG<span style="color: #339933;">,</span> ml.<span style="color: #202020;">getGreen</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066;">analogWrite</span><span style="color: #009900;">&#40;</span>ledPinB<span style="color: #339933;">,</span> ml.<span style="color: #202020;">getBlue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; <br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/arduino-moodlight-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino Scratch mapping example</title>
		<link>http://www.kasperkamperman.com/blog/arduino-scratch-mapping-example/</link>
		<comments>http://www.kasperkamperman.com/blog/arduino-scratch-mapping-example/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 15:32:53 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=1076</guid>
		<description><![CDATA[If you want to use sensor data in your application you probably want to map the values to a different range. Below a visualisation of the formula that you can use for that. ]]></description>
			<content:encoded><![CDATA[<p>If you want to use sensor data in your application you probably want to map the values to a different range. Below a visualisation of the formula that you can use for that. Drag the sliders to change the virtual sensor input value and the maximum value of the sensor. </p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_mapping-example_986944944"
			class="flashmovie"
			width="554"
			height="500">
	<param name="movie" value="http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2010/12/mapping-example.swf" />
	<param name="play" value="true" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2010/12/mapping-example.swf"
			name="fm_mapping-example_986944944"
			width="554"
			height="500">
		<param name="play" value="true" />
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>You can use this formula in every programming/scripting language of course. Below you can download a more complex example for <a href="http://seaside.citilab.eu/scratch/arduino">Scratch4Arduino (S4A)</a> that I use in my classes (it also includes a smoothing formula). </p>
<p><a class="download" href='http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2010/12/s4a-mapping-smoothing-v3.zip'>s4a-mapping-smoothing-v3.zip</a></p>
<p>The <a href="http://www.arduino.cc/en/Reference/Map">Arduino</a> and <a href="http://processing.org/reference/map_.html">Processing</a> languages already have an implementation of this formula in the map() function. For an example see this post:  <a href="http://www.kasperkamperman.com/blog/arduino/arduino-programming-map-and-smooth/">Arduino Programming – Map and smooth values</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/arduino-scratch-mapping-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash QRcode reader as3</title>
		<link>http://www.kasperkamperman.com/blog/flash-qrcode-reader-as3/</link>
		<comments>http://www.kasperkamperman.com/blog/flash-qrcode-reader-as3/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 13:26:57 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Computer Vision]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=1057</guid>
		<description><![CDATA[QRreader example that uses the QR Code Reader by Logosware (libspark project). Code is improved with Adaptive Threshold (by Quasimondo) and other small modifications to improve the QRcode detection.  ]]></description>
			<content:encoded><![CDATA[<p>QRcode reader implementation that uses the QRCode Reader by Logosware (Libspark project). Code is improved with Adaptive Threshold (by Quasimondo) and other small modifications to improve the QRcode detection.  </p>
<h2>Modifications</h2>
<ul>
<li>Implemented Adaptive Threshold by Quasimondo (Mario Klingemann) in the GetQRimage Class.</li>
<li>Added the substract blur method that Mario Klingemann explains in his lecture about the
	process of reading QR codes. I&#8217;ve got less wrong strings in this mode and the detection runs faster.
	You can set it to false, to use the original method. </li>
<li>The outside parts of the video are cropped, to reduce image noise. By providing a markerGuide
	the user knows where to hold the marker.</li>
<li>The data from the onQrDecodeComplete event is compared with the data from a previous event as
	a way of extra error correction. </li>
</ul>
<p>The user interface uses the <a href="http://www.minimalcomps.com/">minimalcomps</a> by Keith Peters (bit-101) and the <a href="http://mrdoob.com/blog/post/582">Hi-Res! stats</a> by Mr. Doob. </p>
<h2>Example (Flash Player 10 or higher)</h2>
<p><a href=" http://qrcode.kaywa.com/">Generate a QRcode</a> and print it out.<br/>
You need a webcam and give Flashplayer access to the camera to see the example below :</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_ReadQrSimple_1303959716"
			class="flashmovie"
			width="554"
			height="416">
	<param name="movie" value="http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2010/11/ReadQrSimple.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2010/11/ReadQrSimple.swf"
			name="fm_ReadQrSimple_1303959716"
			width="554"
			height="416">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<h2>Used resources</h2>
<ul>
<li><a href="http://blog.jactionscripters.com/2009/05/23/introduction-of-qr-code-reader-library/">Introduction of QR Code Reader Library</a></li>
<li><a href="http://www.libspark.org/wiki/QRCodeReader/en">QRCodeReader library (Libspark)</a></li>
<li><a href="http://tv.adobe.com/watch/max-2008-develop/here-be-pixels-by-mario-klingemann">Max 2008 develop &#8211; Be here pixels by Mario Klingemann (interesting lecture)</a></li>
<li><a href="http://www.quasimondo.com/archives/000690.php">
Automated Threshold &#038; Edge Detection</a></li>
</ul>
<p><a class="download" href='http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2010/11/ReadQrSimple-src.zip'>Download : ReadQrSimple &#8211; source code</a></p>
<p>If you have suggestions for more improvements, please give your feedback in the comments. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/flash-qrcode-reader-as3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>De Verleiding (The Seduction)</title>
		<link>http://www.kasperkamperman.com/blog/de-verleiding2010/</link>
		<comments>http://www.kasperkamperman.com/blog/de-verleiding2010/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 12:14:26 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=931</guid>
		<description><![CDATA['De Verleiding' (the seduction) is an exhibition by the 2nd grade students of the study Art &#038; Technology (Saxion, Enschede). The assignment: Make an interactive art installation that seduces people and that fits in a shop. In this post I highlight some of the installations.]]></description>
			<content:encoded><![CDATA[<p>&#8216;De Verleiding&#8217; (the seduction) is an exhibition by the 2nd grade students of the study <a href="http://www.saxion.edu/programmes/degree-programmes/bachelor-art-technology/?filter=true&#038;sector=art-technology#id_tab_1">Art &#038; Technology</a> (Saxion, Enschede). The assignment: Make an interactive art installation that seduces people and that fits in a shop. All teams
are assigned to a shop in a shopping street in Enschede. During this project they have to shown everything they&#8217;ve learned the last two years (in the third year they start with their internship). Apart from the installation, they also have to make a website, a pre-visualization, a &#8216;making of&#8217; movie, poster and invitation. They have 10 weeks time to finish and present the project with a group of 5 members. </p>
<p>Since the 4 years my colleagues and I teach Physical Computing with Arduino and Flash (see my tutorials on <a href="http://www.kasperkamperman.com/blog/arduino/arduino-flash-communication-as3/">Flash Arduino communication</a>). The students are not allowed to make use of standard keyboard/mouse interaction, so they used Arduino in all of the projects. Apart from that some students used computer vision as well as input. Each team gets a laptop to use in the project, but some take the challenge to make a complex installation running on Arduino only. </p>
<p>This year 24 groups did their presentation. The level was really high and they&#8217;ve made some really good installations. Its a touch job to make something that functions good in hard- and software. </p>
<p>My three personal favorites below. </p>
<h2><a href="http://psychedelic-seduction.com/">Kosmic Kitchen &#8211; Digital Praxinoscope</a></h2>
<p>
<a href="http://www.kasperkamperman.com/wordpress_kk/wp-content/gallery/post-images/installationpraxinoscope-1024x956.jpg" title="" class="thickbox" rel="singlepic72" >
	<img class="ngg-singlepic ngg-right" src="http://www.kasperkamperman.com/wordpress_kk/wp-content/gallery/cache/72__150x_installationpraxinoscope-1024x956.jpg" alt="installationpraxinoscope-1024x956" title="installationpraxinoscope-1024x956" />
</a>

A modern tribute to a historic invention. The Praxinoscope is a installation of 16 mirrors on a spinning wheel, when spinning it shows the 16 frames and you&#8217;ll get an illusion of movement. You can select animations and background colors with an old fashioned telephone dialer. The group made a beautiful looking and good working installation that fits perfect in the shop.
<br/><br/>
Hardware &#8211; software :
Arduino Mega, 4 RGB leds, telephone dealer, record player, microphone, Sharp distance sensor, Flash, Arduino AS3 Messenger. </p>
<h2><a href="http://welkeactieheldbenjij.nl/superhelden.html">Comicasa &#8211; Welke actie held ben jij ? (Which action hero fits you ?)</a></h2>
<p>In a few questions, a fingerprint scan and a face scan this installation detects which superhero fits you the best. The phone rings to attend you that you can see your superhero combination on the website and on Twitter. The installation is placed in the Comic book and game store Comicasa. The installation works perfect and uses the curiosity of people find out who fits them and of course the vanity of their picture on the web. Its designed like a console and they made smart use of the laser cutter to cut the frames and logo. </p>
<p>Hardware &#8211; software :
Arduino, Switches, Pressure sensor, PIR, Ledstrip, servo motor, Flash, PHP, MySQL, As3Glue. </p>
<h2><a href="http://www.6pack-limited.de.vu/">Bagels and Beans: Bagel Balance Board </a></h2>
<p>Balancing on a seesaw you have to put together your favorite bagel. You&#8217;ll have to gather a maximum of 5 ingredients and if you succeeded a ticket is printed with the ingredients for a discount price. A simple game that works out great with the seesaw balancing board. The installation integrates nice in the environment of the shop and the combination of a discount ticket for a bagel is really motivating for the players. </p>
<p><a href="http://www.kasperkamperman.com/blog/de-verleiding2010/"><em>Click here to view the embedded video.</em></a></p>
<p>Hardware &#8211; software :
Arduino, Sharp distance sensor (seesaw), buttons, leds, Flash, As3Glue.</p>

<a href="http://www.kasperkamperman.com/wordpress_kk/wp-content/gallery/post-images/cheezy.jpg" title="" class="thickbox" rel="singlepic73" >
	<img class="ngg-singlepic ngg-right" src="http://www.kasperkamperman.com/wordpress_kk/wp-content/gallery/cache/73__150x_cheezy.jpg" alt="cheezy" title="cheezy" />
</a>

<h2><a href="http://cheezy.eu/">De Leckernij: Cheezy</a></h2>
<p>A old fashioned game where you have to feed &#8220;Boris Slagmuis&#8221; a piece of cheese. With 2 buttons you have to move a ball to the right hole. I nice hardware only installation which uses 2 Arduino&#8217;s, a Vmusic, two servo&#8217;s and different sensors. Nice design and great use of electronics.  </p>
<p>Hardware &#8211; software : Arduino (2x), Flex sensor, PIR, LDR, arcade buttons, leds, Vmusic. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/de-verleiding2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MediaLAB Amsterdam : U-turm &#8211; Scryption</title>
		<link>http://www.kasperkamperman.com/blog/medialab-amsterdam/</link>
		<comments>http://www.kasperkamperman.com/blog/medialab-amsterdam/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 23:03:54 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=897</guid>
		<description><![CDATA[In the <a href="http://medialab.hva.nl/">MediaLAB Amsterdam</a> (Lab of the Applied University of Amsterdam) I've supervised a few project teams to help them find the right technical solutions for their projects. I'd like to highlight two of them. ]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://medialab.hva.nl/">MediaLAB Amsterdam</a> (Lab of the Applied University of Amsterdam) I&#8217;ve supervised a few project teams to help them find the right technical solutions for their projects. I&#8217;d like to highlight two of them. </p>
<h2>U-turm</h2>
<p>
<a href="http://www.kasperkamperman.com/wordpress_kk/wp-content/gallery/post-images/u_turm_concept.jpg" title="" class="thickbox" rel="singlepic71" >
	<img class="ngg-singlepic ngg-right" src="http://www.kasperkamperman.com/wordpress_kk/wp-content/gallery/cache/71__200x_u_turm_concept.jpg" alt="u_turm_concept" title="u_turm_concept" />
</a>

An interactive projection for the closing ceremony of the <a href="http://www.eculturefair2010.eu/project/medialab-u-turm-project">E-culture fair</a>, as part of the cultural capital of Europe Ruhr 2010. Dance on the facade of the Dortmunder U. In collaboration with producer <a href="http://janscholte.nl/">Jan Scholte</a> and the artist <a href="http://www.magdatt.nl">Matthias Oostrik</a>.<br/><br/></p>
<p>The U-turm team made an interactive projection on the Dortmunder-U tower. When a person steps on one of the stages their silhouette appears on one of the windows of the building. Depending on how the person moves the silhouette can move to other windows, leaving a trace where it has already been before. If two or more silhouettes meet on the same window there will be some creative content coming out, symbolizing the new use of the building as cultural hotspot.</p>
<p>The installation uses Quart Composer the generate the visuals. I&#8217;ve helped Joost Buijs (responsible for the technical part) finding some different motion tracking solutions for Quartz Composer.<br/><br/>Tested options were :</p>
<ul>
<li><a href="http://v002.info/?page_id=28">v002 Optical Flow 2.0.2</a> : uses a lot of processing power, so a big framerate drop. </li>
<li><a href="http://www.msavisuals.com/webcam_piano">Webcam piano by Memo Akten</a> : worked good, but didn&#8217;t invite for dancing too much. </li>
<li><a href="http://kineme.net/release/CVTools/0.2">Kineme CVTools plugin</a> : used in the end, saves a lot of processing power by checking only certain points.</li>
</ul>
<p>The team did a good job to find and test the right way of interaction. Its a really powerful and intuitive concept I&#8217;m curious how its going to look on the big building.  </p>
<p><a href="http://www.kasperkamperman.com/blog/medialab-amsterdam/"><em>Click here to view the embedded video.</em></a></p>
<hr/>
<h2>Scryption &#8211; Google mirror.</h2>
<p>The team of Scryption made a mirror that shows your digital identity. The concept was based on the theories of Marshall McLuhans ideas. From their concept document :</p>
<blockquote><p>
You enter the area and you will see two different mirrors in front of you. You will be directed to type in your name. The left mirror is just an ordinary mirror that shows the real you. The left one shows up the pictures that appear on Google when doing a search query on your name. This mirror shows you the digital you, the identity that is created by the internet (incl. other people) and by yourself. You will then be able to play with your digital shape since there are sensors installed that react on your movement. A picture is uploaded to the net. </p>
<p>The installation fits to the debate around technological determinism. As McLuhan puts it, “We shape our tools and our tools shape us”. But also that the medium is the message since a mirror always confronts you with yourself. And sometimes you see something you didn’t expect to see.</p></blockquote>
<p><a href="http://www.saromedia.nl/">Saro van Cleynenbreugel</a> was responsible for the technical part. Together with him and project coach <a href="http://www.tovernoot.nl">Iris Douma</a> we&#8217;ve decided to make the installation with <a href="http://www.processing.org">Processing</a>. I like Processing because of the ease of code sharing (mail some code and run it directly). However in the end Processing seemed a bit to slow for the task. Especially blending a camera silhouette with images and text cost a lot frames. Maybe next time I would choose and suggest <a href="http://www.openframeworks.cc">OpenFrameWorks</a> for an installation like this. In the end the application ran at 20 fps, so we couldn&#8217;t complain. Due some problems with a Nightvision camera (warning: exposure settings don&#8217;t work in that mode), there was some trouble to make a nice looking silhouette. </p>

<a href="http://www.kasperkamperman.com/wordpress_kk/wp-content/gallery/post-images/screenshot-scryption.jpg" title="" class="thickbox" rel="singlepic70" >
	<img class="ngg-singlepic ngg-center" src="http://www.kasperkamperman.com/wordpress_kk/wp-content/gallery/cache/70__556x_screenshot-scryption.jpg" alt="screenshot-scryption" title="screenshot-scryption" />
</a>

<p>Libraries used :</p>
<ul>
<li><a href="http://www.superduper.org/processing/fullscreen_api/">Fullscreen library</a></li>
<li><a href="http://ubaa.net/shared/processing/opencv/">OpenCV library</a></li>
<li><a href="http://www.shiffman.net/teaching/nature/box2d-processing/">Box2D library</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/medialab-amsterdam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visuals by code</title>
		<link>http://www.kasperkamperman.com/blog/visuals-by-code/</link>
		<comments>http://www.kasperkamperman.com/blog/visuals-by-code/#comments</comments>
		<pubDate>Mon, 17 May 2010 11:40:36 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[generative art]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[toxic libs]]></category>
		<category><![CDATA[visuals by code]]></category>
		<category><![CDATA[vvvv]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=328</guid>
		<description><![CDATA[Some resources I’ve mentioned in the lecture of 'visuals by code'. An overview of toolkits you can use to design and make graphical work by writing code, some examples and a view useful books. ]]></description>
			<content:encoded><![CDATA[<p>Some resources I&#8217;ve mentioned in the lecture of visuals by code.</p>
<p>A lot of interactive tools like Flash and Processing serve well to make visual effects. By using relative simple scripts ( re-use and play ! ) you can create complex and cool looking visuals. Most tools let you export the material to image sequences or even video. Make use of them even for non-interactive stuff. Try some examples to create some genenerative art yourself.Lets start using your creativity and start playing, &#8216;remixing&#8217; and mashing up some code. </p>
<p>Toolkits :</p>
<ul>
<li><a href="http://www.processing.org">processing.org</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/QuartzComposerUserGuide/qc_intro/qc_intro.html">quartz composer (osx)</a></li>
<li><a href="http://www.hypeframework.org/">hype framework (Flash)</a></li>
<li><a href="http://www.nodebox.net/">Nodebox (Python, nodebased)</a></li>
<li><a href="http://www.vvvv.org">vvvv (nodebased, windows)</a></li>
<li><a href="http://sourceforge.net/projects/nodekit/">Tagtool/Nodekit (windows)</a></li>
<li><a href="http://aeexpressions.blogspot.com/2006/07/lesson-1-basics.html">after effects expressions</a></li>
<li><a href="http://www.openframeworks.cc/">OpenFrameworks (c++)</a></li>
<li><a href="http://libcinder.org/">Cinder framework (c++)</a></li>
</ul>
<p>Code examples, libraries, inspiration :</p>
<ul>
<li><a href="http://www.fxguide.com/article473.html">sc/4 : realtime compositing</a> by <a href="http://www.minivegas.co.uk/">Minivegas</a></li>
<li><a href="http://www.memo.tv/lab" class="broken_link">memo.tv</a></li>
<li><a href="http://kineme.net/">kineme.net (quartz)</a></li>
<li><a href="http://www.levitated.net/daily/index.html">levitated : Jared Tarbell</a></li>
<li><a href="http://www.apple.com/pro/profiles/joshuadavis/">Joshua Davis</a></li>
<li><a href="http://incubator.quasimondo.com/">incubator : Mario Klingemann</a></li>
<li><a href="http://code.google.com/p/toxiclibs/">toxic libs ( processing libraries examples</a></li>
<li><a href="http://www.processing.org/learning/">processing learning section</a></li>
<li><a href="http://www.brendandawes.com/sketches/redux/">cinema redux : Bredan Dawes (2004)</a></li>
<li><a href="http://www.yooouuutuuube.com/v/?width=160&amp;height=160&amp;yt=pAwR6w2TgxY&amp;flux=0&amp;direction=bottom_left">yooouuutuuube.com : David Kraftsow 2009 | Alice ( Fagottron )</a></li>
</ul>
<p>Books :</p>
<p><iframe class="amazon_iframe" src="http://rcm-de.amazon.de/e/cm?t=kasperkamperm-21&amp;o=3&amp;p=8&amp;l=as1&amp;asins=1590593146&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0e8290&amp;bc1=FFFFFF&amp;bg1=FFFFFF&amp;f=ifr" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<iframe class="amazon_iframe" src="http://rcm-de.amazon.de/e/cm?t=kasperkamperm-21&amp;o=3&amp;p=8&amp;l=as1&amp;asins=0262182629&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0e8290&amp;bc1=FFFFFF&amp;bg1=FFFFFF&amp;f=ifr" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<iframe class="amazon_iframe" src="http://rcm-de.amazon.de/e/cm?t=kasperkamperm-21&amp;o=3&amp;p=8&amp;l=as1&amp;asins=1590594290&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0e8290&amp;bc1=FFFFFF&amp;bg1=FFFFFF&amp;f=ifr" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<iframe class="amazon_iframe" src="http://rcm-de.amazon.de/e/cm?t=kasperkamperm-21&amp;o=3&amp;p=8&amp;l=as1&amp;asins=1590597915&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0e8290&amp;bc1=FFFFFF&amp;bg1=FFFFFF&amp;f=ifr" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<p>Above 20 euro no shipping costs to the Netherlands and Germany !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/visuals-by-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino Flash communication AS3 &#8211; Messenger</title>
		<link>http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/</link>
		<comments>http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/#comments</comments>
		<pubDate>Thu, 13 May 2010 21:52:41 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=857</guid>
		<description><![CDATA[Example how to setup serial communication between Flash and Arduino in combination with the Messenger library for Arduino. This is usefull if you want to use Arduino in a different way than as a sensorbox (if you want that check out the As3glue Firmata combination in my other post).]]></description>
			<content:encoded><![CDATA[<p>Example how to setup serial communication between Flash and Arduino in combination with the Messenger library for Arduino. You can send whatever you want between Arduino and Flash (if you only want to receive data from inputs and set outputs it better to use <a href="http://www.kasperkamperman.com/blog/arduino/arduino-flash-communication-as3/">Firmata / As3Glue combination</a>). </p>
<p>For receiving of data on the Arduino I&#8217;ll choose the <a href="http://www.arduino.cc/playground/Code/Messenger">Messenger library</a>. It has some nice simple functions and gives you the opportunity to check if a string is fully received (a &#8216;carriage return&#8217; is send by Flash at the end of a serial message in the SerialPort class) by Arduino. Of course you can write your own serial protocol. You can find some thoughts about it at the Todbot blog : <a href="http://todbot.com/blog/2009/07/30/arduino-serial-protocol-design-patterns/">Arduino serial protocol design patterns</a>.</p>
<p>You can send data to the serial port with the <a href="http://arduino.cc/en/Serial/Print">Serial.print()</a> and <a href="http://arduino.cc/en/Serial/Println">Serial.println()</a> commands.</p>
<p>Included is the SerialPort class for Flash that makes it easy to send and receive serial data from/to the Arduino. I&#8217;ve modified the original (from tinker.it) so it supports start and stop characters. As a stop character &#8216;carriage return&#8217; is used (&#8216;\r&#8217;, or char(13)) that is send when you do Serial.println(); from Arduino. </p>
<p>I advise using a start character (not used in the example below) as well, because sometimes (especially when sending on a high datarate) characters at the beginning if the string can get lost. </p>
<p>The download contains SerialPort.as and example_messenger.fla (CS3).  </p>
<p>Download : <a class="download" href='http://www.kasperkamperman.com/wordpress_kk/wordpress_uploads/2010/05/flash-arduino-as3-messenger.zip'>flash-arduino-as3-messenger</a></p>
<h2>Step by step guide for Messenger library communication</h2>
<ul>
<li>Download the <a href="http://www.arduino.cc/playground/Code/Messenger">Messenger library</a> and install it in your <em>Arduino/libraries/</em> folder ( you can find it by default in your documents folder ). Restart Arduino if it was running. </li>
<li>
Open basic_communication_old in my zip-file (basic_communication included in the Messenger examples has been changed).<br/><i>I&#8217;ve modified the old example in two ways. I&#8217;ve changed the serial speed to a baudrate of 57600, so you don&#8217;t have to change the Serproxy.cfg if you use it with Firmata as well and I have change the update interval to 40ms (instead of 20ms) for more stability.</i></li>
<li>Upload the Sketch to the Arduino.</li>
<li>Configure Serialproxy for your Arduino board and run it.</li>
<li>Open example_messenger.fla and run it.</li>
<li>If everything went fine you&#8217;ll see the led on pin 13 blinking and 6 balls, controlled by the analog inputs, moving on the screen.</li>
</ul>
<h2>Example_messenger code</h2>
<pre>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:450px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> receivedValues<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Arduino connection</span><br />
<br />
<span style="color: #3f5fbf;">/* SerialPort(localhost, netport, start character, stop character)<br />
&nbsp; &nbsp;for more stability use a startcharacter so you can check if a message is complete<br />
&nbsp; &nbsp;default stop character is carriage return '\r' <br />
&nbsp; &nbsp;A carriage return is send by the Arduino command Serial.println();<br />
*/</span><br />
<br />
<span style="color: #6699cc; font-weight: bold;">var</span> arduino<span style="color: #000066; font-weight: bold;">:</span>SerialPort = <span style="color: #0033ff; font-weight: bold;">new</span> SerialPort<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;127.0.0.1&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">5331</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
arduino<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">DataEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">DATA</span><span style="color: #000066; font-weight: bold;">,</span> onArduinoData <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
arduino<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">connect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Setup a timer to send data to the Arduino</span><br />
<span style="color: #009900; font-style: italic;">// The timer object calls the timerEvent function 20 times a second (every 50ms)</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">timer</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Timer</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">500</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">timer</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;timer&quot;</span><span style="color: #000066; font-weight: bold;">,</span> timerEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">timer</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">start</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// toggle variable that is switched by the timer from true to false and back</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> toggle<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span>= <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> timerEvent<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <br />
<span style="color: #000000;">&#123;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// change toggle boolean to the opposite</span><br />
&nbsp; &nbsp; toggle = <span style="color: #000066; font-weight: bold;">!</span>toggle<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>toggle == <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">// make ledPin 13 HIGH - onboard led on </span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//arduino.send(&quot;on&quot;); // For Messenger checkString example</span><br />
&nbsp; &nbsp; &nbsp; arduino<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">send</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;13 1&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// For Messenger basic_communication example</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">else</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">// make ledPin 13 LOW - onboard led off</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//arduino.send(&quot;off&quot;); // For Messenger checkString example</span><br />
&nbsp; &nbsp; &nbsp; arduino<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">send</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;13 0&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> &nbsp;<span style="color: #009900; font-style: italic;">// For Messenger basic_communication example</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #3f5fbf;">/*<br />
&nbsp; &nbsp; When you have a certain amount of values it will be smart to keep them<br />
&nbsp; &nbsp; in an array (so you only modify the array indexes that change.<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; You can convert an array to a character seperated string (space character for <br />
&nbsp; &nbsp; Messenger library) with the join function.<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Example :<br />
&nbsp; &nbsp; var sendValues:Array = new Array(2,4,8,16,32,64,128);<br />
&nbsp; &nbsp; arduino.send(sendValues.join(&quot; &quot;));<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; */</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// add some balls to the stage to display incoming analog values</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> ballArray = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>i<span style="color: #000066; font-weight: bold;">&lt;</span><span style="color: #000000; font-weight:bold;">6</span><span style="color: #000066; font-weight: bold;">;</span>i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> ball<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MovieClip</span> = <span style="color: #0033ff; font-weight: bold;">new</span> Ball<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; ballArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = ball<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = <span style="color: #000000; font-weight:bold;">50</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">60</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>ball<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Called when data is received from the Arduino</span><br />
<span style="color: #339966; font-weight: bold;">function</span> onArduinoData<span style="color: #000000;">&#40;</span> event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">DataEvent</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;received string : &quot;</span><span style="color: #000066; font-weight: bold;">,</span> event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #3f5fbf;">/* The values from Arduino Messenger are space seperated values. We will <br />
&nbsp; &nbsp; &nbsp; &nbsp;store each value in the receivedValues array. &nbsp; &nbsp;<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; receivedValues = event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">split</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot; &quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// change the y position of the balls on stage </span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>i<span style="color: #000066; font-weight: bold;">&lt;</span><span style="color: #000000; font-weight:bold;">6</span><span style="color: #000066; font-weight: bold;">;</span>i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #6699cc; font-weight: bold;">var</span> mc = ballArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = receivedValues<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">350</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">1023</span><span style="color: #000066; font-weight: bold;">;</span>&nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span> &nbsp; <br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Arduino &#8211; Unity serial communication</title>
		<link>http://www.kasperkamperman.com/blog/arduino-unity-serial-communication/</link>
		<comments>http://www.kasperkamperman.com/blog/arduino-unity-serial-communication/#comments</comments>
		<pubDate>Wed, 12 May 2010 21:45:43 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=850</guid>
		<description><![CDATA[Control parameters in Unity with sensors connected to the Arduino and control actuators connected to Arduino from Unity.]]></description>
			<content:encoded><![CDATA[<p>Art &#038; Technology student Tiuri de Jong did a project on Arduino and Unity communication. The goal was (and still is) to create an easy workflow and tutorial on how to connect Arduino with Unity (free version). Due the serial implementation in the Mac OSX version of Unity, this part still doesn&#8217;t work. Suggestions and contributions are welcome on the <a href="http://code.google.com/p/unity-arduino-serial-connection/">project page</a>. </p>
<blockquote><h2>Project: unity-arduino with serial connection</h2>
<p>This project uses Unity (which uses C# and JavaScript scripting), the Arduino and/or SerialProxy to connect the Arduino to Unity. Thus allowing custom hardware to be linked to Unity (in real-time).</p>
<p>The link is established in Windows using the Mono implementation of System.IO.Ports.</p>
<p>For Mac/OSX users, I&#8217;ve made an implementation that uses SerialProxy because direct serial connection doesn&#8217;t work on the mac. The problem is, though, that the SerialProxy implementation doesn&#8217;t seem to work either. </p></blockquote>
<p>Links:</p>
<ul>
<li><a href="http://code.google.com/p/unity-arduino-serial-connection/">Unity-Arduino serial-connection</a>  on Google code</li>
<li><a href="http://unity3d.com/">Unity : Game Development Tool</a></li>
<li>
<a href="http://www.arduino.cc">Arduino</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/arduino-unity-serial-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Computer Vision : Blob tracking &#8211; Face detection</title>
		<link>http://www.kasperkamperman.com/blog/computer-vision-blob-tracking-face-detection/</link>
		<comments>http://www.kasperkamperman.com/blog/computer-vision-blob-tracking-face-detection/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 13:04:44 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Computer Vision]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=825</guid>
		<description><![CDATA[In this 'Computer Vision' article you can read about <strong>Blob detection</strong> and <strong>Face detection</strong>. I've included some video's to give you an idea about the techniques and links to the most relevant code examples.]]></description>
			<content:encoded><![CDATA[<p>A blobs is a certain object that represents a certain area of a frame. Blobs can be different things like: hands, faces, balls, ir-lights. They are identified because they differ from other pixels in the frame.<br/><br/> Tracking is identifying blobs that change over time. In multi-touch tables, based on computer vision with a webcam, your fingertips are the blobs that are tracked. Every blob will act as a &#8216;mouse pointer&#8217;. </p>
<p><em>Blob Detection test by samkeene :</em>
<p><a href="http://www.kasperkamperman.com/blog/computer-vision-blob-tracking-face-detection/"><em>Click here to view the embedded video.</em></a></p></p>
<p>Max Meinders made a good description of all the processing steps involved in Blob tracking :<br/>
<a href="http://vid.acqda.nl/index.php?page=general">Max Meinders &#8211; videotracking</a>.</p>
<table>
<tr>
<th>Tool/Language</th>
<th>Resource</th>
</tr>
<tr>
<td>AS3</td>
<td><a href="http://play.blog2t.net/fast-blob-detection/">Fast blob detection in Flash by Tomek</a></td>
</tr>
<tr>
<td>Standalone application</td>
<td><a href="http://ccv.nuigroup.com/">Community Core Vision / Tbeta by the NUI Group Community</a><br/>
  Can communicate by TUIO, OSC, XML protocols with other software.
  </td>
</tr>
<tr>
<td>Standalone application and Open Frameworks addon</td>
<td><a href="http://opentsps.com/">Toolkit for Sensing People in Spaces</a><br/>
Opensource. Can communicate by TUIO and OSC. With Flash, Processing, Max and VVVV examples.</td>
</tr>
<tr>
<td>Processing</td>
<td><a href="http://ubaa.net/shared/processing/opencv/opencv_blobs.html">OpenCV library for Processing</a> by Stéphane Cousot and Douglas Edric Stanley.</td>
</tr>
</table>
<p><br/></p>
<h2>Face detection</h2>
<p>OpenCV also supports the recognition of special characteristics in an image and use those as a blob. Face detection a tecnique to recognize things that look like a face in an image. It doesn&#8217;t recognize a certain face ( although thats possible, see Image recognition ), but it detects facial features. </p>
<p><em>Face Detection with Processing by Pedro Amado </em>
<p><a href="http://www.kasperkamperman.com/blog/computer-vision-blob-tracking-face-detection/"><em>Click here to view the embedded video.</em></a></p></p>
<p>Face detection works with classifiers. You can learn the computer characteristics of an object. So OpenCV can detect other objects as well, as long you have a classifier file for it. </p>
<p>Keywords : <a href="http://www.google.com/search?q=%22Haar+Classifier%22">Haar Classifier</a>, <a href="http://www.google.com/search?q=%22Viola+Jones+object+detection+framework%22">Viola Jones object detection framework</a>, <a href="http://www.google.nl/search?q=cascade+classifier">cascade classifiers</a>. </p>
<table>
<tr>
<th>Tool/Language</th>
<th>Resource</th>
</tr>
<tr>
<td>AS3</td>
<td><a href="http://blog.inspirit.ru/?p=416">Viola-Jones object detection by Eugene Zatepyakin</a></td>
</tr>
<tr>
<td>AS3</td>
<td><a href="http://www.quasimondo.com/archives/000687.php ">Optimizing Flash Based Face Detection by Mario Klingemann</a>
  </td>
</tr>
<tr>
<td>Processing libary</td>
<td><a href="http://ubaa.net/shared/processing/opencv/opencv_detect.html">OpenCV detect</a> Can detect faces, profiles and bodies.</td>
</tr>
</table>
<p><br/>
Tomek made a nice example where he tracks faces in the &#8216;Black and White&#8217; video of Michael Jackson in realtime in Flash ( you can tried it yourself to with a webcam ) : <a href="http://play.blog2t.net/realtime-as3-face-and-eye-detection-with-michael-jackson/">Machines are looking for Michael Jackson</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/computer-vision-blob-tracking-face-detection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Computer Vision : Frame differencing</title>
		<link>http://www.kasperkamperman.com/blog/computer-vision/computervision-framedifferencing/</link>
		<comments>http://www.kasperkamperman.com/blog/computer-vision/computervision-framedifferencing/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 22:51:21 +0000</pubDate>
		<dc:creator>kasperkamperman</dc:creator>
				<category><![CDATA[Computer Vision]]></category>

		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=804</guid>
		<description><![CDATA[In this 'Computer Vision' article you can read something about the <strong>Frame Differencing</strong> technique. I've included some video's to give you an idea about the technique and some links the most relevant code examples. ]]></description>
			<content:encoded><![CDATA[<p>Frame differencing is a technique where the computer checks the difference between two video frames. If the pixels
have changed there apparently was something changing in the image (moving for example).
Most techniques work with some blur and threshold, to distict real movement from noise. Because frame could differ
too when light conditions in a room change ( and camera auto focus, brightness correction etc. ).  </p>
<p>Below an example of the difference filter in the <a href="http://ubaa.net/shared/processing/opencv/">OpenCV library</a> for Processing. You can do the same in Flash with the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/BlendMode.html#DIFFERENCE">Difference Blendmode</a>.</p>
<p><a href="http://www.kasperkamperman.com/blog/computer-vision/computervision-framedifferencing/"><em>Click here to view the embedded video.</em></a></p>
<p>You can move objects to area&#8217;s where most of the motion is happening, like in the Pong example of Ostrich :
<a href="http://www.flashfeathers.com/feathers/samples/ostrich/samplecursors.html" class="broken_link">Ostrich two cursors example</a> </p>
<p>Or you can make some hotspots in your image and check the amount of motion in those. A nice example to get the idea is the <a href="http://www.memo.tv/webcam_piano">webcam piano</a> from Memo Akten (implemented in Quartz Composer and Processing) :</p>
<p><a href="http://www.kasperkamperman.com/blog/computer-vision/computervision-framedifferencing/"><em>Click here to view the embedded video.</em></a></p>
<p>Or you can do other creative things with it (video by <a href="http://www.okgo.net/2010/01/20/wtf-video-remix-project/">WTF? by OK Go</a>, <a href="http://www.msavisuals.com/xmas2009">example code in Processing by Memo Akten</a>) :</p>
<p><a href="http://www.kasperkamperman.com/blog/computer-vision/computervision-framedifferencing/"><em>Click here to view the embedded video.</em></a></p>
<h2>Code examples and tutorials</h2>
<table>
<tr>
<th>Tool/Language</th>
<th>Resource</th>
</tr>
<tr>
<td>AS3</td>
<td><a href="http://ostrichflash.wordpress.com/">Ostrich Flash (Flash feathers)</a></td>
</tr>
<tr>
<td>AS3</td>
<td><a href="http://blog.soulwire.co.uk/code/actionscript-3/webcam-motion-detection-tracking/">Webcam motion detection by Soulwire</a></td>
</tr>
<tr>
<td>AS2</td>
<td><a href="http://www.adobe.com/devnet/flash/articles/webcam_motion.html">Webcam Motion Detection by Guy Watson</a></td>
</tr>
<tr>
<td>Processing</td>
<td><a href="http://www.memo.tv/webcam_piano_with_processing_v0_1" class="broken_link">Webcam Piano by Memo Akten</a></td>
</tr>
<tr>
<td>Processing</td>
<td><a href="http://andybest.net/2009/02/processing-opencv-tutorial-2-bubbles/">Poping Bubbles with OpenCV library by Andy Best</a></td>
</tr>
<tr>
<td>Processing</td>
<td><a href="http://processing.org/learning/library/framedifferencing.html">Frame differencing code example by Golan Levin</a></td>
</tr>
</table>
<p><br/>If you only want to detect if there is a certain amount of motion in front of a webcam, you can use the activityHandler and <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/media/Camera.html#activityLevel">activityLevel</a> parameters in Flash. See my example on bitmap filters where i use it the apply a red filter when there is movement :<br/>
<a href="http://www.kasperkamperman.com/blog/flash-code/as3-apply-bitmap-filters-to-a-webcam-image/">Flash AS3 : Apply bitmap filters to a webcam image</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kasperkamperman.com/blog/computer-vision/computervision-framedifferencing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

