IMP Activity 1
IMP Activity 1
IMP Activity 1
Image Processing
G Rithik Savio
ECE Department
311121106049
CEC366 – IMAGE PROCESSING ACTIVITY –I
III YEAR/V SEM ECE AY 2023-24
EXPERIENTIAL LEARNING
Outcomes :
CO1 - Know and understand the basics and fundamentals of digital image processing, such as digitization,
sampling, quantization, and 2D-transforms
CO2 - Operate on images using the techniques of smoothing, sharpening and enhancement. PO’s
mapped :
Note : Submissions beyond the Due date will not be considered for assessment
Criteria for Assessment Score
(10)
TOTAL SCORE
I. Using MATLAB or Python environment, experiment the following:
1. Select an RGB image of your choice
2. Separate the three color planes in an image and display them as gray scale images. 3. Combine
two planes at a time and comment on the results.
4. Convert the RGB image into HSI image space.
For each of the above cases, mention the transformation algorithm, MATLAB code,
corresponding output images and comment on the results.
1) RGB Image
Matlab Code :-
parrot = imread("parrot.png")
%Seperation of 3 channels
[R,G,B] = imsplit(parrot)
figure
subplot(3,1,1)
imshow(R)
subplot(3,1,2)
imshow(G)
subplot(3,1,3)
imshow(B)
% Combination of 2 channels
Output:-
Original Image
i) Image Splitting :-
Observations:-
Green Channel Image 3) similarly we have the outputs of all the other
dimensions or channels .
ii) Combination of 2 channels
Observations:-
Observations:-
Original Image
Matlab Code :-
strawberrylowcon = imread("strawberry.jpg")
%Negative Transformation
strawberrylowconneg = 255 - strawberrylowcon
%log transformation
r = double(strawberrylowcon);
c = 1;
s = c*(log(1+r));
t = 255/(c*log(256));
strawberrylowconlog = uint8(t*s);
figure
subplot(1,3,1)
imshow(strawberrylowcon)
subplot(1,3,2:3)
imshow(strawberrylowconneg)
figure
subplot(1,3,1)
imshow(strawberrylowcon)
subplot(1,3,2:3)
imshow(strawberrylowconlog)
figure
subplot(1,3,1)
imshow(strawberrylowcon)
subplot(1,3,2:3)
imshow(strawberrylowconpower)
i) Negative Transformation of an Image
Observations:-
1) The given Negative Image is simply produced, by subtracting the image from 255 (the highest Intensity
value )
2) The negative of the image is said so due to the appearance the brightest pixel in the original image,
converted to the darkest pixel in the Negative image, (vice versa )
Observations:-
1) In the given input image , we firstly convert the image
into the double values and then apply it to formula of
s = (c*(log(1+r)), and then we simply multiply the
normalized value of T, and we get the output.
Observations:-
1) In the given input image , we firstly convert the image into the double values and then apply it to
formula of s = (r*G), where G is said to be the power factor, and then we simply multiply the normalized
value of T, and we get the output.
2) The exponential and `raise to power' operators are two anamorphosis operators which can be applied
to grayscale images. Like the logarithmic transform, they are used to change the dynamic range of an
image. However, in contrast to the logarithmic operator, they enhance high intensity pixel values.
Thank You