added cpu performance test for gpu module

This commit is contained in:
Vladislav Vinogradov
2012-05-22 08:29:08 +00:00
parent 8429c109be
commit d78aa7c937
14 changed files with 3117 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#include "perf_precomp.hpp"
#ifdef HAVE_CUDA
GPU_PERF_TEST_1(HOG, cv::gpu::DeviceInfo)
{
cv::gpu::DeviceInfo devInfo = GetParam();
cv::gpu::setDevice(devInfo.deviceID());
cv::Mat img_host = readImage("gpu/hog/road.png", cv::IMREAD_GRAYSCALE);
cv::gpu::GpuMat img(img_host);
std::vector<cv::Rect> found_locations;
cv::gpu::HOGDescriptor hog;
hog.setSVMDetector(cv::gpu::HOGDescriptor::getDefaultPeopleDetector());
TEST_CYCLE()
{
hog.detectMultiScale(img, found_locations);
}
}
INSTANTIATE_TEST_CASE_P(ObjDetect, HOG, ALL_DEVICES);
#endif