Edge and line detection in multidimensional noisy, imagery data
CROSS REFERENCE TO RELATED APPLICATION 
     This application is a continuation-in-part of U.S. patent application Ser. No. 394,674 as filed on July 2, 1982, under title of &#34;Edge and Line Detection in Multidimensional Noisy Imagery Data,&#34; now U.S. Pat. No. 4,499,598. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The invention relates generally to digital pattern recognition systems and, more particularly, but not by way of limitation, it relates to an improved form of pattern detection device for use with multidimensional data in the presence of noise. 
     2. Description of the Prior Art 
     Generally, the prior art has been limited to various forms of two-dimensional recognition process wherein digital image processing is carried out using two-dimensional operators in processing a single image plane and the selection of thresholds is a difficult task at best. The prior art proposals employed a variety of operators for detection of edges and lines by fitting a planar surface to a picture function in the neighborhood of each image point and then taking the derivatives of the function at that point. The prior operators worked on single plane images. Such prior art digital picture processing technique is disclosed by Prewitt in &#34;Object Enhancement and Extraction in Picture Processing and Psycho Pictorics&#34;, Academic Press, New York, 1970, PP. 75, 149. More recently, Haralick introduced the noise term and devised statistical tests for the detection of significant edges by fitting a plane in the neighborhood of a point for a two-dimensional image, and this teaching is presented in &#34;Edge and Region Analysis of Digital Image Date&#34; as presented in Computer Graphics and Image Processing, Volume 12, 1980, PP. 60-73. 
     Several prior sources have treated the surface fitting using orthogonal two-dimensional basis functions, e.g. walsh functions, orthonormal fourier functions and orthogonal polynomials. All of the derived operators work upon a two-dimensional plane or single band image. Still more recently, Morgenthaler and Rosenfeld generalized the aforementioned Prewitt operators to n-dimensions by fitting a hyperquadric surface. However, noise is not introduced into the formulation. The Morgenthaler and Rosenfeld teachings are presented in an article entitled &#34;Multidimensional Edge Detection by Hypersurface Fitting&#34;, IEEE Transactions, Pattern Analysis and Machine Intelligence, July 1981, PP. 482-486. 
     In the patented prior art, some patents of general interest are as follows: Sternberg--U.S. Pat. No. 4,322,716; Golay--U.S. Pat. No. 4,060,713; and Kono--U.S. Pat. No. 4,110,736. 
     SUMMARY OF THE INVENTION 
     The present invention relates to digital machine processing to achieve identification and extraction of edges and lines and directional edges and lines in noisy multidimensional image data. The present invention differs from the prior techniques in that multidimensional operators and optimal statistical tests are developed for the extraction of significant edges and lines from multidimensional noisy data. The digital picture function is viewed as a sampling of the underlying reflectance function of the objects in the scene with noise added to the true function values. Thus, the edges or lines relate to places in the image where there are jumps in the values of the function or its derivatives. By expressing the function in some parametric form, the edges or lines are inferred from the values of the parameters. Multidimensional or multi-band data is input for subsequent processing through routines for effecting detection of edges and lines to develop data relating to the magnitude and direction of the edge or line. Upon perfection of this data for a series of pixel evaluations constituting a full image scene, additional processing routines for linking the data may be selectively called up for contribution to the final output display of the multidimensional data. 
     Therefore, it is an object of the present invention to identify and extract edges and lines in noisy, multidimensional image data, for example, the linear features in multi-band Landsat image data, three-D seismic horizon data and the like. 
     It is also an object of the invention to provide a digital machine process for evaluating multi-band geographic surveillance data to provide recognition of linears, lineaments, vegetation variations, and other multiple band reflectance parameters emanating from earth surface areas. 
     It is still further an object of this invention to provide a versatile machine processing program capable of processing a considerable plurality of simultaneous band or depth responses over selected, interconnected neighborhood image elements. 
     Finally, it is an object of the present invention to perform digital pattern recognition of multi-band data while eliminating the effects of noise present in the input data. 
     Other objects and advantages of the invention will be evident from the following description when read in conjunction with the accompanying drawing which illustrate the invention. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram illustrating the basic elements of the present edge and line detection system; 
     FIG. 2 is an idealized drawing of a three-dimensional image with size designations as utilized in the present invention; 
     FIG. 3 illustrates the local neighborhood of a pixel and the positioning of the coordinate system in the present invention; 
     FIG. 4 is a view in perspective illustrating the manner in which the scanning of neighborhood pixels is effected; 
     FIG. 5 is a flow diagram of the program utilized to effect the present invention; 
     FIG. 6 are a series of related graphs depicting a step edge and its derivatives; 
     FIG. 7 is a series of interconnected graphs illustrating a roof top edge or line and its derivatives; 
     FIG. 8 is a graphic view illustrating the basic and rotated coordinate systems employed in the present invention; 
     FIG. 9 is a graphic depiction illustrating the concept of overlapping blocks, the portion of the coordinate system and the definition of the parameters O and P; 
     FIG. 10 is a photograph of a Landsat, band 4, image; 
     FIG. 11 is a photograph of a Landsat, band 5, image; 
     FIG. 12 is a photograph of a Landsat, band 6, image; 
     FIG. 13 is a photograph of a Landsat, band 7, image; 
     FIG. 14 is an image of detected significant lines thresholded at a high percentage confidence level; 
     FIG. 15 is a compressional wave seismic section; 
     FIG. 16 is an overlay of detected troughs on the original seismic section; and 
     FIG. 17 is an overlay of detected and linked troughs on the orignal seismic section. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     FIG. 1 illustrates the major system portions of a machine processing system 20 for edge and line detection in multidimensional noisy imagery data. The system 20 can be used for examinations of plural band input data of various types as is input in digitized form for storage at stage 22. Such plural band data may be any of the multi-band Landsat data images, three-dimensional seismic horizon data, or other forms of related data in a plurality of distinct band responses. 
     The multidimensional data input is applied in scan sequence through stage 24 which functions to detect edge and line data relative to the multidimensional images. System 20 next performs a link routine in stage 28 and, finally, output display 30 provides an edge and line display at selectively varied significance levels of the multi-band image data. The processing system 20 is the function of two programs and two sub routines, as presently constituted, which implement and control operation of a digital computer type VAX 11-780, as available from Digital Equipment Company. 
     The present invention is particularly described with respect to four-band Landsat data of the type acquired from the United States government in digital tape form for whatever the selected earth areas of interest; however, it should be understood that various types of multidimensional, related image data can be processed in like manner and the present invention is particularly adapted for picking selected linear horizons of three-dimensional seismic data. The display 30 is a conventional type of color video display that is compatible with the particular computer equipment. The video display is divided up into a pixel array, 512 pixels by 512 pixels, and this pixel field is equated to the image field of view in the X 1  and X 2  dimensions. Thus, FIG. 2 illustrates the three-dimensional coordinates as utilized in the present processing system with a 512×512 three-dimensional pixel array superimposed thereover, i.e. a 3-D image of size m 1  ×m 2  ×N 3 . 
     FIG. 3 illustrates a local neighborhood of a pixel and its position relative to the coordinate system, such neighborhood being of a size N 1  ×N 2  ×N 3  as shown. Some typical dimensions as selected by the operator for implementation within the program of processing system 20 may be: 
     m 1  =512 
     m 2  =512 
     N 3  =4 
     N 1  =3, 5, 7, 9, 11 . . . 
     N 2  =3, 5, 7, 9, 11 . . . . 
     FIG. 4 illustrates the scanning procedure of pixel neighborhoods as it may be likened to scanning in the X 2  direction across the image block 32, i.e. from left to right, where N 1  =3 and a 9 pixel neighborhood 34 is disposed around the central pixel 36. The neighborhood has a four pixel N 3  dimension along the X 3  axis as would be the case for four-band Landsat data. At completion of establishment of coefficients and requisite pixel data for pixel 36, the entire neighborhood 34 would shift rightward one pixel such that the next successive neighborhood would be shown by lines 38 surrounding central pixel 40. Such examination of all bands of data proceeds a pixel at a time rightward whereupon return to the left side of the m 2  dimension (see FIG. 2) would find the scan indexed one pixel in the X 1  direction for initiation of the next successive rightward scan of neighborhoods in the N 2  dimension. 
     The edges or lines refer to the places in the image where there are significant discontinuities in the values of the function or its derivatives. The existence of an edge or line at the point of the image is decided using information from the neighborhood for that point or pixel. Thus, hypersurfaces are fitted to the multidimensional picture function in the neighborhood of the pixel under consideration using discrete orthogonal polynomials as basis functions. Assuming the noise is Gaussian and independent from pixel to pixel, the coefficients of the fitted surfaces are shown to be unbiased and expressions for their variances are obtained. The directions of the edges and lines are estimated. The first and the second directional derivatives of the fitted function evaluated at the pixel under consideration are used in setting up the statistical hypothesis tests for the detection of edges and lines. These tests involve the computation of a variable having F-distribution in terms of the coefficients of the fitted surface, their variances and the error in the fit. The significant edges and lines are detected by comparing the computed variable with its critical value at a specified degree of confidence. If the value of the variable is greater than the critical value, the magnitude of the edge or line is taken to be the value of the variable. Otherwise, they are set to zero. Thus, for each point in the image, the magnitude and direction of the edge or line is computed. 
     For the detection of edges and lines at a particular orientation, the expressions are developed for the coefficients of the fitted surfaces and for their variances when the coordinate system is rotated by selected angle to that direction. Statistical tests are then carried out for the detection of significant edges and lines. Having observed that there is considerable redundancy in the computations for successive neighborhoods, the program utilizes recursive relationships in computing the coefficients of the fitted surface of a successive neighborhood. 
     In some cases, the detected edges or lines sometimes get disconnected. This is due to the variations in the reflectance function along the edge or line. In this case, the processing system uses the linking routine of Stage 28. 
     FIG. 5 illustrates a processing flow diagram 50 which illustrates the program and sub-routine functions in control of the processing system 20 to carry out the method of the present invention. Thus, the initial stage 52 controls read-in of N 1  lines of data in the X 1  direction, each of the lines of data being of a size m 2  ×N 3 . This input data is then processed at flow step 54 to compute the parameters for the N 1  lines of data. For this operation, let f(X 1 , X 2 , X 3 ) be the picture function values in the N 1  lines of data read where 1≦X 1  ≦N 1 , 1≦X 2  ≦m 2 , 1≦X 3  ≦N 3 . Let π 3  be the domain of X 3  and let π 13  be the domain of X 1 , X 3 . Then, for each X 1 , X 2  compute the following over domain π 3  with the coordinate system position at the center of π  3  for every X 1 , X 2 . Compute: ##EQU1## 
     For each X 2  compute the following over the domain π 13  with the coordinate system positioned at the center of π 13  for every X 2 . 
     Compute: ##EQU2## 
     The process flow then proceeds to stage 56 which commands computation of the denominators of the coefficients for the hyperquadric surface that will be fit to reflectance function in a neighborhood of size N 1  ×N 2  ×N 3 . Thus, let X=X(X 0 , X 1 , . . . X n ) T  be a point in the n-dimensional space. Let π 0  be the hyperrectangular local neighborhood of its central pixel, the pixel that is under consideration. Let the coordinate system be positioned so that the center of the region is at the origin. Let {S i  (X), 0≦i≦N} be a set of orthogonal basis functions defined over the neighborhood π 0 . Let f(X) be the digital picture function and let g(X) be an estimate f(X), estimated as a weighted sum of basis functions. That is: ##EQU3## where {a i , 0≦i≧N} are a set of coefficients. The coefficients a i  that minimize the total squared error ##EQU4## are given by ##EQU5## Let the picture function f(X) be written as ##EQU6## where η(X) is a noise term and is assumed to be Gaussian with zero mean and variance σ 2 . The noise η(X) is also assumed to be independent from pixel to pixel. Then we have ##EQU7## The coefficients a i  are unbiased and independent and their variances are given by ##EQU8## The total squared error, e 2 , is given by ##EQU9## Thus, the quantity (e 2  /σ 2 ) is distributed as a chi-square variate with ##EQU10## degrees of freedom. To test the hypothesis that the coefficients a i , i=1, 2, . . . m (m&lt;N) are in fact zero, we use the ratio ##EQU11## which has F-distribution with ##EQU12## degrees of freedom and reject the hypothesis for large values of F. 
     By choosing the orthogonal polynomials as the basis functions, the coefficients for the following hyperquadric surface fit to the picture function in three-dimensions can be obtained as follows: ##EQU13## The estimates of the coefficients are given by: ##EQU14## 
     If the coordinate system is rotated by using an orthonormal rotation matrix D, the coordinates X in the original and the coordinates Y in the rotated coordinate system are related as X=DY which is equal to the summation between the limits of j=1 and 3 for the quantity (d ij  y j ). 
     The fitted function g(Y) can be expressed with respect to the rotated coordinates as ##EQU15## The coefficients b&#39;s and c&#39;s are related in terms of the elements of the rotating matrix D as follows: ##EQU16## Expressions for the variances of C i  and C ii  are given in the following: ##EQU17## where ##EQU18##  and χ l  is the domain of X l . 
     The sum of squares of errors of the fitted surface is independent of rotation in the coordinate system. A step edge and its derivatives are shown in the graphs of FIG. 6 to illustrate proof of an edge if the following conditions are satisfied: (a) the gradient in a direction normal to the direction of the edge is significantly different from zero; and, (b) the second directional derivative in the direction of the gradient is significantly zero. The sign of first directional derivative indicates the type of edge. It it is positive the edge is from right to left and if it is negative the edge is from left to right. Thus, relative to a median point 64 of curve 66 of f(X), the first derivative at point 68 is significantly greater than zero and the second derivative curve at point 70 is significantly zero. 
     In like manner, for the existence of line, conditions are set up on directional derivatives in a direction perpendicular to the direction of line. As shown in FIG. 7, a line is characterized by f(X) curve 72 peaking at top point 74 with the first derivative curve indicating significantly zero along line 76 at point 78 and the second derivative curve showing a significantly greater than zero value at point 80. In effect, it is stated that the line is detected by performing the significance test in a direction perpendicular to the direction of the line for (a) the zeroness of the gradient; and, (b) the non-zeroness of the second derivative. The type of line is detected by looking at the sign of second directional derivative. If it is positive the line is due to trough and if it is negative the line is due to peak. 
     FIG. 8 illustrates the rotated coordinate system Y 1  -Y 2  with respect to the original coordinate system X 1-X   2 . Thus, the original coordinate system X 1  -X 2  is rotated counterclockwise by a selected angle θ to set up the coordinate system Y 1  -Y 2 . The rotation of the coordinate system and the D-matrix may be represented as follows: ##EQU19## Thus, the directional derivative of the fitted function g in the direction Y 1  is given by ##EQU20## The angle θ that maximizes the directional derivative is given by ##EQU21## For computing the direction of the line, the second directional derivative in the Y 2  is given by ##EQU22## The direction of the line is estimated by maximizing the above expression. That is the direction of the line as determined from ##EQU23## 
     The angles θ 1  and θ 2 , that satisfy this equation are given by ##EQU24## The angle θ L  =θ 1  is chosen as the direction of the line of |λ 1  |&gt;|λ 2  |; otherwise, θ L  =θ 2  is chosen as the direction of the line. The angle θ 1  corresponds to a line due to a trough in the data and the angle θ 2  corresponds to a line due to a peak in the data. 
     All necessary variables having been determined and stored, computation then proceeds to declare bN i , bN ii , bN ij , bN o  and b i , b ii , b ij , b o  as derived previously at equations (11). The computations of flow step 62 performing tests of significance carry out computation of θ G  and θ L . Thus, it computes the coefficients C 1  and C 11  with the rotation matrix corresponding to θ G  ; and, there are then formed values F e1  and F e2  where ##EQU25## Then, letting F e1c  and F e2c  represent the critical values for F e1  and F e2 , declare there is an edge if F e1  is greater than F e1c  and F e2  is less then F e2c . If there is proof of an edge, the program stops the gradient magnitude and direction for the pixel under consideration. 
     The next operation is to compute the coefficients C 1  and C 11  with the rotation matrix corresponding to θ L . Thus, in similar manner, there is formed the values F L1  and F L2  where ##EQU26## Letting F L1C  and F L2C  represent the critical values for F L1  and F L2 , the program then declares there to be a line if F L1  is less than F L1C  and F L2  is greater than F L2C . If there is a line proven, then the magnitude and direction for the pixel under consideration is stored. Similar tests may be performed for the detection of edge and line at any arbitrary direction θ, if desired. 
     Upon performance of the test for significance for the first neighborhood in stage 62, flow proceeds to a query stage 82 to determine whether or not this is the last neighborhood to be examined and, if not, the program recycles to operation of flow stage 84 to consider the next succeeding neighborhood in the X 2  direction. The flow stage 86 then performs a recursive relationship operation to compute the coefficients of the current neighborhoods fitted function by updating as operation recycles through the significance testing stage 62 for the next or current neighborhood processing. The function of the recursive and computative stage 86 sets the size of the neighborhood in the X 2  coordinate direction so that if N 2  is odd, then N 2  2 is equal to N 2 |2 and is truncated to an integer value (e.g. if N 2  =5, then N 22  =2). N2I then sets the starting value of X 2  of the current neighborhood and there is definition as follows: ##EQU27## Updating the numerators of the coefficients b&#39;s is as follows: 
     
         bN.sub.12 =bN.sub.12 -bN.sub.1 +N221·F1(Ii,2)+N22·F1(ILL,2) 
    
     
         bN.sub.13 =bN.sub.13 -F1(II,6)+F1(ILL,6) 
    
     
         bN.sub.23 =bN.sub.23 -bN.sub.3 +N221·F1(II,3)+N22·F1(ILL,3) 
    
     
         bN.sub.11 =bN.sub.11 -F1(II,4)+F1(ILL,4)-X120·FIL1 
    
     
         bN.sub.22 =bN.sub.22 -2.0bN.sub.2 +bN.sub.0 +PNW1F1(II,1)+PNW2F1(ILL,1) 
    
     
         bn.sub.33 =bN.sub.33 -F1(II,5)+F1(ILL,5)-X320 FIL1 
    
     
         bN.sub.1 =bN.sub.1 -F1(II,2)+F1(ILL,2)                     (23) 
    
     
         bN.sub.2 =bN.sub.2 -bN.sub.0 +N221 F1(II,1)+N22F1(ILL,1) 
    
     
         bN.sub.3 =bN.sub.3 -F1(II,3)+F1(ILL,3) 
    
     
         N.sub.0 =bN.sub.0 +FIL1 
    
     The program then effects computation of the values B i , B ii , B ij  and B o  in accordance with equations (11) as the current neighborhood data is stored subject to significance tests for edge or line presence. All successive neighborhoods in the X 2  direction are processed for computational coefficients and performance of tests of significance for edge and line detection until the decision stage 82 finds an affirmative for the last neighborhood in the X 2  direction, whereupon the program moves forward to a decision stage 88 for query as to whether or not the last line of the data has been read in the X 1  direction. If not, flow proceeds to stage 90 which reads from storage the next line of data of size m 2  ×N 3 , and flow stage 92 forms a current set of N 1  lines and computes their parameters by recursive update. The new set of lines in the N 1  dimension must then be processed through the successive neighborhoods from the first through the last. Thus, the program recycles back through flow stage 58 to consider the first neighborhood of the next successive set of N 1  lines. 
     In operation, the flow stage 92 transfers the last N 1  -1 lines of size m 2  ×3 of F2(X 1 , X 2 , X 3 ) into the first N 1  -1 lines. That is, F2(i, X 2 , X 3 )=F2(i+1, X 2 , X 3 ) for 1≦i≦N 1  -1. Using the currently read line of data there is computed F2(N 1 , X 2 , X 3 ) for 1≦X 2  ≦m 2  and 1≦X 3  ≦3. Letting FC (X 2 , X 3 ), 1≦X 2  ≦m 2 , 1≦X 3  ≦N 3 , be equal to the currently read line of data, and let π 3  be the domain of X 3 . Then, for every X 2  compute the following: ##EQU28## Let the size of the neighborhood N 1  in the X 1  coordinate direction be odd, and let N12=N1|2 and be truncated to an integer value, and let N121=N12+1; then, the parameters of the current set of lines F1&#39;s are updated as follows: 
     
         F1(X.sub.2,6)=F1(X.sub.2,6)-F1(X.sub.2,3)+N121F2(1,X.sub.2,2)+N12F3(X.sub.2,2 ) 
    
     
         F1(X.sub.2,5)=F1(X.sub.2,5)-F2(1,X.sub.2,3)+F3(X.sub.2,3)  (25) 
    
     
         F1(X.sub.2,4)=F1(X.sub.2,4)-2F1(X.sub.2,1)-N121.sup.2 F2(1,X.sub.2,1)+N12.sup.2 F3(X.sub.2,1) 
    
     
         F1(X.sub.2,3)=F1(X.sub.2,3)-F2(1,X.sub.2,2) 
    
     
         F1(X.sub.2,2)=F1(X.sub.2,2)-F1(X.sub.2,1)+N121F2(1,X.sub.2,1)+N12F3(X.sub.2,1) 
    
     
         F1(X.sub.2,1)=F1(X.sub.2,1)-F2(1,X.sub.2,1)+F3(X.sub.2,1) 
    
     After processing of all neighborhoods in the X 2  direction successively for all lines in the X 1  direction, i.e. a complete neighborhood coverage of the image, all edge and line data is computed, tested for significance and stored. When the last of the data has been read, the decision stage 88 signals an affirmative and data processing proceeds to flow stage 94 which effects linking of detected edges and lines. In flow stage 94, for edge or line linking the image is divided into overlapping blocks of certain size. Consider one block of pixels. Let the coordinate system be positioned such that the origin is at the top left corner of the block. FIG. 9 illustrates the concept of overlapping blocks and the parameters ρ and θ that define the line 95. The angle θ defines the orientation of normal to the line 95 from x 1  axis and ρ is the distance of the line 95 along normal from the origin. Bins of certain size are setup in the (ρ,θ) space. At each pixel in the block where an edge or line is detected, the parameters ρ and θ are computed for that edge or line. These are quantized and are used to update the count in the appropriate bin of the (ρ,θ) space. The bins in the (ρ,θ) space are scanned and the bins whose count exceed certain present threshold are marked. The pixels corresponding to the marked bins are linked by lines. The process is repeated for every block. 
     The photo-reproductions of FIGS. 10 through 17 illustrate final display results of image analysis performed with processing system 20. FIGS. 10, 11, 12 and 13 represent Landsat data for Landsat bands 4, 5, 6 and 7, respectively, as scanned over an area in Australia from an altitude of 250 miles. The Landsat band response designations are as follows: 
     Landsat Band 4--0.5 to 0.6 microns 
     Landsat Band 5--0.6 to 0.7 microns 
     Landsat Band 6--0.7 to 0.8 microns 
     Landsat Band 7--0.8 to 1.1 microns 
     The multi-band Landsat data or the multi-dimensional portion N 3  of an image m 1  ×m 2  ×N 3 , was processed in accordance with the system 20. FIG. 14 is a final output display and detected lines in the image. The lines are detected with threshold set at a high percent confidence level, e.g. 95% confidence level, and it can readily be seen that many significant lineaments in many different directions are highlighted in the display. The alignments, continuances, cross-overs and diverse linear patterns are presented in enhanced form that is not readily discernible in the one or more raw data band images of FIGS. 10-13. The detected line can further be sorted into peak or trough. To support this argument, the system 20 is used to detect troughs in seismic data. FIG. 15 is a compressional wave seismic section. FIG. 16 contains the detected troughs. These are further linked and are shown in FIG. 17. 
     The foregoing discloses a novel method for edge and line detection of multidimensional image data utilizing machine processing. The method of the present invention is particularly valuable in defining edge and line formation within noisy image data as the process functions to define edge and line magnitude and orientation and allows further linking in tomographic manner. 
     While the machine process of the present invention is particularly set forth in terms of specific steps and data processing manipulations, it should be understood that similar processing functions obtaining the same general results can be implemented without departing from the spirit and scope of the invention as defined in the following claims.