First notice that when computing IntegralSquare, point A is excluded and point
D is included (you got sum(pixel) for x>xA && x<=xD && y>yA && y<=yD)
This is fine because point coordinates are computed using (int)(x-scale) for
point A and (int)(x+scale) for point D resulting in truncation (except if scale
if an integer value).
Looking at HAARConvolution.makeConvolutionDx for example, we can see that the
width of the positive wavelet is 1 pixel greater than the width of the negative
one. This is because the positive wavelet include the pixels values for the
center of the filter. This is not good as the filter there is 0.
Suggest to modify code as follow:
return ( integralImage.getIntegralSquare(x1, y1, x2-1, y3)
- integralImage.getIntegralSquare(x2, y1, x3, y3));
Same comment for other methods in HARRConvolution and GAUSSConvolution.
Original issue reported on code.google.com by yves.cui...@gmail.com on 1 May 2011 at 10:24
Original issue reported on code.google.com by
yves.cui...@gmail.com
on 1 May 2011 at 10:24