<?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>Alex Sleat &#187; machine vision</title>
	<atom:link href="http://alexsleat.co.uk/tag/machine-vision/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexsleat.co.uk</link>
	<description>/home/alex</description>
	<lastBuildDate>Tue, 22 May 2012 19:59:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Kinect Development &#8211; Day 1</title>
		<link>http://alexsleat.co.uk/2011/05/14/kinect-development-day-1/</link>
		<comments>http://alexsleat.co.uk/2011/05/14/kinect-development-day-1/#comments</comments>
		<pubDate>Sat, 14 May 2011 23:03:47 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Kinect]]></category>
		<category><![CDATA[Machine Vision]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[kinect]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[machine vision]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[xbox 360]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=15926</guid>
		<description><![CDATA[<br/><p>Head over to this page if you want some tutorials on getting started with the Kinect and libfreenect, I&#8217;ll update more as time goes on and I have free time.</p> <p>I&#8217;ve been meaning to grab myself an Xbox 360 Kinect for a while, not because I&#8217;m a big motion controlled game fan but for [...]]]></description>
			<content:encoded><![CDATA[<br/><blockquote><p>Head over to <a href="http://alexsleat.co.uk/kinect-development-tutorials/">this page</a> if you want some tutorials on getting started with the Kinect and libfreenect, I&#8217;ll update more as time goes on and I have free time.</p></blockquote>
<p>I&#8217;ve been meaning to grab myself an Xbox 360 Kinect for a while, not because I&#8217;m a big motion controlled game fan but for machine vision development. Within the first month of the Kinect open source drivers being released the coolest things were seen, from motion controlled media centres to 3D modelling. I&#8217;ll admit, I&#8217;m a little late to the game, mostly due to the amount of work in my final year at university and other general business. Over the summer I&#8217;ll have plenty of time to do a couple of projects and hopefully come up with something cool and contribute to the scene.</p>
<p>Anyway enough of the small talk, I&#8217;ve decided to blog in as much detail the journey through the development, from the installation of the libraries to writing the first and last bit of code as a sort of a set of tutorials for anyone else who wants to get into it.</p>
<p style="text-align: center;"><a href="http://alexsleat.co.uk/wp-content/uploads/2011/05/2011-05-13-1305312313_1440x900_scrot.png"><img class="size-large wp-image-15938 aligncenter" title="Kinect Example Program" src="http://alexsleat.co.uk/wp-content/uploads/2011/05/2011-05-13-1305312313_1440x900_scrot-1024x640.png" alt="" width="640" height="400" /></a></p>
<p>There are currently two main sets of drivers/libraries out there <strong>libfreenect</strong> and <strong>OpenNI</strong> both sporting hip, cool, open source names. So which one do you choose? Well, here&#8217;s a brief description of both.</p>
<p>Let&#8217;s start with OpenNI, these are the Official PrimeSense (the people that Microsoft paid to actually create the Kinect) these allow access to audio, video and depth with the addition of PrimeSense&#8217;s NITE Middleware. NITE is the software library used for skeletal tracking, hand gesture recognition and scene analyzer (used to separate figures in the foreground from the background) .</p>
<p>Alternatively there is the libfreenect libraries, from the community over at <a href="http://openkinect.org/">openkinect.org</a>. While these are admittedly lacking slightly in features such as skeletal tracking and hand gesture recognition they much make up for it in the dedication to open source and the creation of the best suite available. These have access to video, microphones, motors and LED with speakers currently being worked on. They work under a variety of language wrappers for most OS&#8217;s and will of course by my personal library of choice.</p>
<p>Fortunately, you won&#8217;t have to decide which one you&#8217;d prefer &#8217;cause you can run them both on the same machine but you&#8217;ll have to look into licencing information for releasing projects with OpenNI so it&#8217;s unlikely you&#8217;ll want to combine them (or even allowed?).</p>
<p><strong>libfreenect Installation:</strong></p>
<p>OpenKinect&#8217;s getting started page provides a well enough documented installation guide that anyone should be able to get them up and running under Windows/Linux or OSX. With Ubuntu being the distro of choice for installation guide. - <a href="http://openkinect.org/wiki/Getting_Started">http://openkinect.org/wiki/Getting_Started</a></p>
<p>If you&#8217;re running Arch, there are a few AUR packages available however they all seem to have lacked updates for a few months but the manual build is pretty simple on the getting started page, I&#8217;ve also added a quick list of commands to get you there:</p>
<p><span style="text-decoration: underline;">Grab the git copy of the libraries:</span></p>
<div class="dean_ch" style="white-space: wrap;">git clone https://github.com/OpenKinect/libfreenect.git<br />
<span class="kw3">cd</span> libfreenect/</div>
<p><span style="text-decoration: underline;">Make, install:</span></p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">mkdir</span> build<br />
<span class="kw3">cd</span> build/<br />
cmake ..<br />
<span class="kw2">make</span><br />
<span class="kw2">sudo</span> <span class="kw2">make</span> <span class="kw2">install</span><br />
<span class="kw2">sudo</span> ldconfig /usr/<span class="kw3">local</span>/lib64/</div>
<p><span style="text-decoration: underline;">Add your user to allow access to the connect by creating a group called video and adding your user to it:</span><br />
<em>note: this can be skipped if you don&#8217;t mind running as root/sudo</em></p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> <span class="kw2">nano</span> /etc/udev/rules.d/<span class="nu0">66</span>-kinect.rules<br />
<span class="kw2">sudo</span> usermod -G video username</div>
<p><span style="text-decoration: underline;">Test the kinect with the example program:</span></p>
<div class="dean_ch" style="white-space: wrap;">bin/glview</div>
<p>If all went well you should have seen a sight similar to the screenshot above, if not check out the OpenKinect page for more information and see if the problems you&#8217;re having haven&#8217;t already been resolved.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/05/14/kinect-development-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FYP &#8211; Pedestrian Detection &#8211; Test 2</title>
		<link>http://alexsleat.co.uk/2011/05/02/fyp-pedestrian-detection-test-2/</link>
		<comments>http://alexsleat.co.uk/2011/05/02/fyp-pedestrian-detection-test-2/#comments</comments>
		<pubDate>Mon, 02 May 2011 12:43:03 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Final Year Project]]></category>
		<category><![CDATA[ann]]></category>
		<category><![CDATA[computer vision]]></category>
		<category><![CDATA[fann]]></category>
		<category><![CDATA[final year project]]></category>
		<category><![CDATA[fyp]]></category>
		<category><![CDATA[human recognition]]></category>
		<category><![CDATA[machine vision]]></category>
		<category><![CDATA[neural networks]]></category>
		<category><![CDATA[OpenCV]]></category>
		<category><![CDATA[pedestrian]]></category>
		<category><![CDATA[people detection]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=15627</guid>
		<description><![CDATA[<br/><p></p> <p>The latest version of my final year project, almost complete. It&#8217;s designed to be a pedestrian detection system used in reversing cameras on cars. Possibly more information to come, see here &#8211; projects/finalyearproject/</p> ]]></description>
			<content:encoded><![CDATA[<br/><p><center><iframe width="640" height="510" src="http://www.youtube.com/embed/hwCADEJvpVs?hd=1" frameborder="0" allowfullscreen></iframe></center></p>
<p>The latest version of my final year project, almost complete. It&#8217;s designed to be a pedestrian detection system used in reversing cameras on cars. Possibly more information to come, see here &#8211; <a href="http://alexsleat.co.uk/projects/finalyearproject/">projects/finalyearproject/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/05/02/fyp-pedestrian-detection-test-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Fix &#8220;No accelerated colorspace conversion found from yuv420p to bgr24.&#8221; &#124; OpenCV-2.2.0 &amp; Ubuntu 10.10</title>
		<link>http://alexsleat.co.uk/2011/01/09/how-to-fix-no-accelerated-colorspace-conversion-found-from-yuv420p-to-bgr24-opencv-2-2-0-ubuntu-10-10/</link>
		<comments>http://alexsleat.co.uk/2011/01/09/how-to-fix-no-accelerated-colorspace-conversion-found-from-yuv420p-to-bgr24-opencv-2-2-0-ubuntu-10-10/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 15:13:16 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenCV]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[2.1]]></category>
		<category><![CDATA[2.2]]></category>
		<category><![CDATA[bgr24]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[install guide]]></category>
		<category><![CDATA[machine vision]]></category>
		<category><![CDATA[No accelerated colorspace conversion found from yuv420p to bgr24.]]></category>
		<category><![CDATA[swscaler]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Ubuntu Maverick Meerkat 10.10]]></category>
		<category><![CDATA[yuv420p]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=11307</guid>
		<description><![CDATA[<br/><p>[swscaler @ 0xbf2130]No accelerated colorspace conversion found from yuv420p to bgr24.</p> <p>This problem is basically an issue converting YUV to RGB using ffmpeg, in order for it to work ffmpeg needs to be recompiled with x264. To get around it use the following to recompile ffmpeg and OpenCV 2.1/2.2:</p> Follow steps 1-to-4 of FakeOutdoorsman&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<br/><blockquote><p>[swscaler @ 0xbf2130]No accelerated colorspace conversion found from yuv420p to bgr24.</p></blockquote>
<p>This problem is basically an issue converting YUV to RGB using ffmpeg, in order for it to work ffmpeg needs to be recompiled with x264. To get around it use the following to recompile ffmpeg and OpenCV 2.1/2.2:</p>
<ol>
<li>Follow steps 1-to-4 of FakeOutdoorsman&#8217;s guide on ubuntuforums.org &#8211; <a href="http://ubuntuforums.org/showthread.php?t=786095" target="_blank">here</a></li>
<li>OpenCV 2.1/2.2 Install Guide by Sebastian Montabone - <a href="http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/" target="_blank">here</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/01/09/how-to-fix-no-accelerated-colorspace-conversion-found-from-yuv420p-to-bgr24-opencv-2-2-0-ubuntu-10-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FYP &#124; mbed + C328 First Image</title>
		<link>http://alexsleat.co.uk/2010/09/17/fyp-mbed-c328-first-image/</link>
		<comments>http://alexsleat.co.uk/2010/09/17/fyp-mbed-c328-first-image/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 03:33:38 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Final Year Project]]></category>
		<category><![CDATA[c328]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[final year project]]></category>
		<category><![CDATA[fyp]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[machine vision]]></category>
		<category><![CDATA[mbed]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[uart]]></category>
		<category><![CDATA[UWE]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=691</guid>
		<description><![CDATA[<br/><p>After spending some time to write mbed drivers for the C328 camera for mbed and then taking a break, it looks like someone swooped in and did a cracking job &#8211; http://mbed.org/users/shintamainjp/notebook/CameraC328/. The test program takes uncompressed snapshot (80x60px), uncompressed preview (80x60px), JPEG snapshot and JPEG preview images and stores them on the mbed [...]]]></description>
			<content:encoded><![CDATA[<br/><p>After spending some time to write mbed drivers for the C328 camera for mbed and then taking a break, it looks like someone swooped in and did a cracking job &#8211; <a href="http://mbed.org/users/shintamainjp/notebook/CameraC328/">http://mbed.org/users/shintamainjp/notebook/CameraC328/</a>. The test program takes uncompressed snapshot (80x60px), uncompressed preview (80x60px), JPEG snapshot and JPEG preview images and stores them on the mbed filesystem which allows you to grab them via USB.</p>
<p>A huge issue it looks like I&#8217;m going to face is that it takes on average about 6.9 seconds (or a incredible 0.145fps) to take a 80x60px uncompressed image and around 11.6 seconds (0.08621fps) for a 640x480px JPEG image, which I think may be more down to the camera than the mbed or software. If that is the case, there may be a pretty high chance I&#8217;m going to have to switch my camera.</p>
<p>I&#8217;ll have to explore the code a little more tomorrow to see how this work (in the hours when it&#8217;s not so late/early) but this should be perfect since it should give me more time for vision processing..</p>
<div id="attachment_693" class="wp-caption aligncenter" style="width: 650px"><a href="http://alexsleat.co.uk/wp-content/uploads/2010/09/JPPV0000.jpg"><img class="size-full wp-image-693" title="mbed + c328" src="http://alexsleat.co.uk/wp-content/uploads/2010/09/JPPV0000.jpg" alt="jpeg preview" width="640" height="480" /></a><p class="wp-caption-text">mbed + C328 - JPEG Preview (640x480px)</p></div>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2010/09/17/fyp-mbed-c328-first-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

