<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11307093</id><updated>2012-01-20T00:35:33.342-08:00</updated><title type='text'>I Hate (Love) OpenCV</title><subtitle type='html'>A discussion of problems encountered in implementing random computer vision related algorithms in OpenCV.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brian</name><uri>http://www.blogger.com/profile/10051689279394304562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11307093.post-114586749056829328</id><published>2006-04-24T01:30:00.000-07:00</published><updated>2006-04-24T01:31:30.576-07:00</updated><title type='text'>Things that just don't work</title><content type='html'>An ongoing list:&lt;br /&gt;&lt;br /&gt;cvMinMaxLoc on non-32F images&lt;br /&gt;cvPyrUp / cvPyrDown on 32F images (works on 8U)&lt;br /&gt;&lt;br /&gt;Why? Who knows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-114586749056829328?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/114586749056829328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=114586749056829328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/114586749056829328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/114586749056829328'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2006/04/things-that-just-dont-work.html' title='Things that just don&apos;t work'/><author><name>Brian</name><uri>http://www.blogger.com/profile/10051689279394304562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-114552704648650920</id><published>2006-04-20T02:57:00.000-07:00</published><updated>2006-04-20T03:14:20.396-07:00</updated><title type='text'>Getting Started with OpenCV in Visual Studio 2005</title><content type='html'>&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/01-NewProject.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/01-NewProject.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 1: Create a new project.&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/02-ProjectKind.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/02-ProjectKind.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 2: Select Win32 Console Application&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/03-ConsoleApp.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/03-ConsoleApp.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 3: We want an Empty project&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/04-WizardFinish.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/04-WizardFinish.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 4: Done creating the project&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/05-ResultingProject.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/05-ResultingProject.jpg'&gt;&lt;/a&gt;&lt;br /&gt;This is what your project screen should look like at this point.&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/06-NewItem.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/06-NewItem.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 5: Create a new item&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/07-PickCpp.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/07-PickCpp.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 6: Create a C++ file, the name is your choice.&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/08-ProjectProperties.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/08-ProjectProperties.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 7: Modify the project properties&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/09-AllConfigurations.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/09-AllConfigurations.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 7: Select All Configurations&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/10-IncludeDirs.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/10-IncludeDirs.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 9: Go to Configuration Properties / C/C++ / General / Additional Include Directories&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/11-IncludeDirsDone.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/11-IncludeDirsDone.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 10: Enter the path to your include files: For default OpenCV install location, they are &lt;pre&gt;"C:\Program Files\OpenCV\cvaux\include\";"C:\Program Files\OpenCV\cxcore\include\";"C:\Program Files\OpenCV\cv\include\";"C:\Program Files\OpenCV\otherlibs\highgui\";"C:\Program Files\OpenCV\otherlibs\cvcam\include\"&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/11-IncludeDirsDone.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/11-IncludeDirsDone.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 10: Enter the path to your include files: For default OpenCV install location, they are &lt;pre&gt;"C:\Program Files\OpenCV\cvaux\include\";"C:\Program Files\OpenCV\cxcore\include\";"C:\Program Files\OpenCV\cv\include\";"C:\Program Files\OpenCV\otherlibs\highgui\";"C:\Program Files\OpenCV\otherlibs\cvcam\include\"&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/12-LinkerIncludes.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/12-LinkerIncludes.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Step 11: Go to Configuration Properties / Linker / Input / Additional Dependencies&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/13-LinkerIncludesDone.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/13-LinkerIncludesDone.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Enter the path to all the relevant cv libs. For a default install, this is: &lt;pre&gt;"C:\Program Files\OpenCV\lib\cv.lib" "C:\Program Files\OpenCV\lib\cxcore.lib" "C:\Program Files\OpenCV\lib\cvaux.lib" "C:\Program Files\OpenCV\lib\highgui.lib"&lt;/pre&gt; (notice the spaces instead of ; marks)&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/14-WriteCode.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/14-WriteCode.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Write some code&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/15-StartDebug.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/15-StartDebug.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Click on "Start Debug"&lt;br /&gt;&lt;br /&gt;&lt;a href='http://photos1.blogger.com/hello/173/3082/1024/16-HelloWorld.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/hello/173/3082/320/16-HelloWorld.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Hello World in OpenCV&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-114552704648650920?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/114552704648650920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=114552704648650920' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/114552704648650920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/114552704648650920'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2006/04/getting-started-with-opencv-in-visual.html' title='Getting Started with OpenCV in Visual Studio 2005'/><author><name>Brian</name><uri>http://www.blogger.com/profile/10051689279394304562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111370556464623957</id><published>2005-04-16T19:35:00.000-07:00</published><updated>2006-09-15T17:45:21.096-07:00</updated><title type='text'>cvReleaseImage() on image with ROI set</title><content type='html'>This one took me a long time to track down, so make sure you clear an image's ROI before you call cvReleaseImage() on it. The error I kept getting (which of course is very informative) was:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;OpenCV ERROR: Unknown error code -49 (Deallocation error)&lt;br /&gt;      in function cvFree, cxalloc.cpp(136)&lt;br /&gt;Terminating the application...&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111370556464623957?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111370556464623957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111370556464623957' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111370556464623957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111370556464623957'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/04/cvreleaseimage-on-image-with-roi-set.html' title='cvReleaseImage() on image with ROI set'/><author><name>Louka</name><uri>http://www.blogger.com/profile/18254209889005899617</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111369307935152738</id><published>2005-04-16T16:02:00.001-07:00</published><updated>2005-04-16T16:12:40.480-07:00</updated><title type='text'>cvIntegral() on 32-bit floating point images</title><content type='html'>OpenCV provides a very useful function performing fast Viola and Jones object detection, but it can be a little silly in its requirements for the target image format. For the most part, it insists on you using double precision floating point integral images, and if you need to store a whole bunch of these in memory, you can quickly run out of RAM even on well equipped modern machines. Not finding an easy way to force it to use floats instead of doubles, I wrote my own integral image function, which frankly, looks simpler than OpenCV's, which you are free to use:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.etalonsoft.com/code/integral.cpp"&gt; http://www.etalonsoft.com/code/integral.cpp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111369307935152738?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111369307935152738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111369307935152738' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111369307935152738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111369307935152738'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/04/cvintegral-on-32-bit-floating-point_16.html' title='cvIntegral() on 32-bit floating point images'/><author><name>Louka</name><uri>http://www.blogger.com/profile/18254209889005899617</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111268577451735304</id><published>2005-04-05T00:22:00.000-07:00</published><updated>2005-04-05T00:37:05.546-07:00</updated><title type='text'>Montage in OpenCV</title><content type='html'>MATLAB has a really convenient function to create a montage of images -- i.e. a large image from a whole bunch of little ones. Requiring this functionality in my OpenCV projects, I decided to write my own utility function that accomplishes the same goal. &lt;a href="http://www.etalonsoft.com/code/montage.cpp"&gt;Here's the code for it&lt;/a&gt;, and below is an example montage image produced:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/img/55/3072/640/montage.jpg"&gt;&lt;img style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; MARGIN: 2px; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" src="http://photos1.blogger.com/img/55/3072/320/montage.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Example montage image with 10 images per row&lt;br /&gt;&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111268577451735304?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111268577451735304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111268577451735304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111268577451735304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111268577451735304'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/04/montage-in-opencv.html' title='Montage in OpenCV'/><author><name>Louka</name><uri>http://www.blogger.com/profile/18254209889005899617</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111130358493313880</id><published>2005-03-19T23:22:00.000-08:00</published><updated>2005-03-19T23:26:24.933-08:00</updated><title type='text'>OpenCV Assertions Are Lame</title><content type='html'>Whenever OpenCV library functions encounter a problem such as a NULL pointer passed in, or unexpected dimensions, or unexpected image format, they croak right away and for your help, apparently, output a line number deeeep inside the function framework where the problem occurred, which is often of little use to you. Here's an example:&lt;br /&gt;&lt;br /&gt;OpenCV ERROR: Null pointer (NULL array pointer is passed)&lt;br /&gt;        in function cvGetMat, cxarray.cpp(2766)&lt;br /&gt;Terminating the application...&lt;br /&gt;&lt;br /&gt;If you're compiling on the command line, you'll have to bust out gdb and hope you're a gdb pro to find what high-level function call in your code causes the assertion to fail.&lt;br /&gt;&lt;br /&gt;&lt;sigh&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111130358493313880?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111130358493313880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111130358493313880' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111130358493313880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111130358493313880'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/03/opencv-assertions-are-lame.html' title='OpenCV Assertions Are Lame'/><author><name>Louka</name><uri>http://www.blogger.com/profile/18254209889005899617</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111110569404155941</id><published>2005-03-17T16:17:00.000-08:00</published><updated>2005-03-17T23:29:25.930-08:00</updated><title type='text'>Switch to C++</title><content type='html'>I've decided to switch to C++, primarily because I like to use default parameters. For example, in the &lt;a href="http://www.deftdesigns.net/opencvdocs/"&gt;OpenCV 0.9.6 Documentation&lt;/a&gt; the Canny edge detector is defined as:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;void cvCanny( const CvArr* image, CvArr* edges, double threshold1,&lt;br /&gt;              double threshold2, int aperture_size=3 );&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;That means that you can call cvCanny like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cvCanny(sourceimage, resultimage, low_threshold, high_threshold);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Or like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cvCanny(sourceimage, resultimage, low_threshold, high_threshold, aperature_size);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;And either way will work in C++. C does not support this functionality. So, from now on, anything I post here probably won't compile like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;gcc test.cpp -o test `pkg-config --libs opencv --cflags opencv`&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;But it will compile like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;g++ test.cpp -o test `pkg-config --libs opencv --cflags opencv`&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Even though the underlying program may be entirely C except for the OpenCV calls.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111110569404155941?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111110569404155941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111110569404155941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111110569404155941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111110569404155941'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/03/switch-to-c.html' title='Switch to C++'/><author><name>Brian</name><uri>http://www.blogger.com/profile/10051689279394304562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111110501255085252</id><published>2005-03-17T16:06:00.000-08:00</published><updated>2005-03-17T16:16:52.553-08:00</updated><title type='text'>Documentation</title><content type='html'>Earlier, I had complained that the documentation for OpenCV that I could find easily was out of date. I was really looking for some kind of online reference, but it turns out the most up to date documentation is bundled with the distribution. It lives in a subfolder called (surprise) "docs". When you install OpenCV it puts these files by default in the folder /usr/local/share/opencv/doc/.&lt;br /&gt;&lt;br /&gt;Opening the file index.htm gives you links to four reference files (OpenCV is really four separate libraries bundled together). The problem is, on my Linux machine, the links don't work. They don't work because the names of the files referenced by the link have capitals, where the actual filenames they reference are all lower case. I fixed this on my local machine and then decided I should put this fixed version online where people could get to it:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.deftdesigns.net/opencvdocs/"&gt;OpenCV 0.9.6 Documentation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hopefully, this will allow for quick and easy reference (and as soon as google indexes it, a convenient site search).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111110501255085252?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111110501255085252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111110501255085252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111110501255085252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111110501255085252'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/03/documentation.html' title='Documentation'/><author><name>Brian</name><uri>http://www.blogger.com/profile/10051689279394304562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111033477045360583</id><published>2005-03-08T18:13:00.000-08:00</published><updated>2005-03-11T14:02:56.203-08:00</updated><title type='text'>My First OpenCV Program</title><content type='html'>Now that I've gotten OpenCV installed, the first thing I needed to try was to create a sample program of some kind that was basically not useful for anything except to demonstrate that I could compile an OpenCV program. Heres the code for test.c, my first attempt:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#include "cv.h"&lt;br /&gt;#include "highgui.h"&lt;br /&gt;&lt;br /&gt;int main( int arc, char ** argv)&lt;br /&gt;{&lt;br /&gt;    int W = 640;&lt;br /&gt;    int H = 480;&lt;br /&gt;&lt;br /&gt;    // Images are stored in IplImage structs. The function cvCreateImage&lt;br /&gt;    // allocates space for an image of a certain type, in this case an&lt;br /&gt;    // 8 bit, 1 channel (grayscale) image.&lt;br /&gt;    IplImage *image = cvCreateImage(cvSize(W, H), IPL_DEPTH_8U, 1);&lt;br /&gt;&lt;br /&gt;    // Create a named window and show our image on it&lt;br /&gt;    cvNamedWindow("My First OpenCV Program", 1);&lt;br /&gt;    cvShowImage("My First OpenCV Program", image);&lt;br /&gt;&lt;br /&gt;    // Wait for any keystroke and then release the image from memory and exit&lt;br /&gt;    // the program&lt;br /&gt;    cvWaitKey(0);&lt;br /&gt;    cvReleaseImage(&amp;amp;image);&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;All this code does is create a window and show an image of size 640x480 that was created using cvCreateImage. The image is black, which isn't surprising since we didn't put anything in it. In order to compile it from a shell I did:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;gcc test.c -o test `pkg-config --libs opencv --cflags opencv`&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111033477045360583?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111033477045360583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111033477045360583' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111033477045360583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111033477045360583'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/03/my-first-opencv-program.html' title='My First OpenCV Program'/><author><name>Brian</name><uri>http://www.blogger.com/profile/10051689279394304562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111027033989634909</id><published>2005-03-08T00:08:00.000-08:00</published><updated>2005-06-15T14:25:22.593-07:00</updated><title type='text'>How I Installed OpenCV</title><content type='html'>Thought I would start things off by recounting my installation experience. I'm running a pretty much default installation of Fedora Core 3 (I did install all the development packages, as well as gtk+2). I downloaded the Linux tar.gz from Sourceforge into my home directory and then from a shell did:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;tar -xzf opencv-0.9.6.tar.gz&lt;br /&gt;cd opencv-0.9.6&lt;br /&gt;./configure&lt;br /&gt;make&lt;br /&gt;su -&lt;br /&gt;make install&lt;br /&gt;exit (to get out of root)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This all completed without any real trouble, and things looked good. Problem was, after this step I couldn't compile any opencv programs. One method for compiling an OpenCV program test.c is to type:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;gcc test.c -o test `pkg-config --libs opencv --cflags opencv`&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;When I did this, pkg-config reported that it couldn't find opencv and that perhaps I should add opencv.pc to the PKG_CONFIG_PATH environment variable. I instead decided to add /usr/local/lib (the location of opencv.pc) to my /etc/ld.so.conf file and then run ldconfig (as root) to rebuild the links. You can check to see if everything is working by typing the following at the shell:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;pkg-config --libs opencv --cflags opencv&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;which in my case returned:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;-I/usr/local/include/opencv -L/usr/local/lib -lcxcore -lcv -lhighgui -lcvaux&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you get this far, chances are you have everything you need to compile an opencv program except the source code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111027033989634909?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111027033989634909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111027033989634909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111027033989634909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111027033989634909'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/03/how-i-installed-opencv.html' title='How I Installed OpenCV'/><author><name>Brian</name><uri>http://www.blogger.com/profile/10051689279394304562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11307093.post-111026865388107243</id><published>2005-03-07T23:57:00.000-08:00</published><updated>2005-03-07T23:58:32.473-08:00</updated><title type='text'>Welcome</title><content type='html'>I've created this blog because I started experimenting with OpenCV and looking into it's enormous potential only to notice that the documentation is ... lacking. Even Google searches turn up less than impressive results, usually returning one of two sites:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;University of Birmingham &lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.cs.bham.ac.uk/resources/courses/robotics/notes/lecture3.html"&gt;A lecture with sample code &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.cs.bham.ac.uk/resources/courses/robotics/doc/opencvdocs/"&gt;More comprehensive documentation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Official Sourceforge Page &lt;/span&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/opencvlibrary/"&gt;http://sourceforge.net/projects/opencvlibrary/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Admittedly, I've seen less documentation, but never on a project so large and well known. Even the documentation that exists, such as the sample code in the above link, doesn't compile without some modifications to the source. So as I run into problems and hopefully find solutions I'll post results here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11307093-111026865388107243?l=opencv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opencv.blogspot.com/feeds/111026865388107243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11307093&amp;postID=111026865388107243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111026865388107243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11307093/posts/default/111026865388107243'/><link rel='alternate' type='text/html' href='http://opencv.blogspot.com/2005/03/welcome_111026865388107243.html' title='Welcome'/><author><name>Brian</name><uri>http://www.blogger.com/profile/10051689279394304562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
