Skip to content

Commit f4250ca

Browse files
committed
Deletes misused buffer in BackgroundSubstractorGMG.
1 parent 17e939f commit f4250ca

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

modules/bgsegm/src/bgfg_gmg.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ class BackgroundSubtractorGMGImpl CV_FINAL : public BackgroundSubtractorGMG
196196
Mat_<int> nfeatures_;
197197
Mat_<int> colors_;
198198
Mat_<float> weights_;
199-
200-
Mat buf_;
201199
};
202200

203201

@@ -459,8 +457,7 @@ void BackgroundSubtractorGMGImpl::apply(InputArray _frame, OutputArray _fgmask,
459457

460458
if (smoothingRadius > 0)
461459
{
462-
medianBlur(fgmask, buf_, smoothingRadius);
463-
swap(fgmask, buf_);
460+
medianBlur(fgmask, fgmask, smoothingRadius);
464461
}
465462

466463
// keep track of how many frames we have processed
@@ -474,7 +471,6 @@ void BackgroundSubtractorGMGImpl::release()
474471
nfeatures_.release();
475472
colors_.release();
476473
weights_.release();
477-
buf_.release();
478474
}
479475

480476

0 commit comments

Comments
 (0)