Commit 5673e7e4 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fix bug in gpu bgsegm sample

create `d_fgimg` matrix before cleaning.
parent 578e9847
...@@ -146,6 +146,7 @@ int main(int argc, const char** argv) ...@@ -146,6 +146,7 @@ int main(int argc, const char** argv)
double fps = cv::getTickFrequency() / (cv::getTickCount() - start); double fps = cv::getTickFrequency() / (cv::getTickCount() - start);
std::cout << "FPS : " << fps << std::endl; std::cout << "FPS : " << fps << std::endl;
d_fgimg.create(d_frame.size(), d_frame.type());
d_fgimg.setTo(Scalar::all(0)); d_fgimg.setTo(Scalar::all(0));
d_frame.copyTo(d_fgimg, d_fgmask); d_frame.copyTo(d_fgimg, d_fgmask);
......
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