moved SURF_GPU and VIBE to gpunonfree module

This commit is contained in:
Vladislav Vinogradov
2013-03-15 14:09:39 +04:00
parent abc9ef6809
commit fd7bf0b766
39 changed files with 1317 additions and 413 deletions

View File

@@ -818,71 +818,6 @@ PERF_TEST_P(Video_Cn, Video_MOG2GetBackgroundImage,
}
}
//////////////////////////////////////////////////////
// VIBE
PERF_TEST_P(Video_Cn, Video_VIBE,
Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"),
GPU_CHANNELS_1_3_4))
{
const string inputFile = perf::TestBase::getDataPath(GET_PARAM(0));
const int cn = GET_PARAM(1);
cv::VideoCapture cap(inputFile);
ASSERT_TRUE(cap.isOpened());
cv::Mat frame;
cap >> frame;
ASSERT_FALSE(frame.empty());
if (cn != 3)
{
cv::Mat temp;
if (cn == 1)
cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
else
cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
cv::swap(temp, frame);
}
if (PERF_RUN_GPU())
{
cv::gpu::GpuMat d_frame(frame);
cv::gpu::VIBE_GPU vibe;
cv::gpu::GpuMat foreground;
vibe(d_frame, foreground);
for (int i = 0; i < 10; ++i)
{
cap >> frame;
ASSERT_FALSE(frame.empty());
if (cn != 3)
{
cv::Mat temp;
if (cn == 1)
cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
else
cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
cv::swap(temp, frame);
}
d_frame.upload(frame);
startTimer(); next();
vibe(d_frame, foreground);
stopTimer();
}
GPU_SANITY_CHECK(foreground);
}
else
{
FAIL_NO_CPU();
}
}
//////////////////////////////////////////////////////
// GMG