OpenCV 1.0はFedora 9の下に設置されています。

4087 ワード

努力の結果、OenCV 1.0をFedora 9に取り付けることに成功しました。現在の記録の全プロセスは以下の通りである。http://sourceforge.net/projects/opencvlibraryから。 OpenCVのソースコードをダウンロードして、ファイルをダウンロードするのはopencv-1.0.tar.gzです。(1.0バージョンが好きです。今は2.1バージョンに更新されているようですが、1.0バージョンの方が力があります。ハハ)。1.解凍ファイル
tar zxvf opencv-1.0.0.tar.gz
cd opencv-1.0.0

2. /etc/ld.so.conf % k8 d9 ~6 B& k: z) |3 J
/usr/local/lib
l7 m, x7 }' o; N: D
# ldconfig (root )
, , :
ldconfig: /usr/local/lib/libcxcore.so.1

ldconfig: /usr/local/lib/libml.so.1

ldconfig: /usr/local/lib/libhighgui.so.1

ldconfig: /usr/local/lib/libcvaux.so.1

ldconfig: /usr/local/lib/libcv.so.1
, opencv , 。

3.
congfigure , ./configure --without-python --enable-static
: , WITHOUT,MAKE , ;
( , 。。。)/ A3 P: a# b6 @5 K6 R
q8 `, Y: ?+
a" r1 u) |

, :

./configure" b/ o7 X( U1 D( o" r
checking build system type... i686-pc-linux-gnu
checking
host system type... i686-pc-linux-gnu
checking target
system type... i686-pc-linux-gnu8 K2 W; j; |1 z' i
checking for a BSD-compatible install... /usr/bin/install -c
checking whether
build environment is sane... yes4 e- l3 o, \( e$ s% u" ~! `
checking for gawk... no/ B5 ?" {+ }1 g/ a; y8 G
... ...
General
configuration ==============& u" f: f) L& L1 F
& t. P,
V   _6 e& n" K

Compiler: g++
9 X* n   \7 K* f
CXXFLAGS: -Wall -fno-rtti -pipe -O3 -g -march=i686 -ffast-math
-fomit-frame-pointer
Install path:
/usr/local
HighGUI
configuration ==================
0 y; w- U2 W* u" I

Windowing system --------------( r. G8 e; D* @- V$ r. Z
Use Carbon / Mac OS X: no4 E) M( a9 W& Y1 q' g" K9 V. d+ u
Use gtk+ 2.x: yes$ |# V4 R6 J5 s% p: ~9 Z7 C8 f* \
Use gthread: yes3
n+ k' O6 _3 t3 x% x0 F2 m% u

Image
I/O ---------------------
Use libjpeg: yes
Use zlib:
yes
Use libpng: yes
Use libtiff:
yes
Use
libjasper: no
Use libIlmImf: no
Video I/O
---------------------
Use
QuickTime / Mac OS X: no
Use xine: no
Use ffmpeg: no
Use
dc1394 & raw1394: no
Use v4l:
yes
Use v4l2:
no
Wrappers
for other languages =============
SWIG
Python yes
N3 A$ T3 Z: u1 x
Additional build settings ============; r, U5 m, w. X' B- ^
Build demo apps
yes
Now
run make ...
m$ f# r5 A* F3 Z! C

4.
それから/usr/local/lib/pkg-configの中のopencv.pcを コピー/usr/lib/pkg-configでは、(このステップをしないと、まったくコンパイルができない)というコマンドが採用されます。 /usr/local/lib/pkg-config/opencv.pc/usr/lib/pkg-config/再将/usr/local/lib/下関連opencvのlibを全部コピーします。   /アメリカ/libの下では、どれがopencvと関連しているのか分かりませんので、そのまま全部コピーします。兄はハードディスクの空間があります。コマンドは以下の通りです。#cp-rf/usr/local/lib/*/usr/lib/は-rfを追加してください。/usr/local/lib/下に二つのフォルダがありますので、繰り返しコピーします。
 
  

 

5.     OPENCV     ,    cv.h highgui.h  2    

( /usr/local/include/opencv), /usr/include 。

6. opencv :
cd /usr/local/share/opencv/samples/c

drawing.c :
g++ `pkg-config opencv --libs --cflags opencv` drawing.c -o drawing

7. drawing ./drawing , ,