mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 17:24:28 +08:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -222,7 +222,7 @@ namespace cv
|
|||||||
for (int j = n2 + 2; j <= width - n2 - 2; j++)
|
for (int j = n2 + 2; j <= width - n2 - 2; j++)
|
||||||
{
|
{
|
||||||
int c[nr_img];
|
int c[nr_img];
|
||||||
memset(c,0,nr_img);
|
memset(c, 0, sizeof(c[0]) * nr_img);
|
||||||
for(int step = step_start; step <= step_end; step += step_inc)
|
for(int step = step_start; step <= step_end; step += step_inc)
|
||||||
{
|
{
|
||||||
for (int ii = - n2; ii <= + n2_stop; ii += step)
|
for (int ii = - n2; ii <= + n2_stop; ii += step)
|
||||||
|
@@ -1147,19 +1147,20 @@ void SIFT_Impl::detectAndCompute(InputArray _image, InputArray _mask,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mat base = createInitialImage(image, firstOctave < 0, (float)sigma);
|
Mat base = createInitialImage(image, firstOctave < 0, (float)sigma);
|
||||||
std::vector<Mat> gpyr, dogpyr;
|
std::vector<Mat> gpyr;
|
||||||
int nOctaves = actualNOctaves > 0 ? actualNOctaves : cvRound(std::log( (double)std::min( base.cols, base.rows ) ) / std::log(2.) - 2) - firstOctave;
|
int nOctaves = actualNOctaves > 0 ? actualNOctaves : cvRound(std::log( (double)std::min( base.cols, base.rows ) ) / std::log(2.) - 2) - firstOctave;
|
||||||
|
|
||||||
//double t, tf = getTickFrequency();
|
//double t, tf = getTickFrequency();
|
||||||
//t = (double)getTickCount();
|
//t = (double)getTickCount();
|
||||||
buildGaussianPyramid(base, gpyr, nOctaves);
|
buildGaussianPyramid(base, gpyr, nOctaves);
|
||||||
buildDoGPyramid(gpyr, dogpyr);
|
|
||||||
|
|
||||||
//t = (double)getTickCount() - t;
|
//t = (double)getTickCount() - t;
|
||||||
//printf("pyramid construction time: %g\n", t*1000./tf);
|
//printf("pyramid construction time: %g\n", t*1000./tf);
|
||||||
|
|
||||||
if( !useProvidedKeypoints )
|
if( !useProvidedKeypoints )
|
||||||
{
|
{
|
||||||
|
std::vector<Mat> dogpyr;
|
||||||
|
buildDoGPyramid(gpyr, dogpyr);
|
||||||
//t = (double)getTickCount();
|
//t = (double)getTickCount();
|
||||||
findScaleSpaceExtrema(gpyr, dogpyr, keypoints);
|
findScaleSpaceExtrema(gpyr, dogpyr, keypoints);
|
||||||
KeyPointsFilter::removeDuplicatedSorted( keypoints );
|
KeyPointsFilter::removeDuplicatedSorted( keypoints );
|
||||||
|
Reference in New Issue
Block a user