I use the sift algorithm in opencv code to get descriptors and key points from images. My code
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 key points of the image in the <KeyPoint> vector. After that, I want to get the Octave of each KeyPoint for more details. But when I turn off each octave value for each point for a single image, it seems strange that I want to confirm if they are correct.
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 the SIFT algorithm to the SURF algorithm, it will be fine and looks right.
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 if the Octave value is correctly calculated in the SIFT algorithm in opencv?
source share