optimized gpu pyrDown and pyrUp
This commit is contained in:
@@ -762,48 +762,10 @@ namespace cv
|
||||
|
||||
//! smoothes the source image and downsamples it
|
||||
CV_EXPORTS void pyrDown(const GpuMat& src, GpuMat& dst, Stream& stream = Stream::Null());
|
||||
|
||||
struct CV_EXPORTS PyrDownBuf;
|
||||
|
||||
CV_EXPORTS void pyrDown(const GpuMat& src, GpuMat& dst, PyrDownBuf& buf, Stream& stream = Stream::Null());
|
||||
|
||||
struct CV_EXPORTS PyrDownBuf
|
||||
{
|
||||
PyrDownBuf() : image_type(-1) {}
|
||||
PyrDownBuf(Size image_size, int image_type_) : image_type(-1) { create(image_size, image_type_); }
|
||||
void create(Size image_size, int image_type_);
|
||||
|
||||
private:
|
||||
friend void pyrDown(const GpuMat&, GpuMat&, PyrDownBuf&, Stream& stream);
|
||||
|
||||
static Mat ker;
|
||||
GpuMat buf;
|
||||
Ptr<FilterEngine_GPU> filter;
|
||||
int image_type;
|
||||
};
|
||||
|
||||
//! upsamples the source image and then smoothes it
|
||||
CV_EXPORTS void pyrUp(const GpuMat& src, GpuMat& dst, Stream& stream = Stream::Null());
|
||||
|
||||
struct CV_EXPORTS PyrUpBuf;
|
||||
|
||||
CV_EXPORTS void pyrUp(const GpuMat& src, GpuMat& dst, PyrUpBuf& buf, Stream& stream = Stream::Null());
|
||||
|
||||
struct CV_EXPORTS PyrUpBuf
|
||||
{
|
||||
PyrUpBuf() : image_type(-1) {}
|
||||
PyrUpBuf(Size image_size, int image_type_) : image_type(-1) { create(image_size, image_type_); }
|
||||
void create(Size image_size, int image_type_);
|
||||
|
||||
private:
|
||||
friend void pyrUp(const GpuMat&, GpuMat&, PyrUpBuf&, Stream& stream);
|
||||
|
||||
static Mat ker;
|
||||
GpuMat buf;
|
||||
Ptr<FilterEngine_GPU> filter;
|
||||
int image_type;
|
||||
};
|
||||
|
||||
//! performs linear blending of two images
|
||||
//! to avoid accuracy errors sum of weigths shouldn't be very close to zero
|
||||
CV_EXPORTS void blendLinear(const GpuMat& img1, const GpuMat& img2, const GpuMat& weights1, const GpuMat& weights2,
|
||||
|
Reference in New Issue
Block a user