namespace cvtest {
namespace ocl {
-////////////////////////// MOG2///////////////////////////////////
+//////////////////////////Mog2_Update///////////////////////////////////
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);
}
};
-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);
}
}
-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());
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