Commit 5c38519c authored by Konstantin Matskevich's avatar Konstantin Matskevich

some changes

parent 3ea32b87
...@@ -327,7 +327,7 @@ public: ...@@ -327,7 +327,7 @@ public:
Size padding = Size(), Size padding = Size(),
const std::vector<Point>& searchLocations=std::vector<Point>()) const; const std::vector<Point>& searchLocations=std::vector<Point>()) const;
//ocl //ocl
virtual bool ocl_detect(const UMat& img, std::vector<Point> &hits, virtual bool ocl_detect(InputArray img, std::vector<Point> &hits,
double hitThreshold = 0, Size winStride = Size()) const; double hitThreshold = 0, Size winStride = Size()) const;
//with result weights output //with result weights output
CV_WRAP virtual void detectMultiScale(InputArray img, CV_OUT std::vector<Rect>& foundLocations, CV_WRAP virtual void detectMultiScale(InputArray img, CV_OUT std::vector<Rect>& foundLocations,
...@@ -360,7 +360,7 @@ public: ...@@ -360,7 +360,7 @@ public:
CV_PROP double L2HysThreshold; CV_PROP double L2HysThreshold;
CV_PROP bool gammaCorrection; CV_PROP bool gammaCorrection;
CV_PROP std::vector<float> svmDetector; CV_PROP std::vector<float> svmDetector;
CV_PROP std::vector<float> oclSvmDetector; UMat oclSvmDetector;
CV_PROP int nlevels; CV_PROP int nlevels;
......
...@@ -85,7 +85,7 @@ OCL_PERF_TEST(HOGFixture, HOG) ...@@ -85,7 +85,7 @@ OCL_PERF_TEST(HOGFixture, HOG)
OCL_TEST_CYCLE() hog.detectMultiScale(src, found_locations); OCL_TEST_CYCLE() hog.detectMultiScale(src, found_locations);
std::sort(found_locations.begin(), found_locations.end(), RectLess()); std::sort(found_locations.begin(), found_locations.end(), RectLess());
// SANITY_CHECK(found_locations, 1 + DBL_EPSILON); SANITY_CHECK(found_locations, 1 + DBL_EPSILON);
} }
} }
......
This diff is collapsed.
...@@ -110,20 +110,6 @@ OCL_TEST_P(HOG, Detect) ...@@ -110,20 +110,6 @@ OCL_TEST_P(HOG, Detect)
OCL_OFF(hog.detectMultiScale(img, cpu_found, 0, Size(8, 8), Size(0, 0), 1.05, 6)); OCL_OFF(hog.detectMultiScale(img, cpu_found, 0, Size(8, 8), Size(0, 0), 1.05, 6));
OCL_ON(hog.detectMultiScale(uimg, gpu_found, 0, Size(8, 8), Size(0, 0), 1.05, 6)); OCL_ON(hog.detectMultiScale(uimg, gpu_found, 0, Size(8, 8), Size(0, 0), 1.05, 6));
for (size_t i = 0; i < cpu_found.size(); i++)
{
Rect r = cpu_found[i];
rectangle(img, r.tl(), r.br(), Scalar(0, 255, 0), 3);
}
imshow("cpu", img);
Mat imgs(img);
for (size_t i = 0; i < gpu_found.size(); i++)
{
Rect r = cpu_found[i];
rectangle(imgs, r.tl(), r.br(), Scalar(0, 255, 0), 3);
}
imshow("gpu", imgs);
waitKey(0);
EXPECT_LT(checkRectSimilarity(img.size(), cpu_found, gpu_found), 1.0); EXPECT_LT(checkRectSimilarity(img.size(), cpu_found, gpu_found), 1.0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment