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

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.2.run
sudo ./qt-opensource-linux-x64-5.3.2.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 makesudo 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 j4sudo 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:

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!

时间: 2024-11-16 16:57:25

openbr on linuxmint13/ubuntu12.04/debian7 x64 facial recognition [Compile from source!!!]的相关文章

VPN pptp on linuxmint13/ubuntu12.04/debian VPS

VPN is a great thing when you are forced to be stuck somewhere. on ubuntu, you need to check out whether your system supports TUN/ 我从这里等得到一些灵感http://www.hostloc.com/thread-33260-1-1.html 还有 http://www.jb51.net/os/Ubuntu/34821.html 但是这些都不适合我的系统.基本上都是c

iphone on Linux Debian7/ubuntu12.04/linuxmint13 build from source

The packages we need for ubuntu12.04 and its derived destros are: libimobiledevices, libplist, libusbmuxd Mostly the important thing is libimobiledevices. and it has an official site: http://libimobiledevice.org   . You can download the sources codes

openssh6.7.deb download packed for debian7/ubuntu12.04 amd64

openssh the openssh-server on debian7/ubuntu12.04 is too old and out of date. so now we replace and compile them from source. In production, that's vital. Here's download link. http://pan.baidu.com/s/1qWyTfuG SSH version 1 is weak, SSH 2 is recommend

华科校园网内ubuntu12.04用锐捷客户端联网流程详解

刚开始一直都用mentohust联网,这个比较方便,只需要配置网络的基本属性,ip,网关等,然后安装mentohust的deb文件,再通过sudo mentohust 来配置用户名,密码等就成功了. 可是后来mentohust突然找不到服务器,一直以为是mentohust或者系统出了问题,实验室的小伙伴重复百遍,重装系统,重装mentohust,重新配置,依然不能上网,因为时间原因这个暂时放下了,而我当时也只是在windows下进行编程,所以也没太在意. 直到工作找完后意识到公司需要应聘者有li

ubuntu12.04下同步cm10源码(个人记录,当作笔记)

环境:AMD N850,4G,ubuntu12.04 x64, 老规矩,先是各种依赖: sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngc

linux环境c++开发:ubuntu12.04使用llvm3.4.2

什么是 clang/llvm/libc++[1] clang 是最近几年(在大财主苹果的支持下)发展得非常好的 C 家族语言 (包括C/C++/Obj-C/Obj-C++) 编译器前端,所谓前端,就是它可以认识 C/C++/Obj-C/ObjC++ 代码,并且把它转化成某种更接近机器指令的形式.理论上说,“某种形式”是语法树,但作为一个工具,clang 实际上会帮助你调用链接器生成可执行代码,这跟 gcc 是一样的. llvm 是一个通用的编译优化和代码生成平台,它定义了一个中间语言 LLVM

重新安装Ubuntu12.04

重新安装Ubuntu12.04 之所以我重新安装Ubuntu,因为我第一次给根目录分配的空间过小,好像是20GB吧~结果编译Android的时候,编译了3个小时候直接中止掉了.郁闷.这个也告诉我们一定概要根据自己的需求去进行分区的大小分配.因此这次给根目录分配大点空间.当然这是利用DiskGenius实现的. 所用文件下载链接: mbrfix.exe: http://linux.linuxidc.com/pub/2007/Windows%E4%B8%8B%E4%BF%AE%E5%A4%8Dmbr

VirtualBox中安装Ubuntu12.04/Ubuntu14.04虚拟机

NOTE: 一开始安装的Ubuntu12.04,后来又重新安装了14.04.截图基本使用了安装12.04时的截图,后来安装14.04时又补充了几张.该安装过程对Ubuntu12.04和14.04都是适用的. 1. 选择版本 1.1 Ubuntu桌面版与服务器版的区别 桌面版与服务器版,只要发布版本号一致,这两者从核心来说也就是相同的,唯一的差别在于它们的预期用途.桌面版面向个人电脑使用者,可以进行文字处理.网页浏览.多媒体播放和玩游戏.本质上说,这是一个为普通用户所定制的多用途操作系统.另一方面

Ubuntu12.04安装OpenCV报错及解决

安装环境:Ubuntu12.04 安装版本:OpenCV3.1.0 问题描述: $ cmake .. $ make 编译到21%时,报错“No rule to make target `/usr/lib/libz.so', needed by `lib/libopencv_core.so.” 问题解决: 1)查询资料,得知是软连接出了问题,需要用绝对路径重新建立软连接. 2)定位源文件在什么地方:$ locate libz.so 打印出如下两个: /usr/lib/libz.so /usr/li