comparison scripts/image/imshow.m @ 559:4e826edfbc56

[project @ 1994-07-25 22:18:28 by jwe] Initial revision
author jwe
date Mon, 25 Jul 1994 22:19:05 +0000
parents
children 3470f1e25a79
comparison
equal deleted inserted replaced
558:faf108b99d21 559:4e826edfbc56
1 function imshow(a1,a2,a3)
2 #Display images.
3 #
4 #imshow(X) displays an indexed image using the current colormap.
5 #
6 #imshow(X,map) displays an indexed image using the specified colormap.
7 #
8 #imshow(I,n) displays a gray scale intensity image.
9 #
10 #imshow(R,G,B) displays an RGB image.
11 #
12 #SEE ALSO: image, imagesc, colormap, gray2ind, rgb2ind.
13
14 #Author:
15 # Tony Richardson
16 # amr@mpl.ucsd.edu
17 # July 1994
18
19 if (nargin == 0)
20 error("usage: imshow requires at least one argument.");
21 elseif(nargin == 2)
22 if(length(a2)==1)
23 [a1 a2] = gray2ind(a1,a2);
24 endif
25 colormap(a2);
26 elseif(nargin == 3)
27 [a1 a2] = rgb2ind(a1,a2,a3);
28 colormap(a2);
29 endif
30
31 image(a1);
32
33 endfunction