2011-09-12 09:48:09 +02:00
|
|
|
#include "perf_precomp.hpp"
|
|
|
|
|
|
|
|
PERF_TEST_P(DevInfo, HOGDescriptor, testing::ValuesIn(devices()))
|
|
|
|
{
|
|
|
|
DeviceInfo devInfo = GetParam();
|
|
|
|
|
|
|
|
setDevice(devInfo.deviceID());
|
|
|
|
|
|
|
|
Mat img_host = readImage("gpu/hog/road.png", CV_LOAD_IMAGE_GRAYSCALE);
|
|
|
|
|
|
|
|
GpuMat img(img_host);
|
|
|
|
vector<Rect> found_locations;
|
|
|
|
|
|
|
|
gpu::HOGDescriptor hog;
|
|
|
|
hog.setSVMDetector(gpu::HOGDescriptor::getDefaultPeopleDetector());
|
|
|
|
|
2011-11-15 08:03:44 +01:00
|
|
|
TEST_CYCLE(100)
|
2011-09-12 09:48:09 +02:00
|
|
|
{
|
|
|
|
hog.detectMultiScale(img, found_locations);
|
|
|
|
}
|
|
|
|
}
|