Example: Smoothing
Use the
centsmooth function to perform a convolution of the input image with the following smoothing kernel:
This kernel gives weight to the center pixel so retains image features.
For information on using this example, refer to
About Image Processing Examples.
1. Read in an image:
(pattern.bmp)
2. Add noise to the image:
(pattern_an.bmp)
3. Verify that blurring of the noisy image increases with every application of the centsmooth function:
| (pattern_an1.bmp) |
| (pattern_an2.bmp) |
| (pattern_an3.bmp) |
You can design and try your own smoothing filters using the
convolve function.