mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Merge pull request #7941 from wykvictor:master
This commit is contained in:
commit
1989d94ef5
@ -1068,6 +1068,8 @@ namespace
|
|||||||
private:
|
private:
|
||||||
int windowSize;
|
int windowSize;
|
||||||
int partitions;
|
int partitions;
|
||||||
|
GpuMat devHist;
|
||||||
|
GpuMat devCoarseHist;
|
||||||
};
|
};
|
||||||
|
|
||||||
MedianFilter::MedianFilter(int srcType, int _windowSize, int _partitions) :
|
MedianFilter::MedianFilter(int srcType, int _windowSize, int _partitions) :
|
||||||
@ -1099,9 +1101,8 @@ namespace
|
|||||||
// Note - these are hardcoded in the actual GPU kernel. Do not change these values.
|
// Note - these are hardcoded in the actual GPU kernel. Do not change these values.
|
||||||
int histSize=256, histCoarseSize=8;
|
int histSize=256, histCoarseSize=8;
|
||||||
|
|
||||||
BufferPool pool(_stream);
|
devHist.create(1, src.cols*histSize*partitions, CV_32SC1);
|
||||||
GpuMat devHist = pool.getBuffer(1, src.cols*histSize*partitions,CV_32SC1);
|
devCoarseHist.create(1, src.cols*histCoarseSize*partitions, CV_32SC1);
|
||||||
GpuMat devCoarseHist = pool.getBuffer(1,src.cols*histCoarseSize*partitions,CV_32SC1);
|
|
||||||
|
|
||||||
devHist.setTo(0, _stream);
|
devHist.setTo(0, _stream);
|
||||||
devCoarseHist.setTo(0, _stream);
|
devCoarseHist.setTo(0, _stream);
|
||||||
|
Loading…
Reference in New Issue
Block a user