From: Josep i T. <jm...@pu...> - 2004-07-29 17:06:04
|
On dj, 2004-07-29 at 02:10, Paul Kienzle wrote: > Okay, added. > I'm surprised you couldn't use filter2(...,'same') to trim the > array automatically. I'm not saying it will work (I didn't look > closely at the program logic), but I thought this would be > a primary example of where 'same' would be used. You are right. This is becuase of my inexperience with Octave. I was experimenting on filters with even size (where to set central pixel in those to be compatible with MATLAB?). Cutting borders myself let me use both floor((size(SE)+1)/2) and ceil((size(SE)+1)/2). But just using 'same' gives the same results as the version I sent yesterday. And if someone tries it on MATLAB and it behaves differently, perhaps we can just pad the filter with 0 properly. It's cleaner. I attach a patch[1] using your suggestion. Regards, [1] Created by command "cvs diff -u main/image/dilate.m main/image/erode.m" -- Josep Monés i Teixidor Clau GnuPG: gpg --recv-keys 80E85CC4 |