559
|
1 function imshow(a1,a2,a3) |
904
|
2 |
|
3 # Display images. |
559
|
4 # |
904
|
5 # imshow(X) displays an indexed image using the current colormap. |
559
|
6 # |
904
|
7 # imshow(X,map) displays an indexed image using the specified colormap. |
559
|
8 # |
904
|
9 # imshow(I,n) displays a gray scale intensity image. |
559
|
10 # |
904
|
11 # imshow(R,G,B) displays an RGB image. |
|
12 # |
|
13 # SEE ALSO: image, imagesc, colormap, gray2ind, rgb2ind. |
559
|
14 |
904
|
15 # Author: |
|
16 # Tony Richardson |
|
17 # amr@mpl.ucsd.edu |
|
18 # July 1994 |
559
|
19 |
|
20 if (nargin == 0) |
904
|
21 usage ("imshow requires at least one argument."); |
559
|
22 elseif(nargin == 2) |
|
23 if(length(a2)==1) |
|
24 [a1 a2] = gray2ind(a1,a2); |
|
25 endif |
|
26 colormap(a2); |
|
27 elseif(nargin == 3) |
|
28 [a1 a2] = rgb2ind(a1,a2,a3); |
|
29 colormap(a2); |
|
30 endif |
|
31 |
|
32 image(a1); |
|
33 |
|
34 endfunction |