fixed roi handling in HOGDescriptor::computeGradient (ticket #295).

pull/13383/head
Vadim Pisarevsky 15 years ago
parent 6da8d7cb52
commit 686e28eeee
  1. 4
      modules/objdetect/src/hog.cpp

@ -200,10 +200,10 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
for( x = -1; x < gradsize.width + 1; x++ )
xmap[x] = borderInterpolate(x - paddingTL.width + roiofs.x,
wholeSize.width, borderType);
wholeSize.width, borderType) - roiofs.x;
for( y = -1; y < gradsize.height + 1; y++ )
ymap[y] = borderInterpolate(y - paddingTL.height + roiofs.y,
wholeSize.height, borderType);
wholeSize.height, borderType) - roiofs.y;
// x- & y- derivatives for the whole row
int width = gradsize.width;

Loading…
Cancel
Save