added ImagePyramid class to gpu module

This commit is contained in:
Vladislav Vinogradov
2011-12-27 06:24:31 +00:00
parent 92a682093a
commit b398ac7a96
4 changed files with 227 additions and 3 deletions

View File

@@ -826,6 +826,32 @@ struct CV_EXPORTS CannyBuf
Ptr<FilterEngine_GPU> filterDX, filterDY;
};
class CV_EXPORTS ImagePyramid
{
public:
inline ImagePyramid() : nLayers_(0) {}
inline ImagePyramid(const GpuMat& img, int nLayers, Stream& stream = Stream::Null())
{
build(img, nLayers, stream);
}
void build(const GpuMat& img, int nLayers, Stream& stream = Stream::Null());
void getLayer(GpuMat& outImg, Size outRoi, Stream& stream = Stream::Null()) const;
inline void release()
{
layer0_.release();
pyramid_.clear();
nLayers_ = 0;
}
private:
GpuMat layer0_;
std::vector<GpuMat> pyramid_;
int nLayers_;
};
////////////////////////////// Matrix reductions //////////////////////////////
//! computes mean value and standard deviation of all or selected array elements