<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://www.bytefish.de/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel>
        <title>http://www.bytefish.de</title>
        <description></description>
        <link>http://www.bytefish.de/</link>
        <lastBuildDate>Sun, 20 May 2012 02:54:32 +0200</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
        <image>
            <url>http://www.bytefish.de/lib/tpl/minimal/images/favicon.ico</url>
            <title>http://www.bytefish.de</title>
            <link>http://www.bytefish.de/</link>
        </image>
        <item>
            <title>blog:corrected_facerec_demo.cpp_for_opencv_2.4</title>
            <link>http://www.bytefish.de/blog/corrected_facerec_demo.cpp_for_opencv_2.4</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot;&gt;&lt;a name=&quot;corrected_facerec_democpp_for_opencv_24&quot; id=&quot;corrected_facerec_democpp_for_opencv_24&quot;&gt;Corrected facerec_demo.cpp for OpenCV 2.4&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
There&amp;#039;s a small bug in the facerec_demo.cpp, that ships with OpenCV 2.4. I&amp;#039;ll put a corrected version upstream as soon as possible. However, here&amp;#039;s a corrected version if you can&amp;#039;t wait:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://bytefish.de/dev/cpp/facerec_demo.cpp&quot; class=&quot;urlextern&quot; title=&quot;http://bytefish.de/dev/cpp/facerec_demo.cpp&quot;  rel=&quot;nofollow&quot;&gt;http://bytefish.de/dev/cpp/facerec_demo.cpp&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://www.bytefish.de/tag/opencv?do=showtag&amp;amp;tag=opencv&quot; class=&quot;wikilink1&quot; title=&quot;tag:opencv&quot; rel=&quot;tag&quot;&gt;opencv&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;/div&gt;
</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Fri, 04 May 2012 20:12:06 +0200</pubDate>
        </item>
        <item>
            <title>blog:opencv_visual_studio_and_libfacerec</title>
            <link>http://www.bytefish.de/blog/opencv_visual_studio_and_libfacerec</link>
            <description>
&lt;h1 class=&quot;sectionedit2&quot;&gt;&lt;a name=&quot;opencv_visual_studio_and_libfacerec&quot; id=&quot;opencv_visual_studio_and_libfacerec&quot;&gt;opencv, visual studio and libfacerec&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
I&amp;#039;ve got a lot of mails from people, who have problems to use OpenCV with Microsoft Visual Studio 2008/2010. While I think it&amp;#039;s unbelievably easy by using CMake, I am going to explain how to build the libfacerec demo without using CMake. I have illustrated each step with screenshots and detailed explanation, so it&amp;#039;s easy for you to follow. I am going to use Microsoft Windows 7, Microsoft Visual Studio 2010 and OpenCV 2.3.1 in this tutorial.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT2 SECTION &quot;opencv, visual studio and libfacerec&quot; [1-497] --&gt;
&lt;h2 class=&quot;sectionedit3&quot;&gt;&lt;a name=&quot;setting_up_opencv&quot; id=&quot;setting_up_opencv&quot;&gt;Setting up OpenCV&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
First of all you&amp;#039;ll need OpenCV. For this tutorial I suggest to download the OpenCV Superpack 2.3.1, which is available as OpenCV-2.3.1-win-superpack.exe at:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3.1/&quot; class=&quot;urlextern&quot; title=&quot;http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3.1/&quot;  rel=&quot;nofollow&quot;&gt;http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3.1/&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
There are a lot of other ways to install OpenCV, so please consult the &lt;a href=&quot;http://opencv.willowgarage.com/wiki/&quot; class=&quot;urlextern&quot; title=&quot;http://opencv.willowgarage.com/wiki/&quot;  rel=&quot;nofollow&quot;&gt;http://opencv.willowgarage.com/wiki/&lt;/a&gt; if you don&amp;#039;t like the suggested one. The Superpack itself is not an installer, but a self-extracting archive. It contains the pre-built OpenCV library for VC9 (Microsoft Visual Studio 2008), VC10 (Microsoft Visual Studio 2010) and MinGW to mention a few. You&amp;#039;ll only need the VC10 binaries for this tutorial.
&lt;/p&gt;

&lt;p&gt;
Double-click the OpenCV-2.3.1-win-superpack.exe and select a folder to extract to. I&amp;#039;ll choose &lt;strong&gt;D:\projects&lt;/strong&gt; in this example:
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.bytefish.de/_detail/blog/installer_path.jpg?id=blog%3Aopencv_visual_studio_and_libfacerec&quot; class=&quot;media&quot; title=&quot;blog:installer_path.jpg&quot;&gt;&lt;img src=&quot;http://www.bytefish.de/_media/blog/installer_path.jpg?w=400&quot; class=&quot;mediacenter&quot; alt=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
The OpenCV superpack is no installer, so you&amp;#039;ll need to manually add the OpenCV libraries to the DLL search path of Windows. The search paths of Windows are given in the PATH environment variable, which is a list of the directories to search, each separated by a semicolon.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT3 SECTION &quot;Setting up OpenCV&quot; [498-1620] --&gt;
&lt;h3 class=&quot;sectionedit4&quot;&gt;&lt;a name=&quot;windows_vista_and_windows_7_users&quot; id=&quot;windows_vista_and_windows_7_users&quot;&gt;Windows Vista and Windows 7 users&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; From the Desktop (or Start Menu), right-click My Computer and click Properties.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Click Advanced System Settings link in the left column.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; In the System Properties window click the Environment Variables button.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button. In the PATH variable each search path is separated with a semicolon.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; At the end of the line add the following directories:&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; D:\projects\opencv\build\x86\vc10\bin&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; D:\projects\opencv\build\common\tbb\ia32\vc10&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
So you have to append a line like this to the existing PATH: 
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;;D:\projects\opencv\build\x86\vc10\bin;D:\projects\opencv\build\common\tbb\ia32\vc10&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT4 SECTION &quot;Windows Vista and Windows 7 users&quot; [1621-2401] --&gt;
&lt;h3 class=&quot;sectionedit5&quot;&gt;&lt;a name=&quot;windows_2000_and_windows_xp_users&quot; id=&quot;windows_2000_and_windows_xp_users&quot;&gt;Windows 2000 and Windows XP users&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; From the Desktop, right-click My Computer and click Properties.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; In the System Properties window, click on the Advanced tab.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; In the Advanced section, click the Environment Variables button.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button. In the PATH variable each search path is separated with a semicolon.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; At the end of the line add the following directories: &lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; D:\projects\opencv\build\x86\vc10\bin&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; D:\projects\opencv\build\common\tbb\ia32\vc10&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
So you have to append a line like this to the existing PATH: 
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;;D:\projects\opencv\build\x86\vc10\bin;D:\projects\opencv\build\common\tbb\ia32\vc10&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT5 SECTION &quot;Windows 2000 and Windows XP users&quot; [2402-3164] --&gt;
&lt;h2 class=&quot;sectionedit6&quot;&gt;&lt;a name=&quot;getting_libfacerec&quot; id=&quot;getting_libfacerec&quot;&gt;Getting libfacerec&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Next you&amp;#039;ll need to download libfacerec, which is available from:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.github.com/bytefish/libfacerec&quot; class=&quot;urlextern&quot; title=&quot;http://www.github.com/bytefish/libfacerec&quot;  rel=&quot;nofollow&quot;&gt;http://www.github.com/bytefish/libfacerec&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
If you don&amp;#039;t know how to clone a github repository with git, then you can download the source from:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://github.com/bytefish/libfacerec/downloads&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/bytefish/libfacerec/downloads&quot;  rel=&quot;nofollow&quot;&gt;https://github.com/bytefish/libfacerec/downloads&lt;/a&gt; (&lt;a href=&quot;https://github.com/bytefish/libfacerec/zipball/master&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/bytefish/libfacerec/zipball/master&quot;  rel=&quot;nofollow&quot;&gt;zip&lt;/a&gt;, &lt;a href=&quot;https://github.com/bytefish/libfacerec/tarball/master&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/bytefish/libfacerec/tarball/master&quot;  rel=&quot;nofollow&quot;&gt;tar.gz&lt;/a&gt;)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Then extract the zip or tar.gz file to a folder of your choice, I am using &lt;strong&gt;D:\downloads\libfacerec&lt;/strong&gt; in this tutorial. If you are using an other folder, then just keep it consistent.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT6 SECTION &quot;Getting libfacerec&quot; [3165-3782] --&gt;
&lt;h2 class=&quot;sectionedit7&quot;&gt;&lt;a name=&quot;setting_up_visual_studio&quot; id=&quot;setting_up_visual_studio&quot;&gt;Setting up Visual Studio&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
You&amp;#039;ll now learn how to configure a Microsoft Visual Studio 10 C++ project with OpenCV. Parts might resemble the post by &lt;a href=&quot;http://stackoverflow.com/users/176769/karlphillip&quot; class=&quot;urlextern&quot; title=&quot;http://stackoverflow.com/users/176769/karlphillip&quot;  rel=&quot;nofollow&quot;&gt;karlphilipp&lt;/a&gt;, which also explains how to configure OpenCV 2.3 on Visual Studio 2010. I won&amp;#039;t reinvent the wheel, so you probably want to read hist post at:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://stackoverflow.com/a/7014918/513875&quot; class=&quot;urlextern&quot; title=&quot;http://stackoverflow.com/a/7014918/513875&quot;  rel=&quot;nofollow&quot;&gt;http://stackoverflow.com/a/7014918/513875&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The difference is, that I&amp;#039;ve decided to use pre-built Visual Studio 2010 (VC 10) libraries from the superpack. And I mention some pitfalls you&amp;#039;ll encounter when compiling libfacerec.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT7 SECTION &quot;Setting up Visual Studio&quot; [3783-4382] --&gt;
&lt;h3 class=&quot;sectionedit8&quot;&gt;&lt;a name=&quot;create_an_empty_project&quot; id=&quot;create_an_empty_project&quot;&gt;Create an Empty project&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Start Visual Studio and from the main menu select &lt;strong&gt;“File → New Project…“&lt;/strong&gt;. Then create an &lt;strong&gt;“Empty Project”&lt;/strong&gt;, name it &lt;strong&gt;libfacerec&lt;/strong&gt; and store it in &lt;strong&gt;D:\projects&lt;/strong&gt;:
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.bytefish.de/_detail/blog/libfacerec_vs_new_proj.jpg?id=blog%3Aopencv_visual_studio_and_libfacerec&quot; class=&quot;media&quot; title=&quot;blog:libfacerec_vs_new_proj.jpg&quot;&gt;&lt;img src=&quot;http://www.bytefish.de/_media/blog/libfacerec_vs_new_proj.jpg?w=400&quot; class=&quot;mediacenter&quot; alt=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT8 SECTION &quot;Create an Empty project&quot; [4383-4635] --&gt;
&lt;h3 class=&quot;sectionedit9&quot;&gt;&lt;a name=&quot;adding_the_libfacerec_headers_and_sources&quot; id=&quot;adding_the_libfacerec_headers_and_sources&quot;&gt;Adding the libfacerec headers and sources&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
First of all the libfacerec headers and sources are added to our solution. For this copy the libfacerec header files from your extracted archive in &lt;strong&gt;D:\downloads\libfacerec\include&lt;/strong&gt; to where your the solution is located in &lt;strong&gt;D:\projects\libfacerec\libfacerec&lt;/strong&gt;. Also copy the source files from &lt;strong&gt;D:\downloads\libfacerec\src&lt;/strong&gt; to &lt;strong&gt;D:\projects\libfacerec\libfacerec&lt;/strong&gt;. 
&lt;/p&gt;

&lt;p&gt;
Now add the files to the Microsoft Visual Studio solution. In the Solution Explorer right click on &lt;strong&gt;Header Files&lt;/strong&gt; and select &lt;strong&gt;Add → Existing Item…“&lt;/strong&gt;, then select all *.hpp files you&amp;#039;ve just copied. Do the same for the source files and right click on &lt;strong&gt;Source Files&lt;/strong&gt; and select all *.cpp files. 
&lt;/p&gt;

&lt;p&gt;
Your project now looks like this:
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.bytefish.de/_detail/blog/libfacerec_added_files.jpg?id=blog%3Aopencv_visual_studio_and_libfacerec&quot; class=&quot;media&quot; title=&quot;blog:libfacerec_added_files.jpg&quot;&gt;&lt;img src=&quot;http://www.bytefish.de/_media/blog/libfacerec_added_files.jpg?w=400&quot; class=&quot;mediacenter&quot; alt=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT9 SECTION &quot;Adding the libfacerec headers and sources&quot; [4636-5445] --&gt;
&lt;h3 class=&quot;sectionedit10&quot;&gt;&lt;a name=&quot;additional_include_directories&quot; id=&quot;additional_include_directories&quot;&gt;Additional Include Directories&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Your project doesn&amp;#039;t compile yet, because we didn&amp;#039;t configure OpenCV. The first step is to set the additional include directories for our project. Go to the &lt;strong&gt;Project Properties&lt;/strong&gt; by either right click on your project and select Properties or by pressing Alt + F7, in the new window do the following:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; From the &lt;strong&gt;Configuration&lt;/strong&gt; box (combo box in the top left), select &lt;strong&gt;All Configurations&lt;/strong&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Open &lt;strong&gt;Configuration Properties → C/C++ → General&lt;/strong&gt; and edit the field &lt;strong&gt;Additional Include Directories&lt;/strong&gt; to add these 3 include paths:&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; D:\projects\opencv\build\include&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; D:\projects\opencv\build\include\opencv&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; D:\projects\opencv\build\include\opencv2&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.bytefish.de/_detail/blog/libfacerec_c_cpp.jpg?id=blog%3Aopencv_visual_studio_and_libfacerec&quot; class=&quot;media&quot; title=&quot;blog:libfacerec_c_cpp.jpg&quot;&gt;&lt;img src=&quot;http://www.bytefish.de/_media/blog/libfacerec_c_cpp.jpg?w=400&quot; class=&quot;mediacenter&quot; alt=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT10 SECTION &quot;Additional Include Directories&quot; [5446-6197] --&gt;
&lt;h3 class=&quot;sectionedit11&quot;&gt;&lt;a name=&quot;additional_library_directories_and_additional_dependencies&quot; id=&quot;additional_library_directories_and_additional_dependencies&quot;&gt;Additional Library Directories and Additional Dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Then we need to add the libraries to build against. Again in the &lt;strong&gt;Project Properties&lt;/strong&gt; Window do the following:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Add the path of the OpenCV libraries by &lt;strong&gt;Configuration Properties → Linker → General&lt;/strong&gt; and on the &lt;strong&gt;Additional Library Directories&lt;/strong&gt; field add:&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; D:\projects\opencv\build\x86\vc10\lib&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Then go to &lt;strong&gt;Configuration Properties → Linker → Input&lt;/strong&gt; and in the &lt;strong&gt;Additional Dependencies&lt;/strong&gt; field add:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; opencv_highgui231.lib&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; opencv_core231.lib&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; opencv_imgproc231.lib&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.bytefish.de/_detail/blog/libfacerec_linker_input.jpg?id=blog%3Aopencv_visual_studio_and_libfacerec&quot; class=&quot;media&quot; title=&quot;blog:libfacerec_linker_input.jpg&quot;&gt;&lt;img src=&quot;http://www.bytefish.de/_media/blog/libfacerec_linker_input.jpg?w=400&quot; class=&quot;mediacenter&quot; alt=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT11 SECTION &quot;Additional Library Directories and Additional Dependencies&quot; [6198-6810] --&gt;
&lt;h3 class=&quot;sectionedit12&quot;&gt;&lt;a name=&quot;build_libfacerec&quot; id=&quot;build_libfacerec&quot;&gt;Build libfacerec&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Finally libfacerec can be built.  We are linking against the libraries:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; opencv_core231.lib&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; opencv_highgui231.lib&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; opencv_imgproc231.lib&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Those libraries have no Debug symbols, so we build libfacerec with the Release Configuration:
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.bytefish.de/_detail/blog/release_build.jpg?id=blog%3Aopencv_visual_studio_and_libfacerec&quot; class=&quot;media&quot; title=&quot;blog:release_build.jpg&quot;&gt;&lt;img src=&quot;http://www.bytefish.de/_media/blog/release_build.jpg&quot; class=&quot;mediacenter&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Then build the project and its executable by simply selecting &lt;strong&gt;Build → Build Solution&lt;/strong&gt; (F7) from the Menu. And you should see:
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.bytefish.de/_detail/blog/build.jpg?id=blog%3Aopencv_visual_studio_and_libfacerec&quot; class=&quot;media&quot; title=&quot;blog:build.jpg&quot;&gt;&lt;img src=&quot;http://www.bytefish.de/_media/blog/build.jpg?w=400&quot; class=&quot;mediacenter&quot; alt=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Congratulations!
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT12 SECTION &quot;Build libfacerec&quot; [6811-7292] --&gt;
&lt;h2 class=&quot;sectionedit13&quot;&gt;&lt;a name=&quot;running_the_demo&quot; id=&quot;running_the_demo&quot;&gt;Running the Demo&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Now to the Eigenfaces Demo. You need some data to make the examples work, sorry but I really can&amp;#039;t include those face databases in my repository. First of all this. In the demo I have decided to read the images from a very simple CSV file. Why? Because it&amp;#039;s the simplest platform-independent approach I can think of. However, if you know a simpler solution please ping me about it. Basically all the CSV file needs to contain are lines composed of a &lt;strong&gt;filename&lt;/strong&gt; followed by a &lt;strong&gt;;&lt;/strong&gt; followed by the &lt;strong&gt;label&lt;/strong&gt; (as &lt;em&gt;integer number&lt;/em&gt;), making up a line like this: 
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;/path/to/image.ext;0&lt;/pre&gt;

&lt;p&gt;
Think of the &lt;strong&gt;label&lt;/strong&gt; as the subject (the person) this image belongs to, so same subjects (persons) should have the same &lt;strong&gt;label&lt;/strong&gt;. So let&amp;#039;s make up an example. Download the AT&amp;amp;T Facedatabase from &lt;a href=&quot;http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html&quot; class=&quot;urlextern&quot; title=&quot;http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html&quot;  rel=&quot;nofollow&quot;&gt;AT&amp;amp;T Facedatabase&lt;/a&gt; and the corresponding CSV file from &lt;a href=&quot;https://github.com/bytefish/opencv/blob/master/eigenfaces/at.txt&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/bytefish/opencv/blob/master/eigenfaces/at.txt&quot;  rel=&quot;nofollow&quot;&gt;at.txt&lt;/a&gt;, which looks like this (file is without &lt;strong&gt;…&lt;/strong&gt; of course):
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;./at/s1/1.pgm;0
./at/s1/2.pgm;0
...
./at/s2/1.pgm;1
./at/s2/2.pgm;1
...
./at/s40/1.pgm;39
./at/s40/2.pgm;39&lt;/pre&gt;

&lt;p&gt;
Imagine I have extracted the files to &lt;strong&gt;D:/data/at&lt;/strong&gt; and have downloaded the CSV file to &lt;strong&gt;D:/data/at.txt&lt;/strong&gt;.
&lt;/p&gt;

&lt;p&gt;
Then I would simply Search &amp;amp; Replace &lt;strong&gt;./&lt;/strong&gt; with &lt;strong&gt;D:/data/&lt;/strong&gt;. You can do that in an editor of your choice, every sufficiently advanced editor can do this. Once you have a CSV file with &lt;em&gt;valid&lt;/em&gt; &lt;strong&gt;filenames&lt;/strong&gt; and &lt;strong&gt;labels&lt;/strong&gt;, you can run the demo by with the path to the CSV file as parameter:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;D:\projects\libfacerec\Release\libfacerec.exe D:/data/at.txt&lt;/pre&gt;

&lt;p&gt;
and you should see (Note I have switched to the Eigenfaces model in the demo. Latest version in trunk is Fisherfaces!):
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.bytefish.de/_detail/blog/eigenfaces.jpg?id=blog%3Aopencv_visual_studio_and_libfacerec&quot; class=&quot;media&quot; title=&quot;blog:eigenfaces.jpg&quot;&gt;&lt;img src=&quot;http://www.bytefish.de/_media/blog/eigenfaces.jpg?w=400&quot; class=&quot;mediacenter&quot; alt=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
So yes. I am pretty sure all this also works in Microsoft Windows.
&lt;/p&gt;
&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://www.bytefish.de/tag/opencv?do=showtag&amp;amp;tag=opencv&quot; class=&quot;wikilink1&quot; title=&quot;tag:opencv&quot; rel=&quot;tag&quot;&gt;opencv&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;!-- EDIT13 SECTION &quot;Running the Demo&quot; [7293-] --&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 22:33:24 +0200</pubDate>
        </item>
        <item>
            <title>blog:libfacerec_c_cpp.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Alibfacerec_c_cpp.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/libfacerec_c_cpp.jpg?w=500&amp;h=304t=1334790516&quot; alt=&quot;blog:libfacerec_c_cpp.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:58:08 +0200</pubDate>
        </item>
        <item>
            <title>blog:release_build.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Arelease_build.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/release_build.jpg?w=347&amp;h=88t=1334789887&quot; alt=&quot;blog:release_build.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:58:07 +0200</pubDate>
        </item>
        <item>
            <title>blog:libfacerec_linker_input.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Alibfacerec_linker_input.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/libfacerec_linker_input.jpg?w=500&amp;h=324t=1334790451&quot; alt=&quot;blog:libfacerec_linker_input.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:58:05 +0200</pubDate>
        </item>
        <item>
            <title>blog:libfacerec_vs_new_proj.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Alibfacerec_vs_new_proj.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/libfacerec_vs_new_proj.jpg?w=500&amp;h=345t=1334789880&quot; alt=&quot;blog:libfacerec_vs_new_proj.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:58:00 +0200</pubDate>
        </item>
        <item>
            <title>blog:libfacerec_added_files.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Alibfacerec_added_files.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/libfacerec_added_files.jpg?w=457&amp;h=483t=1334789874&quot; alt=&quot;blog:libfacerec_added_files.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:57:54 +0200</pubDate>
        </item>
        <item>
            <title>blog:installer_path.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Ainstaller_path.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/installer_path.jpg?w=496&amp;h=160t=1334789874&quot; alt=&quot;blog:installer_path.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:57:54 +0200</pubDate>
        </item>
        <item>
            <title>blog:installer_extracting.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Ainstaller_extracting.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/installer_extracting.jpg?w=500&amp;h=253t=1334789873&quot; alt=&quot;blog:installer_extracting.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:57:53 +0200</pubDate>
        </item>
        <item>
            <title>blog:eigenfaces.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Aeigenfaces.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/eigenfaces.jpg?w=500&amp;h=230t=1334789872&quot; alt=&quot;blog:eigenfaces.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:57:52 +0200</pubDate>
        </item>
        <item>
            <title>blog:build.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Abuild.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/build.jpg?w=500&amp;h=122t=1334789870&quot; alt=&quot;blog:build.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Thu, 19 Apr 2012 00:57:50 +0200</pubDate>
        </item>
        <item>
            <title>blog:arnie_30_30_200_200.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Aarnie_30_30_200_200.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/arnie_30_30_200_200.jpg?w=200&amp;h=200t=1334087572&quot; alt=&quot;blog:arnie_30_30_200_200.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Tue, 10 Apr 2012 21:52:52 +0200</pubDate>
        </item>
        <item>
            <title>blog:arnie_20_20_200_200.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Aarnie_20_20_200_200.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/arnie_20_20_200_200.jpg?w=200&amp;h=200t=1334087571&quot; alt=&quot;blog:arnie_20_20_200_200.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Tue, 10 Apr 2012 21:52:51 +0200</pubDate>
        </item>
        <item>
            <title>blog:arnie_20_20_70_70.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Aarnie_20_20_70_70.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/arnie_20_20_70_70.jpg?w=70&amp;h=70t=1334087570&quot; alt=&quot;blog:arnie_20_20_70_70.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Tue, 10 Apr 2012 21:52:50 +0200</pubDate>
        </item>
        <item>
            <title>blog:arnie_10_10_200_200.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Aarnie_10_10_200_200.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/arnie_10_10_200_200.jpg?w=200&amp;h=200t=1334087570&quot; alt=&quot;blog:arnie_10_10_200_200.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Tue, 10 Apr 2012 21:52:50 +0200</pubDate>
        </item>
        <item>
            <title>blog:arnie.jpg</title>
            <link>http://www.bytefish.de/?image=blog%3Aarnie.jpg&amp;ns=blog&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/blog/arnie.jpg?w=440&amp;h=500t=1334087292&quot; alt=&quot;blog:arnie.jpg&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Tue, 10 Apr 2012 21:48:12 +0200</pubDate>
        </item>
        <item>
            <title>wiki:lda_pc1.png</title>
            <link>http://www.bytefish.de/?image=wiki%3Alda_pc1.png&amp;ns=wiki&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/wiki/lda_pc1.png?w=500&amp;h=375t=1322500125&quot; alt=&quot;wiki:lda_pc1.png&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Mon, 28 Nov 2011 18:08:45 +0200</pubDate>
        </item>
        <item>
            <title>wiki:lda_components.png</title>
            <link>http://www.bytefish.de/?image=wiki%3Alda_components.png&amp;ns=wiki&amp;do=media</link>
            <description>&lt;img src=&quot;/_media/wiki/lda_components.png?w=500&amp;h=375t=1322499594&quot; alt=&quot;wiki:lda_components.png&quot; /&gt;</description>
            <author>philipp</author>
        <category>opencv</category>
            <pubDate>Mon, 28 Nov 2011 17:59:55 +0200</pubDate>
        </item>
    </channel>
</rss>

