Commit 599f5ef5 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

use downscaled frames in FGDStatModel test

parent 86e12b60
...@@ -98,10 +98,13 @@ GPU_TEST_P(FGDStatModel, Update) ...@@ -98,10 +98,13 @@ GPU_TEST_P(FGDStatModel, Update)
cap >> frame; cap >> frame;
ASSERT_FALSE(frame.empty()); ASSERT_FALSE(frame.empty());
IplImage ipl_frame = frame; cv::Mat frameSmall;
cv::resize(frame, frameSmall, cv::Size(), 0.5, 0.5);
IplImage ipl_frame = frameSmall;
cv::Ptr<CvBGStatModel> model(cvCreateFGDStatModel(&ipl_frame)); cv::Ptr<CvBGStatModel> model(cvCreateFGDStatModel(&ipl_frame));
cv::gpu::GpuMat d_frame(frame); cv::gpu::GpuMat d_frame(frameSmall);
cv::gpu::FGDStatModel d_model(out_cn); cv::gpu::FGDStatModel d_model(out_cn);
d_model.create(d_frame); d_model.create(d_frame);
...@@ -109,18 +112,17 @@ GPU_TEST_P(FGDStatModel, Update) ...@@ -109,18 +112,17 @@ GPU_TEST_P(FGDStatModel, Update)
cv::Mat h_foreground; cv::Mat h_foreground;
cv::Mat h_background3; cv::Mat h_background3;
cv::Mat backgroundDiff;
cv::Mat foregroundDiff;
for (int i = 0; i < 5; ++i) for (int i = 0; i < 5; ++i)
{ {
cap >> frame; cap >> frame;
ASSERT_FALSE(frame.empty()); ASSERT_FALSE(frame.empty());
ipl_frame = frame; cv::resize(frame, frameSmall, cv::Size(), 0.5, 0.5);
ipl_frame = frameSmall;
int gold_count = cvUpdateBGStatModel(&ipl_frame, model); int gold_count = cvUpdateBGStatModel(&ipl_frame, model);
d_frame.upload(frame); d_frame.upload(frameSmall);
int count = d_model.update(d_frame); int count = d_model.update(d_frame);
......
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