Image Processing Reference
In-Depth Information
forms the first point of a line of edge points. The neighbours of the point are then searched
to determine whether or not they exceed the lower threshold, as in Figure 4.19 . Any
neighbour that exceeds the lower threshold is labelled as an edge point and its neighbours
are then searched to determine whether or not they exceed the lower threshold. In this
manner, the first edge point found (the one that exceeded the upper threshold) becomes a
seed point for a search. Its neighbours, in turn, become seed points if they exceed the lower
threshold, and so the search extends, along branches arising from neighbours that exceeded
the lower threshold. For each branch, the search terminates at points that have no neighbours
above the lower threshold.
seed
lower
seed
lower
seed
lower
seed
lower
seed
lower
seed
upper
seed
lower
seed
lower
seed
lower
Figure 4.19
Neighbourhood search for hysteresis thresholding
In implementation, hysteresis thresholding clearly requires recursion , since the length
of any branch is unknown. Having found the initial seed point, the seed point is set to white
and its neighbours are searched. The co-ordinates of each point are checked to see whether
it is within the picture size, according to the operator check, given in Code 4.11 .
check(xc, yc, pic):= 1 if(xc 1)·(xc cols(pic)-2)·(yc 1)·(yc rows(pic)-2)
0 otherwise
Code 4.11
Checking points are within an image
The neighbourhood (as in Figure 4.19 ) is then searched by a function connect (Code
4.12 ) which is fed with the non-maximum suppressed edge image, the co-ordinates of the
seed point whose connectivity is under analysis and the lower switching threshold. Each of
the neighbours is searched if its value exceeds the lower threshold, and the point has not
for x1 x-1..x+1
for y1 y-1..y+1
if (nedg y1,x1 low)·(nedg y1,x1 255)·
check(x1, y1, nedg)
nedg y1,x1
connect(x,y,nedg,low):=
255
nedg
connect(x1,y1,nedg,low)
nedg
Code 4.12 Connectivity analysis after seed point location
Search WWH ::




Custom Search