$24
◦ Solve the following problems using your own Matlab programs. Unless specified in the problem, do not use advanced MATLAB image editing commands such as imadjust, medfilt2, histeq, edge, etc... .
1) (50 points) 4_1.bmp is a clean image, please generate a noisy version of it by adding the salt-and-pepper noise, with 15% of the pixels being altered by the noise. Use two different filters to reduce the noise. Show the original image, the generated noisy image, and two denoised results. Compare and write your comments on these two denoised results.
Hint:
1. In adding the salt-and-pepper noise, pixels altered by the noise are randomly set to either black or white. For this problem, 50% of the altered pixels are set to black, and 50% of altered pixels are set to white.
2. You could use a low pass filter and a median filter.
3. You can use imread to read .bmp files. Other useful commands are median, conv2.
2) (50 points) Write a program to sharpen 4_2.bmp using a high boost filter. You can choose the scale factor by yourself.
Hint: 1. Useful MATLAB commands: rgb2hsv, hsv2rgb, and conv2.