OPENCV2.2移植说明
OPENCV2.2移植說明
系統(tǒng):Ubuntu10.10
+++++++++++++++++++++++++++++++++++++++++++++
???? 編譯OPENCV2.2
reference URL:
??? ??? http://opencv.willowgarage.com/wiki/InstallGuide
???? 安裝庫:
??? apt-get install build-essential? cmake pkg-config? libpng12-0 libpng12-dev libpng++-dev libpng3? libpnglite-dev libpngwriter0-dev libpngwriter0c2 zlib1g-dbg zlib1g zlib1g-dev libjasper-dev libjasper-runtime libjasper1? pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools libjpeg8 libjpeg8-dev libjpeg8-dbg ffmpeg libavcodec-dev libavcodec52 libavformat52 libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libxine1-ffmpeg libxine-dev libxine1-bin libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 python-numpy libpython2.6 python-dev python2.6-dev
???? 操作步驟:
?? cd ~/projects/Opencv2.2? # the directory containing INSTALL, CMakeLists.txt etc.
?? mkdir release
?? cd release
?? cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv2.2 -D BUILD_PYTHON_SUPPORT=ON ..
?? make
?? make install
???? 添加庫路徑:
echo /usr/local/opencv2.2/lib > /etc/ld.so.conf.d/opencv.conf
設(shè)置pkg-config
echo 'export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opencv2.2/lib/pkgconfig' >> /root/.bashrc
source /root/.bashrc
???? 編譯android下的opencv庫:
http://opencv.willowgarage.com/wiki/Android
???? eclipse下設(shè)置頭文件和庫路徑:
facelib工程:
facelib右鍵?properties如下圖,??? 配置include路徑:
?
??? 下圖配置lib庫及路徑:
?制作自己需要的庫
?執(zhí)行如下命令gcc -shared -fpci -o libxxxlib.so **.o 生成xxxlib動態(tài)庫,將xxxlib復(fù)制到/usr/lib目錄下
???? 其它工程配置同上。
???? Opencv2.2編譯生成的庫包括:opencv_core opencv_legacy opencv_objdetect opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_features2d opencv_calib3d opencv_objdetect opencv_contrib opencv_legacy opencv_flann如有工程編譯不能通過,請?zhí)砑訉?yīng)庫。
?
轉(zhuǎn)載于:https://blog.51cto.com/tianxiaolin/536155
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結(jié)
以上是生活随笔為你收集整理的OPENCV2.2移植说明的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 男人梦到自己坐牢了预示什么
- 下一篇: 梦到熟人结婚是什么预兆