fixed roi handling in HOGDescriptor::computeGradient (ticket #295).
This commit is contained in:
@@ -200,10 +200,10 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
|
|||||||
|
|
||||||
for( x = -1; x < gradsize.width + 1; x++ )
|
for( x = -1; x < gradsize.width + 1; x++ )
|
||||||
xmap[x] = borderInterpolate(x - paddingTL.width + roiofs.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++ )
|
for( y = -1; y < gradsize.height + 1; y++ )
|
||||||
ymap[y] = borderInterpolate(y - paddingTL.height + roiofs.y,
|
ymap[y] = borderInterpolate(y - paddingTL.height + roiofs.y,
|
||||||
wholeSize.height, borderType);
|
wholeSize.height, borderType) - roiofs.y;
|
||||||
|
|
||||||
// x- & y- derivatives for the whole row
|
// x- & y- derivatives for the whole row
|
||||||
int width = gradsize.width;
|
int width = gradsize.width;
|
||||||
|
Reference in New Issue
Block a user