Commit 69630ee9 authored by Elena Gvozdeva's avatar Elena Gvozdeva

fixed test

parent 96b6f338
...@@ -20,7 +20,7 @@ defined(WIN32) ...@@ -20,7 +20,7 @@ defined(WIN32)
namespace cvtest { namespace cvtest {
namespace ocl { namespace ocl {
////////////////////////// MOG2/////////////////////////////////// //////////////////////////Mog2_Update///////////////////////////////////
namespace namespace
{ {
...@@ -28,11 +28,10 @@ namespace ...@@ -28,11 +28,10 @@ namespace
IMPLEMENT_PARAM_CLASS(DetectShadow, bool) IMPLEMENT_PARAM_CLASS(DetectShadow, bool)
} }
PARAM_TEST_CASE(Mog2, UseGray, DetectShadow) PARAM_TEST_CASE(Mog2_Update, UseGray, DetectShadow)
{ {
bool useGray; bool useGray;
bool detectShadow; bool detectShadow;
bool useRoi;
virtual void SetUp() virtual void SetUp()
{ {
useGray = GET_PARAM(0); useGray = GET_PARAM(0);
...@@ -40,7 +39,7 @@ PARAM_TEST_CASE(Mog2, UseGray, DetectShadow) ...@@ -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"; string inputFile = string(TS::ptr()->get_data_path()) + "video/768x576.avi";
VideoCapture cap(inputFile); VideoCapture cap(inputFile);
...@@ -77,11 +76,19 @@ OCL_TEST_P(Mog2, Update) ...@@ -77,11 +76,19 @@ OCL_TEST_P(Mog2, Update)
} }
} }
OCL_TEST_P(Mog2, getBackgroundImage) //////////////////////////Mog2_getBackgroundImage///////////////////////////////////
PARAM_TEST_CASE(Mog2_getBackgroundImage, DetectShadow)
{ {
if (useGray) bool detectShadow;
return; virtual void SetUp()
{
detectShadow = GET_PARAM(0);
}
};
OCL_TEST_P(Mog2_getBackgroundImage, Accuracy)
{
string inputFile = string(TS::ptr()->get_data_path()) + "video/768x576.avi"; string inputFile = string(TS::ptr()->get_data_path()) + "video/768x576.avi";
VideoCapture cap(inputFile); VideoCapture cap(inputFile);
ASSERT_TRUE(cap.isOpened()); ASSERT_TRUE(cap.isOpened());
...@@ -113,11 +120,17 @@ OCL_TEST_P(Mog2, getBackgroundImage) ...@@ -113,11 +120,17 @@ OCL_TEST_P(Mog2, getBackgroundImage)
EXPECT_MAT_NEAR(background, u_background, 1.0); 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(UseGray(true), UseGray(false)),
Values(DetectShadow(true), DetectShadow(false))) Values(DetectShadow(true), DetectShadow(false)))
); );
OCL_INSTANTIATE_TEST_CASE_P(OCL_Video, Mog2_getBackgroundImage, (Values(DetectShadow(true), DetectShadow(false)))
);
}}// namespace cvtest::ocl }}// namespace cvtest::ocl
#endif #endif
#endif #endif
\ No newline at end of file
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