2012-05-22 18:29:58 +08:00
|
|
|
#include "perf_cpu_precomp.hpp"
|
2012-05-22 16:29:08 +08:00
|
|
|
|
|
|
|
#ifdef HAVE_CUDA
|
|
|
|
|
|
|
|
GPU_PERF_TEST_1(HOG, cv::gpu::DeviceInfo)
|
|
|
|
{
|
2012-05-22 18:29:58 +08:00
|
|
|
cv::Mat img = readImage("gpu/hog/road.png", cv::IMREAD_GRAYSCALE);
|
2012-05-22 16:29:08 +08:00
|
|
|
|
|
|
|
std::vector<cv::Rect> found_locations;
|
|
|
|
|
2012-05-22 18:29:58 +08:00
|
|
|
cv::HOGDescriptor hog;
|
2012-05-22 16:29:08 +08:00
|
|
|
hog.setSVMDetector(cv::gpu::HOGDescriptor::getDefaultPeopleDetector());
|
|
|
|
|
|
|
|
TEST_CYCLE()
|
|
|
|
{
|
|
|
|
hog.detectMultiScale(img, found_locations);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(ObjDetect, HOG, ALL_DEVICES);
|
|
|
|
|
|
|
|
#endif
|