简体   繁体   English

SIFT算法中奇怪的八度值?

[英]Strange Octave value in SIFT algorithm?

I am using sift algorithm in opencv code to get descriptors and keypoints from images.My code is我在 opencv 代码中使用 sift 算法从图像中获取描述符和关键点。我的代码是

    Ptr<IplImage> image;
    vector<KeyPoint> keypoints;
    OutputArray des;

    Feature2D *descriptor_type = new SIFT()
    Mat image_mat(image);
    (*descriptor_type)(image_mat,noArray(),keypoints,des,false);

Here I can get the keypoints of the image in vector < KeyPoint > .After that,I want to get the Octave of each KeyPoint for more details .But when I cout each keypoint octave value for one image,it seems so strange that I want to confirm whether they are right.在这里我可以得到向量中的图像关键点以确认他们是否正确。

for(int i=0;i<keypoints.size();i++)
{
     cout<< (keypoints[i].octave) <<endl;
}

9765375
9765375
2621951
8323583
13763071
6488575
12845567
721407
3604991
12321279
9568767
7406079
8585727
4653567
7799295
7799295
5112319
10486271
9961983
6226431
1245951

and if I change SIFT algorithm to SURF algorithm,it will be OK and seem right.如果我将 SIFT 算法更改为 SURF 算法,那就没问题了,看起来是对的。

0
0
0
0
0
0
1
0
0
0
0
1
1
1
0
1
1
1
0
0
1
0

So I want to ask whether the calculation of Octave value in SIFT algorithm is right in opencv?所以想问一下opencv中SIFT算法中Octave值的计算是否正确?

Just came across this link .刚遇到这个链接

It seems like the octave value for SIFT keypoints needs to by "patched":似乎 SIFT 关键点的octave值需要“修补”:

keyPoint.octave = keyPoint.octave & 0xFF;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM