OpenSift源码编译过程记录

6 篇文章 0 订阅
3 篇文章 0 订阅

本文记录了在CentOS6.5上编译Sift的开源实现OpenSift的编译过程,同时记录了编译过程中的几个问题.

sift的理论已经有很多了,下面会给出链接:


1.Requirements

a.OpenCV

All code in this package requires the OpenCV library (known working version is 2.3):http://sourceforge.net/projects/opencvlibrary/

b.GDK/GTK+2

Some functions require GDK/GTK+2 (known working version is 2.18.4): http://www.gtk.org/

opencv的安装可以看CentOS6.5上配置Python2.7+OpenCV2.4.7  


2.Build

从github下载源码,解压如图


作者给出的build和使用过程

To build everything, use make:

#make

This should produce a few executables in bin/, a static library lib/libopensift.a, and some HTML documentation in docs/.
You can use the -h argument to get help with any of the executables. libopensift.a can be compiled into your own code using the standard method:

#gcc -I/path/to/opensift/include/ -L/path/to/opensift/lib/ yourcode.c -o yourexecutable -lopensift
The documentation in docs/ describes all of the functions available in libopensift.a as well as
#defines, etc. Use the documentation to determine what header files from include/ to include in your code.

You can also individually build any of the executables or libopensift.a, e.g.

照做,很明显,一般人make完了都会有错,错误如下:


确认你已经安装了opencv和gtk,然后出现上图错误的话肯定就是编译设置的问题了,

提示信息已经说了:

Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable,

就是说pkg-config找不到opencv.pc,那就找到opencv.pc,cp到/usr/lib/pkgconfig下

#find / -name opencv.pc


安装目录就是/usr/lib/pkgconfig/opencv.pc了,复制到pkgconfig下

#cp /usr/local/lib/pkgconfig/*.pc /usr/lib/pkgconfig,然后再重新make,没报错就Ok了


3.test

# bin/match beaver.png beaver_xform.png,报错如下:

opencv的动态库没找到,修改如下:

# vim /etc/ld.so.conf

添加/usr /local/lib(这里是opencv安装后的库目录)

#ldconfig

重新执行下,效果如图:



相关链接:

http://robwhess.github.io/opensift/(opensift介绍)

https://github.com/robwhess/opensift(opensift源码)

http://www.cs.ubc.ca/~lowe/keypoints/(sift)

http://www.robots.ox.ac.uk:5000/~vgg/research/affine/index.html

http://blog.csdn.net/onlyzkg/article/details/11570965(理论)

http://blog.csdn.net/abcjennifer/article/details/7639681(理论)

http://cgwxyz.blog.163.com/blog/static/262806020105307929424/(编译错误)

http://blog.sina.com.cn/s/blog_54f82cc201011ve4.html(编译错误)


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值