2
–1
–1
0
Figure 4.3 Template for first order difference
edge(pic):=
newpic
zero(pic)
for x0..
cols(pic)–2
for y0..
rows(pic)–2
newpic
y,x
2
.
pic
y,x
–pic
y,x+1
–pic
y+1,x
newpic
Code 4.1 First order edge detection
Uniform thresholding (Section 3.3.4) is often used to select the brightest points, following
application of an edge detection operator. The threshold level controls the number of selected
points; too high a level can select too few points, whereas too low a level can select too
much noise. Often, the threshold level is chosen by experience or by experiment, but it can be
determined automatically by considering edge data (Venkatesh and Rosin, 1995), or empirically
(Haddon, 1988). For the moment, let us concentrate on the development of edge detection
operators, rather than on their application.
4.2.2 Analysis of the basic operators
Taylor series analysis reveals that differencing