{"id":393,"date":"2009-08-19T01:26:37","date_gmt":"2009-08-19T04:26:37","guid":{"rendered":"http:\/\/wordpress.matbra.com\/?p=393"},"modified":"2010-08-03T17:34:23","modified_gmt":"2010-08-03T20:34:23","slug":"reconhecimento-facial-no-ubuntu","status":"publish","type":"post","link":"https:\/\/wordpress.matbra.com\/en\/2009\/08\/19\/reconhecimento-facial-no-ubuntu\/","title":{"rendered":"Facial Recognition using Ubuntu."},"content":{"rendered":"<p>Good Night,<\/p>\n<p>I was reading about Facial Recognition and found <a href=\"http:\/\/code.google.com\/p\/pam-face-authentication\/\" target=\"_blank\">pam-face-authentication<\/a>. You must have this packages to use it:<br \/>\n<a href=\"http:\/\/opencv.willowgarage.com\/wiki\" target=\"_blank\">Opencv 1.0.0 +<\/a><br \/>\nlibpam (dev version)<br \/>\nlibX11 (dev version)<br \/>\nQt4.5 (dev version) <\/p>\n<p>So I decided to try it. Let&#8217;s start.<\/p>\n<p><a href=\"http:\/\/opencv.willowgarage.com\/wiki\/InstallGuide_Linux\"  target=\"_blank\">Open CV &#8211; How to Install<\/a><br \/>\nThis is a resume of what I did<\/p>\n<p>1. Install the build-essential<\/p>\n<blockquote><p>\n$ sudo apt-get install build-essential\n<\/p><\/blockquote>\n<p>2. Access synaptic and search for &#8220;CMake&#8221;, Subversion, GTK+ 2.x, libpng, zlib, libjpeg, libtiff, libjasper, python 2.3+, swig. Don&#8217;t forget to install the -dev packages too<\/p>\n<p>3. Install libavformat-dev<\/p>\n<blockquote><p>\n$ sudo apt-get install libavformat-dev\n<\/p><\/blockquote>\n<p>4. Download the opencv library<\/p>\n<blockquote><p>\n$ svn co https:\/\/opencvlibrary.svn.sourceforge.net\/svnroot\/opencvlibrary\/tags\/latest_tested_snapshot\n<\/p><\/blockquote>\n<p>5. Go to the download folder<\/p>\n<blockquote><p>\n$ cd latest_tested_snapshot\/opencv\n<\/p><\/blockquote>\n<p>6. Create dir release<\/p>\n<blockquote><p>\n$ mkdir release\n<\/p><\/blockquote>\n<p>7. Access it<\/p>\n<blockquote><p>\n$ cd release\n<\/p><\/blockquote>\n<p>8. Use cmake (Don&#8217;t have sure if .. is necessary.)<\/p>\n<blockquote><p>\\<br \/>\n$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=\/usr\/local -D BUILD_PYTHON_SUPPORT=ON ..\n<\/p><\/blockquote>\n<p>9. Make it<\/p>\n<blockquote><p>\n$ make\n<\/p><\/blockquote>\n<p>10. Install it<\/p>\n<blockquote><p>\n$ sudo make install\n<\/p><\/blockquote>\n<p>11.<\/p>\n<blockquote><p>\n$ sudo ldconfig -v\n<\/p><\/blockquote>\n<p>12. <\/p>\n<blockquote><p>\n$ cd bin\n<\/p><\/blockquote>\n<p>13. Verify if the dependencies works.<\/p>\n<blockquote><p>\n$ .\/cxcoretest\n<\/p><\/blockquote>\n<p>Now go to Synpactic again and look for Libpam, libX11, Qt4.5 (don&#8217;t forget the -dev version) <\/p>\n<p>How to install pam-face-authentication? <a href=\"http:\/\/lifeasiknow-it.blogspot.com\/2009\/08\/pam-face-authentication-musings-how-to.html\"  target=\"_blank\">Install PAM-FaCE-AUTH (reference)<\/a><\/p>\n<p>1. Download pam-face-authentication (download the last version in my time I used 0.3)<\/p>\n<blockquote><p>\n$ wget http:\/\/pam-face-authentication.googlecode.com\/files\/pam-face-authentication-0.3.tar.gz\n<\/p><\/blockquote>\n<p>2. Extract it.<\/p>\n<blockquote><p>\n$ tar -xf pam-face-authentication-0.3.tar.gz\n<\/p><\/blockquote>\n<p>3. Go to extracted folder<\/p>\n<blockquote><p>\n$ cd pam-face-authentication-0.3\n<\/p><\/blockquote>\n<p>4. Create build<\/p>\n<blockquote><p>\n$ mkdir build\n<\/p><\/blockquote>\n<p>5. Go to folder<\/p>\n<blockquote><p>\n$ cd build\n<\/p><\/blockquote>\n<p>6. (Don&#8217;t have sure if .. is necessary.)<\/p>\n<blockquote><p>\n$ cmake -D CMAKE_INSTALL_DIR=\/usr ..<br \/>\n<\/blockquote\n\n7.\n\n\n<blockquote>\n$ make\n<\/p><\/blockquote>\n<p>8.<\/p>\n<blockquote><p>\n$ sudo make install\n<\/p><\/blockquote>\n<p>Access Applications &#8211; Other &#8211; QtFacetrainer. Configure it. Go to Advanced and test it. <\/p>\n<p>If you want to use it when somebody uses the &#8220;su&#8221; command. Edit &#8220;\/etc\/pam.d\/su&#8221;<\/p>\n<blockquote><p>\n$ sudo vi \/etc\/pam.d\/su\n<\/p><\/blockquote>\n<p>Add this line in the begin of the file<\/p>\n<blockquote><p>\nauth sufficient pam_face_authentication.so enableX<br \/>\n<\/blockquote\n\nIf you don't want a window showing the webcam remove the enableX\n\nMatheus\n\n<a href=\"http:\/\/code.google.com\/p\/pam-face-authentication\/issues\/detail?id=17\">Other reference <\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Good Night, I was reading about Facial Recognition and found pam-face-authentication. You must have this packages to use it: Opencv 1.0.0 + libpam (dev version)&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/wordpress.matbra.com\/en\/2009\/08\/19\/reconhecimento-facial-no-ubuntu\/\">Continue reading<span class=\"screen-reader-text\">Facial Recognition using Ubuntu.<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[34,27],"tags":[319,152,153,151],"class_list":["post-393","post","type-post","status-publish","format-standard","hentry","category-linux","category-ubuntu","tag-linux","tag-opencv","tag-pam_face_authentication","tag-reconhecimento-facial","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/psjGE-6l","_links":{"self":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/comments?post=393"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts\/393\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/media?parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/categories?post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/tags?post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}