The present invention relates to the automated analysis of digital images. It is more particularly concerned with the automated identification of different cell groupings in digital images of histological or cytology specimens and most particularly for the purpose of assessing the presence and severity of cancer in breast tissue based on the relative proportions of tubule formations and epithelial cells identified in digital images of tissue sections, and it is in this context that the invention is principally described herein. The invention may, however, also find application in the analysis of various other kinds of structure presenting image components which are amenable to identification in a similar way, for example in the analysis of mineral samples containing certain types of crystal formations.
Many thousands of women die needlessly each year from breast cancer, a cancer from which there is theoretically a high probability of survival if detected sufficiently early. If the presence of cancerous tissue is missed in a sample, then, by the time the next test is undertaken, the cancer may have progressed and the chance of survival significantly reduced. The importance of detecting cancerous tissue in the samples can therefore not be over-emphasised.
A typical national breast screening programme uses mammography for the early detection of impalpable lesions. Once a lesion indicative of breast cancer is detected, then tissue samples are taken and examined by a trained histopathologist to establish a diagnosis and prognosis. This is a time consuming, labour intensive and expensive process. Qualification to perform such examination is not easy to obtain and requires frequent review. The examination itself requires the interpretation of colour images by eye, a highly subjective process characterised by considerable variations in both inter, and intra-observer analysis, ie. variances in observation may occur for the same sample by different histopathologists, and by the same histopathologist at different times. For example, studies have shown that two different histopathologists examining the same ten samples may give different opinions on three of them, an error of 30%. This problem is exacerbated by the complexity of some samples, especially in marginal cases where there may not be a definitive conclusion. If sufficient trained staff are not available this impacts upon pressures to complete the analysis, potentially leading to erroneous assessments and delays in diagnosis.
These problems mean that there are practical limitations on the extent and effectiveness of screening for breast cancer with the consequence that some women are not being correctly identified as having the disease and, on some occasions, this failure may result in premature death. Conversely, others are being incorrectly diagnosed with breast cancer and are therefore undergoing potentially traumatic treatment unnecessarily.
It is thus an aim of the invention to provide a method of image analysis which can be embodied in a robust, objective and cost-effective tool to assist in the diagnosis and prognosis of breast cancer, although as previously indicated the invention may also find application in other fields.
To aid in the understanding of this aim reference is made to the accompanying
where T is the surface area in the slide covered by tubule formations (the ducts plus boundary of two epithelial cells), D is the surface area covered by ducts and E is the surface area covered by all epithelial cells (including those in T), and relate their assessment of the value of this metric to a grade of cancer using thresholds typically as follows:
where Grade 1 is the least serious and Grade 3 is the most serious.
If an objective assessment of the same or a similar metric is to be achieved through an automated method of image analysis it is necessary to distinguish inter alia those objects in an image which comprise epithelial cells and in one aspect the invention accordingly resides in a method for the automated analysis of a digital image comprising an array of pixels which includes the steps of: generating a property co-occurrence matrix (PCM) from some or all of said pixels, using the properties of local mean and local standard deviation of intensity in neighbourhoods of the selected pixels; and segmenting the image by labelling the selected pixels as belonging to specified classes consequent upon analysis of said PCM.
The invention also resides in apparatus for the automated analysis of a digital image comprising means to perform the foregoing method and in a computer program product comprising a computer readable medium having thereon computer program code means adapted to cause a computer to execute the foregoing method and in a computer program comprising instructions so to do.
Property co-occurrence matrices (PCMs) are described e.g. in Electronics and Communication Engineering Journal, pp 713, Vol 5, No 2, 1993 (Co-occurrence Matrices for Image Analysis, J F Haddon and J F Boyce), and are an extension or generalisation to the standard grey level co-occurrence matrices described e.g. in IEEE Trans. Syst., Man, Cybern., Vol SMC-3, pp 610-621, 1973 (Texture Features for Image Classification, R M Haralick, K Shanmugan and I Dinstein). They are multidimensional histograms in which each element is the frequency with which selected properties co-occur. By generating a PCM using the properties of local mean and local standard deviation of intensity in neighbourhoods of image pixels, analysis of such a PCM can thus distinguish pixels contributing to regions of, say, relatively low local mean and relatively high local standard deviation (such as the dark, textured regions representing epithelial cells in the preferred implementation of this aspect of the invention) and pixels contributing to regions of, say, relatively high local mean and relatively low local standard deviation (such as the lighter, more uniform regions representing “background” tissue in the preferred implementation of this aspect of this invention), or to regions of other combinations of those properties in other applications of the invention.
These and other aspects of the invention will now be more particularly described, by way of example, with reference to the accompanying drawings and in the context of an automated system for grading cancer on the basis of tubule formations in digital images of histological slides of potential carcinomas of the breast.
In the drawings:
General System Configuration
Overview of Process
The first step 31, following initial digitisation, is to correct the colour balance and vignetting of the image, if required. In step 32 mask points are identified to exclude certain pixels (which are neither parts of epithelial cells nor “background” tissue) from the generation at step 33 of a PCM based on local standard deviation and local mean of intensity values. The PCM distributions are analysed at step 34 to distinguish pixels contributing to epithelial cells and “background” tissue respectively, and the image is segmented at step 35 by labelling pixels as epithelial or background (from step 34) or masked (from step 32). Contiguous pixels having the same label are grouped into blobs and filtered to clean up the image at step 36 (or in the case of masked pixels will have been grouped and filtered at step 32). Blobs of pixels labelled masked which have shape and size characteristics indicative of ducts are identified and relabelled accordingly at step 37. The resultant duct blobs are then dilated at step 38 into adjoining blobs labelled epithelial, by an amount corresponding to two epithelial cells, so that they now cover an area corresponding to that of a tubule formation. A metric is calculated at step 39 based on the area ratio of dilated duct pixels to the total of duct and epithelial pixels and transformed to an indication of cancer severity at step 40 and/or used to train a classifier at step 41.
Digitisation and Calibration
The combination of microscope 21, camera 22 and computer 23 shown in
In step 31, a calibration image is captured using a clear portion of the slide. The intensity of the lighting associated with the microscope is increased until the maximum intensity of a few pixels in one or more wavebands (red, green or blue) is at or close to saturation. As few pixels as possible should be saturated but would typically be around 1%. Any lens system causes variations such as vignetting in an image and this impacts upon uniformity of intensity across an image. If these variations are severe then they may need to be corrected prior to the application of any image processing algorithm. In the equipment which has been used the vignetting effect caused a variation in intensity of up to 10% between the middle and corners of the image. This may impact upon the efficacy of the algorithm and is preferably corrected.
In the preferred embodiment, the image vignetting is roughly corrected by scaling the colour component at a pixel x by a factor F, where
where S is a scale factor. In the preferred embodiment, S=0.95. The subscript k refers to the waveband; red, green, blue or grey or as appropriate. Ck is the kth waveband of the calibration image and the function
means the maximum value over index x. In the above example this process meant that the image became consistent to significantly less than 5%. However, the region to be analysed can be further constrained if desired by imposing an elliptical mask on the image such that the axes of the ellipse are 95% of the image dimensions. This further helps to ensure that the image intensity is sufficiently consistent in the area to be analysed.
The colour balance should also be consistent and reproducible between different digitisations. This may become critical if a combination of the red, green and blue wavebands is used, such as in a grey level image. Colour balance correction can be obtained by assuming that the maximum grey level intensity in the calibration image corresponds to peak white and forcing the red; green and blue components to be of equal and maximum intensity. The red, green and blue components of any pixel can then be linearly scaled accordingly. It is also possible to use an average from several pixels that it is believed should be peak white:
where
This process assumes that peak black corresponds to (0,0,0) and does not need to be corrected. A minor change to Equation (4) would enable this to be taken into account. By applying the colour and vignette correction to the digitised image to be analysed then the resultant image has sufficient uniformity to be amenable to the following analysis. If an image can be obtained without significant variation of intensity then the calibration may not be needed.
The following processing steps can operate on a single waveband image that could be the red, green or blue component, or some combination of them such as a grey level image formed from the average of the colour components. In practice the red waveband has been found to contain the most information for discriminating between relevant portions of the image when using conventional staining.
Generating a Property Co-Occurrence Matrix
Property co-occurrence matrices (PCM) are fundamental to this algorithm. As previously indicated, they are an extension or generalisation to the standard grey level co-occurrence matrices defined by Haralick et al. PCMs are multidimensional histograms in which each element is the frequency with which the particular properties have co-occurred in an image. Formally, a PCM S can defined as:
where
In the preferred embodiment, the PCM generated at step 33 is 2-dimensional and the two properties used are local mean and local standard deviation of intensity calculated over a neighbourhood Δm and Δσ respectively. These neighbourhoods are based upon the size of epithelial cells. The larger the neighbourhood, the poorer the localisation of the boundaries but the more accurate the estimate of local mean and standard deviation. In the preferred embodiment a compromise has been reached where typical values of Δm and Δσ are 7 and 13 respectively. A typical epithelial cell was of the order of 13 pixels across for the magnification used in this case.
A mask component M has been introduced to the formation of co-occurrence matrices so that
The properties used in the preferred embodiment are local mean and local standard deviation calculated in a standard way but masking out pixels that are to be excluded, namely:
if the pixel x is to be omitted then the value of P1 and P2 are zero, but are already excluded from the formation of the PCM. If the results of either equation (8) or (9) are undefined (such as from a divide by 0) then the results are excluded from the formation of the PCM. This has not been explicitly stated in equation (7).
Identification of Mask Points
The PCM in step 33 can be formed from all pixels in the image to be analysed. However, pixels from areas that are known to be of no interest will cause an increase in the complexity of the matrix and reduce the difference between parts of the matrix which are of interest. Accordingly, in the preferred embodiment; certain pixels are excluded from the formation of the PCM using a masking operation as defined in equation (7) and are identified in step 32. Pixels to be excluded are those that:
Any algorithm that identifies these pixels could be used. However, in the preferred embodiment the algorithm shown in
If there is no appropriate valley at which to set a threshold, such as in
where the i index in the PCM is local mean and the j index local standard deviation. The histogram Hm is constrained to be between the lower of the main and secondary peaks as determined from an analysis of the histogram, as discussed hereinafter.
The block diagram of the process in the preferred embodiment of setting the mask pixels is shown in
Any appropriate algorithm could be used for determining the location and relative importance of peaks and valleys in the histogram Hg or Hm. However, in the preferred embodiment the following algorithm is used.
Peaks and valleys in the histogram are determined using a multi-resolution approach which determines both peak and valley locations and a metric (track length) that is related to the ‘importance’ of the peak. A small isolated peak is considered to be of equal importance to a large peak.
The histogram is zero-extended so that it runs from −2n/2 to 23n/2, where n is determined such that 2″ is the smallest number of bins completely containing the histogram before zero extension. This is achieved by first extending the histogram until its number of bins is equal to 2n and setting the new bins to zero, and then further extending the histogram by 50% on both sides so that it has 2n+1 bins and setting the new bins to zero. A set of n multi-resolution histograms is then formed by averaging groups of bins so that successive histograms have 22, 23, 24, . . . 2n−1, 2n, 2n+1 bins and the location of peaks and valleys determined by convolving with a [1−1] edge operator at every resolution and identifying changes of sign. Where the histogram is flat then the valley, if necessary, is right justified. The location of the peaks and valleys is then tracked through each resolution, the more resolutions in which it is located the higher the track length and the greater the perceived importance of the peak or valley. An example of this is shown in
This analysis enables pixels to be masked and excluded from the formation of the step 33 PCM used for segmenting the image into epithelial and background pixels. Very small isolated groups of pixels should not, however, be included in the mask. The identified pixels are therefore grouped and filtered using the same process as more fully described below with reference to step 36, with the following criteria for blobs. Only groups of pixels which meet these criteria are included within the mask.
Analysis of Distributions in PCM
The locations and extents of the two main 2-dimensional Gaussian distributions, and N(m1x,s1x,m1y,s1y) and N(m2x,s2x,m2y,s2y), within the PCM generated at step 33 must be determined. An example of such distributions is shown in
In the preferred embodiment, a variation on the standard algorithm is added to enable relative attributes of the two distributions to be forced. In this case the Gaussian amplitude of the model components is scaled by the product of their x and y standard deviations, ie. the models being fitted become
Image Segmentation
At step 35 the image is segmented into three classes:
This is a hard segmentation assignment, T, which for the background and epithelial cells is based upon the address in the PCM to which a pixel's local properties contribute and the distance from this address to the nearest (normalised) distribution in the PCM (determined by the EM algorithm):
where
are the local mean and standard deviations over local neighbourhood Δm and Δσ respectively in image I indexed by vector x. Rk is a scale factor to alter the relative importance of the two distributions, typically, R1=1 and R2=0.8.
This may be clarified with reference to
This results in a segmentation, T, with pixels labelled as masked, epithelial or background with the following values:
Cleanup Image
At step 36 pixels in the segmentation which have been labelled as epithelial or background and which are adjacent to pixels of the same label using an 8-pixel neighbourhood (see
The segmentation is cleaned to remove small holes (a blob labelled differently to its surroundings), small isolated blobs, lines and any other simple artefact. The measures used are X and Y sizes, area (in terms of numbers of pixels), density and aspect ratio of blobs. The values of these parameters will be related to the magnification and the size of epithelial cells. In the preferred embodiment with a magnification of ×10, the criteria for accepting a group of pixels can be varied if necessary, but typical minimum and maximum values are listed in the following table. If a blob is rejected then it is replaced by its surroundings.
Density is defined as the number of pixels in a blob over the area of the minimum enclosing rectangle. The aspect ratio is the ratio of the minor to major axis of the blob.
By way of example,
Note that in this step 36 masked pixels (grouped and filtered at step 32) are ignored, so for example holes of any size in epithelial blobs due to the presence of ducts or fat cells (labelled masked at this stage) are retained, but for ease of illustration are not shown in
Identify Duct Pixels
At step 37 groups of pixels or blobs which are labelled as masked but which satisfy simple shape and size criteria are relabelled as duct pixels. Typical values in the preferred embodiment would be:
These values are not especially critical but have been chosen so that long tissue tears, shrinkage cracks and most fat cells are rejected.
At this stage, pixels are labelled as masked, epithelial, background or duct with values as follows:
Dilating Tubule Seed Points
The purpose of step 38 is to dilate the blobs of duct pixels identified in step 37 into surrounding epithelial blobs by an amount equivalent to two typical epithelial cell diameters, so that the dilated duct blobs then equate to the presumed size of a corresponding tubule formation in the original tissue sample.
Duct cells should be surrounded by epithelial cells. Due to the way in which the slide is prepared this may not always be the case with ducts occasionally partially surrounded by background cells. Any blob which has been labelled as duct but whose boundary does not have sufficient neighbouring epithelial cells will be reclassified as mask, not duct. In the preferred implementation, at least 15% of the boundary must be with epithelial cells, determined by counting the bounding pixels.
Furthermore, there may be a very small gap between pixels labelled duct and those labelled epithelial. This is due to the neighbourhood used in the segmentation. The larger the neighbourhood, the larger this gap can be. In the preferred implementation, the dilation is allowed to cross a gap of, say, two pixels by repeatedly applying the following dilation technique until the overall dilation is equivalent to two epithelial cell diameters.
There are a variety of methods that could be used for dilation, most notably that of morphology. However, in the preferred embodiment the image, I, is convolved with a 2 dimensional Gaussian kernel, N(0,s), to generate a new dilated image, D. The Gaussian kernel has a zero mean and a standard deviation s such that the Gaussian has a value 1 at a radius 1 greater that the gap to be bridged. In more detail consider the following algorithm:
1. A new image, D, is created in which all pixels in the segmentation which are to be subject to dilation are set to 1 and all other pixels are set to 0.
2. Image D is convolved with a Gaussian kernel that has a standard deviation such that the value of the Gaussian is 1 at the desired amount of dilation, ie. if the maximum gap to be crossed is 2 pixels then the desired amount of dilation is 3 pixels and the value of the Gaussian kernel at 3 pixels from the centre would be 1. The results of the convolution are rounded down, ie. to values 0 or 1.
3. All pixels which are 1 in the dilated image and are of the class to be dilated into in the original image are set to the dilated class, otherwise they are left as they are. This means that blobs of pixels labelled duct can be dilated into blobs labelled epithelial across a gap of another label. The maximum gap that can be crossed is 1 less than the amount of dilation.
Repeated application of this algorithm enables duct blobs to be dilated across minor artefacts into epithelial blobs without uncontrolled behaviour.
A single step of the dilation is defined by
where {circle around (x)} is the operator for digital convolution. Initially, the image to be dilated, D(x), contains all pixels which have been labelled as duct. This is then convolved with the 2-dimensional Gaussian Kernel of appropriate extent and the results converted to integer by truncation. Pixels that are now labelled duct and were previously labelled as either duct or epithelial are retained as duct, all other pixels are set to 0. This process is repeated until the desired level of dilation is achieved, equivalent to two typical epithelial cells, which, in the preferred embodiment, will be 13 iterations.
A visualisation of the result of this dilation is shown in
Assessing Severity of Cancer
In step 39 the metric M on which the severity of cancer will be based is calculated as the ratio of the number of dilated pixels labelled duct to the total of the duct and epithelial pixels:
It will be seen that this effectively corresponds to the metric given in equation (1) as used by histopathologists when grading slides by eye.
As previously indicated, clinicians typically use decision boundaries of 10% and 75% to grade cancer severity based on this metric. This is not, however, necessarily appropriate for an automatic system in step 40 because:
For these reasons the actual decision boundaries to be used are preferably defined by training in step 41. Thresholds can thus be selected on metric M to define the boundaries between grade 1 and 2, and between grades 2 and 3. These thresholds should be based upon representative and complete training data. This may well mean on a per laboratory basis.
Number | Date | Country | Kind |
---|---|---|---|
0226331.7 | Nov 2002 | GB | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/GB03/04841 | 11/10/2003 | WO | 4/28/2005 |