You are on page 1of 2

1.

Gray scale
-- uint8 [0 255], double [0 1], double [0 255]

Indexed
kX3 double [0 255] double
[0 1] k=

RGB
X3 -- uint8 [0 255], double [0 1], double [0 255]

Binary
-- logical [0 1],

2.
x=imread(cameraman.tif) ; jpg, tif, png, bmp
load woman

; save (*.mat)

filename='Lenna.bin';
par=[512,512];
fid=fopen(filename,'r');
x=fread(fid,par);
3.
imshow(x) - x= uint8 [0 255] double [0 1]
imshow(X,map) (X,map)=
imshow(x,[]) min0 max255
imshow(x,thr) thr= [0 1],
4.
imwrite(x,onoma.jpg) x=imread(onoma.jpg)
imwrite(X,map,onoma.tif) [X,map]=imread(onoma.tif)
uint8 double [0 1] y=im2double(x)
double [0 1] uint8 y=im2uint8(x)
double [0 1] double [0 255] 255
double [0 255] double [0 1] 255
uint8 double y=double(x)
double uint8 y=uint8(x)
5.

y=ind2gray(X,map)

[X,map]=rgb2ind(x)
y=ind2rgb(X,map)

You might also like