Skip to content

Commit abfcde0

Browse files
committed
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2 parents 2d0c8a4 + cd95a5f commit abfcde0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

modules/stereo/include/opencv2/stereo/descriptor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ namespace cv
222222
for (int j = n2 + 2; j <= width - n2 - 2; j++)
223223
{
224224
int c[nr_img];
225-
memset(c,0,nr_img);
225+
memset(c, 0, sizeof(c[0]) * nr_img);
226226
for(int step = step_start; step <= step_end; step += step_inc)
227227
{
228228
for (int ii = - n2; ii <= + n2_stop; ii += step)

modules/xfeatures2d/src/sift.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,19 +1147,20 @@ void SIFT_Impl::detectAndCompute(InputArray _image, InputArray _mask,
11471147
}
11481148

11491149
Mat base = createInitialImage(image, firstOctave < 0, (float)sigma);
1150-
std::vector<Mat> gpyr, dogpyr;
1150+
std::vector<Mat> gpyr;
11511151
int nOctaves = actualNOctaves > 0 ? actualNOctaves : cvRound(std::log( (double)std::min( base.cols, base.rows ) ) / std::log(2.) - 2) - firstOctave;
11521152

11531153
//double t, tf = getTickFrequency();
11541154
//t = (double)getTickCount();
11551155
buildGaussianPyramid(base, gpyr, nOctaves);
1156-
buildDoGPyramid(gpyr, dogpyr);
11571156

11581157
//t = (double)getTickCount() - t;
11591158
//printf("pyramid construction time: %g\n", t*1000./tf);
11601159

11611160
if( !useProvidedKeypoints )
11621161
{
1162+
std::vector<Mat> dogpyr;
1163+
buildDoGPyramid(gpyr, dogpyr);
11631164
//t = (double)getTickCount();
11641165
findScaleSpaceExtrema(gpyr, dogpyr, keypoints);
11651166
KeyPointsFilter::removeDuplicatedSorted( keypoints );

0 commit comments

Comments
 (0)