We developed a quality control system (QCS) for digital mammography that can notify technologists in real time of mammograms of poor image quality due to under or over exposure. Mammograms are digitized by a Lumisys Scanner at 100 micron and 12 bits per pixel. An automatic image segmentation technique is employed to extract area inside the breast in mammogram. Histograms of the segmented areas are then calculated. By analyzing the composition of histograms, the computer program determines whether the original films have properly exposed. Traditional image segmentation techniques are based on histogram analysis of digitized mammograms. However, such methods often fail with mammograms of low contrast or that are under-exposed because the difference in brightness across the breast skin line is so small that it is difficult to define boundary by thresholding or region growing techniques. We proposed a novel method to detect breast skin line based on statistical changes of gradient. By analyzing the histogram composition of normal, under and over-exposed films, we defined an image feature that describes the image intensity content of underlying mammograms. The criterion for determining the category of a mammogram were established by studying a training database of normal, under, and over exposed films. We can then classify the mammograms using the image feature, based on the established criterion. Over 150 real mammograms of different exposure levels were analyzed. The images were classified by the computer system into groups of normal, slightly under-exposed, under-exposed, slightly over- exposed, and over-exposed. We compared the classification results by computer with a radiologist's evaluation. Our QCS system was able to correctly classify over 85% of the cases. Receiver operating curve (ROC) analysis will be employed to evaluate the performance of the QCS system in determining the image quality of digital mammograms. Our QCS program is able to automatically determine whether a mammogram is properly exposed and advise a technologist to re-take additional exposures. The QCS correctly identified 100% of over- and under-exposed mammograms and 92% of mammograms of normal exposure. The QCS can help reduce the cost of recalling patients and improve the overall quality of mammographic service.