<?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>Starlino Electronics &#187; OpenCV</title>
	<atom:link href="http://www.starlino.com/tag/opencv/feed" rel="self" type="application/rss+xml" />
	<link>http://www.starlino.com</link>
	<description>Electronics and Robotics Projects, Tutorials, Reviews, Experiments</description>
	<lastBuildDate>Sat, 28 Jan 2012 01:38:28 +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>Stereo Vision with OpenCV and QT</title>
		<link>http://www.starlino.com/opencv_qt_stereovision.html</link>
		<comments>http://www.starlino.com/opencv_qt_stereovision.html#comments</comments>
		<pubDate>Wed, 01 Jul 2009 19:42:33 +0000</pubDate>
		<dc:creator>starlino</dc:creator>
				<category><![CDATA[Robotics]]></category>
		<category><![CDATA[Camera]]></category>
		<category><![CDATA[Computer Vision]]></category>
		<category><![CDATA[OpenCV]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[robot]]></category>

		<guid isPermaLink="false">http://opencv_qt_stereovision</guid>
		<description><![CDATA[<p>This projects is intended for those who would like to get started with OpenCV and&#160; stereo vision. I created a simple StereoVision C++ class that simplifies the development of a 3D calibration and vision system.</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Demo</strong></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" height="344" width="425"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/WHBMXzBPZS4&amp;hl=en&amp;fs=1&amp;" /><embed allowfullscreen="true" allowscriptaccess="always" height="344" src="http://www.youtube.com/v/WHBMXzBPZS4&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" width="425"></embed></object></p>
<p><span id="more-7"></span></p>
<p><strong>Hardware </strong></p>
<p>Consists of two USB Web Cameras connected one next to another<strong>:<br />
	</strong></p>
<p><img alt="IMG_0891.JPG" src="data/opencv_qt_stereo_vision/IMG_0891.JPG" style="border: 0pt none;" /></p>
<p>&nbsp;</p>
<p><strong>Software </strong></p>
<p>Source code available here:</p>
<p><a href="http://code.google.com/p/opencvstereovision/source/browse/#svn/trunk" target="_blank">http://code.google.com/p/opencvstereovision/source/browse/#svn/trunk</a></p>
<p>Requirements:</p>
<p>- QT SDK&nbsp; <a href="http://www.qtsoftware.com/downloads" target="_blank">http://www.qtsoftware.com/downloads</a></p>
<p>- OpenCV Library (* At the time of this article I was using&nbsp; Version 1.1pre1, October, 2008)</p>
<p>&nbsp;</p>
<p>Once you have instaleld the libraries and downloaded the code open OpenCV-Qt-StereoVision.pro in QT Creator.</p>
<p>Update the paths to where your OpenCV library is installed (replace every occurrence of&nbsp; C:\SDK\OpenCV\&nbsp; to the path where you installed OpenCV).</p>
<p>It is assumed that you have 2 USB cameras connected to your PC and there are no other cameras connected to computer. If this is not the case then you might want to have a look at&nbsp; StereoCamera::setup()&nbsp; in stereocamera.cpp.</p>
<p>It is assumed your cameras can capture 640&#215;480 images.</p>
<p>If you don&#39;t have the cameras yet, but would like to test the sofware using the included images sets (see /images/ folder). Open mainwindow.cpp and comment out&nbsp; timer.start(50); while uncommenting one of the 2 lines:</p>
<p>&nbsp; //stereoVisionTest(&quot;../images/set1/&quot;,7,4);&nbsp; //run test1<br />
	&nbsp; //stereoVisionTest(&quot;../images/set2/&quot;,9,6);&nbsp; //run test2</p>
<p>If you get any compiler errors make sure your Qt and OpenCV libraries are installed correctly. For that matter try to create a new test QT project and make sure it compiles.</p>
<p>&nbsp;</p>
<p><strong>Calibration</strong></p>
<p>Before your cameras can see in 3D you need to perform a calibration sequence.</p>
<p>- print out the following PDF : <a href="data/opencv_qt_stereo_vision/ChessBoard - Stereo Calibration.pdf" target="_blank">ChessBoard &#8211; Stereo Calibration.pdf</a> and tape it to a solid piece of wood, plastic or fiber glass (make sure the image is not bent or calibration will not work).</p>
<p>- focus your cameras so that the text on the chessboard is readable, make sure you don&#39;t modify the focus of cameras after calibration or during calibration since the focus is an important factor in calibration .</p>
<p>- start calibration by clicking on Start Calibration button in software, place the chessboard in front of the cameras so that it is completely visible in both cameras.</p>
<p>-software will take samples every 5 seconds , until the specified number of samples has been taken (10 by default).</p>
<p>-once calibration is complete click &quot;Save Calibration&quot; to save calibration data to a file (calibration will be reloaded next time you start the program automatically).</p>
<p>-if you modify position or focus of cameras you will need to calibrate.</p>
<p>-pay attention to &#39;rectified&#39; image , if a line intersects an object or a spot on the left image it should intersect same object or spot on the right image. This is an indicator that your calibration is correct.</p>
<p>-if you have valid calibration data you should see the normalized depth image in the &quot;Depth&quot; window</p>
<h2>IMPORTANT UPDATE July 3, 2010:</h2>
<p>Updated code to work with&nbsp; OpenCV-2.0.0a-win32.exe&nbsp;&nbsp; (will no longer work with older versions, unless you modify the .pro file, to include ther proper libraries and include paths).</p>
<p>//starlino//</p>
<p><iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=librarian06-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0596516134&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.starlino.com/opencv_qt_stereovision.html/feed</wfw:commentRss>
		<slash:comments>86</slash:comments>
		</item>
	</channel>
</rss>

