diff --git a/modules/features2d/src/sift.cpp b/modules/features2d/src/sift.cpp index 8a13de7118..9e39fde879 100644 --- a/modules/features2d/src/sift.cpp +++ b/modules/features2d/src/sift.cpp @@ -1110,19 +1110,20 @@ void SIFT_Impl::detectAndCompute(InputArray _image, InputArray _mask, } Mat base = createInitialImage(image, firstOctave < 0, (float)sigma); - std::vector gpyr, dogpyr; + std::vector gpyr; int nOctaves = actualNOctaves > 0 ? actualNOctaves : cvRound(std::log( (double)std::min( base.cols, base.rows ) ) / std::log(2.) - 2) - firstOctave; //double t, tf = getTickFrequency(); //t = (double)getTickCount(); buildGaussianPyramid(base, gpyr, nOctaves); - buildDoGPyramid(gpyr, dogpyr); //t = (double)getTickCount() - t; //printf("pyramid construction time: %g\n", t*1000./tf); if( !useProvidedKeypoints ) { + std::vector dogpyr; + buildDoGPyramid(gpyr, dogpyr); //t = (double)getTickCount(); findScaleSpaceExtrema(gpyr, dogpyr, keypoints); KeyPointsFilter::removeDuplicatedSorted( keypoints );