From: Vladislav Vinogradov Date: Sat, 19 Oct 2013 08:40:10 +0000 (+0400) Subject: fix bug in gpu bgsegm sample X-Git-Tag: accepted/tizen/ivi/20140515.103456~1^2~376^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5673e7e4353bbeeea8392ae5d046b0a08e6eadb1;p=profile%2Fivi%2Fopencv.git fix bug in gpu bgsegm sample create `d_fgimg` matrix before cleaning. --- diff --git a/samples/gpu/bgfg_segm.cpp b/samples/gpu/bgfg_segm.cpp index 6963e75..47edbe7 100644 --- a/samples/gpu/bgfg_segm.cpp +++ b/samples/gpu/bgfg_segm.cpp @@ -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);