debian下OpenCV安裝 簡單測試例項

2021-06-20 15:28:21 字數 1520 閱讀 3364

sudo apt-get update

wangye@debian:~/opencv_study$ apt-cache search opencv

libcv-dev - development files for libcv

libcv2.1 - computer vision library

libcvaux-dev - development files for libcvaux

libcvaux2.1 - computer vision extension library

libhighgui-dev - development files for libhighgui

libhighgui2.1 - computer vision gui library

opencv-doc - opencv documentation and examples

python-opencv - python bindings for the computer vision library

wangye@debian:~/opencv_study$

如果只是用來執行opencv程式,僅需安裝libcv2.1,libcvaux2.1,libhighgui2.1

如果你要使用opencv來編寫程式,那麼還需要安裝libcv-dev,libcvaux-dev,libhighgui-dev包

文件在opencv-doc包中,python-opencv是opencv的python語言包,可根據需要安裝:

wangye@debian:~/opencv_study$ sudo  apt-get install libcv-dev libcvaux-dev libhighgui-dev libcv2.1 libcvaux2.1 libhighgui2.1 python-opencv opencv-doc

測試是否安裝成功,你可以使用以下的命令列編譯位於源**包中的

opencv_test.c例子:

wangye@debian:~/opencv_study$ vim opencv_test.c

#include "cv.h"

#include "highgui.h"

int main (int argc,char **argv)

wangye@debian:~/opencv_study$ g++ opencv_test.c `pkg-config opencv --libs --cflags opencv` -o drawing //生成目標檔案drawing 

結果如下:

參考:

debian下samba的安裝

特別簡單,直接apt get install samba,根據嚮導填幾項內容,不會填的就預設吧,然後用乙個有效的使用者名稱和密碼就以通過windows訪問使用者目錄了。在 etc samba smb.conf global 節新增以下幾行 dos charset cp936 unix charset...

debian下vim安裝外掛程式

1.安裝ctags apt get install ctags 在vimrc檔案中加入 map ctags r c kinds p fields ias extra q 即可在vim中使用ctrl f12生成ctags 2.安裝taglist 在vimrc檔案中加入 let tlist show o...

debian系統下安裝mongodb

sudo apt key adv keyserver hkp recv ea3129272.新增 源 在目錄為 etc apt sources.list echo deb wheezy mongodb org 3.2 main sudo tee etc apt sources.list.d mong...