Ir ao conteúdo

Reconhecimento Facial no Ubuntu.

Boa noite,

Estive dando uma lida sobre reconhecimento facial nos últimos dias e achei o pam-face-authentication. Acessei o mesmo e vi as dependencias dele:

Opencv 1.0.0 +
libpam (também o pacote de desenvolvedor)
libX11 (também o pacote de desenvolvedor)
Qt4.5 (Não foi testado com versões anteriores)

Então pensei, por que não testar? Bom vamos começar…

Open CV – How to Install
Irei fazer um breve resumo do que eu fiz:

1. $ sudo apt-get install build-essential

2. Acessei o synaptic e procurei pelo “CMake”, Subversion, GTK+ 2.x, libpng, zlib, libjpeg, libtiff, libjasper, python 2.3 ou maior, swig. Instalei também as “-dev” para desenvolvedores. (Foram diversos pacotes que não sei listar já que não sabia ao certo quais exatamente eram necessários.)

3. $ sudo apt-get install libavformat-dev

4. $ svn co https://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/tags/latest_tested_snapshot

5. $ cd latest_tested_snapshot/opencv (O diretório deve conter CMakeLists.txt, INSTALL, etc…)

6. $ mkdir release

7. $ cd release

8. $ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..

9. $ make

10. $ sudo make install

11. $ sudo ldconfig -v

12. $ cd bin

13. $ ./cxcoretest

Verifiquei se passou nos testes e passou. Então prossegui na instalação dos requisitos.

(OpenCv agora deve estar instalado e funcionando.)

Agora faltava a libpam, libX11, Qt4.5 procurei manualmente os mesmos no synaptic mais uma vez e adiciuonei também os pacotes de desenvolvedor. (Novamente foram vários pacotes instalados, porém não tinha certeza do que ia ou não, antes sobrar do que faltar num teste como esses.)

Outras dependencias? Provavelmente Ok.

Vamos ao que insteressa, instalação do “pam-face-authentication” (ingles)

1. $ wget http://pam-face-authentication.googlecode.com/files/pam-face-authentication-0.3.tar.gz

2. $ tar -xf pam-face-authentication-0.3.tar.gz

3. $ cd pam-face-authentication-0.3

4. $ mkdir build

5. $ cd build

6. $ cmake -D CMAKE_INSTALL_DIR=/usr ..

7. $ make

8. $ sudo make install

Após instalado acessei o menu “Applications – Other – QtFacetrainer”, fiz reconhecimento facial. Fui em Advanced e testei, e me pareceu que estava funcionando.

Continuando a ler vi que havia um método para rodar o reconhecimento facial automaticamente quando fosse utilizado o comando “su usuario”.

Editei o “/etc/pam.d/su” com $ sudo vi /etc/pam.d/su

e adicionei a seguinte linha no inicio do arquivo:

auth sufficient pam_face_authentication.so enableX

(Lembrando que está opção é para quem deseja que uma janela com a exibição da webcam seja exibida. Caso você não deseje utilize auth sufficient pam_face_authentication.so)

Bom, espero que ajude um pouco, assim que for fazendo mais testes nas demais versões do Ubuntu mantenho você informado.

Até breve,
Matheus

PS: Testei o mesmo na minha instalação velha do Ubuntu 9.04 e não obtive sucesso, mas lembro que foi minha primeira tentativa e posso ter feito algo errado. Como já estava pra formatar e instalar o 9.10 alpha 4 e testa-lo, decidi tentar novamente.) Entrei em contato com o desenvolvedor do pam-face, tentando esclarecer minhas dúvidas sobre o problema no pam-face. Quem sabe ajude você.

PS2: desculpe os vários erros de portugues, mas estou escrevendo bem rápido pois amanhã cedo tenho aula e já está tarde.

Publicado emLinuxUbuntu

289 Comentários

  1. Thanks for your helpful post. Through the years, I have been able to understand that the actual symptoms of mesothelioma cancer are caused by the particular build up connected fluid relating to the lining on the lung and the chest cavity. The illness may start within the chest vicinity and pass on to other parts of the body. Other symptoms of pleural mesothelioma include fat loss, severe breathing in trouble, a fever, difficulty taking in food, and bloating of the neck and face areas. It really should be noted that some people existing with the disease do not experience virtually any serious indicators at all.

  2. Once I initially commented I clicked the -Notify me when new feedback are added- checkbox and now every time a remark is added I get four emails with the same comment. Is there any method you’ll be able to remove me from that service? Thanks!

  3. I will right away grab your rss feed as I can not find your e-mail subscription link or e-newsletter service. Do you’ve any? Kindly let me know in order that I could subscribe. Thanks.

  4. Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! However, how could we communicate?

  5. The following time I read a blog, I hope that it doesnt disappoint me as a lot as this one. I imply, I do know it was my option to read, but I truly thought youd have one thing fascinating to say. All I hear is a bunch of whining about something that you could fix should you werent too busy in search of attention.

  6. I don?t even know how I stopped up here, but I thought this submit was great. I don’t understand who you are however certainly you’re going to a famous blogger in the event you are not already 😉 Cheers!

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *