Commit f4250cae authored by Anton Shutikhin's avatar Anton Shutikhin Committed by Anton Shutikhin

Deletes misused buffer in BackgroundSubstractorGMG.

parent 17e939fa
...@@ -196,8 +196,6 @@ private: ...@@ -196,8 +196,6 @@ private:
Mat_<int> nfeatures_; Mat_<int> nfeatures_;
Mat_<int> colors_; Mat_<int> colors_;
Mat_<float> weights_; Mat_<float> weights_;
Mat buf_;
}; };
...@@ -459,8 +457,7 @@ void BackgroundSubtractorGMGImpl::apply(InputArray _frame, OutputArray _fgmask, ...@@ -459,8 +457,7 @@ void BackgroundSubtractorGMGImpl::apply(InputArray _frame, OutputArray _fgmask,
if (smoothingRadius > 0) if (smoothingRadius > 0)
{ {
medianBlur(fgmask, buf_, smoothingRadius); medianBlur(fgmask, fgmask, smoothingRadius);
swap(fgmask, buf_);
} }
// keep track of how many frames we have processed // keep track of how many frames we have processed
...@@ -474,7 +471,6 @@ void BackgroundSubtractorGMGImpl::release() ...@@ -474,7 +471,6 @@ void BackgroundSubtractorGMGImpl::release()
nfeatures_.release(); nfeatures_.release();
colors_.release(); colors_.release();
weights_.release(); weights_.release();
buf_.release();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment