USING MATLAB
Create a grayscale art image 1000px x 1000px using MATLAB. You must implement the use of grey scale. Be creative. You can earn up to 5 additional points.
1)
%-------------The program is to fade the image as it move from left
corner
%to right corner of the image. Left corner has 0 grayscale
value(black) and right
%corner has 1 gray scale value(white)
clc
clear all
close all
size=1000;
pic=[];
p=0;q=0;
for m=1:size
for n=1:size
pic(m,n)=sqrt(((m/1000-p)^2+(n/1000-q)^2)/2);
end
end
imshow(pic)
title('fading out grey scale image')
2)
clc
clear all
close all
pic=magic(1000); %It creates a magic square matrix with the range
of 1 to 2^n
imagesc(pic) %Scales the image data to the full range of current
colormap
colormap(gray(256)) % set the color to gray scale range of 0 to
255
axis equal %Equal axis in both x and y direction
Get Answers For Free
Most questions answered within 1 hours.