added padded performance tests for gpu module
This commit is contained in:
23
modules/gpu/perf/perf_objdetect.cpp
Normal file
23
modules/gpu/perf/perf_objdetect.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#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;
|
||||
|
||||
declare.time(0.5).iterations(100);
|
||||
|
||||
gpu::HOGDescriptor hog;
|
||||
hog.setSVMDetector(gpu::HOGDescriptor::getDefaultPeopleDetector());
|
||||
|
||||
SIMPLE_TEST_CYCLE()
|
||||
{
|
||||
hog.detectMultiScale(img, found_locations);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user