From: Elena Gvozdeva Date: Fri, 31 Jan 2014 06:46:29 +0000 (+0400) Subject: fixed test X-Git-Tag: submit/tizen_ivi/20141117.190038~2^2~669^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69630ee9d9506259aab42099ffbae00cceef5694;p=profile%2Fivi%2Fopencv.git fixed test --- diff --git a/modules/video/test/ocl/test_bgfg_mog2.cpp b/modules/video/test/ocl/test_bgfg_mog2.cpp index e9a73cb..bfb1621 100644 --- a/modules/video/test/ocl/test_bgfg_mog2.cpp +++ b/modules/video/test/ocl/test_bgfg_mog2.cpp @@ -20,7 +20,7 @@ defined(WIN32) namespace cvtest { namespace ocl { -////////////////////////// MOG2/////////////////////////////////// +//////////////////////////Mog2_Update/////////////////////////////////// namespace { @@ -28,11 +28,10 @@ namespace IMPLEMENT_PARAM_CLASS(DetectShadow, bool) } -PARAM_TEST_CASE(Mog2, UseGray, DetectShadow) +PARAM_TEST_CASE(Mog2_Update, UseGray, DetectShadow) { bool useGray; bool detectShadow; - bool useRoi; virtual void SetUp() { useGray = GET_PARAM(0); @@ -40,7 +39,7 @@ PARAM_TEST_CASE(Mog2, UseGray, DetectShadow) } }; -OCL_TEST_P(Mog2, Update) +OCL_TEST_P(Mog2_Update, Accuracy) { string inputFile = string(TS::ptr()->get_data_path()) + "video/768x576.avi"; VideoCapture cap(inputFile); @@ -77,11 +76,19 @@ OCL_TEST_P(Mog2, Update) } } -OCL_TEST_P(Mog2, getBackgroundImage) +//////////////////////////Mog2_getBackgroundImage/////////////////////////////////// + +PARAM_TEST_CASE(Mog2_getBackgroundImage, DetectShadow) { - if (useGray) - return; + bool detectShadow; + virtual void SetUp() + { + detectShadow = GET_PARAM(0); + } +}; +OCL_TEST_P(Mog2_getBackgroundImage, Accuracy) +{ string inputFile = string(TS::ptr()->get_data_path()) + "video/768x576.avi"; VideoCapture cap(inputFile); ASSERT_TRUE(cap.isOpened()); @@ -113,11 +120,17 @@ OCL_TEST_P(Mog2, getBackgroundImage) EXPECT_MAT_NEAR(background, u_background, 1.0); } -OCL_INSTANTIATE_TEST_CASE_P(OCL_Video, Mog2, Combine( +/////////////////////////////////////////////////////////////////////////////////////////// + +OCL_INSTANTIATE_TEST_CASE_P(OCL_Video, Mog2_Update, Combine( Values(UseGray(true), UseGray(false)), Values(DetectShadow(true), DetectShadow(false))) ); + +OCL_INSTANTIATE_TEST_CASE_P(OCL_Video, Mog2_getBackgroundImage, (Values(DetectShadow(true), DetectShadow(false))) + ); + }}// namespace cvtest::ocl #endif -#endif +#endif \ No newline at end of file