gram m ing
6.2.2 C o a stlin e M atch in g
One of the coasthne sequences is denoted as P (i), where i is a pixel counter in one sequence {0 < i < N , N is the number of pixels in the sequence
For each pixel, i, possible matched pixels Q{j) in the nadir coasthnes were confined within the range of a maximum deviation (± 3 pixels). This reduces the num ber of matching candidates and hence, reduces computation dramatically.
Let M( i ) be the num ber of the matching candidates of P{i). In other words, M( i ) is the number of nadir coasthne pixels which are located within the maximum deviation range around P{i). Then Q (j), 0 < j < M{i ), can be defined. In i —j plane, each i is regarded as the stage and each pair ( f (f), Q{j))
(denoted here by (t, j ) for clarity) is the node in the trehis diagram (See Figure
6.1). The cumulative cost for the node (%, j ) is defined as:
C[i,j] = M inimum{C[2 — 1, fc]-I-c[z — 1,& ; i,y]}, 0 < k < M { i — l), (6.1) where c[z — 1, fc ; i,j] is the instant cost between nodes (i — 1, ^) and (i,y).
In this equation:
• the costs of ( i , j ) are calculated with all nodes at the previous stage, i — 1,
• the cost of each previous stage node is added to its accumulated cost, • the path from the previous stage node with minimum accumulated cost
is selected, and all other paths are discarded.
This is the local optimisation scheme used in the dynamic programming algo rithm . The instant cost is based on the difference between translation of the
6 .2 Co a s t l i n e Ma t c h i n g Us i n g Dy n a m i c Pr o g r a m m i n g 97
previous stage node, (i — l,fc) and th at of the current node, (%, j):
c [ i - l , k ] i , j ] = f [ i ~ l , k ; i , j ] , (6.2) and
/ [ / ,m ; r ,5] = { ( z ( Q ,y (f))-(z (7n ),y (m ))} -{ (a ;(r),y (r))-(æ (a ),y (^ ))} (6.3) where æ() and y() are ( x, y) coordinates in the nadir (for m and s) and the forward (for I and r) image domains.
A problem arises when the previous node is not properly matched, i.e.,
the detected coastline features in two images do not provide one-to-one corre spondence. The problem of non-matched features is solved by allocating one fictitious node to each stage w ith a fixed cost, c/iaj. The fixed cost is the toler ance of elastic matching and it is also accumulated with previous accumulated costs. A fixed cost of 1.2 was selected. This allows 1 pixel of elastic distortion.
In case th at the previous node is fictitious, the cost is calculated with a real node by tracing the path backward. Equation 6.2 is, therefore, re-written as:
c [ i - l , k ] i , j ] = (6.4)
when the nodes at stages ..., m -f l are fictitious. The node (m, I) is on the surviving path connected to the node (i — 1, A). Each node {i , j ) stores the node on the previous stage R{ i , j ) = (% —1, ^ t-i) from which the surviving path emerged. This enables back-tracing of the surviving path through non-matched nodes. Therefore, R{i — l , k ) = (i —2, fci_2), i?(z — 2, ^£-2) = (i — 3, fct-s), •••,
R {m + l,km +i) = {m ,l).
In contrast to Matre and Wu, the tolerance of elastic distortion was not increased as a path with successive fictitious nodes was lengthened, because: (a) the nadir and forward images were pre-corrected initially and are closely matched, (b) occlusions due to clouds occur in similar positions in the nadir and the forward coastlines. These two reasons ensure th a t the fixed tolerance finds correct matches after th e non-matched instance. The use of increasing tolerance allows wrong m atches to survive. Coastlines with length shorter than 50 pixels were excluded as they were regarded as being too short for global optimisation by the dynamic programming algorithm.
6 .2 Co a s t l i n e Ma t c h i n g Us in g Dy n a m i c Pr o g r a m m i n g 98
According to Equation 6.2, a num ber of small and one directional devi ations can result in sequential false matchings. This problem is illustrated in Figure 6.4. (a) 1 2 3 4 5 (b) 1 (c)
Figure 6.4: Problem of sequential false matchings.
In matching the sequences (a) and (b) in Figure 6,4, the instant cost of every stage from 1 to 5 is unity according to Equation 6.2. A forward image can show a distorted coastline such as the sequence (b) which corresponds to the same, but straight coastline such as the sequence (a) in a nadir image due to the undesirable artifact of the nearest neighbour resampling for the pre correction of ATSR images. The matching between the sequences (a) and (b) should, therefore, be chosen as a true matching. The sequence (c) in Figure 6.4 deviates continuously from the sequence (a). According to Equation 6.2, however, the instant cost profile of the matching of the sequences (a) and (c) is exactly same as th a t of the matching of the sequences (a) and (b). The matching of the sequences (a) and (c) can be seen visually to be a false matching.
In order to distinguish these two cases, a momentum term was added to Equation 6.2:
c [ i - l , k ; i , j ] = ^ { f [ m , l ; i , j ] + ^ / [ « A I (6-5)
n = t - 2
where R{i — 1, &) = (i — 2, R{i — 2 ,/s,_2) = (i — 3 , and so on. According to the modified equation, the instant cost profile for the (a) and (b) matching is (1, 0.5, 1, 0.5) while th at of the (a) and (c) matching is (1, 1.5, 2, 2.5). This modification for the instant cost calculation can eliminate the false matching caused by the small and one directional deviation.
6 .3 Re s u l t s a n d Di s c u s s i o n 99
The overall flow diagram of the algorithm is shown in Figure 6.5, and the cost calculation module algorithm is illustrated in Figure 6.6.
i= N i—i+1
cost calculation
P(i), i=0
C[ iJ]= M in{ C [i-l,k]+ c[i-l,k,i,jJ}
0<k<M (i-l)
P[iJJ= k*
next sequence
Figure 6.5: Overall flow diagram of the coastline matching algorithm.
6.3
R esu lts and D iscu ssion
Figure 5.10 in Chapter 5 was used as a test image for the proposed dynamic programming matching algorithm. Figure 6.7 shows the coastline images de tected by the algorithm described in 5.2. Figure 6.8 shows the nadir and forward coastlines which were m atched by the proposed dynamic program ming algorithm. As shown in Figure 6.8, this algorithm m atched a much larger number of and inter-connected coastline pixels than the binary cross correlation matching techniques in Section 5.3.
The performance of the fine co-location using the dynamic programming algorithm was also assessed numerically by the Adaptive Least Squares Corre-
6 .3 Re s u l t s a n d Di s c u s s i o n 100 hj m<0 k= M (i-l) (m,l)= fictitious k= k+ l m = i-l, l=k c [i-l,k ; i j ] = c l=R(m,l) m = m -l c [i-l,k ; i,j] = f[m ,l iJ]
Figure 6.6: Cost calculation module in the coastline matching algorithm.