Page 76 -
P. 76
50 Chapter 2 ■ Edge-Detection Techniques
where the result is now normalized, as well. To convolve an image with this
filter, recursive filtering in the x direction is done first, giving r[i,j]:
1 − b
y 1 [i, j] = I[i, j] + by 1 [i, j − 1], j = 1 ... N, i = 1 ... M
1 + b
1 − b
y 2 [i, j] = b I[i, j] + by 1 [i, j + 1], j = N ... 1, i = 1 ... M
1 + b
r[i, j] = y 1 [i, j] + y 2 [i, j + 1] (EQ 2.29)
with the boundary conditions:
I[i,0] = 0
y 1 [i,0] = 0
y 2 [i, M + 1] = 0 (EQ 2.30)
Then filtering is done in the y direction, operating on r[i,j] to give the final
output of the filter, y[i,j]:
1 − b
y 1 [i, j] = I[i, j] + by 1 [i − 1, j], i = 1 ... M, j = 1 ... N
1 + b
1 − b
y 2 [i, j] = b I[i, j] + by 1 [i + 1, j], i = N ... 1, j = 1 ... N
1 + b
y[i, j] = y 1 [i, j] + y 2 [i + 1, j] (EQ 2.31)
with the boundary conditions:
I[0, j] = 0
y 1 [0, j] = 0
y 2 [N + 1, j] = 0 (EQ 2.32)
The use of recursive filtering speeds up the convolution greatly. In the ISEF
implementation at the end of the chapter the filtering is performed by the
function ISEF, which calls ISEF_vert to filter the rows (Equation 2.29) and
ISEF_horiz to filter the columns (Equation 2.31). The value of b is a parameter
to the filter, and is specified by the user.
All the work to this point simply computes the filtered image. Edges are
located in this image by finding zero crossings of the Laplacian, a process
similar to that undertaken in the Marr-Hildreth algorithm. An approximation
to the Laplacian can be obtained quickly by simply subtracting the original
image from the smoothed image. That is, if the filtered image is S and the
original is I, we have:
1
2
S[i, j] − I[i, j] ≈ I[i, j] ∗∇ f(i, j) (EQ 2.33)
4a 2