One embodiment of the invention relates to a method of merging segments to
form supersegments in an image. The image consists of a plurality of
segments that are constituent portions of the image. At least one
candidate segment(s) and at least one neighboring segment(s) for each
candidate segment are identified. An error statistic for each pair,
consisting of a candidate segment and a corresponding neighboring
segment, is computed. A neighboring segment is determined that results in
a smallest error statistic for a given candidate segment. A determination
is also made as to whether the smallest error statistic is sufficiently
small to merit merging of the corresponding pair of segments. The
corresponding pair of segments is merged to create one supersegment. The
supersegment is a new segment including all pixels formerly contained in
one of the two segments that were merged.