the present invention discloses a general method for automatically locating instances of a specified image pattern in a digital image . in particular , this invention discloses a robust and computationally efficient method for automatically locating cylindrical bones in digital projection radiographs . the method is based on image pattern filters and eigenvector analysis . the characteristic profile ( i . e ., the code values on a line segment that crosses the bone perpendicular to the bone edge ) of a cylindrical bone is selected as the basis for creating an image pattern . the characteristic profile for a cylindrical bone is generally comprised of two peaks corresponding to the high - density bone edge areas and of a valley corresponding to the less dense center region of the bone . the algorithm utilizes a gradient - based edge detection to locate candidate bone edge pixels . for each candidate pixel , the bone image profile is analyzed to identify indicators of bone location . then , shape constraints of the image profile is used to refine the further selection of candidate profiles . a set of training profiles is used to construct an eigenvector representation for the characteristic cylindrical bone profiles . the algorithm then uses an eigenvector classifier to locate cylindrical bones in the imagery that match the eigenvector representation of the characteristic profile . in the following description , the method of the invention will be described for locating cylindrical bones . referring now to fig1 , there is shown a digital image system incorporating the present invention the digital image is acquired by image acquisition system 30 . the digital image is processed by image pattern filter system 32 and the processed image is output to image display 34 . image acquisition system 30 can be one of the following : a computed radiography system ; direct digital radiography system ; radiographic film digitizer ; diagnostic image modality ( ct , mri , us , nm , and pet ); digital image archive . the image display can be a soft copy display ( crt , liquid crystal display ) or a hard copy ( film , paper ). the digital image is processed in image pattern filter system 32 ( fig1 ) according to the method of the present invention . system 32 can take the form of a digital computer , such as illustrated in fig9 . in such case , one or more of the steps of said method can be carried out using software routines . image processor can also include hardware or firmware for carrying out one or more of the method steps . thus , the steps of the method of the invention can be carried out using software , firmware , hardware either alone or in any preferable combination . as shown in fig9 a digital computer 300 includes a memory 310 for storing digital images , application programs , operating system , etc . memory 310 can include mass memory ( such as a hard magnetic disc or cd rom ), and fast memory ( such as ram ). computer 300 also includes input device 312 ( such as a keyboard , mouse , touch screen ), display 314 ( crt monitor , lcd ), central processing unit 316 ( microprocessor ), output device 318 ( thermal printer , dot matrix printer , laser printer , ink jet printer ). components 310 , 312 , 314 , 316 , 318 are connected together by control / data bus 320 . computer 300 can include a transportable storage medium drive 322 for reading from and / or writing to transportable storage media 324 , such as a floppy magnetic disk or write - able optical compact disk ( cd ). as used in this application , computer readable storage medium can include , specifically , memory 310 and transportable storage medium 324 . more generally , computer storage medium may comprise , for example , magnetic storage media , such as magnetic disk ( hard drive , floppy disk ) or magnetic tape ; optical storage media , such as optical disk , optical tape , or machine readable bar code ; solid state electronic storage devices , such as random access memory ( ram ), read only memory ( rom ); or any other physical device or medium which can be employed to store a computer program . following is the method of the invention as applied to finding cylindrical bone patterns and the major steps of locating cylindrical bones . referring now to fig1 a , there is shown a flow diagram of the general method of the present invention for automatically locating instances of a specified image pattern in a digital image . a digital image is input ( box 10 ). then , candidate points are found through the detection of a first feature of the specified image pattern ( box 12 ). for each candidate point , a search is conducted for a second feature of the specified image pattern ( box 14 ). for each pair of features found so far , all features of the specified image pattern are matched at each candidate location ( box 16 ). next , all instances of the specified image pattern are obtained from an eigenvector classifier ( box 18 ). then , the statistical and / or structural information is extracted from the located instances of the specified image pattern ( box 20 ). last , the extracted information is used to guide or improve further image processing and display ( box 22 ). fig1 b is a flow diagram of the method of the present invention as applied to the problem of automatically locating the cylindrical bone pattern structure from the digital projection radiographic images . a digital image and a set of training images are provided ( box 130 and box 132 ). the eigenvector representation algorithm is run on the set of training digital images ( box 136 ). a bone edge filter is run on the input digital image ( box 134 ). then , a search is conducted for pairs of bone edge points ( box 138 ). the candidate bone profiles between the pair of bone edge points are sent to the eigenvector classifier ( box 140 ). lastly , the classified bone points are saved for further image processing and display ( box 142 ). for example , consider the humerus ( upper arm bone ). a line segment is analyzed which crosses the humerus . the image profile ( i . e ., the code values of the image along this line ) is presented in fig2 . this image profile represents the gray level transitions along the line crossing the bone . the humerus has a lower density in the middle region , which is called humeral shaft , and has a higher density at its two edge regions . the two peaks of the bone image profile in fig2 correspond to the middle points of the two highest density bone edge regions . the valley area between the two peaks corresponds to the lower density shaft area . the maximum and minimum gradient points of the image profile represent the points separating the bone from the soft tissue surrounding it . the maximum gradient point is called the left maximum gradient point , or the left edge point , and the minimum gradient point is called the right maximum gradient point , or the right edge point . for example , in fig2 the left maximum gradient point a is located at distance 8 and the right maximum gradient point b is at distance 25 . the image profile shown in fig2 represents the profile of the image with inverse polarity . greater code values represent the brighter areas of the image and the lower code values represent the darker areas . the image profile of a cylindrical bone is comprised of the transition of the gray levels of the bone to the surrounding anatomy . the unique “ two - peak ” shape of the image profile and the bone edge points are used as the “ cylindrical bone pattern ”. an eigenvector - based cylindrical bone pattern classification method is described in the following section . however , this invention can be applied to the detection of any pattern in a digital image , either radiographic or non - radiographic . an image profile consists of n samples along the line crossing the bone . the image profile , call it x , is an n - dimensional random vector . using orthogonal decomposition of vectors ( fukunaga , 1990 ), the vector x can be represented without any error via the summation of n linearly independent ( orthogonal ) basis vectors as shown in the following : x = ∑ i = 1 n   y i   φ i = φ   y , ( 1 ) φ =[ φ 1 , . . . , φ n ], y =[ y 1 , . . . , y n ] t , φ i =[ φ i1 , . . . , φ in ] t , i − 1 , . . . , n . the φ is made up of n linearly independent column vectors . an objective of eigenvector analysis is to reduce the dimensionality of the signal subspace φ , which results in reduced computational load and improved signal - to - noise ratio ( snr ). the following operation removes the basis vectors that contain a small portion of the energy of x . for this purpose , choose only m where m ≦ n of the basis vectors φ &# 39 ; s in equation ( 1 ) to approximate x accurately . without loss of generality , assume that only the first m basis vectors are selected . then , the above - mentioned approximation of x can be expressed via the following : x ^ = ∑ i = 1 m   y i   φ i = φ   ( m )   y   ( m ) , ( 2 ) the mean - square error of the resulting approximation can be written via ɛ _ 2   ( m ) = ∑ i = m + 1 n    y i  2 . it can be shown ( fukunaga , 1990 ) that the optimum choice for the φ &# 39 ; s , which minimizes the mean - square error { overscore ( ε )} 2 ( m ), is the eigenvectors of the covariance matrix of x , that is , where c x is the covariance matrix of x , and λ i is the eigenvalue that is associated with the eigenvector φ . in this case , the minimum mean - square error becomes ɛ _ 2   ( m ) opt = ∑ i = m + 1 n   λ i . in order to extract the eigenvector representation of bone profiles , select a set of bone profiles as the training bone set . the automatic method of extracting a bone profile is presented in section ( 5 ), bone pattern segmentation . the following shows the method of constructing an approximation of the bone profile via eigenvector decomposition . where p j , j = 1 , . . . , k , is a row vector representing the j th bone profile that consists of n sample points , that is , p j =[ p 1 , . . . , n ], j = 1 , . . . , k . ( 4 ) 2 . calculate the covariance matrix of p : c p = 1 k - 1   ∑ j = 1 k   [ p j - μ p ] t  [ p j - μ p ] , where μ p = 1 k   ∑ j = 1 k   p j 3 . solve the eigenvector matrix φ and eigenvalue matrix λ of the covariance matrix c p using the singular value decomposition method , such that and λ is a diagonal matrix with eigenvalues as its elements , that is , 4 . choose m basis vectors that contain a large portion of the energy of the training data , that is , ∑ i = 1 m   λ i ≥ α   ∑ i = 1 n   λ i , where the constant α can be selected to be very close to 100 %, such as 99 % or 98 %. 5 . project the vector p j onto the selected m basis vectors via where a ji is called the projection coefficient , i = 1 , . . . , m , j = 1 , . . . , k , and & lt ; x , y & gt ; represents the inner product of x and y . 6 . construct the approximation of p j via p ^ j = ∑ i = 1 m   a ji   φ i t   ( m ) = a j   ( m )   φ t   ( m ) , j = 1 , …  , k a j ( m )=[ a j1 , . . . , a jm ] a ( m )=[ a 1 ( m ), . . . , a k ( m )] t . a classifier was designed to distinguish between the bone structures and the non - bone structures based on a metric referred to as the scatter measure that is discussed next . let μ a and c a be the mean vector and the covariance matrix of the projection coefficient matrix a ( m ) from a training set of the bone profiles , respectively . the scatter measurement is the distance between the projection coefficient vector a t ( m ) of a test image profile p t and the projection coefficient matrix of the training bone set , that is , d =( a t ( m )− μ a ) t c a − 1 ( a t ( m )− μ a ). ( 5 ) if d & lt ; δ , the test image profile is classified as a bone profile ; otherwise , it is not . the parameter δ is typically chosen to be around 3 , this represents an acceptable bone profile distribution within 3 standard deviations of the training data . the shape of the cylindrical bone image profile is unique as shown in fig2 . however , the bone image profiles that are obtained from different line segments of different cylindrical bones , even when they are selected from a single bone , are not properly aligned when they are plotted in the same coordinate system . fig3 shows six bone profiles from a humerus . it can be observed from this figure that these image profiles exhibit different locations of the maximum and minimum gradient points ( i . e ., the two edge points ), different dc code values ( gray levels ), and a different number of points between the two edge points . this is attributed to different x - ray exposure energies scattered in different directions on the bone during the image formation process , and due to variations in the width of the bone . in order to analyze image profiles on a common coordinate system , the profiles must be registered such that they align on the same maximum and minimum gradient points ( i . e ., the two edge points ), align on a common dc value , and have the same number of sample points between the two edge points . one image profile was selected as the basis profile . the other image profiles were then registered based on this basis profile the following procedure describes how to register two image profiles . to register multiple image profiles , repeat the procedure . register the two image profiles so that the left and right edge points are aligned . this step is called horizontal registering . first align the second profile to the first profile on the left maximum gradient point ( left edge point ), then scale the second profile such that the right edge points of the two profiles are aligned . next register the two profiles such that they have a common dc value . this step is called vertical registering . a constant value must be added to the second profile for this purpose . this constant value is the difference between the vertical values of the two profiles . the vertical value of a profile is calculated as the average code value of the central 5 points . after the two profiles are aligned horizontally and vertically , cubic spline interpolation is used to force the two profiles to have the same number of points between the two edge points . this section describes a method for automatically extracting bone edge points and bone image profiles by segmenting the bone patterns . this automatic bone profile extraction method can be applied to extract both the test bone profiles and the training bone profiles . the procedure for segmenting a bone pattern is summarized in the following . 2 . calculate the image partial derivatives with respect to the x and y dimensions by the following two masks : ∂ ∂ x = ( - 1 0 1 - 1 0 1 - 1 0 1 )   and   ∂ ∂ y = ( - 1 - 1 - 1 0 0 0 1 1 1 ) . 3 . calculate the gradient magnitude by g = ( ∂ i ∂ x ) 2 + ( ∂ i ∂ y ) 2 and the direction by θ = arctan   ( ∂ i ∂ y / ∂ i ∂ x ) 4 . find the candidate edge points by finding the local gradient maximum along their gradient directions . fig4 ( a ) shows the candidate edge points of a humerus digital projection radiographic image . 5 . for each candidate edge point , if its gradient magnitude is greater than a predetermined threshold , save it as the edge point . fig4 ( b ) shows the edge points after thresholding the gradient magnitude at 2 . 0 × 10 3 . 6 . for each edge point , generate a line along the gradient direction with a length of l , where l can be selected according to the length of the bone . for example , this line length is set to be l = 4 . 5 cm for humerus images in our database . the length of this line is set to be 25 pixel units for a digital projection radiographic image with the resolution of 171 microns / pixel . 7 . on that line , search for another edge point in each direction . to reduce the noise effects , starts the search at the middle point of that line segment and go towards the ending edge point . 8 . after detecting an “ ending ” edge point , identify the line that connects the starting nd ending edge points . suppose there are n pixel points on this line . each pixel value n this line is determined by bilinear interpolation . denote the profile vector for this line to be p ( 1 , . . . , n ). 9 . accept this ending edge point as a bone edge point if the following shape constraint conditions of the bone profile are satisfied : the maximum gradient of the profile is greater than a threshold value g max and the minimum gradient of the profile is less than a threshold value g min . 10 . if the above criteria are satisfied , save the edge points as the potential bone edge points , and save the profile vector p ( 1 , . . . n ) on the line connecting the pair of potential bone edge points . fig4 ( c ) shows the potential bone edge points and the lines that connect the pair of potential bone edge points . then the profiles of these potential bone edge points are sent to the bone classifier , that is , the scatter measurement as shown in section locating cylindrical bones . a set of 26 adult ap humerus images were selected from which 312 bone profiles were extracted as training bone profiles which included mirror profiles of the original profiles . the horizontally and vertically registered representative training bone profiles are shown in fig5 ( a ). the basis profile is the line with circles on it . interpolated bone profiles after the points beyond the maximum and minimum gradient points are truncated are shown in fig5 ( b ). the training bone profiles p shown in equation ( 3 ) contain k = 132 bone profiles and the number of sample points of each profile is n = 18 . fig5 ( c ) shows the eigenvalues of the covariance matrix of p . the numerical results indicate that the first 8 eigenvectors ( eigenvalues ) contain 99 % of the energy of the training data , that is , ∑ i = 1 8   λ i & gt ; 0 . 99  ∑ i = 1 18   λ i . the first 9 eigenvectors of the bone profiles are shown in fig5 ( d ). the projection coefficients , after projecting 312 training bone profiles onto 8 eigenvectors in fig5 ( d ), are calculated . therefore , 8 eigenvectors can be used to represent the bone profile that consists of 18 sample points . hence , the dimension of the data in bone profiles is reduced . the projection coefficients obtained from eigenvectors of the bone profiles can be used to classify the bone and non - bone patterns . a set of 156 bone profiles were extracted from 7 adult lateral projections and 3 pediatric humerus images . similarly , these test bone profiles included the mirror image profiles . based on the same basis bone profile from the training set shown in fig5 ( a ), the horizontally and vertically registered representative test bone profiles are shown in fig6 ( a ). the interpolated test bone profiles after the points beyond the maximum and minimum gradient points are truncated and are shown in fig6 ( b ). the projection coefficients , after projecting 156 test bone profiles onto 8 eigenvectors of fig5 ( d ), were calculated . next the scatter distance measurement was obtained using equation ( 5 ). these distances are shown in fig6 ( c ). the number of distances that are less than 3 is 136 ( out of 156 ). this means that the correct classification rate is 88 %. fig6 ( d ) shows the original bone test profile versus the estimated bone profile using 8 eigenvectors when the scatter distance is maximum ( the worst estimated case ), and fig6 ( e ) shows when the scatter distance is minimum ( the best estimated case ). fig6 ( f ) shows the scatter distances when the first 6 eigenvectors are used . the number of these distances that are less than 3 is 142 ( out of 156 ). for this case the correct classifying rate is 91 %. the worst and best fitting cases of the bone test profiles using 6 eigenvectors are shown in fig6 ( g ) and 6 ( h ). the fewer eigenvectors that are used reduces the noise level and the classification rate is increased . there is a trade off between the classification rate and the degree of approximation of the test bone profile . in this case , the sum of first 6 eigenvalues is 0 . 98 which indicates a good approximation . for the purpose of constructing the tone scale curve , the histogram was formed of the pixel points that fall on the lines connecting the valid pair of bone edge points . this histogram represents the code value distribution of the cylindrical bone region , which are bone structures in the extremity image . this histogram is the image - pattern histogram . fig7 shows the image - pattern histogram ( the solid line ) and the code - value histogram of the entire image ( the dashed line ) for a single humerus image . from this figure , it is observed that most of the code values for the bone regions occur between 1200 to 2000 , while the code values of the entire image span the range from 200 to 3000 . from the image - pattern histogram , four points are identified in the input image code value range , that can form the input for the construction of a visually optimized tone scale ( u . s . pat . no . 5 , 633 , 511 , issued may 27 , 1997 , to inventors h .- c lee et al .). these four points are called the far - left , the left , the right , and the far - right points . the code values between the left point and the right point correspond to the sub - range of the input code values . this sub - range corresponds to the most important body parts that are examined . in the case of extremity image , this sub - range corresponds to cylindrical bone patterns . the far - left and far - right points are used to roll off both ends ( the toe and the shoulder ) of the tone scale curve . this will prevent the tone scale curve from producing a hard clipping in the displayed image . one of the computer aided diagnosis applications in detecting bone disease , such as osteoporosis , is based on analyzing the bone morphology in x - ray images . for example , in the total body study , the locations of arms and legs are important . in the peripheral skeleton scanning study , the location of the forearm , or the location of the fingers , are crucial . in this section , an example is shown of locating fingers for purposes of measuring bone mineral density . in radiographic absorptiometry , the bone mineral density is measured by correlating the optical density of the region of phalanges of the hand in the radiograph and the density of a bone - like wedge that is imaged with the hand . therefore , the location of phalanges of the hand needs to be obtained . the bone mineral content ( bmc ) is derived by multiplying the mean bmd by the phalange area : therefore , the area of the region of phalanges of the hand also needs to be calculated . an example of locating finger bones in a hand image is shown in this section . the edge points in a hand digital radiographic image is shown in fig8 ( a ). observe that the finger bones , the skin lines , and the collimation edges are all found at this stage . then the bone pattern segmentation algorithm ( see section ( 5 ), bone pattern segmentation ), which is based on the constraints of the shape of the bone profile , is applied to the resultant image in fig8 ( a ). the potential bone edge points and the lines connecting the pair of potential bone edge points are shown in fig8 ( b ). we can observe that most of the finger bone points are correctly located . the wedge in the image is also detected . this can be classified as non - bone patterns by the eigenvector analysis method described in section ( 3 ), scatter measurement . in another hand , the location of the wedge is also needed to calculate the bone mineral density from the density of the wedge that is imaged with the hand . hence , the location of the wedge is saved . usually , the mineral density is measured in the middle finger at three phalanges . a simple stripe algorithm can be applied to locate three phalanges separately . the invention has been described in detail with particular reference to certain preferred embodiments thereof , but it will be understood that variations and modifications can be effected within the spirit and scope of the invention .