You are on page 1of 4

FROM DEFAULT MATLAB IMAGES

load mandrill figure('color','k') image(X) colormap(map) axis off % Remove axis ticks and numbers axis image % Set aspect ratio to obtain square pixels

FROM A SAVED IMAGE


a=imread('images.jpg','jpg'); imshow(a)

RGB TO GRAY
clear A=imread('images.jpg'); imshow(A) b=rgb2gray(A); % Convert to gray scale figure,imshow(b)

RGB IMAGE TO BINARY IMAGE

a = imread('images.jpg'); BW = im2bw(a); imshow(a), figure, imshow(BW)

CHECKER BOARD
J = checkerboard(100,4,4); K = (J > 0.5); figure, imshow(K)

You might also like