GpuMat st1, st2;
GpuMat unused;
Ptr<FilterEngine_GPU> filterDX, filterDY;
+
+ CannyBuf() {}
+ explicit CannyBuf(const Size& image_size, int apperture_size = 3) {create(image_size, apperture_size);}
+ CannyBuf(const GpuMat& dx_, const GpuMat& dy_);
};
CV_EXPORTS void Canny(const GpuMat& image, GpuMat& edges, double low_thresh, double high_thresh, int apperture_size = 3, bool L2gradient = false);
vector<GpuMat> prevPyr_;
vector<GpuMat> nextPyr_;
GpuMat vPyr_[2];
- vector<GpuMat> unused1;
- vector<GpuMat> unused2;
- bool unused3;
-
- GpuMat buf_;
+ vector<GpuMat> buf_;
+ vector<GpuMat> unused;
+ bool isDeviceArch11_;
};
using namespace cv;
using namespace cv::gpu;
+/*stub for deprecated constructor*/
+cv::gpu::CannyBuf::CannyBuf(const GpuMat&, const GpuMat&) { }
+
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
void cv::gpu::meanShiftFiltering(const GpuMat&, GpuMat&, int, int, TermCriteria, Stream&) { throw_nogpu(); }
}
else
{
- cvtColor(prevImg, buf_, COLOR_BGR2BGRA);
- buf_.convertTo(prevPyr_[0], CV_32F);
+ buf_.resize(1);
- cvtColor(nextImg, buf_, COLOR_BGR2BGRA);
- buf_.convertTo(nextPyr_[0], CV_32F);
+ cvtColor(prevImg, buf_[0], COLOR_BGR2BGRA);
+ buf_[0].convertTo(prevPyr_[0], CV_32F);
+
+ cvtColor(nextImg, buf_[0], COLOR_BGR2BGRA);
+ buf_[0].convertTo(nextPyr_[0], CV_32F);
}
for (int level = 1; level <= maxLevel; ++level)
prevPyr_.clear();
nextPyr_.clear();
- buf_.release();
+ buf_.clear();
uPyr_[0].release();
vPyr_[0].release();