2011-09-12 09:48:09 +02:00
|
|
|
#include "perf_precomp.hpp"
|
|
|
|
|
2011-12-28 13:53:08 +01:00
|
|
|
#ifdef HAVE_CUDA
|
|
|
|
|
|
|
|
GPU_PERF_TEST_1(HOG, cv::gpu::DeviceInfo)
|
2011-09-12 09:48:09 +02:00
|
|
|
{
|
2011-12-28 13:53:08 +01:00
|
|
|
cv::gpu::DeviceInfo devInfo = GetParam();
|
2011-09-12 09:48:09 +02:00
|
|
|
|
2011-12-28 13:53:08 +01:00
|
|
|
cv::gpu::setDevice(devInfo.deviceID());
|
2011-09-12 09:48:09 +02:00
|
|
|
|
2011-12-28 13:53:08 +01:00
|
|
|
cv::Mat img_host = readImage("gpu/hog/road.png", cv::IMREAD_GRAYSCALE);
|
2011-09-12 09:48:09 +02:00
|
|
|
|
2011-12-28 13:53:08 +01:00
|
|
|
cv::gpu::GpuMat img(img_host);
|
|
|
|
std::vector<cv::Rect> found_locations;
|
2011-09-12 09:48:09 +02:00
|
|
|
|
2011-12-28 13:53:08 +01:00
|
|
|
cv::gpu::HOGDescriptor hog;
|
|
|
|
hog.setSVMDetector(cv::gpu::HOGDescriptor::getDefaultPeopleDetector());
|
2011-09-12 09:48:09 +02:00
|
|
|
|
2011-12-29 17:46:16 +01:00
|
|
|
TEST_CYCLE()
|
2011-09-12 09:48:09 +02:00
|
|
|
{
|
|
|
|
hog.detectMultiScale(img, found_locations);
|
|
|
|
}
|
|
|
|
}
|
2011-12-28 13:53:08 +01:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(ObjDetect, HOG, ALL_DEVICES);
|
|
|
|
|
|
|
|
#endif
|