A method for enhancing electronic images of a document, in which the
electronic images contain a background with foreground markings, includes
receiving an electronic image containing pixels and assigning an initial
provisional foreground/background status to the pixels. The initial
foreground/background estimate is revised and a determination is made as
to whether the revised foreground/background estimate is to be the final
status assignment for the pixels of the image. If a final pixel status
assignment has not been achieved, the estimate is again revised until a
final foreground/background status is reached for the image pixels prior
to creation of an output image.