We will address the problem of segmenting single images into parts corresponding to those intuitively provided by human perception. To this effect a resistive network analogue of the edge image is used, in which electric resistances correspond to edge segments. Compact contours including given segments can then be found by introducing current sources in these segments, and following the path of largest current. In order to overcome the artifacts of edge finders and apply to partially occluded contours, the method requires the detection of gaps in L-junctions and collinearities, and the introduction of virtual resistances at these locations. Since contours must be found serially, the segmentation can be guided by a knowledge-based attentional mechanism, as seems to happen in human perception. The method also offers a natural framework for fusing information from various image understanding mechanisms. When a contour containing a given seed segment is sought, or entering into perceptually significant relationships with the seed segment, such as symmetry, skew symmetry or parallelism. The electric circuit part of the method can be implemented as a very simple neural network, which raises intriguing questions about the existence of such a structure in the human visual system.