Rob Hess 主页: http://blogs.oregonstate.edu/hess/
http://blogs.oregonstate.edu/hess/sift-library-places-2nd-in-acm-mm-10-ossc/
http://blogs.oregonstate.edu/hess/code/sift/
运行该工程需要安装opencv,先要安装opencv。
opencv安装成功后,下载linux下的源码,之后make发生以下错误
wenbo@wenbo-computer:~/学习/特征提取/sift/sift/src$ make
gcc -I../include `pkg-config --cflags opencv gtk-engines-2` -c imgfeatures.c -o imgfeatures.o
Package gtk-engines-2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk-engines-2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-engines-2' found
In file included from imgfeatures.c:9:
../include/utils.h:12: fatal error: cxcore.h: 没有那个文件或目录
compilation terminated.
make: *** [imgfeatures.o] 错误 1
找不到gtk-engines-2,可以找到/usr/lib/pkgconfig/gtk+-2.0.pc,所以将gtk-engines-2该为gtk-2.0。
wenbo@wenbo-computer:~/学习/特征提取/sift/sift/src$ make
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` -c imgfeatures.c -o imgfeatures.o
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` -c utils.c -o utils.o
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` -c sift.c -o sift.o
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` -c kdtree.c -o kdtree.o
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` -c minpq.c -o minpq.o
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` -c xform.c -o xform.o
ar rc ../lib/libfeat.a imgfeatures.o utils.o sift.o kdtree.o minpq.o xform.o
ranlib ../lib/libfeat.a
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` siftfeat.c -o ../bin/siftfeat -L../lib -lfeat `pkg-config --libs opencv gtk+-2.0`
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` match.c -o ../bin/match -L../lib -lfeat `pkg-config --libs opencv gtk+-2.0`
gcc -I../include `pkg-config --cflags opencv gtk+-2.0` dspfeat.c -o ../bin/dspfeat -L../lib -lfeat `pkg-config --libs opencv gtk+-2.0`
成功!
参考:http://stackoverflow.com/questions/5461224/package-gtk-engines-2-was-not-found-in-the-pkg-config-search-path