ASIFT算法

看名字就知道是SIFT的升级版。

官网:http://www.ipol.im/pub/art/2011/my-asift/

在win环境下用cmake生成 vs2017 x64工程,居然报错:

error C2373: “Eigen::DenseBase<Derived>::segment”: 重定义;不同的类型修饰符

谷歌出来一个链接(gayhub上一个开源码,应该也是用到eigen,出现类似于上述错误):

作者反馈:

Hi everyone it seems openbr downloaded an old commit of eigen, so MSVC is finding it difficult compiling it...
go to the Eigen source @ bitbucket, download the repo.... copy all contents of the repo into
the Openbr dir > 3rd party > eigem-eigen-56ecd324......
【https://github.com/biometrics/openbr/tree/master/3rdparty/eigen-eigen-5a0156e40feb】

好了,我就懒得取eigen官网download了,直接download他的工程(链接:https://github.com/biometrics/openbr),

也不管叫什么了,直接把其中的eigen库拷贝到asift的thirdparty中,编译成功!

测试(note:仅支持png格式图片):

1 cd D:VS2017_ProjectASIFTdemo_ASIFT_srcuildRelease
2 ./demo_ASIFT.exe adam1.png  adam2.png adam_vert.png  adam_hori.png  adam_match.txt adam_key1.txt  adam_key2.txt 
3 
4 ./demo_ASIFT.exe 1.png  2.png 12png_vert.png  12jpg_hori.png  adam_match.txt adam_key1.txt  adam_key2.txt 
5 
6 ./demo_ASIFT.exe 3.png  4.png 12png_vert.png  12jpg_hori.png  adam_match.txt adam_key1.txt  adam_key2.txt 
7 
8 ./demo_ASIFT.exe 7.png  8.png 12png_vert.png  12jpg_hori.png  adam_match.txt adam_key1.txt  adam_key2.txt 

 

 上面的效果无论是准确率还是得到的最终匹配数量,都已经吊打ISFT SURF之流,观察知道,偶尔也会有小概率错误,不过可以用ransac剔除掉。

OpenCV4.5已经将SIFT算法重写,经过我测试,配合ransac也可以得到不错的效果,下次再分享。

参考:

http://www.ipol.im/pub/art/2011/my-asift/

https://blog.csdn.net/zz420521/article/details/63686163

https://www.zhihu.com/question/23371175/answer/60304493

原文地址:https://www.cnblogs.com/winslam/p/14084454.html