A method and apparatus for correcting for a distortion in a mammogram. The
method comprises classifying pixels as either likely fat or likely
not-fat. The method further comprises identifying a candidate distortion
and calculating a histogram of the likely fat and the likely not-fat
pixels at the candidate distortion. The method further comprises
evaluating a quality of the candidate distortion based on features of the
histograms of pixel values in the fat and dense tissue classes. The
distortion may be a two dimensional tilt of the plates or a three
dimensional deformation of the plates as in a bend.