added default detector for winSize(64,128) for hog on gpu
This commit is contained in:
parent
be54f1237a
commit
edff674105
@ -528,8 +528,8 @@ CV_IMPL const char* cvErrorStr( int status )
|
||||
case CV_StsBadMemBlock : return "Memory block has been corrupted";
|
||||
case CV_StsAssert : return "Assertion failed";
|
||||
case CV_GpuNotSupported : return "No GPU support";
|
||||
case CV_GpuApiCallError : return "GPU API error";
|
||||
case CV_GpuNppCallError : return "NPP API error";
|
||||
case CV_GpuApiCallError : return "Gpu Api call";
|
||||
case CV_GpuNppCallError : return "Npp Api call";
|
||||
};
|
||||
|
||||
sprintf(buf, "Unknown %s code %d", status >= 0 ? "status":"error", status);
|
||||
|
@ -995,6 +995,7 @@ namespace cv
|
||||
double getWinSigma() const;
|
||||
|
||||
static vector<float> getDefaultPeopleDetector();
|
||||
static vector<float> getDefaultPeopleDetector_64x128();
|
||||
void setSVMDetector(const vector<float>& detector);
|
||||
bool checkDetectorSize() const;
|
||||
|
||||
|
@ -56,6 +56,7 @@ void cv::gpu::HOGDescriptor::detectMultiScale(const GpuMat&, vector<Rect>&, doub
|
||||
int cv::gpu::HOGDescriptor::numPartsWithin(int, int, int) { throw_nogpu(); return 0; }
|
||||
cv::Size cv::gpu::HOGDescriptor::numPartsWithin(cv::Size, cv::Size, cv::Size) { throw_nogpu(); return cv::Size(); }
|
||||
std::vector<float> cv::gpu::HOGDescriptor::getDefaultPeopleDetector() { throw_nogpu(); return std::vector<float>(); }
|
||||
std::vector<float> cv::gpu::HOGDescriptor::getDefaultPeopleDetector_64x128() { throw_nogpu(); return std::vector<float>(); }
|
||||
|
||||
#else
|
||||
|
||||
@ -309,6 +310,11 @@ cv::Size cv::gpu::HOGDescriptor::numPartsWithin(cv::Size size, cv::Size part_siz
|
||||
}
|
||||
|
||||
std::vector<float> cv::gpu::HOGDescriptor::getDefaultPeopleDetector()
|
||||
{
|
||||
return getDefaultPeopleDetector_64x128();
|
||||
}
|
||||
|
||||
std::vector<float> cv::gpu::HOGDescriptor::getDefaultPeopleDetector_64x128()
|
||||
{
|
||||
static const float detector[] = {
|
||||
0.05359386f, -0.14721455f, -0.05532170f, 0.05077307f,
|
||||
|
@ -109,6 +109,8 @@ struct CV_GpuHogTest : public CvTest
|
||||
|
||||
cv::gpu::HOGDescriptor hog;
|
||||
hog.setSVMDetector(cv::gpu::HOGDescriptor::getDefaultPeopleDetector());
|
||||
//cpu detector may be updated soon
|
||||
//hog.setSVMDetector(cv::HOGDescriptor::getDefaultPeopleDetector());
|
||||
|
||||
std::vector<cv::Point> locations;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user