From addcd16d8f393bb9dad871cb9477bf2b1dfd2531 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 28 May 2012 08:08:14 +0000 Subject: [PATCH] minor fix of gpu perf tests --- modules/gpu/perf_cpu/perf_features2d.cpp | 3 +++ modules/gpu/perf_cpu/perf_utility.hpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/gpu/perf_cpu/perf_features2d.cpp b/modules/gpu/perf_cpu/perf_features2d.cpp index 13c6034..74579a6 100644 --- a/modules/gpu/perf_cpu/perf_features2d.cpp +++ b/modules/gpu/perf_cpu/perf_features2d.cpp @@ -21,6 +21,7 @@ GPU_PERF_TEST_1(SURF, cv::gpu::DeviceInfo) TEST_CYCLE() { + keypoints.clear(); surf(img, cv::noArray(), keypoints, descriptors); } } @@ -41,6 +42,7 @@ GPU_PERF_TEST_1(FAST, cv::gpu::DeviceInfo) TEST_CYCLE() { + keypoints.clear(); cv::FAST(img, keypoints, 20); } } @@ -64,6 +66,7 @@ GPU_PERF_TEST_1(ORB, cv::gpu::DeviceInfo) TEST_CYCLE() { + keypoints.clear(); orb(img, cv::noArray(), keypoints, descriptors); } } diff --git a/modules/gpu/perf_cpu/perf_utility.hpp b/modules/gpu/perf_cpu/perf_utility.hpp index 1af0a0a..6bfc9c8 100644 --- a/modules/gpu/perf_cpu/perf_utility.hpp +++ b/modules/gpu/perf_cpu/perf_utility.hpp @@ -8,7 +8,7 @@ using perf::MatDepth; CV_ENUM(BorderMode, cv::BORDER_REFLECT101, cv::BORDER_REPLICATE, cv::BORDER_CONSTANT, cv::BORDER_REFLECT, cv::BORDER_WRAP) CV_ENUM(Interpolation, cv::INTER_NEAREST, cv::INTER_LINEAR, cv::INTER_CUBIC) -CV_ENUM(NormType, cv::NORM_INF, cv::NORM_L1, cv::NORM_L2) +CV_ENUM(NormType, cv::NORM_INF, cv::NORM_L1, cv::NORM_L2, cv::NORM_HAMMING) struct CvtColorInfo { @@ -32,7 +32,7 @@ void PrintTo(const CvtColorInfo& info, std::ostream* os); }; \ inline void PrintTo( name param, std::ostream* os) \ { \ - *os << #name << "(" << testing::PrintToString(static_cast< type >(param)) << ")"; \ + *os << #name << " = " << testing::PrintToString(static_cast< type >(param)); \ } IMPLEMENT_PARAM_CLASS(Channels, int) -- 2.7.4