Function cuda::integral() does not require an extra buffer any more.

pull/172/head
Sh0 10 years ago
parent 312c8fa7e1
commit c4bec8a5c5
  1. 2
      modules/xfeatures2d/include/opencv2/xfeatures2d/cuda.hpp
  2. 5
      modules/xfeatures2d/src/surf.cuda.cpp

@ -152,7 +152,7 @@ public:
//! max keypoints = min(keypointsRatio * img.size().area(), 65535) //! max keypoints = min(keypointsRatio * img.size().area(), 65535)
float keypointsRatio; float keypointsRatio;
GpuMat sum, mask1, maskSum, intBuffer; GpuMat sum, mask1, maskSum;
GpuMat det, trace; GpuMat det, trace;

@ -146,13 +146,13 @@ namespace
bindImgTex(img); bindImgTex(img);
cuda::integral(img, surf_.sum, surf_.intBuffer); cuda::integral(img, surf_.sum);
sumOffset = bindSumTex(surf_.sum); sumOffset = bindSumTex(surf_.sum);
if (use_mask) if (use_mask)
{ {
cuda::min(mask, 1.0, surf_.mask1); cuda::min(mask, 1.0, surf_.mask1);
cuda::integral(surf_.mask1, surf_.maskSum, surf_.intBuffer); cuda::integral(surf_.mask1, surf_.maskSum);
maskOffset = bindMaskSumTex(surf_.maskSum); maskOffset = bindMaskSumTex(surf_.maskSum);
} }
} }
@ -425,7 +425,6 @@ void cv::cuda::SURF_CUDA::releaseMemory()
sum.release(); sum.release();
mask1.release(); mask1.release();
maskSum.release(); maskSum.release();
intBuffer.release();
det.release(); det.release();
trace.release(); trace.release();
maxPosBuffer.release(); maxPosBuffer.release();

Loading…
Cancel
Save