53
Image Filtering, Enhancement, and Restoration
3.3.3 SHARPENING SPATIAL FILTERS
Sharpening filters are used to extract and highlight fine details from an image and
also to enhance some blurred details. A typical usage of such filters is deblurring
of an image to provide sharper and more visible edge information. There are many
applications for sharpening filters including medical imaging, electronic printing,
industrial inspection, and autonomous guidance in military systems.
There are three important types of sharpening filters: high-pass filters, high-boost
filters, and derivative filters.
3.3.3.1 High-Pass Filters
As in linear low-pass filters, the masks used for high-pass filtering are nothing but the truncated approximations of the space-domain representation of the
typical ideal high-pass filters. As such, in high-pass filters the shape of impulse
response should have (+) coefficients near its center and (−) coefficients in the outer
periphery.
Example 3.8
Figure 3.15 shows an example of a high-pass filter. As can be seen, the central
value of the box is positive and the peripheral values are negative.
As in linear low-pass filters, while this set of numbers might form the most
popular high-pass mask, there is nothing special about these specific numbers,
and similar high-pass masks with different set of numbers can be defined as
long as the general rule of “positive in center and negative in peripherals” is
observed.
Next, we discuss the implementation of this filter mask in MATLAB.
Example 3.9
As shown in the following code, we first define matrix H as the mask defined in
Figure 3.15:
I=imread(‘med_image.jpg’);
I=rgb2gray(I);
H=(1/9)*[1 1 1; 1 −8 1; 1 1 1];
sharpened = imfilter(I,H);
imshow(I);
figure,
imshow(sharpened);
–1
–1
–1
(1/9)*
–1
8
–1
–1
–1
–1
FIGURE 3.15 Typical mask of linear high-pass spatial filter.
Image Filtering, Enhancement, and Restoration
3.3.3 SHARPENING SPATIAL FILTERS
Sharpening filters are used to extract and highlight fine details from an image and
also to enhance some blurred details. A typical usage of such filters is deblurring
of an image to provide sharper and more visible edge information. There are many
applications for sharpening filters including medical imaging, electronic printing,
industrial inspection, and autonomous guidance in military systems.
There are three important types of sharpening filters: high-pass filters, high-boost
filters, and derivative filters.
3.3.3.1 High-Pass Filters
As in linear low-pass filters, the masks used for high-pass filtering are nothing but the truncated approximations of the space-domain representation of the
typical ideal high-pass filters. As such, in high-pass filters the shape of impulse
response should have (+) coefficients near its center and (−) coefficients in the outer
periphery.
Example 3.8
Figure 3.15 shows an example of a high-pass filter. As can be seen, the central
value of the box is positive and the peripheral values are negative.
As in linear low-pass filters, while this set of numbers might form the most
popular high-pass mask, there is nothing special about these specific numbers,
and similar high-pass masks with different set of numbers can be defined as
long as the general rule of “positive in center and negative in peripherals” is
observed.
Next, we discuss the implementation of this filter mask in MATLAB.
Example 3.9
As shown in the following code, we first define matrix H as the mask defined in
Figure 3.15:
I=imread(‘med_image.jpg’);
I=rgb2gray(I);
H=(1/9)*[1 1 1; 1 −8 1; 1 1 1];
sharpened = imfilter(I,H);
imshow(I);
figure,
imshow(sharpened);
–1
–1
–1
(1/9)*
–1
8
–1
–1
–1
–1
FIGURE 3.15 Typical mask of linear high-pass spatial filter.
