Lab 3 - 2
Lab 3 - 2
Lab 3 - 2
Fourier transformation belongs to a class of digital image processing algorithms that can be
utilized to transform a digital image into the frequency domain. After an image is transformed
and described as a series of spatial frequencies, a variety of filtering algorithms can then be
easily computed and applied, followed by retransformation of the filtered image back to the
spatial domain. Filtering in image processing is a process that cleans up appearances and allows
for selective highlighting of specific information. Filtering an Image is useful for many
applications, including smoothing, sharpening, removing noise, and edge detection. A filter is
defined by a kernel, which is a small array applied to each pixel and its neighbors within an
image.
Exercises:
1. Histogram equalization
1.1 Consider the image square.tif. Use both global histogram equalization and local
histogram equalization (computed over 3 x 3, 5x5 and 7x7 localizing windows) and
generate the results. Discuss the effects of window size. See MATLAB function histeq.
1.2 For the images ‘Lake.jpg’, equalize the R, G and B images separately as previously and
convert the images back to jpg format. Comments.
2. Fourier Transform
Consider generating a 256*256 image with the middle part a rectangular mask of dimension mn
(similar to the one presented on pp. 268 of Gonzalez and Woods, 3rd Edition) and do the
followings in Matlab:
3. Filtering
3.1 Implement the median filter on the T1 weighted Magnetic Resonance image first
randomly pick 4000 pixels and set their values to zero to obtain a pepper noise
corrupted image. Then apply the median filter with W = 3, i.e. 3x3 median filter. Use
5*5, 7*7 filters to improve the result. Try simple averaging filter of same size as the
median filter and compare the results. Comments
3.2 Taking notably the images ‘cell’ and ‘fibers2’, Try smoothing, look at the Matlab
functions imfilter and fspecial, notably average and Gaussian. What happens as the filter
size increases?
3.3 Image sharpening: To counter-balance the effects of smoothing, try image sharpening.
Use Matlab functions using low-pass versions and Laplacian ones with ‘unsharp’ version
of fspecial. Comments.