A method and computer program product for processing a digital image is
disclosed. A foreground region relating to an imaged object is estimated,
a background region relating to other than the imaged object is
estimated, and by using the image, the estimated foreground region and
the estimated background region, a transition region disposed between the
foreground region and the background region is calculated. The estimated
foreground region, the estimated background region, and the calculated
transition region, each include a separate set of pixels that may each be
processed separately for suppressing pixel intensities in the estimated
background region and improving image quality.