<?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; Computer Vision  &#8211; kasperkamperman.com : creative media technology</title>
	<atom:link href="http://www.kasperkamperman.com/blog/computer-vision/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>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_581639642"
			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_581639642"
			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>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_163414383"
			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_163414383"
			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>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>

