Image Processing Reference
In-Depth Information
The first quadrant contains the four points in the upper left corner and the third quadrant
contains the four points in the upper right. If the average of the points in any quadrant
differs in sign from the average in any other quadrant, then there must be a zero-crossing
at the centre point. In zerox , Code 4.16 , the average intensity in each quadrant is then
evaluated, giving four values and int0 , int1 , int2 , and int3 . If the maximum value
of these points is positive, and the minimum value is negative, then there must be a zero-
crossing within the neighbourhood. If one exists, then the output image at that point is
marked as white, otherwise it is set to black.
newpic zero(pic)
for x 1..cols(pic)-2
for y 1..rows(pic)-2
zerox(pic):=
x
y
int
pic
0
y1,x1
x1=x-1
y1=y-1
x
y+1
int
pic
1
y1,x1
x1=x-1
y1=y
x+1
y
int
pic
2
y1,x1
x1=x
y1=y-1
x+1
y+1
Σ Σ
maxval max(int)
minval min(int)
newpic y,x
int
pic
3
y1,x1
x1=x
y1=y
255 if (maxval>0)·(minval<0)
newpic
Code 4.15
Zero-crossing detector
The action of the Marr-Hildreth operator is given in Figure 4.28 , applied to the face
image in Figure 4.21 (a). The output of the LoG operator is hard to interpret visually and
is not shown here (remember that it is the zero-crossings which mark the edge points and
it is hard to see them). The detected zero-crossings (for a 3 × 3 neighbourhood) are shown
in Figures 4.28 (b) and (c) for LoG operators of size and variance 11 × 11 with σ = 0.8 and
15 × 15 with σ = 1.8, respectively. These show that the selection of window size and
variance can be used to provide edges at differing scales. Some of the smaller regions in
Figure 4.28 (b) join to form larger regions in Figure 4.28 (c). Note that one virtue of the
Marr-Hildreth operator is its ability to provide closed edge borders which the Canny
operator cannot. Another virtue is that it avoids the recursion associated with hysteresis
thresholding that can require a massive stack size for large images.
The Fourier transform of a LoG operator is shown in Figure 4.29 , in relief in Figure
4.29 (a) and as a contour plot in Figure 4.29 (b). The transform is circular-symmetric, as
expected. Since the transform reveals that the LoG operator emits low and high frequencies
(those close to the origin, and those far away from the origin) it is equivalent to a band-pass
filter . Choice of the value of σ controls the spread of the operator in the spatial domain and
the 'width' of the band in the frequency domain: setting σ
to a high value gives
Search WWH ::




Custom Search