Method and apparatus for segmenting a first region and a second region. A
method for defining a boundary separating a first region and a second
region of a digital image includes determining using a learning machine,
based on one or more of the color arrangements, which pixels of the image
satisfy criteria for classification as associated with the first region
and which pixels of the image satisfy criteria for classification as
associated with the second region. The digital image includes one or more
color arrangements characteristic of the first region and one or more
color arrangements characteristic of the second region. The method
includes identifying pixels of the image that are determined not to
satisfy the criteria for classification as being associated either with
the first region or the second region. The method includes
decontaminating the identified pixels to define a boundary between the
first and second regions.