dmfr.25.1.9084285

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

jj&KSj&SjlK Dentomaxillofac. Radiol , Vol. 25, No. 1, pp.

42-47, 19%
Copyright © 1996 Elsevier Science Ltd. for the IADMFR
iRSSiajl^ Printed in Great Britain. All rights reserved
λΓΛΕΛΙ 0250-832X/96 $15.00 + 0.00

ELSEVIER

0250-832X(95)00031-3

Histogram-matching and histogram-


flattening contrast correction methods:
a comparison
C.F. Hildebolt*, R.K. Walkup*, G.L. Conoverf, N. Yokoyama-Crothers*, T.Q. Bartlett*,
M.W. Vannier*, M.K. Shroud and J.J. Camp§
* Washington University, St Louis, Missouri,+ Southern Illinois University, Alton, Illinois, * Medical College of
Georgia, Augusta, Georgia, and § Mayo Foundation, Rochester, Minnesota, USA

Received 30 December 1994 and in final form 4 May 1995

Objectives. To compare the results of two methods of histogram matching and two methods of
histogram flattening for their ability to correct for contrast variations in digital dental images.
Methods. A custom-built, aluminium stepwedge with 0.1,0.5 and 1.0 mm steps was placed
over Ektaspeed films and exposed for 0.06,0.12 and 0.25 s, respectively. Radiographs were
digitized at 50 μπι spatial resolution and 12-bit contrast resolution. Contrast corrections were
performed using Rüttimann et al.'s algorithm (1986) for one method of matching (RM) and
flattening (RF) and Castleman's algorithm (1979) for the other method of matching (CM) and
flattening (CF). Mean pixel grey-scale values were determined for each step. The 0.12 s
exposure was considered to be the target image exposure. Absolute differences in pixel
grey-scale values between the target images and the modified images were determined.
Results. The median values of the absolute differences in pixel grey-scale values between the
target images and the contrast corrected images were: CM = 4.3; RM = 4.1; CF = 70.2 and
RF = 70.2.
Conclusion. Castleman's and Rüttimann's matching algorithms perform equally well in
correcting digital image contrast. Histogram flattening was less effective.

Keywords: radiographic image enhancement; subtraction radiography; signal processing, computer-


assisted

Dentomaxillofac. Radiol., Vol. 25, N o . 1, 42-47, 1996

Retrospective correction for variations in dental film function; CDF). The cumulative sums of pixels at each
exposure, film processing and radiograph digitization is grey-scale value in the input (original) image are
an essential step in measurement of small changes in matched to the corresponding cumulative sums of the
hard tissue 1-4 . In 1986, a non-parametric histogram- target (desired) image. The result is that the cumulative
matching algorithm for making such corrections was sum of the desired image is less than or equal to the
introduced by Rüttimann et al.5. This method, which cumulative sum of the original image while also being
we refer to as Rüttimann's algorithm, has found wide greater than the next lower bin of the cumulative sum
acceptance in quantitative digital-imaging studies 6-9 . of the original image 5 .
Additional algorithms have been reviewed, and those A similar approach to histogram matching contrast
incorporating non-parametric contrast correction, simi- correction is integrated into the Mayo Clinic's
lar to that described by Rüttimann, have performed ANALYZE™ program - a comprehensive software
best 10 · 11 . system of biomedical and scientific visualization
The first step in using the Rüttimann matching (RM) applications 12 ' 13 . The matching routine in this program
algorithm is to create a histogram for each of the digital is based on an algorithm described by Castleman in
images that are to undergo contrast correction. For 197914. With this algorithm, the CDF of the input
each histogram, a running sum of the frequencies of image is forced to match as closely as possible that of
pixels at each grey-scale value is calculated to yield a the target image, and, as such, the algorithm is some-
cumulative grey-scale distribution (cumulative density what similar to that of Rüttimann's. Over the last two
Comparison of contrast-correction methods 43

years, we have used both algorithms to perform con- Films were processed under highly controlled condi-
trast corrections. In preliminary comparisions, it tions using Wing-Lynch one-shot processing with a
appeared that Castleman's algorithm out-performed custom-made rotary tube (Wing-Lynch, Beaverton,
Rüttimann's and we therefore elected to conduct a OR, USA). The developer was stored in a sealed
controlled study to compare the two algorithms for chemical tank filled with nitrogen to minimize oxida-
their ability to perform contrast corrections. tion. Agitation was provided in a multidirectional
Histogram flattening can be thought of as a special rotary pattern with a slight rocking action. The de-
case of matching in which the desired histogram is flat veloper temperature was maintained at 20°C with a
(i.e. equal numbers of pixels at each grey level). This water-jacketed processing trough. Films were proces-
results in a CDF that follows the major diagonal. sed using a universal rapid access developer, DC-4
Because flattening always matches to a CDF of fixed (Christie, Toronto, Canada), and fixed with Rapid
shape, we hypothesized that flattening procedures with Thiofix (Christie). The chemicals were discarded after
both Rüttimann's and Castleman's algorithms would each batch of films was processed.
result in superior contrast corrections than would the Radiographs were digitized at 50 μιη spatial resolu-
corresponding matching algorithms that match to the tion and 12-bit contrast resolution using a Molecular
arbitrary shapes of the target CDF. Dynamics Personal Densitometer (Sunnyvale, CA,
The aim of this study was to compare Rüttimann's USA). To avoid including the rounded corners of the
algorithm for matching (RM) and flattening (RF) and digital radiographic images, the images were cropped
Castleman's algorithm for matching (CM) and flatten- to 654 x 256 pixels.
ing (CF) for their ability to correct for contrast varia-
tions in dental digital images.
Grey-scale correction methods
The two methods of histogram matching and flattening
Materials and methods compared in this study both utilize cumulative grey-
scale distributions in which a histogram of the frequen-
Experimental model cies of pixels at each grey-scale value is calculated, and
Contrast variation in digital radiographic images may then the running sum of these is calculated to yield the
occur because of changes in film exposure, film proces- CDF 5 1 4 .
sing or radiograph digitization1"3'10. In our study, we With the matching algorithm given by Rüttimann et
varied film exposure and held film processing and al.5, the cumulative sums of pixels at each grey scale in
radiograph digitization constant. We feel that this is the original image are matched to the corresponding
justified in that contrast variations attributable to film cumulative sums of the desired image, such that the
processing and radiograph digitization are similar to cumulative sum of the desired image is less than or
those attributable to film exposure. equal to the cumulative sum of the original image while
A stepwedge was used to test for differences in also being greater than the next lower bin of the
algorithm performance. The stepwedge consisted of cumulative sum of the original image. Inherent in the
eleven 10 x 10 cm HVL aluminium attenuators (Nuc- process is the combining of bins in the original image to
lear Associates, Carle Place, NY, USA) that changed match the cumulative sums of the desired image.
thicknesses in increments of either 0.1, 0.5 or 1.0 mm. For Castleman matching, the CDF of the input
Each step was approximately 5-6 mm deep. Step-by- (original) image is forced to match as closely as possible
step decreases in thickness varied from 37% to less than the CDF of the target (desired) image (Figure 1). To
2% (for example, the change from 2.7 mm to 1.7 mm calculate the output grey level of an input grey level,
from step 5 to 4 represented a decrease in aluminium the value of input grey level is determined on the
thickness of 37%). original CDF. This value is used as input to the inverse
of the desired CDF, and this inverse grey-scale value of
the desired CDF is used as the output grey level (i.e. all
Image acquisition pixels in the image having the input grey level are
The stepwedge was placed over Ektaspeed films (East- 'mapped' to the output grey level). Castleman 14 pre-
man Kodak Co., Rochester, NY, USA) and exposed at sents a flat histogram with equal numbers of pixels at
70 kVp, 7 mA and with a 30 cm FFD (focal film each grey level except for the zero grey level, which has
distance), for 0.06, 0.12 and 0.25 s using a Heliodent no pixels. This results in a CDF that follows the major
MD dental unit with a 12° anode angle and 2.1 mm of diagonal (Figure 2). An alternative definition of a flat
aluminium filtration (Siemens Medical Systems, histogram assumes equal numbers of pixels at each grey
Erlangen, Germany). To cover the full length of the level, including the zero grey level15. We conducted our
wedge, two films were needed. Six steps nearer the thin experiments with both types of histogram flattening but
end of the stepwedge were included on one film, and found no overall difference in performance for these
methods. We present only results for histogram flatten-
six steps nearer the thick end of the stepwedge were
ing performed using Castleman's concept of a flat
included on another film. Step 6 was included in both
histogram.
exposures. In all, six films were exposed. The exposed
portions of the films were framed by lead blocks to The images created by exposures of 0.12 s were
minimize scatter radiation, including backscatter. considered to be the target images. The under- and
44 C.F. Hildebolt et al.

overexposed images created at 0.06 and 0.25 s, respec-


tively, were matched to the target images using Rütti-
mann's algorithm and Castleman's algorithm. These
Original CDF
same algorithms were also used to flatten the images.
α
3
> Our procedures resulted in four types of image:
or
<D Rüttimann-matched (RM), Castleman-matched (CM),
Desired CDF
Rüttimann-flattened (RF), and Castleman-flattened
(CF).
A program was written to sample 40 X 40 pixel areas
α of the resulting images. Samples were taken at the tops
ε and bottoms of each step of the stepwedge at the same
ο
Ζ locations for corresponding images (Figure 3). Mean
pixel grey-scale values were determined for each step.
For histogram matching, absolute differences in mean
input output
pixel grey-scale values between the unmodified target
0 1
Normalized Gray Level images (0.12 s exposure) and the histogram-matched
Figure 1 Castleman histogram matching. Both the original and
under- and overexposed images were determined. For
desired CDFs appear in the figure. To determine the output grey histogram-flattening, absolute differences in mean pix-
level of the input grey level, the value of the input on the original el grey-scale values between the flattened target images
CDF is determined (input arrow in the graph). This value is used as (0.12 s exposure) and the flattened under- and over-
input to the inverse of the desired CDF, and this inverse grey-scale
value (output arrow) of the desired CDF is used as the output exposed images were determined.
grey-scale value. Both the number of pixels and grey levels are
normalized to 1

Results
The optical densities for the steps in the optimally
exposed radiographs varied from 0.849 to 1.844. This
represented a range in grey-scale values of 995 of the
o>
σ possible 4096 grey-scale values in the 12-bit images.
Φ
Algorithm performance did not appear to be related to
Φ
>< stepwedge thickness nor exposure level, i.e. no pattern
α. could be detected for the absolute differences between
•ο the mean pixel grey-scale values for the steps of the
Φ
Μ
10 optimally exposed radiographic images and the corre-
ε sponding values for the histogram-matched images.
δ
2 Likewise, no pattern could be detected for the means
of the absolute differences between the histogram-
flattened target image and the histogram-flattened
input output under- and overexposed radiographic images. Figure 4
0 1 illustrates the lack of any pattern. It contains a plot of
Normalized Gray Level
differences for CM underexposed images against step-
Figure 2 Histogram flattening. With histogram flattening, the de- wedge thicknesses. Because of this lack of pattern,
sired CDF is flat. Input and output are calculated as described in summary statistics for algorithm performances were
Figure 1

TOP

BOTTOM

Figure 3 Sampling of a digital radiographic image of a stepwedge. Two radiographic films were used to cover the length of the stepwedge. The
image in the figure is of a Castleman-matched underexposed image of the thin end of the stepwedge. Six steps and the background (step 0) were
sampled for the images of the thin end of the stepwedge. Six steps were also sampled for the thick end of the stepwedge.
Comparison of contrast-correction methods 45

14η Table I Descriptive statistics for flattening and matching pro-


cedures. Algorithm performance was averaged for the stepwedge.
Values represent absolute differences in pixel grey-scale values
12 -
between target images and modified images

10- Correction method Minimum Maximum Median

>(0 8 - CF underexposed 2.6 221.9 69.8


Φ CF overexposed 0.4 193.9 70.5

ο RF underexposed 2.6 221.9 69.8
ω
>. 6 Η RF overexposed 0.4 193.9 70.5
α RM underexposed 0.3 13.5 4.4
5
4Η RM overexposed 0.2 17.3 3.8
CM underexposed 0.2 13.5 4.4
2 - CM overexposed 0.4 17.0 4.2

0 1.0 1.1 1.6 1.7 2.7 3.7 4.7 4.8 5.3 5.4 6.4
Aluminum Thickness

Figure 4 Absolute differences between mean grey-scale values for


each step of the target image stepwedge and the CM underexposed S°
images of the stepwedge 1δ 1«
cu
g CO
®
£ £5
calculated for the images of the stepwedge. Because οα
the data values used for the summary statistics were not
normally distributed, means and standard deviations
were not good indicators of central tendency, and thus " 근 근 근 근 " "�
medians and percentiles were used (Table I and Figure 5). under-
exposed
over-
exposed
under-
exposed
over*
exposed
under-
exposed
over-
exposed
under-
exposed
over-
exposed
Box plots of the differences for the matching and
flattening procedures are presented in Figure 5. The Figure 5 Box plots of absolute grey-scale differences between target
images and histogram-matched and flattened images. The five hori-
four box plots to the left are for the CF and RF under- zontal lines of the box plots are for the 10th, 25th, 50th (median
and overexposed images. The four box plots to the value), 75th and 90th percentiles. Values above the 90th and below
right are for the RM and CM under- and overexposed the 10th percentiles are indicated by outlier dots
images. In all cases, the median differences between
the target images and the flattened images are greater 1 8

than 69 grey-scale values, which is approximately 7% of 1 6


the grey-scale range utilized for these images. For the
14
matched images, the median differences from target
images are less than five grey-scale intervals (less than £S ®3 1 2

1% of the grey-scale range). II 10


ε ®
Figure 6 is an enlargement of the RM and CM box S8 8
plots of Figure 5. Absolute differences in grey-scale Hs
b a 6
values between the target images and the RM under-
and overexposed images are shown on the left and 4
those for the CM corrections are shown on the right. 2
The algorithms showed essentially identical perform-
ance in correcting for contrast variations among im- RM RM CM CM
ages. The largest difference in grey-scale values for an underexposed overexposed underexposed overexposed

individual step between Rüttimann and Castleman Figure 6 Enlargement of Figure 5 for RM and CM images
matching was 0.4 of a grey-scale value.

grey-scale bins in the original CDF to match the


Discussion cumulative sums of the desired CDF. This combining of
bins results in the loss of information in that it creates
To detect small changes in hard tissue densities in additional zero-frequency bins. Both of these algo-
longitudinal dental radiographic studies, some form of rithms can also be used for histogram flattening.
contrast correction is essential. In 1986, a robust non- Because histogram flattening always matches to a CDF
parametric method of histogram matching was intro- of fixed shape as opposed to histogram matching which
duced 5 . Now termed the Rüttimann method, it has matches CDFs of arbitrary shapes to one another,
gained wide acceptance and has been found to produce we hypothesized that histogram flattening would out-
superior results to other contrast correction methods 10 . perform histogram matching for contrast correction.
Castleman produced a similar algorithm in 1979. Inhe- In our study, the underexposed radiographs received
rent in the use of Rüttimann's and Castleman's algo- 50% less radiation and the overexposed radiographs
rithms for histogram matching is the combining of received 100% more radiation than the target radio-
46 C.F. Hildebolt et al.

median differences in pixel grey-scale values between


the target images and the histogram-matched images
was 4.2, which represents about 0.4% of the grey-scale
range used (Table I). The largest difference was 17
grey-scale values, which represents 1.7% of the range
of grey-scale values. No pattern to the errors with
regard to corrections for underexposed or overexposed
images nor for thickness of aluminium could be de-
tected.
Rüttimann's and Castleman's algorithms performed
equally in correcting contrast on digital images, with
the largest difference in performance for a single step of
the stepwedge being only 0.4 of a grey-scale unit.
Although in our experiment Castleman's algorithm was
Gray Scale Values
more than eight times faster than Rüttimann's, this
Figure 7 Examples of histograms for the original underexposed difference may be reduced by optimizing the Rütti-
image, the desired target image, and the matched image after mann algorithm. Moreover, the excellent results that
histogram matching. The histogram for the matched image has
characteristics of both the original and target image histograms we obtained for histogram-matching contrast correc-
tions were obtained under highly controlled laboratory
conditions and are undoubtedly far better than could be
graphs. As documented in Table I and in Figure 5, our obtained in a clinical situation.
hypothesis that flattening procedures would result in
superior contrast corrections to those from matching
procedures alone is not supported. The average differ- Acknowledgements
ence in the median values between flattened images
and target images was 66.0 grey-scale values, which This study was supported in part by National Institute
represents 6.6% of the grey-scale values used for the of Dental Research (NIDR) projects DE08173 and
target images. Individual differences per step were DE09861.
large, as much as 222 grey-scale values, which repre-
sents 22% of the grey-scale range.
We speculate there are several reasons why flatten- References
ing does not work well when compared with matching.
1. Ohki M, Okano T, Yamada N. A contrast-corrected method for
First, for flattening, two flattening procedures are
digital subtraction radiography. J Periodont Res 1988; 23: 277-
required (both the target histogram and the histogram 80.
to be modified are flattened), whereas, for matching, 2. Reddy MS, Jeffcoat MK. Digital subtraction radiography. Ad-
only one set of operations is needed. The extra proce- vances in dental imaging. Dent Clin North Am 1993; 37: 553-65.
dure with flattening introduces additional errors. 3. Brägger U, Bürgin W, Marconi M, Häsler RU, Lang NP.
Second, the matched histogram takes on some of the Influence of contrast enhancement and pseudocolor transforma-
tion on the diagnosis with digital subtraction images (DSI).
characteristics of the target histogram, yet it retains J Periodont Res 1994; 29: 95-105.
many of the shape characteristics of the original histo- 4. Fourmousis I, Brägger U, Bürgin W, Tonetti M, Lang NP.
gram (Figure 7). In performing a histogram flattening Digital imaging processing: II. In vitro quantitative evaluation of
procedure, the original and target histograms have very soft and hard peri-implant tissue changes. Clin Oral Implants Res
different shapes from the flat histogram to which they 1994; 5: 105-14.
are being matched. Forcing the histograms to adapt to 5. Rüttimann U, Webber R, Schmidt E. A robust digital method
for film contrast correction in subtraction radiography. J
flat shapes introduces additional errors. In summary, Periodont Res 1986; 21: 486-95.
histogram flattening is not appropriate for performing 6. Brägger U, Pasquali L, Rylander H, Carnes D, Kornman KS.
contrast corrections in quantitative dental digital imag- Computer assisted densitometric image analysis in periodontal
ing studies. radiography. A methodological study. J Clin Periodontal 1988;
15: 27-37.
Rüttimann's and Castleman's algorithms showed 7. Steffensen B, Pasquali L, Yuan C, Wood RC, Schoolfield JD,
almost exactly the same performance in correcting Kornman KS. Correction of density changes caused by methodo-
digital image contrast differences (Table I and Figure logical errors in CADIA. J Periodont Res 1989; 24: 402-8.
6). The only difference that we could detect between 8. Deas DE, Pasquali LA, Yuan CH, Kornman KS. The rela-
the two algorithms was in the use of CPU time. The tionship between probing attachment loss and computerized
radiographic analysis in monitoring progression of periodontitis.
algorithms were run on a Sun Sparestation 10, Model J Periodontal 1991; 62: 135-41.
41 (Sun Microsystems Computer Corporation, Moun- 9. Jeffcoat MK, Page R, Wannawisute A, Waite P, Palcanis K,
tain View, CA). Castleman matching used approx- Cogen R. Use of digital radiography to demonstrate the poten-
imately 3 s of CPU time whereas Rüttimann matching tial of naproxen as an adjunct in the treatment of rapidly
used 25 s. However, we did not attempt to optimize the progressing periodontitis. J Periodont Res 1991; 26: 414-21.
10. Fourmousis I, Brägger U, Bürgin W, Tonetti M, Lang NP.
performance of the Rüttimann algorithm and this may
Digital imaging processing: I. Evaluation of grey level correction
account for the CPU time differences. methods in vitro. Clin Oral Implants Res 1994; 5: 37-47.
Histogram matching performed well. The average of 11. Okano T, Ohki M, Mera T, Soejima H, Ishikawa I, Yamada N.
Comparison of contrast-correction methods 47

Quantitiative evaluation of proximal bone lesions using digital 433-54.


subtraction radiography. Dentomaxillofac Radiol 1988; 17: 99- 14. Castleman K. Digital Image Processing. New Jersey: Prentice
103. Hall, 1979: 90-3.
12. Robb RA, Barillot C. Interactive display and analysis of 3D 15. Lim JS. Two-dimensional Signal and Image Processing. New
medical images. IEEE Trans Med Imaging 1989; 8: 217-26. Jersey: Prentice Hall, 1990: 453-9.
13. Robb RA, Hanson DP, Karwoski RA, Larson AG, Workman
EL, Stacy MC. ANALYZE: A comprehensive operator- Address: Dr Charles F. Hildebolt, Mallinckrodt Institute of Radi-
interactive software package for multidimensional medical image ology, Washington University Medical Center, 510 South Kingshigh-
display and analysis. Comput Med Imaging Graph 1989; 13: way Blvd, St. Louis, MO 63110, USA.

You might also like