Professional Documents
Culture Documents
Assignments
Assignments
� 0 1 2 3 4 5 6 7
�� 2 3 10 10 15 25 20 15
I 0 1 2 3 4 5 6 7
ni 20 20 20 10 15 10 0 5
Table 2
I 0 1 2 3 4 5 6 7
ni 0 5 5 20 15 20 20 15
3) Write a matlab code to read your image. Find its gray histogram.
4) Write a matlab code to read your image add salt and pepper noise of
different intensity. Apply mean filters of size 3x3, 5x5 and 7x7 on the
noisy image and comment on the result. Apply median filter on the noisy
image and comment on your result.
%SOUMILI SAHA (1804061)
A = imread('image2.jpg');
figure(1)
image(A)
title('input image SOUMILI SAHA(1804061)')
I = rgb2gray(A);
figure(2)
imshow(I)
title('grayscale image SOUMILI SAHA(1804061)')
2) Explain in detail about different types of data redundancies in digital image compression.
Build a set of code words, average code length and efficiency of code word using Huffman
coding scheme to transmit the message DEBUGGING. Write the code for BUG and explain its
decoding process. If each symbol needs 8 bit for complete representation without
Huffman coding, then what will be the compression ratio and redundancy achieved after
using Huffman coding to represent the symbols in transmitting the message.
4)Compare different edge detection techniques used for image Segmentation. (Gradient and
Laplacian based operators)