Mercurial > forge
changeset 11379:370e385e1edd octave-forge
medfilt2: call ordfiltn directly, not ordfilt2
author | carandraug |
---|---|
date | Sun, 13 Jan 2013 23:59:37 +0000 |
parents | dcde9f1576d4 |
children | 68c8a8c33567 |
files | main/image/inst/medfilt2.m |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/main/image/inst/medfilt2.m Sun Jan 13 23:39:54 2013 +0000 +++ b/main/image/inst/medfilt2.m Sun Jan 13 23:59:37 2013 +0000 @@ -84,6 +84,8 @@ endif endfor + ## TODO this should probably be implemented as an option of + ## __spatial_filtering__ where median() cold be called directly n = nnz (domain); if ((n - 2*floor(n/2)) == 0) % n even - more work nth = floor (n/2); @@ -92,7 +94,7 @@ retval = a./2 + b./2; # split into two divisions to avoid overflow on integer data else nth = floor (n/2) + 1; - retval = ordfilt2 (A, nth, domain, padding); + retval = ordfiltn (A, nth, domain, padding); endif endfunction