-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
38 lines (22 loc) · 1.07 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Learning OpenCV and need a place to play.
Ok, so how do you compile.
Trying this:
gcc `pkg-config --cflags --libs opencv` -o foo hello-world.cpp
Undefined symbols:
"___gxx_personality_v0", referenced from:
___gxx_personality_v0$non_lazy_ptr in ccyR0e4T.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
dao:opencv-samples adamb$
Wrong compiler. User g++ instead.
g++ `pkg-config --cflags --libs opencv` -o hello-world hello-world.cpp
Copied a test image in and I can now run it like this:
./hello-world test.png
Seems to work with both a png and a jpg file.
The jpg is too big for the screen, so it's difficult to see.
2009-01-10
Trying Facedetect
gcc `pkg-config opencv --cflags --libs` facedetect.c -o facedetect
./facedetect --cascade="/opt/local/var/macports/software/opencv/1.0.0_0/opt/local/share/opencv/haarcascades/haarcascade_frontalface_alt.xml" jared.jpg
Q: Why does it keep running over and over?
A: Because it's using cvCaptureFromAVI() and I'm giving it a JPEG. It just keeps reading the image over and over again. I suppose this is ok.