updated normalization routine in the matchTemplate to avoid division by zero on black images (ticket #798), added test

This commit is contained in:
Alexey Spizhevoy
2011-01-11 09:36:21 +00:00
parent a961cfe135
commit dc763e0250
3 changed files with 72 additions and 67 deletions

View File

@@ -1180,7 +1180,6 @@ namespace cv
size_t getBlockHistogramSize() const;
void setSVMDetector(const vector<float>& detector);
bool checkDetectorSize() const;
static vector<float> getDefaultPeopleDetector();
static vector<float> getPeopleDetector_48x96();
@@ -1212,7 +1211,9 @@ namespace cv
protected:
void computeBlockHistograms(const GpuMat& img);
void computeGradient(const GpuMat& img, GpuMat& grad, GpuMat& qangle);
double getWinSigma() const;
bool checkDetectorSize() const;
static int numPartsWithin(int size, int part_size, int stride);
static Size numPartsWithin(Size size, Size part_size, Size stride);