Mercurial > hg > octave-lojdl
changeset 6219:ba9db82d85a8
[project @ 2006-12-27 17:53:34 by jwe]
author | jwe |
---|---|
date | Wed, 27 Dec 2006 17:53:34 +0000 |
parents | c1b66b74937d |
children | 0c3537d2a844 |
files | scripts/ChangeLog scripts/image/imshow.m |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2006-12-27 Søren Hauberg <hauberg@gmail.com> + + * image/imshow.m: Strip NaNs from image. + 2006-12-08 David Bateman <dbateman@free.fr> * sparse/normest.m: New file.
--- a/scripts/image/imshow.m +++ b/scripts/image/imshow.m @@ -130,6 +130,13 @@ im = real (im); endif + nans = isnan (im(:)); + if (any (nans)) + warning ("Octave:imshow-NaN", + "imshow: pixel with NaN or NA values are set to zero"); + im(nans) = display_range(1); + endif + ## Scale the image to the interval [0, 1] according to display_range. if (! isindexed) low = display_range(1);