Abstract:
A method for highlighting particular features of an image photographically captured and stored in a computer is disclosed. The method essentially comprises capturing an image of an object using a video or similar electronic camera and storing the image as a series of numbers in the memory of a computer. The computer contains an image capture board and a graphics board so as to acquire and display the image on a monitor. The operator enlarges a region of the image of interest so as to display the individual pixels comprising the image. The operator, through the computer, selects individual pixels from the image to comprise a test set of pixels to be used to discriminate against all of the pixels comprising the image. Once the test set is defined, the eigenvectors and eigenvalues of the test set are calculated to define an ellipsoid encompassing substantially all of the test set data points. In essence, the ellipsoid defines an envelope in color space. The image is scanned using the test set to either accept or reject each of the pixels comprising the image. The accepted or rejected pixels are assigned a value to be used in producing a second display which highlights the desired pixels. The operator may alter the test set by adding more pixels or change the dimensions of the ellipsoid to produce a different display. Certain operations and calculations may be performed on the second image highlighting characteristics of the first image produced of object.

Description:
FIELD OF THE INVENTION 
     This invention relates to a method for discriminating between particular features in an otherwise substantially homogeneous substance, and has particular application to a method for determining characteristics of a core sample using digital photography. 
     BACKGROUND OF THE INVENTION 
     Objects have been photographed and digitized for analysis by computers. The image captured by a camera may be comprised of hundreds of thousands of pixel elements which are electronically captured by a computer and stored as a series of numbers in the computer&#39;s memory. Individual pixels having different intensities or colors may be selected to define a test set which is approximated by a box in color space. This box is then used to discriminate among the pixels comprising all or a portion of the image. For example, the intensities or colors used in the test set may be approximated by either a two-dimensional square or a three-dimensional cube. However, approximating the variation of colors in the test set by a box, ingnores the covariance between the colors of this test set. The adversely affects the resolution of the discrimination. If there is considerable covariance in the test set of colors, then to include all the colors of the test set may require a box so big that it also includes a multitude of undesirable points. Alternatively, to exclude the undesirable points may require a box so small that it does not include desired points of the test set of colors. The method of the present invention circumbents this problem by implicitly including the covariance of the colors in its analysis. Thus when conducting a detailed examination of certain characteristics of an object, points may be defined on the object which are either extraneous or excluded from the test set. This problem particularly arises in enhancing certain photographic images based upon some characteristic, regardless of the frequency of interest, e.g. frequency spectrum. U.S. Pat. Nos. 4,876,457 and 4,742,233, both assigned to AT&amp;T, and U.S. Pat. No. 4,791,589 assigned to Tektronix, Inc. describe methods and apparatus for digitally photographing objects and discriminating features of the objects using brightness or similar characteristic. 
     It is well known that hydrocarbons fluoresce under ultraviolet light. Ultraviolet light has been used since the 1940&#39;s to determine whether a substrate contains hydrocarbons. For example, the geologist at the well site may determine if hydrocarbons are present in the formation by examining well cuttings under ultraviolet light. Similarly, core samples taken from the bore hole may also be examined under ultraviolet light to show the presence of hydrocarbons. Such a service is offered by Core Laboratories, a division of Western Atlas International, Inc. To document the findings of a laboratory examination, photographs were taken of cross-sections of cores taken under both natural and ultraviolet light. The service provided visual documentation of the rock type, and a visual representation of the extent of hydrocarbons present in the core. This provided the geologist a tool to better evaluate the reservoir. 
     Estimation of the amount and type of hydrocarbons using fluorescence initially was a subjective analysis. The fluorescence of a sample will vary according to the reservoir rock type and the API gravity of the hydrocarbon. A geologist&#39;s estimation will naturally vary between samples of the same rock type because the eye cannot distinguish subtle difference between brightness and/or colors of the fluorescence. The instant invention will greatly improve this technique and will perform the function consistently for every sample. 
     There has been a long felt yet unsolved need to provide an improved method for conducting digital photography of objects. Similarly, a long felt yet unsolved need existed for a method of consistently discriminating certain feature of objects. Such a need exists in the field of core analysis. 
     SUMMARY OF THE INVENTION 
     The instant invention provides a method for efficiently discriminating certain detectable features of an object. For example, such features may include the brightness, color, texture, grading, or structure of an object which may be exhibited by changes in color. Such characteristics of an object may be discernable by improving the manner in which one may discriminate between the elements comprising an image of the object, such as frequency of radiation or similar characteristic. Based upon this method, the operator may perform a series of statistical calculations or other operations and output the findings of such operations in a manner to assist the evaluation of the object, such as the quantitative and qualitative analyses of core taken from a well bore. 
     The method of this invention has application in digital photography with particular application to digital core photography. The method includes electronically capturing an image of a core sample using a camera. The image may be made with any of the detectable frequencies of radiation, particularly white light, ultraviolet light or infrared light. With respect to the analysis of core samples, it is preferred that an image be taken in both natural (white) light and ultraviolet light. The image detected by the camera is electronically transferred to an image-capture circuit operably coupled to a computer. The image may then be stored in the computer&#39;s memory as a series of numbers representing the pixels comprising the image. 
     A region of the image containing the feature to be examined may be enlarged such that the individual pixels are discernable. A plurality of pixels in and along the region of interest are selected and stored in the computer&#39;s memory as a test set. Based upon the sample of pixels, the computer determines the mean-centered covariance matrix, as well as the eigenvectors and eigenvalues for the pixels to define an envelope or ellipsoid of values which satisfy the pixels to be discriminated against. In essence a shrink-wrap is placed around the values comprising the test set and excludes many of those values that would have been incorrectly included under the prior art technique. Following the selection of the test set of pixels, all or part of the pixels in memory are scanned to determine whether they are accepted or rejected by the test set. Using either the accepted or rejected values, the image may be enhanced, highlighting the discriminated pixels comprising the image. Resolution or accuracy of discrimination may be changed by increasing or decreasing the number of pixels comprising the test set. Alternatively, the operator may expand or contract the size of the ellipsoid in color space while maintaining the directions of its principal axes and the ratios of the axes&#39; lengths to one another. Histograms or similar statistical displays may be produced from the results of the improved discrimination ability of the invention. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING FIGURES 
     A better understanding of the benefits and advantages of our invention may be obtained from the appended detailed description and drawing figures, wherein: 
     FIG. 1 generally illustrates components of a system which may be used in association with the instant invention; 
     FIG. 2 is a flow chart of the steps comprising the invention; 
     FIG. 3 is a general representation of a subset of points located in three-dimensional color space; 
     FIG. 4 is a typical example of a display contemplated by this invention; and 
     FIG. 5 is an example of a display presenting the data obtained from an image. 
    
    
     DETAILED DESCRIPTION 
     The inventive method as described herein has application to digital photography as well as application to the analysis of earthen core samples. Adjustments or omissions may be made by those skilled in the art which are within the scope of the method. 
     FIG. 1 generally illustrates components of a system which may be used in association with the instant invention. Generally shown in the Figure is an object 12, such as a length of core, to be photographed by a video camera 14. The object to be photographed need not be three-dimensional, but may include two-dimensional images such as diagrams or other photographs. Alternatively, instead of photography, the image may be made by scanning an already existing image such as a photograph or image printed by a plotter using devices currently available on the market. 
     A variety of light sources may be used to highlight the object to be photographed. For example, a white light 16 and a ultraviolet light 18 are shown. The image received by the camera 14 is transmitted to a computer 20 having an image-capture circuit (not shown). The image-capture circuit redefines the image as hundreds of thousands of pixels which are stored in memory as a series of triplets of numbers, with each triplet of numbers (a red, green and blue intensity) representing a pixel&#39;s color. Each pixel&#39;s color is actually represented as a 16-bit binary code. Each color is represented by a five-bit portion of the code. The remaining bit controls the overlay position of the colors. The pixel&#39;s position in the image by where in memory its triplet of color values is stored. 
     Although not shown in FIG. 1, the computer preferably contains a high-resolution graphics adapter well known in the computer industry. The graphics card enables the computer to display the images on a monitor 22 and to perform operations on the stored image as will be described below. 
     FIG. 2 is a flow chart depicting the steps of the inventive method. The initial step involves obtaining an image 24 of the object. As indicated above, the image may be obtained by the video camera 14 or other camera which produces an analog or digital output. The image obtained by the camera 14 produces an output which serves as an input 26 to the image-capture circuit coupled to the computer 20. The computer and the associated image-capture circuit are controlled by commercially available software packages such that the operator may capture the image at a given instant in time. The captured image may then be stored in a memory 28 as a series of numbers. The memory 28 may be a magnetic disk 30 or tape 32, or may reside in a random-access-memory (RAM). 
     The resolution of the image stored in the computer&#39;s memory is dependent upon the quality of the camera system and the image capture board. For example, an RCA home video camera coupled to a TARGA brand image-capture board in an IBM PC-XT computer produces an image having greater than two-hundred thousand pixels. Each pixel may be capable of displaying one of more than thirty-two thousand possible colors. The color for each pixel is determined by three numbers; one for red, one for blue and one for green, with each value ranging between zero and thirty-one. FIG. 3 graphically illustrates the range of colors each pixel can display. The three axes, X, Y and Z, shown in FIG. 3 define a cubical volume or &#34;color space&#34; which will be referred to below. 
     Returning to FIG. 2, once the image has been stored in the computer&#39;s memory 28, the operator may at step 34 recall all or a portion of the image and display it on the monitor 22. This accomplished with the aid of a graphics-adaptor board coupled with the computer. The operator may select the image taken under natural light, the image taken under the ultraviolet light, or may recall both of them simultaneously on the screen. In either of the images, the operator may select a region 35 to be analyzed by defining the boundaries of the region through the computer keyboard. The scale of the area defined by the operator may also be adjusted through the computer keyboard. It is preferred that an area of interest in the image be enlarged so as to display the individual pixels comprising that portion of the image. From the enlarged image, the operator selects a plurality of pixels (&#34;test set&#34;) along or in the region of interest. The selection of pixels from the image for the test set may be represented in the flow chart at 36 and may be selected using a mouse or through the keyboard terminal. 
     The number of points necessary to adequately define a feature may vary for a given application. However, it is preferred that at least ten pixels be selected for each test set. The test set defines a region in color space which the computer will use for discriminating other pixels in all or a selected portion of the image. 
     Once the test set of points has been selected, and before scanning the desired portion of the image, a calculation must be performed at step 37 to further delineate the range of colors to be accepted or rejected in the scanning of the image. The area used for accepting or rejecting pixels is defined by determining the mean-centered covariance matrix for the test set as illustrated by Equation 1 as follows: ##EQU1## where ΔR i  is equal to R i  minus the mean of R; ΔG i  is equal to G i  minus the mean of G; and ΔB i  is equal to B i  minus the mean of G. The delta values for each of the colors are determined by the differences between a color and the center or mean for the color. Using the mean-centered covariance matrix, the next step is to solve the eigenvalue equation as expressed in Equation 2: 
     
         C-λI=0                                              (2) 
    
     where λ is equal to λ 1 , λ 2  and λ 3  and the axial lengths, A i , are related to √λ i . In the case of a uniform distribution, the axial lengths, A i , are equal to √5λ i . Equations 1 and 2 define eigenvalues and eigenvectors for an ellipsoid encompassing the test set of points in the color space seen in FIG. 3. 
     In general terms, a conceptual envelope or volume in color space is defined by the test-set points and includes those points in between the set of test points as well as the test points themselves. An eigenvector is a non-zero vector ν whose direction is not changed by a given linear transformation T; that is, T(ν) is equal to λν for some scaler λ. Such vectors are also known as characteristic vectors. Eigenvectors are the principle directions of the ellipsoid. An eigenvalue is one scaler λ such that T(ν) is equal to λν, where T is a linear operator on a vector space, and ν is an eigenvector. These are also known as characteristic numbers; characteristic roots; characteristic values; latent roots; and proper values. A proof for the eigenvector equations is provided in the Appendix. 
     Following the selection of the test set by the operator, step 36, the computer scans the image at step 38 and determines whether each pixel satisfies the test set. That is whether or not each pixel is within the ellipsoid of color space. As the computer scans the image, 38, each pixel is either accepted or rejected by the test set of points comprising the ellipsoid and either a true or a false value is assigned to each pixel. The true and false values for the pixels are stored in memory for later use. 
     Following the scan the true or false values assigned to each pixel are output at step 40 and displayed at step 42. The output may consist of a falsely colored image, providing an overall picture of the true and false values. FIG. 4 is a typical example of a core sample image contemplated by this invention. Four images are shown. Moving from left to right, the first column shows a color bar chart 45 which illustrates the range of possible colors and grey scales. Also indicated in this column is the depth 46 of the bore hole where the core sample was taken. Adjacent the color bar scale is the natural image of a core sample 48. The natural image in this instance is of a core sample sliced longitudinally to expose an uncontaminated surface. The third column 50 is an image of the same portion of core as in the second column, but under ultraviolet light. Notice the highlighted regions 52, indicating the presence of hydrocarbons, while the blackened zones such as 54 are hydrocarbon free. The far right image 56 is a falsely colored image of the ultraviolet image 50. Pixels were selected for the test set. The eigenvectors and eigenvalues were calculated by the computer to a best-fitting ellipsoid and the image 50 was scanned. From the comparison of all of the pixels with the test set, the computer falsely colored those portions which satisfy the test set. As shown by the Figure, region 58 closely approximates the highlighted portions of image 50. However, if the operator is dissatisfied with the display, the operator may return to redefine the area of interest, or select more test set points; step 44 as shown in FIG. 2. 
     One of the most significant aspects of this method for discriminating characteristics of an image is the data display. Once the falsely colored image is obtained, the data may be displayed in a manner readily interpreted by the explorationist. Moreover, the operator may want to perform several statistical operations on the data as well. 
     FIG. 5 is an example of one display presenting the data obtained from a falsely colored image of a core sample. The Figure presents the fluorescing and non-fluorescing zones in the false colored image 62 in a log-type display 60 similar to a conventional wireline log used in petroleum exploration. The thickness of an interval 64 is determined by first independently selecting the apparent dip of the structures in the core sample. This is accomplished by defining a line in the image which parallels any laminae or bedding planes in the sample. The apparent dip is stored in the computer&#39;s memory for later reference. The computer also defines an imaginary center line which extends the length of the core sample. The computer then scans across the image from side to side along a series of scan lines tilted at the apparent dip angle. The computer determines the continuity of either the true or the false pixels for each scan line. The number of true or false values for each scan line are normalized by dividing by the total number of pixels scanned. Each normalized value is stored in the computer&#39;s memory and is associated with the depth (distance down the center line of the core) where its corresponding scan line intersected the center line. 
     Once the computer has scanned the preferred length of core and normalized the values, the computer displays the continuity of the image in a &#34;continuity log&#34; 60. The output from the scan produces a curved line 66 which represents the number of either true or false values out of the total number of pixels scanned across the image at the apparent dip angle. The operator may pick a threshold 68 ranging between 0 and 1 to indicate which portions of the core sample contain significant shows of hydrocarbons. Based upon the location of the threshold line, the thickness and number of hydrocarbon shows may be calculated. Such data may be used to determine perforation locations, pay zone thickness, total pay, apsects of geologic history, etc. Data from the &#34;continuity log&#34; may be used for statistical analysis of the core sample. For example, a histogram of the hydrocarbon shows may be calculated from the continuity log. 
     Our invention has been described with a certain degree of specificity. Variations will occur to those skilled in the art which are within the scope and spirit of this invention which is limited only by the appended claims. 
     Appendix 
     The following are the mathematical algorithms used in image analysis. The purpose is to determine if an arbitrary color is similar to a representative set of colors of some feature (such as sand, shale, fluorescence, etc.) in the image. Consider a representative set of N colors which form a cloud of points in red-green-blue color space. 
     Written out in terms of their red, green, and blue components, they are: ##EQU2## 
     The mean or average values of the red, green, and blue color components of this set of points are given by, ##EQU3## 
     The mean-centered covariance matrix is given by, ##STR1## 
     Notice that matrix is symmetric. That is Cij=Cji for all i,j. 
     The eigenvalues of C are those λ such that the determinant of C minus λ times the unit matrix I is zero. That is: ##EQU4## 
     Written explicitly, ##EQU5## 
     Expanding the determinant and collecting terms, we get the (cubic) characteristic equation, 
     
         λ.sup.3 -(C.sub.11 +C.sub.22 +C.sub.33)λ.sup.2 +[(C.sub.11 C.sub.22 +C.sub.11 C.sub.33 +C.sub.22 C.sub.33) 
    
     
          -(C.sub.12 C.sub.21 +C.sub.13 C.sub.31 +C.sub.32 C.sub.23)]λ-C.sub.11 (C.sub.22 C.sub.33 -C.sub.32 C.sub.23) 
    
     +C 12  (C 21  C 33  -C 31  C 23 )-C 13  (C 21  C 32  -C 31  C 22 )=0 
     Substituting the names a 1 , a 2 , a 3  for the coefficients of λ 2 , λ 1  and λ 0 , 
     
         λ.sup.3 +a.sub.1 λ.sup.2 +a.sub.2 λ+a.sub.3 =0 
    
     Let ##EQU6## 
     Since the covariance matrix is symmetric and real, it must have 3 real roots. 
     They are ##EQU7## 
     These are the eigenvalues. 
     Let U be the matrix of eigenvectors, with the first column of U being the eigenvector associated with the first eigenvalue, the second column of U being the eigenvector associated with the second eigenvalue, and similarly for the third column of U. Let the k-th column of U be written as U k  for clarity. ##EQU8## where U 1 , U 2 , U 3  are the eigenvectors. 
     By definition, the k-th eigenvector (the one associated with the k-th eigenvalue λ k ), is the solution to the equation. CU k  =λ k  U k , or CU k  -λ k  U k  =0, or (C-λ k  I)U k  +0, or ##EQU9## For each eigenvalue λ k  where k=1, 2 or 3 we obtain these three homogeneous equations in three unknowns. We can only solve for Ujk within a multiplicative factor until we add an additional constraint equation, requiring that ##EQU10## for k=1, 2, 3 or that the eigenvectors have unit length. 
     Thus, solving the above four equations simultaneously, we obtain the components U jk  of the eigenvector matrix U, (that is, all three eigenvectors). 
     The eigenvectors and eigenvalues can be used to define an ellipsoid in color space. 
     The eigenvectors define the directions of the principal axes of this ellipsoid and the eigenvalues define the lengths of these axes. 
     For a cloud of uniformly spaced points inside an ellipsoid, the semi-axes&#39; lengths are √5 times the square roots of the corresponding eigenvalues. Since our representative color set might not be uniformly spaced, we use an adjustable scale factor S which we typically set between √3 and √6. 
     We can test if an arbitrary color P A  =(R A , G A , B A ) is similar enough to our representative N colors by determining if it is inside the ellipsoid defined by our eigenvalues, eigenvectors, and scale factor. 
     The eigenspace coordinates of this arbitrary color P A  are (E 1 , E 2 , E 3 ), given by, 
     
         E.sub.1 =(R.sub.A -R)U.sub.11 +(G.sub.A -G) U.sub.21 +(B.sub.A -B)U.sub.31 
    
     
         E.sub.2 =(R.sub.A -R)U.sub.21 +(G.sub.A -G) U.sub.22 +(B.sub.A -B)U.sub.23 
    
     
         E.sub.3 =(R.sub.A -R)U.sub.31 +(G.sub.A -G) U.sub.32 +(B.sub.A -B)U.sub.33 
    
     The test expression is ##EQU11## If T≦1, the color point P A  is either inside the ellipsoid or on its surface and is similar to our representative colors. 
     If T&gt;1, the color point P A  is outside the ellipsoid and is not similar to our representative colors.