Question
Load and visualize the image septagon.tif. (you can use any .tif file you want) (a) Add Gaussian noise with mean 0 and variance 10 to
Load and visualize the image septagon.tif. (you can use any .tif file you want)
(a) Add Gaussian noise with mean 0 and variance 10 to this image, and visualize the noisy image and its histogram using the following code: septagon = double(imread(septagon.tif)); noise = 10*randn(size(septagon)); septagonNoisy10 = septagon + noise; figure;imshow(septagonNoisy10/max(septagonNoisy10(:))) figure;histogram(septagonNoisy10) What do you observe?
(b) Choose an appropriate threshold T and segment the image using the following code: septagonSegmented = imbinarize(septagonNoisy10,T); figure;imshow(septagonSegmented) Have you managed to successfully segment the image?
(c) Repeat part (b) when the noise variance is 20. Can you successfully segment the image in this case? Is there any T value that will result in an acceptable segmentation performance?
(d) Denoise the image you have generated in part (c) before segmentation, using the following code: h = ones(3)/9; denoisedSeptagon = filter2(h,septagonNoisy20); figure;imshow(denoisedSeptagon/max(denoisedSeptagon(:))) figure;histogram(denoisedSeptagon) septagonSegmented = imbinarize(denoisedSeptagon,T); Have denoising resulted in better segmentation performance?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started