Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
A METHOD FOR AUTOMATICALLY DETECTING PEAKS IN THE GRAY-LEVEL HISTOGRAM OF A DIGITAL IMAGE
Document Type and Number:
WIPO Patent Application WO/1987/006374
Kind Code:
A1
Abstract:
In many digital image processing methods, it is desirable to selectively apply digital image processing to identifiable structures in the image. For this purpose it is known to select gray level thresholds between structures based upon the location of corresponding peaks in the gray level histogram of the digital image. However, it is a problem to automatically detect the locations of peaks in the histogram and to select the gray level thresholds. The present invention provides a method for automatically detecting the peaks and selecting gray level thresholds for segmenting a digital image into distinguishable structures including the steps of detecting peaks in a gray level histogram of the digital image by applying smoothing and differencing operators to the gray level histogram to generate a peak detection function wherein positive to negative zero crossings (ai) of the peak detection function represent the start of a peak, and maxima (bi) following such a zero crossing represent the end of a peak.

Inventors:
SEZAN MUHAMMED IBRAHIM (US)
SCHAETZING RALPH (US)
Application Number:
PCT/US1987/000656
Publication Date:
October 22, 1987
Filing Date:
March 27, 1987
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
EASTMAN KODAK CO (US)
International Classes:
G06T5/40; H04N5/32; G06T7/00; (IPC1-7): G06F15/68; H04N5/32
Foreign References:
EP0082318A11983-06-29
US4538227A1985-08-27
US3983320A1976-09-28
Other References:
Computer Vision, Graphics and Image Processing, Volume 26, No. 3, June 1984, Academic Press, Inc. (New York, US), J. KAUTSKY et al.: "Smoothed Histogram Modification for Image Processing", pages 271-291 see page 277, lines 21-36; page 283, line 38 - page 290, line 12
Download PDF:
Claims:
Claims
1. A method for automatically detecting peaks in the gray level histogram of a digital image characterized by the steps of applying smoothing and differencing operations to the gray—level histogram to generate a peak detection function, wherein positive to negative zero crossings of the peak detection function represent the start of a peak, and a maximum following such a zero crossing represents the end of the detected peak.
2. The method for detecting peaks claimed in claim 1, wherein said step of peak detecting includes the steps of: a. forming a cumulative distribution function from said gray level histogram; b. smoothing said cumulative distribution function with a sliding window average of size w (where w is an odd integer)to produce a smoothed cumulative distribution function; and c. subtracting said smoothed cumulative distribution function from said cumulative distribution function to produce said peak detection function.
3. The method for detecting peaks claimed in claim 1, wherein said step of peak detecting includes the steps of: convolving the histogram with a smoothing and differencing operator Iw(n) of the form: +l )]/w, n—[(wl)/2]+2 . [(wl)/2]l .
4. The method for automatically detecting peaks claimed in any of claims 1 to 3, further characterized by the steps of: a. applying first smoothing and differencing operations to the gray—level histogram, having a relatively wide smoothing function to generate a first peak detection function; b. applying second smoothing and differencing operations to the gray—level histogram, having a relatively narrow smoothing function to generate a second peak detection function; and c. forming a set of detected peaks from said first and second peak detection functions based upon the percentage of overlap between the peaks detected by said first and second peak detection functions.
5. The method for automatically detecting peaks claimed in claim 4, wherein said step of forming a set of detected peaks further includes basing said selection on the number of peaks detected by said second peak detection function that overlap with peaks detected by said first peak detection function.
6. Use of the method defined in any of the preceding claims for segmenting a digital image into distinguishable structures, characterized by the step of: setting the gray level threshold at a gray level between said clusters of peaks.
7. Use as defined in claim 6, in radiography for automatically selecting a gray level threshold between lung and mediastinum in a digital chest radiograph, further characterized by: a. if the peaks are classified into two clusters, setting the gray level threshold at a convex combination of the gray level at which the first cluster ends and the gray level at which the second cluster starts; b. if the peaks are classified into more than 2 clusters, determine the two adjacent clusters having the largest gray level separation and set the gray level threshold at a convex combination of the gray level at which the first cluster of the pair ends and the gray level at which the second cluster of the pair starts; c. if there is only one peak, and if at least P„ percent of the total number of gray levels are confined between the largest gray level (nmax) and the gray level at which the peak ends, setting the threshold to the gray level at which the peak ends; if the Pτ percent criterium does not hold, then repeat the peak detection and classification steps with a smaller window size and repeat step (a) et seq. if at the end of a given number of repetitions there is still one peak detected and the percent criterion does not hold, then the histogram is essentially unimodal and a threshold does not exist; and d. if the peaks are classified into only one cluster, and if at least P_. percent of the total number of gray levels are confined between the largest gray level (n ) and the gray level at which the cluster ends, setting the threshold to the gray level at which the cluster ends, if the P„ percent criterium does not hold, then repeat the peak detection and classification steps with a larger window size and repeat step (a) et seq. if at the end of a given number of repetitions the peaks are classified into only one cluster and the P, percent criterium does not hold, then treat the peaks as clusters and use step (b) for decision.
Description:
A METHOD FOR AUTOMATICALLY DETECTING

PEAKS IN THE GRAY-LEVEL HISTOGRAM

OF A DIGITAL IMAGE

Technical Field This invention relates to the field of digital image processing, and more particularly to a method for processing a digital image to automatically detect peaks in a gray—level histogram of the digital image. A knowledge of the location of the peaks in the histogram is useful in selecting gray level thresholds for segmenting the digital image into distinguishable structures. Background Art

In digital image processing, and particularly in digital radiography, various image processing methods have been applied to the digital image to increase the diagnostic usefulness of the image. For example in the field of chest radiography, the goal of these image processing methods is to reproduce faithfully or to enhance the detail in both the lungs and the mediastinum in spite of their often large differences in subject contrast. However, when these image processing methods are applied to the entire digital radiographic image, the resulting enhancement in the lung field may be destructively high, potentially decreasing the detectability of small lesions. To overcome this problem, anatomical structure-selective processing of chest radiographs is desirable to prevent the detrimental effects to one structure from outweighing the improvement to another structure.

McAdams et al (see "Histogram Directed Processing of Digital Chest Images" to be published) have discussed anatomical—structure selective image processing as applied to digital chest radiography. They used the lung field and the mediastinum histograms individually to determine a

lung/mediastinum gray level threshold. The individual histograms for the lung field and the mediastinum were constructed by a trackball—driven cursor outlining technique. The gray level threshold was selected from the gray levels at which the two histograms overlap. McAdams et al. presented impressive results of anatomical structure—selective image processing guided by a lung/mediastinum gray level threshold. However, their method for determining the gray level threshold required human intervention, and therefore it was impractical for routine application. Rosenfeld and De La Torre (see "Histogram Concavity Analysis as an Aid in Threshold Selection", IEEE Transactions on Systems Man and Cybernetics, Vol. SMC—13, 1983) proposed an algorithm that used the image histogram concavity to automatically determine a gray level threshold for the images containing at most two major gray level subpopulations. Although capable of being automated, their method is very noise sensitive. Furthermore, the threshold determined by this method always lies closer to the tallest peak in the histogram which does not prove to be satisfactory for chest radiography in general. Another problem encountered in the effort to automate the process of image segmentation is the difficulty in determining whether and where a peak in the histogram is actually located. This problem is aggravated by the presence of noise in the image, which causes the peaks to appear as clusters of spikes.

It is therefore the object of the present invention to provide an improved digital processing method for automatically detecting peaks in the histogram of a digital image and a method of selecting gray level thresholds for segmenting a digital image into distinquishable structures, that is free from the shortcomings noted above.

Disclosure of the Invention

The object of the invention is achieved by a digital image processing method for automatically detecting peaks in a gray level histogram of the digital image characterized by applying smoothing and differencing operators to the gray level histogram to generate a peak detection function wherein positive to negative zero crossings in the function represent the start of a peak, and a maximum of the function following such a positive to negative zero crossing represents the end of a peak. Gray level thresholds are set at gray levels between the detected peaks. Brief Description of the Drawings

Fig. 1 is block diagram showing digital image processing apparatus useful for practicing the digital image processing method of the present invention;

Fig. 2 is a histogram of a typical chest radiograph; Fig. 3 is a graph showing the cumulative distribution function of the digital image represented by the histogram in Fig. 2;

Fig. 4 is a graph illustrating the form of the smoothing and differencing operations employed in one mode of practicing the present invention;

Fig. 5 is a graph showing a peak detection function generated by a smoothing window of width 541; Fig. 6 is a graph showing the peak detection function generated by a smoothing window of width 271; Fig. 7 is an enlarged view of the histogram shown in Fig. 2, illustrating the locations of the detected peaks for a smoothing window of width 541 and 271 respectively;

Fig. 8 is a flow chart of a generalized peak detection method according to the present invention; and

Fig. 9 is a histogram of a digital radiographic image of human hands. Modes of Carrying out the Invention

Fig. 1 is a schematic diagram illustrating digital image processing apparatus useful for practicing the method of the present invention. The apparatus includes a scanning input portion which may comprise, for example, a drum scanner 10 for scanning transparencies such as conventional film radiographs. The drum scanner 10 includes a transparent drum 12 on which the radiograph 14 is mounted. A light source 16 is provided inside the drum to illuminate a spot on the radiograph. A photo sensor 18 receives the light signal modulated by the radiograph 14. The drum 12 spins on its axis in the direction of arrow A to form line scans, and the light source and sensor are moved relative to the radiograph in the direction of arrow B to form the scan raster. The analog signal detected by the photosensor 18 is amplified by an amplifier 20 and is converted to a digital signal by an analog to digital converter 22. The scanning input portion of the digital image processing apparatus may also comprise a stimulable storage phosphor radiographic imaging system of the type shown in U.S. Patent 3,859,257 issued to Luckey, January 1975 reissued as RE 31,847, March 12, 1985.

The digital radiographic signal is stored in a memory 24 and is processed by a digital image processing computer 26. The digital image processing computer 26 may comprise a general purpose digital computer, or a special purpose digital computer designed specifically for processing images. The digital image processing computer performs operations on a digital image, such as tone scale adjustment, and edge enhancement according to well known digital

image processing methods. The processed digital image is converted to a video signal by signal processing electronics and video encoder 28 and is displayed on a video monitor 30. Alternatively, the digital image is displayed by producing a film image on output scanning apparatus 32. The output scanning apparatus comprises a digital to analog converter 34 for converting the processed digital image signal to an analog signal, an amplifier 36 for amplifying the analog image signal, and a light source 38 modulated by the analog signal. Light source 38 is focused to a spot by a lens 40 onto a photosensitive medium such as photographic film 42 on a spinning drum 44. The various elements of the digital image processing apparatus communicate via a data and control bus 46. Fig. 2 is a histogram plot compiled from a typical chest radiograph that was scanned and digitized by apparatus such as shown in Fig. 1. The digital image signal was a 12 bit 1250 x 1400 pixel image. As can be seen from Fig. 2, it is not readily apparent from visual observation of the histogram, which cluster of peaks in the histogram belong to the lungs, and which to the mediastinum. The plot shown in Fig. 2 is typical of a histogram from a chest radiograph and illustrates the difficulty of selecting a gray level threshold between the lungs and mediastinum.

The inventors have found, through experimentation, that a gray level threshold between the portions of the histogram representing the lung and mediastinum may be reliably selected by the method of the present invention. The method involves the steps of applying smoothing and differencing operations to the histogram to produce a peak detection function wherein a positive to negative zero crossing in the function indicates the beginning

of a peak, and a maximum occurring after such a positive to negative crossing represents the end of a peak. According to one mode of practicing the invention, the peak detection function is generated by forming the cumulative distribution function F(n) of the gray levels in the image where n j n i h(n) is the image histogram and n represents the gray

N levels in the image 0 < n < 2 -1 where N is the number of bits used to represent the digital image

(e.g. N=12). A plot of F(n) from the histogram of

Fig. 2 is shown in Fig. 3.

Next, the cumulative distribution function F(n) is smoothed by applying a sliding window average having a width w to (assumed to be an add integer) produce a smoothed cumulative distribution function

F (n). The peak detection function r(n) is generated by subtracting the smoothed cumulative distribution

function F (n) from the original cumulative distribution function F(n) as follows:

r(n) - F(n) - F w (n) (2)

The resulting function r(n) is a function having positive to negative zero crossings that correspond to the beginnings of peaks in the histogram, and maxima corresponding to the ends of the peaks in the histograms.

Alternatively, the peak detection function r(n) can be computed directly from the histogram h(n) by the following convolution r(n) = q w (n) * h(n) (3) where <I w (n) is a function that can be expressed as the convolution of a "smoothing" kernel s (n) and a "differencing" kernel d(n) as follows:

q w (n) = d(n) * s w ( n (4)

a plot of q w (n) for a window size of w=»13 is shown in Fig. 4.

Fig. 5 shows the peak detection function r(n) generated from the histogram of Fig. 1 using a smoothing window w, 541 samples wide. In Fig. 5, a. — is a positive to negative zero crossing, and indicates the gray level at which the ith peak starts b. — is a maximum after the ith positive to negative zero crossing and indicates the gray level at which the ith peak ends. The pair (a., b.) characterizes the ith peak detected.

Fig. 6 shows the peak detection function r(n) generated with a window size w, 271 samples wide. In the following description of the signal processing method, ρ(n) — represents the percentage of the total number of gray levels confined to the interval [o, n] (p(n)=100 F(n)) n_ — represents the gray level threshold between the lung and the mediastinum d - is an empirically derived constant representing the minimum separation in gray levels between two clusters of peaks n Max ~~ is the lar 8 β st gray level present in the image

R a . - is a predetermined parameter indicating significant overlaps of two peaks.

The steps in the signal processing method for selecting the lung/mediastinum gray level threshold will now be described in pseudo-Fortran. This description is sufficient to enable a computer programmer of ordinary skill in the art to implement the method in a general purpose digital computer or a special purpose image processing computer. STEP NO.

0. j = 1 _

1.1. Compute F w (n) with w = w.

1.2. Form r(n) - F(n) - F w (n), or q w (n) * h(n)

1.3. Histogram peak detection: To detect peaks of the histogram consider the zeros and the local maxima of r(n). A zero—crossing to negative values indicates the start of a peak, i.e., the gray level at which the crossover 'occurs is a.. Similarly, the next zero—crossing to negative values at the gray level a i+1 (a. +1 >a.) indicates the start of the (i+l)th peak. The gray level b., a 4<b j < a <+ τ» at which r(b t ) - Max [r(n)],a t < n < & i+l , determines the end point of the peak (see

Fig. 5). That is, the ith peak is characterized by the pair (a., b.), and the (i+l)th by (a i+1 » ^_+ι ^ and so on * When the peak detection function has a negative value at n=o, it is assumed that the start of the first peak a, is at zero.

1.4. Terminate the search for the peaks at the gray level n g . n g is determined from

P ^Max "15 " P S * P( V (5)

In other words, it is assumed that there does not exist a prominent detectable peak in the range where the upper P g percent

(excluding the background level at n„ ) of the gray levels are confined. The " value of the parameter P~ is determined empirically by studying various chest histograms.

Note: If ns is reached after a zero—crossing to negative values but before the next zero-crossing to negative values, then the end point of the last peak

(a κ , g ) is taken to be n i.e.,

b v — n β . At this point a set of peaks A

defined by A = {(a i , ± : i - 1,2,..,!^}

where 0 < a. < 2 N - 1 and 0 < b,

I\I < 2 —1, is obtained.

1.5. Preprocessing: If < m » fo ∑ any i — 1,2,..,K_—1 then (a., b.) and (a. ., b. .) are combined into a single peak to form (a., b i+1 )« In this case the set A becomes:

A =- £( ai , b i ) : i=l,2,..K 2 } ( 2 < K χ ). Parameter m is a constant that is determined experimentally.

1.6. Significance test: If the percentage of the gray levels confined to the peak (a., b.), i » 1,2,..K. is less than a certain value P sig » i.e., ρ(b t ) - p(a i ) <

Psi.g, then the peak is considered to be insignificant and it is excluded from the set A. Thus for L (L >0) insignificant peaks A becomes:

A - {(a^ b t ) : i - 1,2,..K 3 } where K 3 = K 2 — L

P . is a value that is determined s g experimentally. 1.7. Classification: the peaks are classified into clusters as follows:

(a., b,) belongs to the first cluster, (i) i = 2 (ii) IF ( a i -^ i _ 1 < d) THEN (a ± , b i ) and ^ a i-ι' b i—l^ Del °ng to the same cluster

ELSE (a., b.) belongs to the next cluster; a. is the starting value of the next cluster, where d is a constant determined experimentally,

(iii) i - i + 1 (iv) IF(i < 3 ) GO TO (ii) STOP 1.8. Decision: threshold selection 1.8a.If the peaks are classified ' into two clusters then the lung/mediastinum threshold is set to a gray level n„ which lies between the end point of the first cluster and the starting point of the second cluster, that is n χ - int [μb(l) + (l-μ)a(2)], 0 < μ < 1, (6) where int[.] is the integer truncation function, a(2) is the starting point of the second cluster, and b(l) is the end point of the first cluster. (Starting point of a cluster is defined to be the starting point of the first peak classified to that cluster. Similarly, end point of a cluster is defined to be the end point of the last peak classified to that cluster).

1.8b.If the peaks are classified into more than two clusters, the separation in gray levels between each successive clusters is computed. The pair with the largest separation is selected and the threshold is set to a gray level n„ that lies between this pair, i.e. , n τ - int [μb(_D + (l-μ)a(£+l)] , 0 < μ < 1, (7) where Max [a(x+l)-b(x)] - a(l+l) - b(ft). x=l,2,..,M

(M is the total number of clusters). 1.8c.If only one peak is detected (K 3 =l)

IF (K 3 »l) THEN I αP<rι maχ -l - PO^)] < P τ ) THEN

IF ( (j+1) < J ) THEN w — w j.+.,1 — (w"j.+l)/2 ! process can be repeated with a smaller window size GO TO STEP 1.1

ELSE

Histogram is essentially unimodal. A threshold does not exist. END IF ELSE

Histogram is essentially unimodal but a threshold can be set. n T " b l END IF END IF

Note: P τ is an experimentally determined percentage criterium. J is a user specified parameter.

l.δd.If the peaks are classified into one cluster (M=l):

E

IF ( (j+1) < J) THEN w W j+1 2W J -1 process can be repeated ! with a larger window size

GO TO STEP 1.1 ELSE

Peaks are treated as clusters and decision is made according to (1.8b). END IF END IF The signal processing method was applied to the digital chest radiograph having the histogram shown in Fig. 2. The parameters were set as follows: J - 2 μ - 0 - 12 w - 541, 271 P s - 10.0 m - 15

P sig ~ 1 '° d - 235

P χ = 20.0

At the end of STEP 1.6 of the method the following sets of peaks were obtained.

A - {(0,409), (1139, 1567)} (w * 541) A - {(37,255), (274,301), (326,401),

(1160,1567)} (w=271)

The peaks are illustrated on the image histogram in Fig. 7.

The signal processing method was tested with various chest radiographs to empirically determine the initial window size w = w,, the separation criterion d, and the percentage criterion P_. In almost all cases a threshold was determined without the need to modify the initial window size w = » w,.

The threshold selection method according to the present invention was applied to an assortment of digital chest radiographs to select gray level thresholds between the lungs and the mediastinum. Then various anatomical structure selective image enhancement procedures were applied to the digital chest radiographs using the selected gray level thresholds. The image enhancement procedures included anatomical selective tone scale adjustment and edge enhancement. In these tests, the gray level thresholds automatically selected by the method of the present invention were found to be appropriate and yielded diagnostically useful results. Steps 1.7 and 1.8 of the above, method exploit the a priori knowledge of the existence of at most two well-separated (at least by d in gray levels) major histogram clusters corresponding to the mediastinum and the lung field. In general, images can have any number of major structures each of which correspond to a single, or a group of histogram peaks (clusters). The thresholds separating the major structures are then set to gray levels between these peaks. For images other than chest radiographs, the above method can be generalized as follows: steps 1.1 through 1.6 are iterated twice with window sizes w«w. and w=*w 2 (w. > w 2 ) to obtain two sets of peaks:

A l " f (a i' i ? : iasl»2 ""I J ( -w χ ) and A A 2 2 β { (c k ' <V : kasl » 2 "" κ ) ( w=w 2 ) .

(K > I since the sensitivity of the peak detection

increases with decreasing window size (see Fig. 7) ).

Based on selection rules, peaks are selected from these two sets to form a final set C of the so-called

•major' peaks. The thresholds are then set to gray levels between the major peaks.

The A 2 ~intervals (or equivalently the

A 2 ~peaks), i.e., (c. ,d.)'s may overlap with the

A..—intervals (or equivalently the A,—peaks), i.e., (a,,b,)'s. If the relative population of the gray levels contained in the overlap exceeds a predetermined value then the overlap is said to be

significant'. Nonoverlapping peaks, or insignificantly overlapping peaks are called

•independent' peaks. The overlapping and the independent peaks are determined by the overlap detection procedure described below. The set C of the major peaks is formed via the following rules:

Rl. An A,-peak qualifies for the set C if

(i) • it is an independent peak, (ii) • it is not an independent peak but total number of the significant overlaps that are 'major' overlaps is less than t (if an A 2 ~peak overlaps significantly with an A,—peak then the overlap is a major overlap if the ratio of the number of gray levels contained in the overlap to the total number of gray levels contained in the A,—peak exceeds the value

Rmaj.) and t is a predetermined parameter.

R2. An A 2 -peak qualifies for the set C if

(i) • it is an independent peak,

(ii) • it is not independent and its overlap with the A j -peak is a major overlap and the total " number of A 2 ~peaks that have major overlaps with the A,-ρeak is at least t,

(iii) • it is not independent and its overlap with the A,-peak is not a major one but there exist at least t other A 2 ~peaks with major overlaps with that

A.-ρeak. In this case adjacent peaks that do not have major overlaps with the A.—peak are combined into single peaks.

The final set C can be defined as

C = { (β^,^) : m=l,2,..,M }, where (em,fm) ε A_1 U A2„. The thresholds are then set to gray levels n τ , n τ ,....,n τ where l l l 2 (M-l) n„ = int { μf a + (1- -μ)e a+1 }, 1 - 1,2..,(M-1)

and 0 < μ < 1. the overlap detection procedure that determines the overlapping and the independent peaks will now be described in pseudo-Fortran (significant overlaps will be denoted by the > sign).

2.1. i - 1

2.2. k = 1

2.3! IF (c^ > a ± AND b i > d^) THEN I A 2 ~ρeak is contained

(c k' d k } ' ' > <a i'V in the A,-peak

k * k + 1

IF (k > K) GO TO 2.7

GO TO 2.3 END IF IF (c^< a i AND d fc > b ± ) THEN I A χ -peak is contained a c k ! in the A 2 ~ρeak i ~ k ! replace the A^-peak k = k + 1 I with the A 2 ~ρeak

IF (k > K) GO TO 2.7 GO TO 2.3 END IF

2.4. IF (c. < a . < d. ) THEN I (c k> d.) overlaps with

(a-.b * ) from left

P k * LP(d lc )-p(a i )]/[p(d k )-p(c k )] ! left overlap percentage IF(P > P L )THEN I overlap significance check. P, is the left overlap significance

( Clc ,d k ) - -> (a i t ± ) measure . k = k + 1

IF (k > K) GO TO 2.7

GO TO 2. .3

ELSE c k »d k is in<lepein k = = k + 1

IF (k > K) GO TO 2

GO TO 2. .3

END IF

END IF

2.5. IF (c k < b ± < d k ) THEN I overlaps with

_ (a.,b.) from right

P β [P(b i )-p(c v )]/[p(d )-p(c )3 ' right overlap Λ ι κ K R percentage

IF (i < I) pjj - [p(d k )-p(a i+1 )]/[p(d k ) r p(c k )]

! check the possibility of I left overlap with : (a i+l' i+l ) IF (P k > P k ) THEN : right overlap

IF (P k > P R ) THEN ! overlap significance

! check. P R is the right

I overlap significance ! measure

(c k »d lc ) ~ _> ^ a i' b i k - k + 1

IF (k > K) GO TO 2.7 GO TO 2.3 ELSE

(c k ,d k ) is independent k = k + 1

IF (k > K) GO TO 2.7 GO TO 2.3

END IF ELSE ! left overlap with

( a i+1 .b 1+1 >

IF (? ≥- p τ ) THEN : overlap significance κ check

(c k ,d k ) - -> (a i+1 ,b i+1 ) k = k + 1 i - i + 1

IF (k > K) GO TO 2.7 GO TO 2.3 ELSE

(c k ,d k ) is independent k = k + 1

IF (k > K) GO TO 2.7 GO TO 2.3 END IF END IF END IF

2.6 . IF (d k < a i THEN <W lies to the left of

(c k , d k ) is independent ! (a i ,b i ) with no overlap k = k + 1

IF (k > K) GO TO 2.7 GO TO 2.3 ELSE ! (c k ,d k ) lies to the right of • (a-.b.) with no overlap

IF ( i > I ) THEN : it lies to the right of the ! last A,—peak

(c k ,d k ) is independent k = k + 1

IF (k > K) GO TO 2.7 GO TO 2.3 END IF

DO LL = i + 1, I I check for possible overlaps I with upcoming A,—peaks

IF (a, L < d k < b,,) THEN ! an overlap exists i - LL

GO TO 2.3 ELSE

CONTINUE END IF

ENDDO (c k ,d k ) is independent ! no overlap k = k + 1

IF (k > K) GO TO 2.7

GO TO 2.3

END IF Note: P L and R R are the left and the right overlap significance criteria respectively. P. «■ P R — P Q without loss of generality. P Q is determined heuristically. 2.7. A.,-peaks that either do not overlap with any of the A ? —peaks or overlap with A 2 ~peaks insigni icantly are independent peaks.

STOP The window sizes w. and w 2 and the criteria

R . , and t can be determined empirically for the

class of images that is of interest, the general threshold-selection technique is illustrated in Fig. 8. The general technique was applied to a radiograph of human hands having the histogram shown in Fig. 9. The parameters were set as follows: μ - 0 N - 12 w χ - 541 w 2 - 271 t - 1

P s - 10.0 m - 5

P sig - 5

» 90.0 P L = P R » P 0 "

R maj - 0 5

The following sets of peaks were obtained wit]h w^! 541 and w ? =271:

{(0, ,1385), (1484,2319), (2436,2902)-}

A l *

(w χ = =541) and •

A 2 ~ {(509,1385), (1496, ,1744) , (1785,2006),

(2014,2303), (2428,2623), (2662,2902)} (w 2 =271).

The set C of major peaks was

C - {(509,1385), (1496,2006), (2014,2303),

(2428,2623), (2662,2902)}. The corresponding thresholds n τ = 1496, n τ « 2014, x l l 2 n τ = 2428, and n τ — 2662 provided a satisfactory l 3 x 4 segmentation of the hands radiograph. Industrial Applicability and Advantages

The present invention provides a method for automatically detecting peaks in a gray level histogram of a digital image, and for selecting the gray level threshold values between distinguishable structures in the digital image. The method is useful in the field of digital image processing, particularly in the field of digital radiography.

The method has the advantages that peaks are reliably detected in the presence of noise and gray level threshold values are selected automatically without the need for human intervention, thereby simplifying the digital image processing procedure making it more practical and useful.