A method and system for segmenting an object in a digital image are
disclosed. A user selects at least one foreground pixel or node located
within the object and at least one background pixel or node located
outside of the object. A random walk algorithm is performed to determine
the boundaries of the object in the image. In a first step of the
algorithm, a plurality of coefficients is determined. Next, a system of
linear equations that include the plurality of coefficients are solved to
determine a boundary of the object. The processing is performed by a
graphics processing unit. The processing can be performed using the
near-Euclidean LUV color space or a Lab color space. It is also preferred
to use a Z-buffer in the graphics processing unit during processing. The
object, once identified, can be further processed, for example, by being
extracted from the image based on the determined boundary.