1. A computer-implemented method of segmenting a foreground portion from a background portion of an image having a plurality of image elements, each image element having an associated value, the method comprising: selecting a seed region in the foreground portion of the image; calculating, using a processor, a geodesic distance from each image element to the seed region using the associated values; determining a subset of the image elements having a geodesic distance less than a predefined threshold; and labeling the subset of the image elements as foreground image elements.