GPU module performance tests are aligned with other OpenCV pefrofmance tests

This commit is contained in:
marina.kolpakova
2012-10-10 01:34:21 +04:00
parent 10f1004465
commit f5d6367ea1
5 changed files with 53 additions and 71 deletions

View File

@@ -106,7 +106,7 @@ PERF_TEST_P(Image, Labeling_ConnectedComponents, Values<string>("gpu/labeling/al
cv::Mat image = readImage(GetParam(), cv::IMREAD_GRAYSCALE);
if (runOnGpu)
if (PERF_RUN_GPU())
{
cv::gpu::GpuMat mask;
mask.create(image.rows, image.cols, CV_8UC1);
@@ -122,6 +122,8 @@ PERF_TEST_P(Image, Labeling_ConnectedComponents, Values<string>("gpu/labeling/al
{
cv::gpu::labelComponents(mask, components);
}
GPU_SANITY_CHECK(components);
}
else
{
@@ -135,6 +137,8 @@ PERF_TEST_P(Image, Labeling_ConnectedComponents, Values<string>("gpu/labeling/al
{
host(host._labels);
}
CPU_SANITY_CHECK(host._labels);
}
}