Question 1: Method 1: Convert images to images with only 64 colours
A=imread('picture1.jpg');
B=floor(double(A)/64)*85;
imshow(B/255);
Picture1
Picture2
Question 1: Method 2: Convert images to images with only 64 colours
A=imread('picture1.jpg');
B=floor((double(A)+42)/85)*85;
imshow(B/256);
Picture1
Picture2
Question 2: Method 1: Convert images to images with only 27 colours
A=imread('picture1.jpg');
B=floor(double(A)/85)*128;
imshow(B/256);
Picture1
Question 2: Method 2: Convert images to images with only 27 colours
A=imread('picture1.jpg');
B=floor((double(A)+64)/128)*128;
imshow(B/256);
Picture1
Picture2
Question 3: Convert images to greyscale images
A=imread('picture1.jpg');
B=(A(:,:,1)+A(:,:,2)+A(:,:,3))/3;
imshow(B);
Question 4: Greyscale image with only 64 intensity values
A=imread('picture1.jpg');
B=(A(:,:,1)+A(:,:,2)+A(:,:,3))/3;
C=floor(B/4)*4;
imshow(C);
C=floor(B/4)*4;
imshow(C);
Question 5: Greyscale image with only 16 intensity values
A=imread('picture1.jpg');
B=(A(:,:,1)+A(:,:,2)+A(:,:,3))/3;
CC=floor(B/16)*16;
imshow(CC);
No comments:
Post a Comment