軟體安裝
安裝 OpenCV
參考 Build OpenCV with Video Support on Ubuntu
1 2 3 |
$ sudo apt-get update $ sudo apt-get install build-essential checkinstall libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev texi2html yasm zlib1g-dev libgstreamer0.10-0 libgstreamer0.10-dev gstreamer0.10-tools gstreamer0.10-plugins-base libgstreamer-plugins-base0.10-dev gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad libgtk2.0-0 libgtk2.0-dev libjpeg62 libjpeg62-dev libv4l-dev apt-get install ffmpeg |
安裝相依軟體
參考 Ubuntu 13.04 - GCC 4.7.3 - x64
1 2 3 |
$ sudo apt-get update $ sudo apt-get install build-essential $ sudo apt-get install cmake cmake-curses-gui |
安裝 OpenCV 2.4.10
1 2 3 4 5 6 7 8 9 10 |
$ cd ~/Downloads $ tar -xf opencv-2.4.5.tar.gz $ cd opencv-2.4.5 $ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make -j4 $ sudo make install $ cd ../.. $ rm -rf opencv-2.4.5* |
Install Qt 5.0.1
1 |
$ sudo apt-get install qt5-default libqt5svg5-dev qtcreator |
從 Github 取得 OpenBR
1 2 3 4 |
$ git clone https://github.com/biometrics/openbr.git $ cd openbr$ git checkout 0.5 $ git submodule init $ git submodule update |
安裝 OpenBR
1 2 3 4 |
$ mkdir build $ cd build$ cmake -DCMAKE_BUILD_TYPE=Release .. $ make -j4 $ sudo make install |
基本指令
1 2 3 |
br -algorithm FaceDetection -enrollAll -enroll M5.jpg br -gui -algorithm ShowFaceDetection -enrollAll -enroll M5.jpg br -algorithm FaceRecognition -compare M1.jpg ./ |
algorithm 選項
- FaceDetection :生物特徵
- FaceRecognition :特徵比對
- ShowFaceDetection :顯示人臉,必須搭配 -gui 參數
- AgeEstimation :年齡
- GenderEstimation :性別
--
2,308 total views, 1 views today