首页 技术 正文
技术 2022年11月8日
0 收藏 951 点赞 1,938 浏览 4214 个字

Openbr is a great project for facial detecting.

System: linuxmint 13 x86_64

Face recognition,  motion / gender / age / detection

Here it’s website: http://www.openbiometrics.org/

It’s github page: https://github.com/biometrics/openbr

Awareness

Just need to try those cool stuff here:

The installation tutorial

http://openbiometrics.org/doxygen/latest/installation.html

But the tutorial above is for ubuntu13.04 due to that lib/package “”

The reason the OpenBR build instructions use Ubuntu 13.04 is because (I believe) the qt5-default aptitude package is not available on 12.04.

” jklontz mentioned here: http://www.linuxquestions.org/questions/linux-software-2/compiling-openbr-cmake-error-4175469037/

As what jklontz said, we would try to follow the tutorial for Mac OSX , learn the lesson there and then deploy openbr on linux.

Here is the link of a installation for Mac OS X. http://openbiometrics.org/doxygen/latest/osx_clang.html

Conclusion : You would need to install/possess many libs/packages before compiling openbr on your computer.

Materials:

1. cmake (version upper than 2.8.11 )

Notice: ubuntu12.04 doesn’t provide cmake upper than that version. So you ought to compile that from source.

2. qt5 (version upper than 5.0)

Notice: ubuntu12.04 doesn’t provide “qt-* ” packages neither. So if you want to build openbr, you ought to have qt5 cmake files first.

www.qt-project.org    has the things you can download.

3. opencv source files and libs

Let’s compile and deploy them all 🙂

Step 1. compiling cmake

git clone https://github.com/Kitware/CMake
cd CMake
./configure --prefix=/usr/local
make
make install
ldconfig

Step 2. installing qt5

wget -c http://download.qt-project.org/official_releases/qt/5.3/5.3.2/qt-opensource-linux-x64-5.3.2.run
chmod +x qt-opensource-linux-x64-5.3..run
sudo ./qt-opensource-linux-x64-5.3..run# Then a wizard window would jump out, install it as you wish .
# By default a /opt/Qt5.3.2/ will be the default directory

Step 3. building opencv

( notice opencv 3.0+ doesn’t work with openbr 0.5 or previous releases .Openbr would detect error if opencv is 3.0+ when compiling openbr”

In file included from /usr/local/src/openbr/build/stasm/src/external_stasm/stasm/stasm/src/stasm_lib.cpp:7:0:
/usr/local/src/openbr/build/stasm/src/external_stasm/stasm/stasm/include/misc.h:422:1: error: ‘CvScalar’ does not name a type
make[5]: *** [stasm/CMakeFiles/stasm.dir/stasm/src/stasm_lib.cpp.o] Error 1
make[4]: *** [stasm/CMakeFiles/stasm.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [stasm/src/external_stasm-stamp/external_stasm-build] Error 2
make[1]: *** [openbr/CMakeFiles/external_stasm.dir/all] Error 2
make: *** [all] Error 2

. so we need opencv 2.4.9 . Here its download link http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/download)

unzip opencv-2.4.9.zip -d /usr/local/src # or the path you store source files
cd /usr/local/src/opencv-2.4.9/
# Then use 'cmake' to compile opencv sources
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
## Notice when building, cmake would look for some 3rdparty modules from internet. If you see something "-- ICV: Downloading ippicv_linux_20141027.tgz... " , do not be panic, take your time. A cup of coffee is calling you :)
sudo make
sudo make install

Step 4. building openbr

 ( with the support of fresh new ‘cmake’, cross-platform ‘qt5’, marvellous ‘opencv’ )

git clone https://github.com/biometrics/openbr.git
cd openbr
git checkout master # Or here git checkout 0.5 ## coz some times master changes a lot LOL
git submodule init
git submodule update# It will cost your minutes to download those sub-modules. Take that easy.# Then, try to build the openbr
sudo cmake -DCMAKE_PREFIX_PATH=/opt/Qt5.3.2/5.3/gcc_64 -DOpenCV_DIR=/usr/local/src/opencv-2.4.9/release -DCMAKE_BUILD_TYPE=Release .. 
sudo make j4
sudo make install

Step 5. building the openbr GUI

Just as what that refers:

Hack OpenBR!
Open Qt Creator IDE
$ qtcreator &
From the Qt Creator "File" menu select "Open File or Project...".
Select "openbr/CMakeLists.txt" then "Open".
Browse to your pre-existing build directory "openbr/build" then select "Next".
Select "Run CMake" then "Finish".
You're all set! You can find more information on Qt Creator here http://qt-project.org/doc/qtcreator if you need.

Here is what I got after compiling:

openbr on linuxmint13/ubuntu12.04/debian7 x64 facial recognition  [Compile from source!!!]

Then you can find more you’d like

Step More …

Hack on the way!

Like these:

(Optional) Test OpenBR!
$ cd openbr/scripts
$ ./downloadDatasets.sh
$ cd ../build
$ make test(Optional) Package OpenBR!
$ cd openbr/build
$ sudo cpack -G TGZ(Optional) Build OpenBR documentation!
$ sudo apt-get install doxygen
$ cd openbr/build
$ cmake -DBR_BUILD_DOCUMENTATION=ON ..
$ make -j4
$ sudo apt-get install libgnome2-bin
$ gnome-open html/index.html

Happy hacking!

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,088
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,565
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,413
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,186
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,822
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,905