**TONE-SCALE GENERATION METHOD AND APPARATUS FOR DIGITAL X-RAY IMAGES**

Schaetzing, Ralph

*;*

**A61B6/00***;*

**G01T1/00***;*

**G01T1/29***;*

**G03B42/02***;*

**G06T1/00***;*

**G06T5/00***;*

**G06T5/40***;*

**G09G5/00***;*

**G09G5/10***;*

**G09G5/36***;*

**G21K4/00***; (IPC1-7): G01T1/29; G06F15/68*

**H04N1/407**US4682028A | 1987-07-21 | |||

FR2450471A1 | 1980-09-26 | |||

US3893166A | 1975-07-01 | |||

GB2148658A | 1985-05-30 | |||

GB2161670A | 1986-01-15 |

COMPUTER GRAPHICS AND IMAGE PROCESSING 1981, New York (US), pages 210 - 239; T. PUN: "Entropic Thresholding, A New Approach" see page 211, lines 1 - 15 (cited in the application)

1. | A method of processing a digital diagnostic Xray image comprising the steps of: (a) in a digital computer, generating a tonescale transformation function by, (i) forming a histogram of the digital image; (ii) dividing the histogram into a region of interest and a background region; (iii) constructing a tonescale transformation function having a linear portion substantially over the region of interest, smoothly joined with a first portion extending from the start of the histogram to the linear portion, and a second portion extending from the linear portion to the beginning of the background region; and (b) transforming the digital image with the tonescale transformation function. |

2. | The method claimed in claim 1 further comprising the steps of: prior to transforming the digital image with the tonescale transformation function, processing the image with an operator, such as edge enhancement or noise removal. |

3. | The method claimed in claim 1, wherein the step of dividing the histogram further comprises the steps of: (a) assuming the histogram is comprised of two modes; and (b) determining the grey level that separates the two modes by maximizing the a posteriori entropy of the image. |

4. | The method claimed in claim 3, wherein the steps of dividing the histogram further comprises the steps of: (a) modeling the background grey level distribution as a uniform distribution having substantially the same entropy as the background distribution, and computing the width W of the model uniform distribution; (b) determining the location of a window of width W with the greatest number of pixels in the background region; and (c) if the window is located at the upper end of the background distribution choosing the beginning of the window as the start of the background, else compute a new window based on the average of the grey levels in the window, until the window is located at the upper end of the background distribution, and choosing the beginning of the new window as the start of the background. |

5. | The method claimed in claim 3, wherein the steps of dividing the histogram further comprises the steps of: (a) modeling the region of interest of the histogram as a uniform distribution having substantially the same entropy as the region of interest and computing the width w of the model uniform distribution; (b) determining the location of a window of width w with the greatest number of pixels in the region of interest; and (c) if the window is located at the low end of the region of interest, choosing the window as the region of interest, else compute a new window based on the average of the grey levels in the window, until the window is located at the low end of the region of interest, and choosing the new window as the region of interest. |

6. | The method claimed in claim 1, wherein the steps of constructing a tonescale transformation function further comprises the steps of generating the linear portion of the function by determining a slope that will cause the average density and variance of the output image in the region of interest to be equal to preselected target values. |

7. | The method claimed in claim 6 wherein the preselected target values are in the range 0.70.85 and 0.30.4, respectively, for the average density and variance. |

8. | The method claimed in claim 7, wherein the preselected target values are 0.78 and 0.35 respectively, for the average density and variance. |

9. | The method claimed in claim 1, wherein the first and/or second portion of the tonescale reproduction function defines a parabola. |

10. | The method claimed in claim 1, wherein the first and/or second portion of the tonescale reproduction function defines a histogram equalization function. |

11. | The method claimed in claim 1 wherein the first and/or second portions of the tonescale reproduction function defines a straight line smoothly connected to the linear portion by a parabola. |

12. | Apparatus for processing digital diagnostic Xray images, comprising: (a) means for generating a tonescale transformation function having: (i) means for generating a histogram of the digital image; (ii) means for dividing the histogram into a region of interest, and a background region; and (iii) means for generating a linear portion of the tone scale transformation function substantially over the histogram region of interest, and for generating a first portion smoothly joining the linear portion, and extending from the beginning of the histogram, and a second portion extending from the linear portion to the background region of the histogram; (b) means for generating a lookup table representing the tonesfcale transformation function; and (c) means for processing the digital image by addressing the lookup table. |

13. | The apparatus claimed in claim 12, further comprising means for processing the image with an operator, such as edge enhancement or noise removal prior to transforming the digital image with the tonescale transformation function, . |

14. | The apparatus claimed in claim 12, wherein the means for dividing the histogram further comprises means for determining the grey level that separates two modes of the histogram by maximizing the a posteriori entropy of the image. |

15. | The apparatus claimed in claim 14, wherein the means for dividing the histogram further comprises: (a) means for modeling the background grey level distribution as a uniform distribution having substantially the same entropy as the background distribution, and computing the width W of the model uniform distribution; (b) means for determining the location of a window of width W with the greatest number of pixels in the background region^{1}; and (c) means for choosing the beginning of the window as the start of the background,if the window is located at the upper end of the background distribution else computing a new window based on the average of the grey levels in the window, until the window is located at the upper end of the background distribution, and choosing the beginning of the new window as the start of the background. |

16. | The apparatus claimed in claim 14, wherein the means for dividing the histogram further comprises: (a) means for modeling the region of interest of the histogram as a uniform distribution having substantially the same entropy as the region of interest and computing the width w of the model uniform distribution; (b) means for determining the location of a window of width w with the greatest number of pixels in the region of interest; and (c) means for choosing the window as the region of interest if the window is located at the low end of the region of interest, else computing a new window based on the average of the grey levels in the window until the window is located at the low end of the region of interest, and choosing the new window as the region of interest. |

17. | The apparatus claimed in claim 12, wherein the means for constructing a tonescale transformation function further comprises means for generating the linear portion of the function by determining a slope that will cause the average density and variance of the output image in the region of interest to be equal to preselected target values. |

18. | The apparatus claimed in claim 17 wherein the preselected target values are in the range 0.70.85 and 0.30.4, respectively, for the average density and variance. |

19. | The apparatus claimed in claim 17, wherein the preselected target values are 0.78 and 0.35 respectively, for the average density and vaiance. |

20. | The apparatus claimed in claim 12, wherein the first and/or second portion of the tonescale reproduction function defines a parabola. |

21. | The apparatus claimed in claim 12, wherein the first and/or second portion of the tonescale reproduction function defines a histogram equalization function. |

22. | The apparatus claimed in claim 12 wherein the first and/or second portions of the tonescale reproduction function defines straight line connected to the linear portion by a parabola. |

TONE-SCALE GENERATION METHOD AND APPARATUS FOR DIGITAL X-RAY IMAGES Field of the Invention:,

The present invention relates to digital image processing and more particularly to method and apparatus for adjusting the tone-scale of a digital x-ray image.

Background of the Invention

Any digital diagnostic x-ray imaging system must be able to produce an output from the digital signals in the form of a visible image on some output medium, e.g., photographic film (hard display), cathode ray tube (soft display). The input that is scanned to generate the digital signals may be film (film-based system), storage phosphor plate (storage-phosphor-based system) or a variety of other digital radiography systems. The digital data may also come from a direct digital input (e.g., computed tomography). For any of these systems, the output image must be of diagnostic quality. The following discussion will concentrate primarily on film-based and storage-phosphor-based systems.

The major obstacle to producing high quality images consistently from either system is that the available dynamic range in the output medium (soft or hard) is generally lower than the dynamic range present in the input image. Typically, the output range is about 2.6 density units for the hard medium and less than 2 decades of intensity for the soft medium; whereas the range of grey levels in the input can be as high as 4.5 density units (decades). Along with this output range insufficiency is the fact that the input grey level distribution (particularly the range of the diagnostically relevant portion of the distribution) depends greatly on the body parts being

imaged, the exposure, the modality and the imaging system. The input grey level distribution must therefore be optimally transformed to fit the available output range while at the same time producing a high quality image for diagnosis. This transformation is usually referred to as the tone-scale or gradation correcting transformation. The tone-scale transformation that produces an image of high diagnostic quality must ensure, among other things, good contrast in the region of interest, reasonable contrast in the remainder of the image, no clipping at the low and high ends of the grey level range and no artifacts.

Traditional methods of computing this transformation use gross features (variance, percentile, etc.) of the input histogram. This kind of approach does not always produce acceptable contrast and sometimes produces clipping at the high end of the grey level range. Another method has been described in U.S. Patent No. 4,302,672 in which an optimal tone-scale transformation function is derived for the PA (postero-anterior) chest image. This is done by identifying the spine, the heart and lung fields of the image and assigning appropriate contrasts to the three different regions. The lung field gets the highest contrast (because this is mostly the region of interest) with the mediastinum region getting the lowest contrast. To make this approach robust, a similar derivation would have to be performed for the image of each common view of every body part. While this could work in theory, it is certainly not an efficient or automatic method because of its dependence on exam-type information to process each image.

As a way of getting around this problem, another method of generating a tone-scale

transformation function has been described in U.S. Patent No. 4,641,267. In this method, designed for computed radiography, a few reference tone-scale transformation functions are generated. In order to obtain the tone-scale transformation function for a particular input image, one of the reference functions is selected (depending on the body part) and this function is shifted and rotated by amounts depending on the exposure and other parameters of the image. While this method avoids generating and storing a large number of tone-scale transformation functions a priori, it is (1) not an automatic and totally adaptive method, (2) is not robust with respect to different imaging systems and exposures and (3) may be completely inapplicable to imaging modalities other than computed radiography. Also a certain amount of storage and a priori information are still needed to make ^{' } the method work.

There is presently a need for an automatic method and apparatus for generating a tone-scale transformation function that is adaptive to images and imaging systems. The needed method should also be robust with respect to imaging systems and exposures.

SUMMARY OF THE INVENTION

The objective of this invention is to provide a method of and apparatus for automatically and adaptiyely generating tone-scale transformation functions that are robust with respect to imaging systems, exposure conditions, and body parts.

Another object of the present invention is to provide a method of and apparatus for generating tone-scale transformation functions which obviates the need to store a number of reference transformation functions.

The steps involved in using this method

consist of:

1. Forming a histogram of the digital input image;

2. Dividing the histogram into a region of interest and a background region;

3. Constructing a tone scale transformation function having- a linear portion substantially over the region of interest smoothly joined with a first portion extending from the start of the histogram to the linear portion and a second portion extending from the linear portion to the beginning of the background region.

This method depends entirely on the histogram of the input image, hence it is adaptive and robust. BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing prior art apparatus for performing digital imaging processing;

FIG. 2 is a block diagram of a typical radiation image scanning system for generating a digital image;

FIG. 3 is a block diagram of a typical radiation image printing system in which the tone-scale adjustment according to the present invention is performed;

FIG. 4 is a block diagram illustrating the tone-scale adjusting method of the present invention;

FIG. 5 shows a histogram of a typical projection X-ray image;

FIG. 6 is a block diagram illustrating the steps of locating the background component of the image according to the present invention;

FIG. 7 is a block diagram showing the steps performed in identifying the Region of Interest (ROI) component of an image according to the present invention;

FIG. 8 is a graph illustrating a typical tone-scale transformation function generated according to the present invention; and

FIGS. 9 and 10 are graphs useful in describing the steps of defining the linear segment of the tone-scale transformation function according to the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 is a bϊøck diagram showing apparatus for performing digital image processing. An input image 12 which may be a conventional X-ray image of the type obtained from a film/screen combination system; or a latent image, of the type obtained from a storage-phosphor based system is scanned on a scanner 14 to produce a digital image which is processed (e.g. for edge enhancement, noise removal, etc.) in a Digital Image Processor (DIP) 16. The output of the DIP 16 is then sent to a printer 18 which produces an output image 20.

FIG. 2 shows a scanner 14 of the type which is applicable to a storage-phosphor based system. On this scanner, the latent input image in a storage phosphor sheet 12 mounted on a rotating drum 22 is scanned by a laser beam from a laser 24 and the light emitted by the phosphor sheet 12 is imaged by a lens 25 onto a photodetector 26 and is converted by the photodetector 26 into an electric signal S. The signal S is amplified by an amplifier 28 and digitized by an A/D converter 30. The resulting digital image signal is then either stored, for example, on a magnetic tape 32 or sent directly to the DIP 16 for processing. A scanner for a film based system is similar to that described above except that the light is transmitted through the image bearing input film and collected by the photodetector 26.

FIG. 3 is a block diagram showing a printer, in which the method and apparatus of this invention are embodied. The output of the DIP 16 which may have been stored on a magnetic tape 32 is passed to a tone-scale generator/processor 36 which produces a look-up table that is used to transform the digital image. The transformed digital image is then converted into analog signal by a D/A converter 33. This analog signal is amplified by an amplifier 40 which drives a recording light source 42. The output of light source 42 is imaged by a lens 44 to expose a photosensitive medium such as a photographic film 46 mounted on a drum 48 to produce the output image 20. The film printer in FIG. 3 is shown only by way of example. The present invention may also be employed with other types of printers such as thermal and electrophotographic printers.

In a preferred embodiment, the method of this invention is practiced in the tone-scale processor 36. FIG. 4 shows a block diagram of the steps implemented in this processor 36. The tone-scale processor can physically reside in the DIP

16, or in the printer 18, and is preferrably embodied in a programmable microprocessor. In operation, a histogram of the processed image (i.e. DIP output) is generated 50 as is known in the prior art. From this histogram, a grey level, X„, representing the background grey level of the image is computed 52.

Using the histogram and the background grey level

X _{n }__>, a region of interest (ROI) is determined 54. A tone-scale transformation curve is then computed and put in the form of a look-up table (LUT) 56. These steps are described in further detail below: 1. Determining the Background Grey Level X..,

An accurate determination of the grey level X J__> representing the background is pivotal to the

derivation of the tone-scale transformation curve. From this subset of grey levels, the grey level beyond which all other grey levels are to be printed to the highest density is determined. If this grey level is set too low, clipping will occur; if set too high, contrast at the high end of the grey scale will suffer and the background may not be at the highest density.

FIG. 5 shows a histogram of typical diagnostic medical image from either a screen-film system or a storage phosphor based system. The region from grey level X„ to X, of the histogram represents the region where most of the diagnostic information resides; region X 1, to X _{D }13 represents the grey level distribution of the soft tissues in the image; the region beyond -j_> represents the background or the least absorbing portion of the image. The objective of locating the background is to determine X„.

The first step in determining X _{β } is to approximately threshold the image into foreground and background using the histogram. The method used to do this assumes that the histogram consists of two modes and determines the grey level X D' which separates these two modes, by maximizing the a posteriori entropy of the image as is known in the prior art and disclosed in J.N. Kapur, et al., "A new method for gray-level picture thresholding using the entropy of the histogram," Computer Vision, Graphics and Image Processing, 29 1985, pp. 273-285. Briefly, this method is described as follows, Let {p., i=0,..., M-l} be the normalized histogram of the image where M is the total number of grey levels. Then, if X ' is the boundary between the foreground and background, the entropies of the foreground and background (H_ and H„) are respectively:

X.

B

H = -C- I P, In p . ( 1 ) i=0

M-l

H _{B } = -C B Σ V - In p . ( 2 ) i X + 1

B where

C = ( 3 )

B ( 4 )

i = X. + 1

B

The a posteriori entropy H _{ft }, given X is

H, - ^{H }F ^{+ H }B (5)

The method chooses the X * that maximizes H

The grey levels beyond Xj_>' represent approximately the background grey levels. This region can be refined further. The further refinement is done by modeling the grey level distribution between X ' and M-l as a uniform distribution, using this model to obtain a new set of grey levels for the background and continuing this process until a certain criterion is met as described below. This model uniform distribution is chosen such that its entropy is substantially the same as, i.e. the same as or some fixed fraction of the entropy of the background distribution (i.e. H _{n }j_>) .

The entropy of a uniform distribution of width W is given by

H _{N } = In W (6)

Thus

H _{N } - H _{B } - W = exp (H _{B }) _{( 7 ) }

Having computed the width W of the model uniform distribution, the location of the distribution is determined. The criterion used in placing this distribution is that of "maximum probablility within a window"; i.e. choose the subset of W contiguous grey levels in the range (X ',M-1) with the greatest number of pixels. Because of the nature of the histograms of X-ray images, this location will be at either the low end or high end of the region (X ' ,M-1) . An upper end location represents a very good estimate of the background grey levels. A low end location strongly implies that this subset of grey levels belongs more in the foreground than in the background and should therefore be removed from consideration, thereby creating a new set of background grey levels (X ' ,M-1) . This process is repeated until either the location of the model uniform distribution is at the upper end of the region or the percentage of the number of pixels within the window is less than 0.1. X _{D }, the grey level beyond which all grey levels are printed to highest density, is taken as the average of the grey levels within the final window.

FIG. 6 is a block diagram showing the above described sequence of steps. First the threshold X ' between the foreground and background is computed 58. Next, the entropy H _{D } D for the grey levels in the region (X ' ,M-1) is computed 60. The width W of a uniform distribution corresponding to the entropy H _{D } is computed 62. This window (of width W) is located at either the low or high end of region (X ' ,M-1) 64. If the location is at the high end, the window average (X _{β }) is computed 66 as

the average of the grey levels within the window. If the location of the window is at the low end of the region (X- £,5,M-1) the percentage of pixels having grey levels within the window is checked 68 and if the percentage is less than 0.5, the window average

X _{D } is computed 66 as the average of the grey levels within the window. In the event that the location is at the low end and the percentage of pixels having their grey levels within the window is greater than

0.5, the grey levels within the window are eliminated from the set (Xj_s' ,M-1) to produce a new set

(X D",M-1) of the background grey levels 70. The whole process, from the entropy generation on, is now repeated with the new region (X ",M-1) until the window average X_ can be computed.

2. Generation of the Region of Interest (ROI)

Having determined the background grey level X , the region X to X, hereafter referred to as the region of interest (ROI) is identified. The process of identifying this region is basically a thresholding operation, based on certain criteria.

The criterion used is such that as the background portion of the image diminishes, the threshold approaches the leading edge of the distribution, since most of the information in this case will be diagnostically relevant. This means that traditional approaches to background thresholding as discussed in T. Pun, "Entropic Thresholding: A new approach," Computer Graphics and Image Processing 16, 1981 pp. 210-239, J.N. Kapur, et al., "A new method for gray-level picture thresholding using the entropy of the histogram," Computer Vision, Graphics and Image Processing 29, 1985, pp. 273-285, are not applicable in this case since the threshold given by such techniques approaches the center of support of the histogram as

-li¬ the background diminishes.

Other well known techniques that use gross features of the histogram (e.g. mean, variance, percentile, etc.) to threshold the image do not perform satisfactorily and robustly because of the wide variety of histograms that can result from different body parts and different imaging systems.

Therefore, the criterion of determining the threshold according to the present invention is based on a more comprehensive feature of the histogram and is such that the threshold tends to be the end of the histogram as the background becomes smaller and smaller. The criterion is dictated by the kind of transformation one intends to use over the region of interest. According to the present invention, a linear transformation is employed over the region of interest to preserve the results of any previous image processing (e.g. edge enhancement, noise removal, etc.) that was done on the image. Linear transformation is the ideal transformation when the histogram of the image is a uniform distribution. Thus, the next step after background identification is to model the image histogram as a uniform histogram of certain width and mean using some statistical criterion. The criterion takes into account the fact that the region of interest is the most populated region of the image once the background has been isolated. This is to ensure that the model uniform distribution defines the diagnostically relevant region.

One possible criterion for modeling the histogram is the Minimum Mean Squared Error (MMSE) criterion. With ^{" } this criterion, the goal is to choose a histogram width w and to minimize the mean of the square of the error between the actual image cumulative distribution and the model uniform

distribution. While this gives satisfactory results, it is computionally intensive.

A preferred approach employs the entropy H of the image histogram to calculate the width of the histogram. The goal is to choose w, the width of the model uniform distribution, to be such that the entropy H _{N } associated with this uniform distribution equals H- , the entropy of the image histogram. Let {p 1.,i - 0,...XJ_tJ} be the renormalized image histogram in the range of gray-levels from O to X _{D }i_>. Then

^{X }B H _{χ } = - I P _{i }lnp _{i } (8) i = 0 H _{N } - in w (9)

the width w is obtained by setting H = H , i.e. w = exp(H _{τ }) .

To complete the model, a window of width w is placed at the appropriate (according to some criterion) location on the grey level scale. Similar to the procedure for determining the background disclosed above, we use the criterion of maximum probability within the window, i.e. choose the location with the maximum number of pixels within the window. Due to the nature of the histogram, this location will either be at the low end or at the high end of the grey level scale. The low end location represents the region of interest. In the event that the location is at the high end, we obtain the average grey level X within the window and repeat the above described process represented by equations (8) and (9) and continue the process until the window is located at the low end of the grey scale.

FIG. 7 is a block diagram illustrating the steps in locating the region of interest. First the

-13- entropy of the histogram is computed 72 using the image grey levels between X__ and X _{R } computed as described above, where we define

XQO = min(100,X _{10 }) (10) ^{x }10 = 10 - th percentile of the histogram

( Xβ on the first pass X _{av } on subsequent passes Next, the width w of the region of interest

ROI is calculated 74. A window corresponding to width w is located 76. If the window is at the low end of the histogram, the window is taken as the ROI 78. If the window is at the high end of the histogram, the pixel values in the windows are averaged to produce a new average X ' and the process is repeated over the new range (X _{Q0 } "*" ^{X } _{B }') _{* }* until the window is located at the low end of the histogram.

The end of the window X.. is given by

X _{1 }=X _{00 } + w. (11)

Generation of the Output Look-up Table

The output look-up table representing the tone-scale transformation function is now derived, based on the width w and location of ROI. The tone-scale transformation function generated according to the present invention is shown in FIG. 8 where the ordinate represents the required output density and the abscissa represents the input grey level. The tone-scale transformation function 82 consists of a linear segment 84 over substantially all of the region of interest. The linear segment is generated by a line between a point P, representing the start of the region of interest at Dmm. , and a point P2_ representing the end of the region of interest at a density D, determined as described below. The linear segment 84 is smoothly joined with

a first segment 86 over a grey level region starting at the start of the histogram and smoothly joined at point 90 to the linear segment 84 to within Δ. of the start of the region of interest. Similarly, a segment 88 is smoothly joined to the linear segment

84 at point 92 within Δ_ of the end of ROI, and extends to Dmax at the background grey level XD_.

Segment 84 is chosen to be linear to preserve the micro structures the of image after it has been processed by the DIP 16; segments 86 and 88 can be linear or non-linear.

The widths of the transistion regions,

Δ. and Δ_, depend on the nature of the histogram and the bit depth of the input image. We have determined that reasonable values formedical images can be found in the following way. The value for Δ,, and the intercept of the straight line

84, X_' . However, a certain minimum width is recommended in order not to create abrupt slope changes in the tonescale. Similarly, the value for

Δ_ should depend on the distance between X*. and

X__>,. However, this width should have a minimum value in order not to create abrupt slope changes in the tonescale. Expressions that satisfy these constraints are;

Δ _{χ } = MIN[M/20, |X _{0 }-X _{0 }" |/2] Δ _{2 } - MIN[M/20, IXg-X-, |/2], where M is the total number of grey levels in the image and the function MIN generates as its output the minimum value of its arguments.

The slope of the linear segment 84 and hence the value D, is determined by setting the average and variance of the output image density over the ROI equal to some values which are empirically determined from a statistical study of many satisfactorily toned images. The value D. is found as follows. Let

D(X) be the output density as a function of x, the input grey level. Then for the linear model (over the ROI) f _{1 } (X) , X _{0 } X<X _{Q }+Δ _{1 } D(X) = ( 12 ) f _{2 } (X) , X _{1 }-ι _{2 } < X < X _{B } where γ = 1 ^{~ } min is the slope of the straight line, ^{X }l ^{' X }θ'

Dmm. is the minimum density ^{J } achievable in the output image, and f.(x), f _{2 }( ^{χ }) represents the segments 86 and 88 respectively.

The nonlinear functions f,(X) and f _{2 }( ^{χ }) are chosen so that there is functional and slope continuity at the break points 90 and 92, respectively. The function f~(X) depends on both D-. , the density aim at the end of the ROI, and

Dma , the maximum density - achievable in the output image, while the function f 1. (X) depends on Dmm. and on the relative positions of X„ and X _{0 }'- There are a number of known curve fitting methods that can be used for generating these nonlinear regions. Since each function must satisfy two boundary conditions on its value and one on its slope, three parameters are needed in the fit. Thus, a general quadratic fit can be used. We have found empirically that a parabola provides the best visual impression in the images generated with this method. Alternatively, it is also possible to use histogram equalization (see for example W.K. Pratt, Digital Image Processing, Addison Wesley, 1978) to generate these sections.

Taking the average and variance of equaton (12) ov the linear portion of the ROI gives

^{D }av " Υ< ^{X }av ^{" X + D }min < ^{13 }>

where D = average density of output image over linear part of ROI D = variance of output image over linear part of

ROI X = average grey level of input image over linear part of ROI X = variance of grey level of input image over linear part of ROI. Equations (13) and (14) represent two equations in four unknowns. By selecting aim values for D and D Vαl, based on statistical analysis of a large variety of images, these equations can be solved for γ and X- ' :

^ - ^{D }var ^{X }var ^{; } < ^{15 }>

X' _{0 } = x _{gv }- ^{D }av ^{" D } in (16)

Typically the value of D is in the range of

0.7-0.8, while the value for Dvar lies in the rang ^{~ }e of 0.33-0.37.

(These solutions are only approximations in the case where X' < X_) .

There are two possibilities for X' :X' <X and X' >X_. The case X" <X_ is depicted in

FIG. 9 in which 94 represents a line of slope γ obtained as described above. To ensure that Dmm. is reproduced in the output image, the slope of this line

94 is adjusted about point „ to intersect point

P_ at X' as shown by dotted line 96. The resulting slight increase in variance and decrease in average density is negligible.

FIG. 10 represents the case X' > X_. Line 94 is the straight line obtained as described above. The slope of this line is adjusted about point

P_ to intersect point P_ at X' as shown by dotted line 96 to ensure reproduction of Dmm. in the output image. The slightly higher average density and lower variance from the target values are insignificant.

Industrial Applicability and Advantage

The present invention is useful in digital image processing and particularly in digital processing of medical diagnostic x-ray images. The invention is advantageous in that tone-scale of an output image is automatically adjusted for a large family of images without the need to store a variety of tone-scale functions, and without the need for human intervention to select a desired tone-scale reproduction function. In particular the processing method automatically adapts to many different examination types such as' chest, gastrointestinal, skull, and extremities without operator intervention.

**Previous Patent:**MAGNETIC FIELD GENERATING ASSEMBLY

**Next Patent: ATMOSPHERIC POTENTIAL MEASUREMENT DEVICE**