1. A computer implemented method for segmenting at least a pair of regions of a digital image, the method performed by the computer comprising: obtaining data of the image, the image data containing of a plurality of data elements; determining an image gradient magnitude of the image using a finite-difference stencil; computing a plurality of watersheds of the image from intensity gradients of such image data based on computation of shortest paths using a rain simulation algorithm; performing a region growing procedure on the plurality of watersheds to produce a tessellation of the plurality of watersheds into smaller portions; extracting a watershed region adjacency graph from the smaller portions, such graph comprising: a plurality of nodes corresponding to the smaller portions; and node interconnecting edges; assigning a weight to each interconnecting edge based on the dissimilarity of the nodes that are connected by the interconnecting edge; identifying the nodes corresponding to the at least a pair of identified smaller portions in the adjacency graph; marking each of a plurality of the identified smaller portions with one of at least a first and a second foreground seeds; applying a competing wavefronts process to the nodes in the adjacency graph by using the edge weights to label unmarked nodes in accordance with the first and second foreground seeds and extrapolating the obtained labeled nodes on the graph to the image to segment the image, wherein each wavefront propagates from a node with a rate that depends on an edge weight related to the node and until the competing wavefronts collide along a boundary of a region being segmented.