added release method to GMG_GPU
This commit is contained in:
parent
beb3e6ff18
commit
ace7e9d842
@ -2156,6 +2156,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
void operator ()(const GpuMat& frame, GpuMat& fgmask, float learningRate = -1.0f, Stream& stream = Stream::Null());
|
void operator ()(const GpuMat& frame, GpuMat& fgmask, float learningRate = -1.0f, Stream& stream = Stream::Null());
|
||||||
|
|
||||||
|
//! releases all inner buffers
|
||||||
|
void release();
|
||||||
|
|
||||||
//! Total number of distinct colors to maintain in histogram.
|
//! Total number of distinct colors to maintain in histogram.
|
||||||
int maxFeatures;
|
int maxFeatures;
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
cv::gpu::GMG_GPU::GMG_GPU() { throw_nogpu(); }
|
cv::gpu::GMG_GPU::GMG_GPU() { throw_nogpu(); }
|
||||||
void cv::gpu::GMG_GPU::initialize(cv::Size, float, float) { throw_nogpu(); }
|
void cv::gpu::GMG_GPU::initialize(cv::Size, float, float) { throw_nogpu(); }
|
||||||
void cv::gpu::GMG_GPU::operator ()(const cv::gpu::GpuMat&, cv::gpu::GpuMat&, float, cv::gpu::Stream&) { throw_nogpu(); }
|
void cv::gpu::GMG_GPU::operator ()(const cv::gpu::GpuMat&, cv::gpu::GpuMat&, float, cv::gpu::Stream&) { throw_nogpu(); }
|
||||||
|
void cv::gpu::GMG_GPU::release() {}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -151,4 +152,15 @@ void cv::gpu::GMG_GPU::operator ()(const cv::gpu::GpuMat& frame, cv::gpu::GpuMat
|
|||||||
++frameNum_;
|
++frameNum_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cv::gpu::GMG_GPU::release()
|
||||||
|
{
|
||||||
|
frameSize_ = Size();
|
||||||
|
|
||||||
|
nfeatures_.release();
|
||||||
|
colors_.release();
|
||||||
|
weights_.release();
|
||||||
|
boxFilter_.release();
|
||||||
|
buf_.release();
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user