Este pacote é uma solução de código aberto baseado em
Qt e
OpenCV na plataforma
GNU/Linux, que permite o learning (aprendizado) e detectar o objeto recém aprendido pelo sistema.
Este projeto é de código aberto, então, é uma boa fonte de aprendizagem para os programadores. Pois além de manipular Webcam, utiliza diversos algoritmos de reconhecimento de padrão como SURF e outros. Bom, chega de blá-blá-blá.
A instalação é simples. Efetue o download do código fonte no link a seguir:
# wget http://find-object.googlecode.com/files/Find-Object-0.4.0-Source.zip
Agora descompacte o arquivo com o comando
unzip conforme o exemplo abaixo:
# unzip Find-Object-0.4.0-Source.zip
Archive: Find-Object-0.4.0-Source.zip
inflating: Find-Object-0.4.0-Source/build/.empty
inflating: Find-Object-0.4.0-Source/src/AddObjectDialog.h
inflating: Find-Object-0.4.0-Source/src/ParametersToolBox.h
inflating: Find-Object-0.4.0-Source/src/Camera.h
inflating: Find-Object-0.4.0-Source/src/ParametersToolBox.cpp
inflating: Find-Object-0.4.0-Source/src/resources.qrc
inflating: Find-Object-0.4.0-Source/src/AboutDialog.cpp
inflating: Find-Object-0.4.0-Source/src/KeypointItem.h
inflating: Find-Object-0.4.0-Source/src/ui/mainWindow.ui
inflating: Find-Object-0.4.0-Source/src/ui/addObjectDialog.ui
inflating: Find-Object-0.4.0-Source/src/ui/aboutDialog.ui
inflating: Find-Object-0.4.0-Source/src/QtOpenCV.h
inflating: Find-Object-0.4.0-Source/src/AddObjectDialog.cpp
inflating: Find-Object-0.4.0-Source/src/Settings.cpp
inflating: Find-Object-0.4.0-Source/src/MainWindow.cpp
inflating: Find-Object-0.4.0-Source/src/AboutDialog.h
inflating: Find-Object-0.4.0-Source/src/ObjWidget.h
inflating: Find-Object-0.4.0-Source/src/utilite/UFile.cpp
inflating: Find-Object-0.4.0-Source/src/utilite/UFile.h
inflating: Find-Object-0.4.0-Source/src/utilite/UDirectory.cpp
inflating: Find-Object-0.4.0-Source/src/utilite/UDirectory.h
inflating: Find-Object-0.4.0-Source/src/utilite/UPlot.h
inflating: Find-Object-0.4.0-Source/src/utilite/UPlot.cpp
inflating: Find-Object-0.4.0-Source/src/utilite/UStl.h
inflating: Find-Object-0.4.0-Source/src/resources/Find-Object.png
inflating: Find-Object-0.4.0-Source/src/resources/TheWorkingGroup_video_play.ico
inflating: Find-Object-0.4.0-Source/src/resources/TheWorkingGroup_video_stop.ico
inflating: Find-Object-0.4.0-Source/src/resources/TheWorkingGroup_video_pause.ico
inflating: Find-Object-0.4.0-Source/src/Camera.cpp
inflating: Find-Object-0.4.0-Source/src/Settings.h
inflating: Find-Object-0.4.0-Source/src/KeypointItem.cpp
inflating: Find-Object-0.4.0-Source/src/MainWindow.h
inflating: Find-Object-0.4.0-Source/src/QtOpenCV.cpp
inflating: Find-Object-0.4.0-Source/src/rtabmap/PdfPlot.h
inflating: Find-Object-0.4.0-Source/src/rtabmap/PdfPlot.cpp
inflating: Find-Object-0.4.0-Source/src/ObjWidget.cpp
inflating: Find-Object-0.4.0-Source/.project
inflating: Find-Object-0.4.0-Source/CMakeLists.txt
inflating: Find-Object-0.4.0-Source/example/CMakeLists.txt
inflating: Find-Object-0.4.0-Source/example/main.cpp
inflating: Find-Object-0.4.0-Source/bin/box.png
inflating: Find-Object-0.4.0-Source/bin/box_in_scene.png
inflating: Find-Object-0.4.0-Source/.cproject
inflating: Find-Object-0.4.0-Source/LICENSE
inflating: Find-Object-0.4.0-Source/README
inflating: Find-Object-0.4.0-Source/app/CMakeLists.txt
inflating: Find-Object-0.4.0-Source/app/Find-Object.icns
inflating: Find-Object-0.4.0-Source/app/Find-Object.ico
inflating: Find-Object-0.4.0-Source/app/Find-Object.ifx
inflating: Find-Object-0.4.0-Source/app/main.cpp
inflating: Find-Object-0.4.0-Source/app/Find-Object.rc
inflating: Find-Object-0.4.0-Source/cmake_uninstall.cmake.in
Para iniciar a compilação, entre na pasta
Find-Object-0.4.0-Source/build e utilize o comando
cmake:
# cd Find-Object-0.4.0-Source/build
# cmake ..
-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is GNU 4.7.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake (found version "4.8.1")
-- --------------------------------------------
-- Info :
-- CMAKE_INSTALL_PREFIX = /usr/local
-- CMAKE_BUILD_TYPE = Release
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/Find-Object-0.4.0-Source/build
Para iniciar a compilação e instalação, abaixo os comandos:
# make
# make install
Conceitos operacionais
Inicie o programa
Find Object com o comando
find_object, como no exemplo abaixo. Logo após, iniciaremos a nossa Webcam pressionando a tecla espaço. Se tudo estiver funcionando corretamente, entre na opção "EDIT" do menu, e selecione o item "Add object from scene".
find_object
Agora, para executar o modo
learning (aprendizado computacional), devemos focar a Webcam no objeto desejado e selecionar os pontos característicos do objeto e logo a seguir, clique em "NEXT".
Pronto, ao concluir o processo, o sistema passa a identificar e/ou reconhecer no vídeo, ao vivo, o objeto selecionado anteriormente.
A seguir, um vídeo demonstrativo com a funcionalidade do sistema em operação...
Mais dicas sobre este assunto, disponibilizarei no meu blog:
Para finalizar, críticas e sugestões: cabelo[ at ]opensuse.org