Digital Image Processing - Assignment No 2: Problem No. 1: (CLO 2, C-5)
Digital Image Processing - Assignment No 2: Problem No. 1: (CLO 2, C-5)
Code:
Output:
Answer:
Larger the mask we use, the more noise reduction we obtain and it also increases
the blur effect on the edges of the image. So, 3*3 mask is better than 2*2 mask to reduce
noise reduction. It reduces more noise than 2*2 masks and gives clear visibility but it also
increases the blurring effect on the edges as compare to small mask i.e. (2*2) as shown
on the above figure.
b) "Sharpen" the 3x3 blurred image by convolving with the Laplacian mask
Display and submit. Does this operation reduce the blurring? What about the
original noise? You might need to rescale this image after convolving to make the
effect more visible and to make the contrast more pleasing.
Code:
Output:
Answer:
Laplacian filter is applied to emphasis the edges in the image. When we apply
composite Laplacian filter to sharpen the image it increases the noise as well as it blurs
the image.
So, that we have to rescale the image for better visibility. Thus, rescaled image shows
better visual and also reduces the blurring effect than the original filtered image.
c) Apply a second sharpening step as in (b). Display and submit. Would repeated
sharpening help image interpretation? Again, rescaling will be needed to see the
effect
Code:
Output:
Answer:
No, repeated sharpening increases the blurring effect as well as noise on the image. And
also rescaling of repeated sharpen image has no effect on the image. It remains same.
Code:
Output:
Problem No. 3: [CLO 2, C-5]
Intensity level reduction:
b) Write a computer program capable of reducing the number of intensity levels in an
image from 256 to 2, in integer powers of 2. The desired number of intensity levels
needs to be a variable input to your program.
Code:
Output: