CSC566-assignment 1-Dec2020 - Image Processing
CSC566-assignment 1-Dec2020 - Image Processing
ASSIGNMENT 1
Student Id : 2020980517
INSTRUCTIONS
QUESTION 1
Implement the histogram equalization to the input images Q1_1_1 and Q1_1_2; submit
your code and the output images.
QUESTION 2
Reduce the salt-and-pepper noise; submit your code and the output image. The input
image is Q2_1
QUESTION 3
Multiply an image by itself. Converts the class of image from unit8 to unit16 before the
multiplication process. Submit your code and the output image. The input image
is Q3_1
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020
ANSWER
QUESTION 1
Input Image
Output Image
J = histeq(i);
imhist(J);
figure, imshow(J);
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020
Input Image
Output Image
J1 = histeq(I);
imhist(J1);
figure, imshow(J1);
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020
ANSWER
QUESTION 2
Input Image
Output Image
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020
Source Code I = imread('Q2_1.tif');
K = medfilt2(J);
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020
ANSWER
QUESTION 3
Input
Image
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020
Output
Image
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020
Source i = imread('Q3_1.png');
Code RGB64 = double(i)/255;
RGB16 = uint16(round(RGB64*65535));
% image multiplication
J = immultiply(RGB16,1.2);
subplot(1,2,1), imshow(RGB16);
subplot(1,2,2), imshow(J);
J = imread('minaret.bmp');
RGB16 = rgb2gray(J);
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020
ROI = uint8(ROI);
K = immultiply(RGB16, ROI);
figure, imshow(K);
CSC566/Image Processing
Prepared by: Shafaf Ibrahim
December 2020