Write a MATLAB code to do the following: a. Read 'coins.png' image and save it in an 'img' variable. b. Add salt and pepper noise into the 'coins.png' image of amount 0.02 and save it in a noisy_img. c. Apply a 3 * 3 median filter into the noisy_img and display the output. d. Apply a 5 * 5 average filter with replicate border into the noisy_img, and display the output. e. Create a mask that extracts any coin in the image 'coins.png' using AND logical operations. Use ginput function to get the coordinate of any coin by the mouse cursor and display the output. f. Convert 'coins.png' image into binary using threshold (0, 4) then count the number of coins in the image and display the output
Write a MATLAB code to do the following:
a. Read 'coins.png' image and save it in an 'img' variable.
b. Add salt and pepper noise into the 'coins.png' image of amount 0.02 and save it in a noisy_img.
c. Apply a 3 * 3 median filter into the noisy_img and display the output.
d. Apply a 5 * 5 average filter with replicate border into the noisy_img, and display the output.
e. Create a mask that extracts any coin in the image 'coins.png' using AND logical operations. Use ginput function to get the coordinate of any coin by the mouse cursor and display the output.
f. Convert 'coins.png' image into binary using threshold (0, 4) then count the number of coins in the image and display the output
Unlock instant AI solutions
Tap the button
to generate a solution