6. Write a matlab program to implement the filtering function by using the follo
ID: 3743100 • Letter: 6
Question
6. Write a matlab program to implement the filtering function by using the following kernels (30 pt.): Kernel 1 1/9 19 1/9 1/9 1/9 1/9 Kernel #2 1/9 1/9 1/9 1/9 419 1/9 1/9 1/9 1/9 Kernel #3 1/9 1/9 17/9-1/9 Raw image data is stored in imagedata.m. What types of filter are represented by these kernels, and why? Try these kernels on the image data with noise (stored in imagedata N.m) Note: DO NOT use the functions: conv, conv2, filter or filter2 precoded in matlab Consider using loops Some useful matlab functions you might need To load images, use load0 [e.g. load(imagedata')] To display images, use imagesco [e.g. imagesc(imagedata, [O 255])]Explanation / Answer
.The kernels are discussed as follows:
1) The first one is a box blur filter(average filter). A box blur (box linear filter) is a spatial domain linear filter in which each pixel in the resulting image has a value equal to the average value of its neighboring pixels in the input image. It is a form of low-pass ("blurring") filter.
2) The second filter is to highlight the corners and feature points in the image. It can also be called Laplacian filter. It helps to detect if a change in adjacent pixel values is an edge or a continuous progression
3) It is an outline filter. An outline kernel (also called an "edge" kernel) is used to highlight large differences in pixel values. A pixel next to neighbor pixels with close to the same intensity will appear black in the new image while one next to neighbor pixels that differ strongly will appear white.
MATLAB program to convolve with the above kernels:
A = double(A);
Hope it will be helpful. If you have any doubt, you can comment below.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.