|
The direction in which the fringe is to be traced is determined as follows. The sum of the intensities in each of the eight directions are computed and the two sequences of numbers along which the minima occur are searched. The directions producing the minimum intensity sums are accepted as the directions within a fringe band. One of these is the previous direction already identified. Hence the new direction is the one along which the fringe curve has to be extended. In practice the two intensity sums may not be identical since the average intensity level of the image is not constant. Any given pixel will be connected to two neighboring pixels in a thinned image. Hence the past direction of moment has to be preserved to decide the future connections points. Because of residual noise present in the image, it is likely that a pixel may show two new directions in the addition to its last moment. In such a case the sum of intensities that is closer to the previous directions is ignored and the other direction is accepted for the next movement.
The above algorithm can produce loops if precautions are not taken. If a fringe is in the forward tracing mode and the special turning case is not supplied, the fringe is forced to move in the specified direction of (1,2,3,7 and 8) and not (4,5 and 6) the backward direction (fig.4.19). Similarly in backward tracing, the direction (1,2 and 8) is not allowed. If one of the direction that is not permissible during forward tracing is encountered as the final direction of movement, a loop-like structure is formed. Tracing may not be completed in some cases. In Funnell’s algorithm [86], user intervention is suggested to circumvent the difficulty. In the present work, the ambiguity is resolved by an iterative procedure as described below.
To avoid the formation of loops the nearest forward direction is found iteractively as follows. Once a reverse direction of movement is encountered, the nearest possible direction is adopted in its place. For example, if the direction of movement is 4 while the tracing is in forward direction, the direction nearest to 4 is 3. Similarly 7 can be replaced by 6. If the direction found is 5, then both 3 and 7 are equally likely. In such a case, the unbiased estimate to 5 is direction 1.
Reallottment of a direction as described above may result in a wrong movement. For example, the direction of movement identified may be one of the previously detected points on the thinned image. In such a case the above steps are repeated and the next closests direction is searched. If the new pixel located falls in one of the four special cases for turning, the image is rotated by 90 degrees in the clockwise direction. Then depending on one of the four cases, one may have to move temporarily in forward of backward directions. During implementation, the code is prepared in a modular fashion to trace forward (to the right) and backward fringes. Rotation of the image enables one of the modules to be used without any change in the market areas of the fringes.
|