Mark R. Dobie and Paul H. Lewis 1
The extraction of curvilinear features from images is an important task in many image analysis applications. We describe an approach to such tasks based on the combination of an efficient optimal path finding algorithm and the use of window constrained search spaces. We conclude that the combination provides an effective vehicle for curvilinear feature extraction from a variety of images.
The work presented here is part of a project to extract vector representations of the paths of road and river networks from remotely sensed images for use in geographic information system(GIS) environments. Users of such environments often resort to digitising the required paths manually by selecting closely spaced points along the road or river; a labour intensive and error prone process.
Although various systems exist for assisting with automatic vectorisation, they are usually very expensive and still demand substantial user interaction. Our aim is to provide low cost software tools to assist with the rapid vectorisation of curvilinear features in a relatively low cost GIS workstation environment.
There are a wide range of approaches to the problem of curvilinear feature extraction depending on the type of images (noisy or clean, man-made or natural) and the type of features involved (broad or narrow, straight or twisting).
Although many domain dependent algorithms have been published to tackle these problems, it is often possible to pose the problem as one of finding a minimum cost path through a network. For example, the problem of finding a narrow dark line in a light image, given end points on the line, involves finding a path between the two points which minimises
where
is the image intensity at pixel position
and S is the set of pixels along the path.
If relatively straight features are to be extracted, the curvature along the path could be minimised simultaneously by adding a term of the form
where
is an estimate of the curvature of the path
at pixel position
and k is a constant which determines
the relative strength of the term.
If edges are to be extracted rather than lines, for example along the boundaries of a broad curvilinear feature such as a river estuary in an aerial image, the minimum cost path approach may be applied to the gradient magnitude image rather than the raw image.
If a path with target intensity It is required, an appropriate cost function would be
The use of path searching approaches for line and edge following in images was proposed many years ago. A distinction may be drawn between exhaustive optimal search algorithms which find the global minimum cost path and heuristic search algorithms which use heuristics to reduce the search space. For example, Montanari [] introduced dynamic programming for optimal curve detection with respect to a particular figure of merit and Martelli [,] introduced heuristic search to detect edges and contours.
Since these early papers, many authors have applied heuristic search techniques to the problem of boundary and line detection, for example [,]. Optimal search times have been significantly less attractive than heuristic search when powerful heuristics are available, and their computationally intensive nature has resulted in their lack of popularity. More recently, the cost minimisation approach to feature detection has been reworked in the idea of snakes [] which find a local solution to the minimum cost path problem given an initial path by the user. If the local minimum is not correct, additional terms may be added to the cost function interactively to push or pull the snake towards the correct position.
In this work, the idea of a search for the optimal global solution is retained, but a relatively fast search algorithm is adopted and the search area may be restricted interactively by selecting a window on the image which includes the required feature.
The problem of finding a minimum cost path between two points is one of several related graph problems that appear in the literature. Although they have not been used extensively in image analysis, they have been widely explored elsewhere and efficient algorithms have been proposed. These algorithms are expressed in terms of a cost function which is usually used to calculate the incremental cost of moving between two adjacent nodes.
Dijkstra [1] originally devised an algorithm that is guaranteed to find the minimum cost path between two points. It splits the network nodes into two sets, those for which the minimum cost from the start node is known and those for which it is not known. The algorithm proceeds by transferring nodes from the second set to the first by examining the neighbours of each node in the first set. When the cost to get to the destination node is known, the algorithm can terminate. Several improvements have been made to Dijkstra's algorithm to improve its efficiency [2,3].
Moore's algorithm [4] is similar to Dijkstra's but instead of considering two sets of nodes it uses a queue of nodes whose costs have yet to be finally determined. Queue members are removed from the front of the queue and their neighbouring nodes are examined and added to the back of the queue to have their costs determined. When the queue is eventually empty the algorithm terminates and the minimum cost path from the start node to every other node has been calculated. The cost to the destination node will be among these.
An improvement to Moore's algorithm, which has been attributed to d'Esopo [] and developed by Pape [5], uses a more complicated strategy for adding nodes to either the front or back of the queue, depending on whether they have been processed before. This improves the performance of the algorithm, allowing the solutions to be computed in fewer iterations, on average. In the following sections we refer to this as the d'Esopo algorithm.
Hislop [] has compared the performance of four optimal algorithms (dynamic programming, Dijkstra's algorithm, d'Esopo's algorithm and a branch and bound algorithm) for path finding applications on a regular grid, analogous to the type resulting from the formulation for images which we describe below. He found that the d'Esopo algorithm was the fastest with measured time complexity, O(n), where n is the number of nodes in the graph. The space complexity for the d'Esopo algorithm is also O(n).
We have extended the basic algorithm of d'Esopo to allow cost functions at a point to depend on more nodes than just a single node and its immediate neighbours. The information made available to the cost function includes static details about the whole path, such as the locations of the start and end points and any intermediate points that have been indicated by the user.
There is also dynamic information about the node currently being considered and previous nodes along the best path found so far. This facilitates the inclusion of more complex cost functions depending on, for example, the curvature of the path. A pseudo code representation for the extended d'Esopo algorithm is shown in Figure 1.
For the specific problem of finding minimum cost paths in images, some decisions have to be made about network representation. The image is represented as a grid of points, each with a particular intensity. Each network node corresponds to a point (pixel) in the image and has up to eight neighbours which correspond to the adjacent points in the image.
The network itself is also represented as a grid. The links between nodes are not stored explicitly but are implicit in the locations of nodes within the grid. Each node keeps a record of the total cost of the best path to the node, the length of the best path and the direction to the previous point on the path. In addition, flags indicate if the node has been on the queue, if it is currently on the queue and if it is an intermediate path point selected by the user.
The cost of moving between nodes is computed as the algorithm proceeds and is some function of the point intensities and locations within the image. The cost function is implemented separately from the main algorithm so that different cost functions may be used. The user can also supply arbitrary information to the cost function, for example, weighting parameters for the cost calculation.
This design allows a wide variety of cost functions to be implemented, including costs that depend on the intensities of the start and end points and costs that vary with the local curvature of the path.
We have developed the extraction software in C on a Unix and X windows platform, as part of a system which provides a wide variety of tools for curvilinear feature extraction. When applying the minimum cost path algorithm, the user defines the search area and selects the start and end points with a mouse. The relative weighting between the terms that are used to calculate the cost may be adjusted and the resulting minimum cost path is shown highlighted and superimposed on the original image as shown in figure 5.
An alternative tracking tool has also been implemented in which the user may provide rough digitising points along the path of the curvilinear feature. The software tracks the rough points by applying a search window around adjacent pairs of specified points and performing a global search within the moving window using the extended d'Esopo algorithm. In order to allow for the roughness of the digitising the start point in all but the first window is chosen a few points back along the minimum path found in the previous window. This allows the user to be less accurate without affecting the integrity of the final path.
Figure 2 is part of an image containing a large river feature. The river surface is light grey and the surrounding urban areas and river banks are darker grey.
Figure 3 shows the result of using the rough digitising tool to track the boundaries of the river. The extracted paths are superimposed in white over the original image.
In this example the river boundary is identified by the change in intensity between the river surface and the river bank. To extract these features a Sobel edge detector was applied to the image to highlight the boundary and the rough digitising tool was used to track the resulting edge features.
This involves selecting points along the path of the edge feature. If the edge is strong only a few points are needed to accurately digitise a complete path. If the edge is indistict the user has to select points that are closer together in order to provide the tool with more guidance.
Figure 4 shows the course of a river in an area of Nepal. The image is in infra red, so the river shows up dark against the relatively warm land.
In this example the user has only selected two points on the river, near the top and bottom of the image. The path found by the algorithm is shown superimposed in white on the image in figure 5. In this case, in order to find the dark path, the cost function minimises the sum of the intensities along the path. It can be seen that the course of the river has been successfully located along its length.
The use of minimum cost path algorithms and window constrained global search is an effective vehicle for curvilinear feature extraction in a variety of image types.
The system is currently being extended to further improve the search efficiency, to provide a range of more complex cost functions and to enable networks of curvilinear features to be extracted with minimum user interaction.
This document was generated using the LaTeX2HTML translator Version 98.1p1 release (March 2nd, 1998)
Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html -split 1 paper.tex.
The translation was initiated by Mark Dobie on 1999-03-04