Skip to content
Snippets Groups Projects
Commit 685d300c authored by Lieven Govaerts's avatar Lieven Govaerts Committed by Andrews Sobral
Browse files

Independent Multimodal algorithm: assert that a frame is larger than 0x0 pixels (#111)

* package_bgs/IMBS/IMBS.cpp
  (BackgroundSubtractorIMBS::apply): assert that size > 0.
parent 250d6564
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,8 @@ void BackgroundSubtractorIMBS::apply(InputArray _frame, OutputArray _fgmask, dou
CV_Assert(frame.depth() == CV_8U);
CV_Assert(frame.channels() == 3);
CV_Assert(frame.size().width > 0);
CV_Assert(frame.size().height > 0);
bool needToInitialize = nframes == 0 || frame.type() != frameType;
if (needToInitialize) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment