From fd46684bf874f659e5f516f5fc4a651cc887f8a2 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sun, 10 Jun 2018 22:53:13 +0000 Subject: [PATCH] [move sift.cpp] opencv: use cv::AutoBuffer<>::data() original commit: https://github.com/opencv/opencv_contrib/commit/fc69aa57bc021422d825a4331f7ddf7d9f7534e7 --- modules/features2d/src/sift.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/features2d/src/sift.cpp b/modules/features2d/src/sift.cpp index c57d55f840..15334b7735 100644 --- a/modules/features2d/src/sift.cpp +++ b/modules/features2d/src/sift.cpp @@ -306,7 +306,7 @@ static float calcOrientationHist( const Mat& img, Point pt, int radius, float expf_scale = -1.f/(2.f * sigma * sigma); AutoBuffer buf(len*4 + n+4); - float *X = buf, *Y = X + len, *Mag = X, *Ori = Y + len, *W = Ori + len; + float *X = buf.data(), *Y = X + len, *Mag = X, *Ori = Y + len, *W = Ori + len; float* temphist = W + len + 2; for( i = 0; i < n; i++ ) @@ -719,7 +719,7 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc int rows = img.rows, cols = img.cols; AutoBuffer buf(len*6 + histlen); - float *X = buf, *Y = X + len, *Mag = Y, *Ori = Mag + len, *W = Ori + len; + float *X = buf.data(), *Y = X + len, *Mag = Y, *Ori = Mag + len, *W = Ori + len; float *RBin = W + len, *CBin = RBin + len, *hist = CBin + len; for( i = 0; i < d+2; i++ )