Skip to content

Commit

Permalink
imconvcoltri: fixed a bug causing the output to be slightly disaligned
Browse files Browse the repository at this point in the history
  • Loading branch information
vedaldi committed Aug 21, 2008
1 parent 701946c commit 6a145d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions toolbox/test/test_imsmooth.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,12 @@ function testmany(I,ker,step)
I2 = imsmooth(I,sigma,'kernel',ker,'padding','zero', 'verbose','subsample',step) ;
I3 = imsmooth(I,sigma,'kernel',ker,'padding','continuity','verbose','subsample',step) ;

function [I1,I2]=triang(I,sigma)
I1 = I ;
I2 = imsmooth(I,sigma,'verbose') ;

function compare(n,I1,I2,I3,tit)
figure(n) ; clf ; colormap gray ;
subplot(1,3,1) ; axis equal ; imagesc(icut(I1)) ; axis off ;
title('Matlab') ;
subplot(1,3,2) ; axis equal ; imagesc(icut(I2)) ; axis off ;
title('imsmooth zeropad') ;
title('Matlab zeropad') ;
subplot(1,3,2) ; axis equal ; imagesc(abs(I1-I2)) ; axis off ;
title('matlab - imsmooth') ;
subplot(1,3,3) ; axis equal ; imagesc(icut(I3)) ; axis off ;
title('imsmooth contpad') ;
set(n,'name',tit) ;
Expand Down
2 changes: 1 addition & 1 deletion vl/imopv.tc
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ VL_IMCONVCOLTRI (FLT* dst, int dst_stride,
int stride = transp ? 1 : dst_stride ;
dst += dheight * stride ;
for (y = step * (dheight - 1) ; y >= 0 ; y -= step) {
*dst = scale * (buff [y] - buff [y - filt_size]) ;
dst -= stride ;
*dst = scale * (buff [y] - buff [y - filt_size]) ;
}
}
x += 1 ;
Expand Down

0 comments on commit 6a145d3

Please sign in to comment.