fix bug in gpu bgsegm sample

create `d_fgimg` matrix before cleaning.
This commit is contained in:
Vladislav Vinogradov 2013-10-19 12:40:10 +04:00
parent 578e984739
commit 5673e7e435

View File

@ -146,6 +146,7 @@ int main(int argc, const char** argv)
double fps = cv::getTickFrequency() / (cv::getTickCount() - start);
std::cout << "FPS : " << fps << std::endl;
d_fgimg.create(d_frame.size(), d_frame.type());
d_fgimg.setTo(Scalar::all(0));
d_frame.copyTo(d_fgimg, d_fgmask);