Implementation of Image Sharpening and Smoothing Using Filters
Implementation of Image Sharpening and Smoothing Using Filters
Implementation of Image Sharpening and Smoothing Using Filters
ISSN: 2395-3470
www.ijseas.com
1. Introduction
A digital image is an image f(x,y) that has been
discretized both in spatial coordinates and brightness.
The elements of such a digital array are called image
elements or pixels. A simple image model: To be
suitable for computer processing, an image f(x,y)
must be digitalized both spatially and in amplitude.
Digitization of the spatial coordinates (x,y) is called Figure 1: Fundamental steps in Digital image
image sampling. Amplitude digitization is called processing
gray-level quantization.
7
International Journal of Scientific Engineering and Applied Science (IJSEAS) – Volume-2, Issue-1, January 2016
ISSN: 2395-3470
www.ijseas.com
Example 1
8
International Journal of Scientific Engineering and Applied Science (IJSEAS) – Volume-2, Issue-1, January 2016
ISSN: 2395-3470
www.ijseas.com
function -6
-8
.
Let’s consider a simple 1 dimensional example
Figure6: 1st derivate
9
International Journal of Scientific Engineering and Applied Science (IJSEAS) – Volume-2, Issue-1, January 2016
ISSN: 2395-3470
www.ijseas.com
8
7 We can easily build a filter based on this
6
5
4
3
2
1
0
∂2 f
= f ( x + 1, y) + f ( x − 1, y) − 2 f ( x, y)
∂2x
Original - Laplacian =
and in the y direction as follows:
Sharpened image
∂2 f
= f ( x, y + 1) + f ( x, y − 1) − 2 f ( x, y)
∂2 y The key point in the effective sharpening process lies
in the choice of the high-pass filtering operation.
Traditionally, linear filters have been used to
So, the Laplacian can be given as follows:
implement the high-pass filter, however, linear
∇ 2 f = [ f ( x + 1, y ) + f ( x − 1, y ) + f ( x, y + 1) + f ( x, y − 1)]− 4 f ( x, y ) techniques can lead to unacceptable results if the
original image is corrupted with noise. A tradeoff
10
International Journal of Scientific Engineering and Applied Science (IJSEAS) – Volume-2, Issue-1, January 2016
ISSN: 2395-3470
www.ijseas.com
between noise attenuation and edge highlighting can vectors. Thus the process described here can be
be obtained if a weighted median filter with applied to either gray-scale or color images, with the
appropriated weights is used. To illustrate this, only difference being that vector filters have to be
consider a WM filter applied to a gray-scale image used in sharpening color images whereas single-
where the following filter mask is used. component filters are used with gray-scale images.
Human perception is highly sensitive to edges and
fine details of an image, and since they are composed
primarily by high frequency components, the visual
quality of an image can be enormously degraded if
the high frequencies are attenuated or completed
removed. In contrast, enhancing the high-frequency
components of an image leads to an improvement in
the visual quality. Image sharpening refers to any
enhancement technique that highlights edges and fine
details in an image. Image sharpening is widely used
in printing and photographic industries for increasing
the local contrast and sharpening the images.
11
International Journal of Scientific Engineering and Applied Science (IJSEAS) – Volume-2, Issue-1, January 2016
ISSN: 2395-3470
www.ijseas.com
structure shown in Figure 8 must be modified such image are filtered by the same WM filter, the
that positive-slope edges as well as negative-slope positive-slope edges and negative-slopes edges are
edges are highlighted in the same proportion. sharpened in the same way.
equation -----2
With M equal to the maximum pixel value of the
original image. This prefiltering operation can be Figure 12: Sharpening filter re-defined as eight edge
thought of as a flipping and a shifting operation of directional kernels
the values of the original image such that the
negative-slope edges are converted in positive-slope
edges. Since the original image and the pre-filtered
12
International Journal of Scientific Engineering and Applied Science (IJSEAS) – Volume-2, Issue-1, January 2016
ISSN: 2395-3470
www.ijseas.com
RESULTS
4. Conclusions
13
International Journal of Scientific Engineering and Applied Science (IJSEAS) – Volume-2, Issue-1, January 2016
ISSN: 2395-3470
www.ijseas.com
14