A method of segmenting a digitized image includes providing a digitized
image comprising a plurality of intensities corresponding to a domain of
nodes on an N-dimensional grid, providing prior probabilities for a set
of segments, and initializing probabilities that each node belongs to
each segment, defining a weight between each pair of adjacent nodes in
the image based on the intensity difference of each said node pair,
formulating a set of equations that minimize an energy functional of the
probabilities and weights, and solving said set of equations for the
probability that each node belongs to each segment.