using namespace testing;
using namespace perf;
+#if defined(HAVE_XINE) || \
+ defined(HAVE_GSTREAMER) || \
+ defined(HAVE_QUICKTIME) || \
+ defined(HAVE_AVFOUNDATION) || \
+ defined(HAVE_FFMPEG) || \
+ defined(WIN32) /* assume that we have ffmpeg */
+
+# define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
+#else
+# define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
+#endif
+
namespace cv
{
template<> void Ptr<CvBGStatModel>::delete_obj()
//////////////////////////////////////////////////////
// FGDStatModel
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
DEF_PARAM_TEST_1(Video, string);
PERF_TEST_P(Video, Video_FGDStatModel,
}
}
+#endif
+
//////////////////////////////////////////////////////
// MOG
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
DEF_PARAM_TEST(Video_Cn_LearningRate, string, MatCn, double);
PERF_TEST_P(Video_Cn_LearningRate, Video_MOG,
}
}
+#endif
+
//////////////////////////////////////////////////////
// MOG2
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
DEF_PARAM_TEST(Video_Cn, string, int);
PERF_TEST_P(Video_Cn, Video_MOG2,
}
}
+#endif
+
//////////////////////////////////////////////////////
// MOG2GetBackgroundImage
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
PERF_TEST_P(Video_Cn, Video_MOG2GetBackgroundImage,
Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"),
GPU_CHANNELS_1_3_4))
}
}
+#endif
+
//////////////////////////////////////////////////////
// GMG
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
DEF_PARAM_TEST(Video_Cn_MaxFeatures, string, MatCn, int);
PERF_TEST_P(Video_Cn_MaxFeatures, Video_GMG,
}
}
-#ifdef HAVE_NVCUVID
+#endif
//////////////////////////////////////////////////////
// VideoReader
+#if defined(HAVE_NVCUVID) && BUILD_WITH_VIDEO_INPUT_SUPPORT
+
PERF_TEST_P(Video, Video_VideoReader, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"))
{
declare.time(20);
}
}
+#endif
+
//////////////////////////////////////////////////////
// VideoWriter
-#ifdef WIN32
+#if defined(HAVE_NVCUVID) && defined(WIN32)
PERF_TEST_P(Video, Video_VideoWriter, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"))
{
SANITY_CHECK(frame);
}
-#endif // WIN32
-
-#endif // HAVE_NVCUVID
+#endif
using namespace cvtest;
+#if defined(HAVE_XINE) || \
+ defined(HAVE_GSTREAMER) || \
+ defined(HAVE_QUICKTIME) || \
+ defined(HAVE_AVFOUNDATION) || \
+ defined(HAVE_FFMPEG) || \
+ defined(WIN32) /* assume that we have ffmpeg */
+
+# define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
+#else
+# define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
+#endif
+
//////////////////////////////////////////////////////
// FGDStatModel
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
namespace cv
{
template<> void Ptr<CvBGStatModel>::delete_obj()
testing::Values(std::string("768x576.avi")),
testing::Values(Channels(3), Channels(4))));
+#endif
+
//////////////////////////////////////////////////////
// MOG
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
namespace
{
IMPLEMENT_PARAM_CLASS(UseGray, bool)
testing::Values(LearningRate(0.0), LearningRate(0.01)),
WHOLE_SUBMAT));
+#endif
+
//////////////////////////////////////////////////////
// MOG2
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
namespace
{
IMPLEMENT_PARAM_CLASS(DetectShadow, bool)
testing::Values(DetectShadow(true), DetectShadow(false)),
WHOLE_SUBMAT));
+#endif
+
//////////////////////////////////////////////////////
// GMG
using namespace testing;
using namespace perf;
+#if defined(HAVE_XINE) || \
+ defined(HAVE_GSTREAMER) || \
+ defined(HAVE_QUICKTIME) || \
+ defined(HAVE_AVFOUNDATION) || \
+ defined(HAVE_FFMPEG) || \
+ defined(WIN32) /* assume that we have ffmpeg */
+
+# define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
+#else
+# define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
+#endif
+
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////
// VIBE
+#if BUILD_WITH_VIDEO_INPUT_SUPPORT
+
DEF_PARAM_TEST(Video_Cn, string, int);
PERF_TEST_P(Video_Cn, GPU_VIBE,
}
#endif
+
+#endif