Mercurial > hg > octave-max
changeset 14253:f9bd63f5ddd0
contrast.m: Improve demo.
* contrast.m: Improve demo.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 22 Jan 2012 22:22:49 -0800 |
parents | 4e6436a60b62 |
children | 73086d4b64fa |
files | scripts/image/contrast.m |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/image/contrast.m +++ b/scripts/image/contrast.m @@ -50,11 +50,14 @@ %!demo %! clf; %! img = reshape (1:100, 10, 10); -%! image (img); -%! colormap (gray (10)); -%! title ("Image with default 256 gray levels"); -%! input ("Press <enter> to continue: ", "s"); -%! colormap (contrast (img)); +%! imagesc (img); +%! colormap (gray (64)); +%! title ("Image with default 64 gray levels"); +%! pos = get (gcf, "position"); +%! pos(1) += pos(3) + 15; +%! figure ("position", pos); +%! colormap (contrast (img, 10)); +%! imagesc (img); %! title ("Image with contrast enhanced"); %!assert (contrast (1:100,10), [([0:9]/9)',([0:9]/9)',([0:9]/9)'], 1e-10)