Image Processing Reference
In-Depth Information
Fig. 5.18 Left :Kernelsfor
approximating the second
order derivatives. Right :
Laplacian kernel
edges in an image. If we could somehow make the edges steeper the difference
between object and background would be even more profound and hence the image
sharper to look at. A way of doing this is shown in Fig. 5.17 (a). The first figure shows
the pixel values of an image row. x denotes the position in the row and f(x) is the
gray-level value. The next figure shows the gradient value, or the first derivative
f (x) ,of f(x) . The third figure is the second order derivative of f(x) , denoted
f (x) . It expresses the gradient of the gradient. What we can see is that g(x) =
f(x)
f (x) does exactly what we are interested in, namely to make the edges
steeper. The constant c can be used to weight the amount of sharpness that is desired.
For an image the second order derivatives can be approximated as
c
·
g xx (x, y) f(x
1 ,y)
2
· f(x,y) + f(x +
1 ,y)
(5.13)
g yy (x, y) f(x,y
1 )
2
· f(x,y) + f(x,y +
1 )
(5.14)
where g xx (x, y) and g yy (x, y) are the second order derivatives in the x- and y-
direction, respectively. These two expressions can easily be expressed as kernels,
see Fig. 5.18 , and correlated with the image. However, instead of correlating with
both kernels and combining the results, we can combine them into the joint kernel,
h(x,y) , and only do one correlation. This joint kernel is denoted the Laplacian
kernel and shown below. Mathematically this image sharpening method is expressed
as follows and illustrated in Fig. 5.17 (b):
g(x,y) = f(x,y) c f(x,y) h(x,y)
(5.15)
where c is a constant and h(x,y) is the Laplacian kernel. Note that for both Eqs. 5.12
and 5.15 an implementation needs to make sure the output image is mapped to
[
]
0 , 255
. This can be done by the method in Sect. 4.6.
5.3
Further Information
Correlation is related to the term convolution and both are used throughout the video
and image processing literature. Convolution only differs by the way the kernel is
applied to the image beneath it. Mathematically convolution is defined as:
R
R
g(x,y)
=
h(i, j )
·
f(x
i, y
j)
(5.16)
j
=−
R
i
=−
R
Search WWH ::

Custom Search