Toward real-time biopsy image analysis and cell segmentation

This Digital Signal Processing (DSP) study is aimed at real-time capture and analysis of pathological brain images to improve accuracy and efficiency. Simply analyzing cell density statistics and average cell nucleus diameters of a slide image is shown to be useful to determine the abnormality of brain sample. Numerous biopsy samples of various types obtained around the world daily are sent for screening and diagnosis to enable proper treatment, often while patients may be painfully suffering the symptoms for days to weeks anxiously awaiting the biopsy results. In general, pathological image analysis using a computer-based application could demonstrate great precision and efficiency for screening large quantities of cells on one or numerous sample slides, as opposed to the tedious and error-prone human eye counting and measuring hundreds to thousands of cells in one sample slide under a microscope. As a high-level, interactive environment for data visualization/analysis/computation, MATLAB is currently utilized to perform automatic image analysis and segmentation of brain cells on a computer. By comparing cell concentration and cell nucleus sizes between cancerous and normal image groups, MATLAB can be programmed to distinguish normal brain cells from questionable ones. Currently, MATLAB image analysis works on captured/digitized slide images and takes a minute per image to automatically pre-screen abnormalities that require further human expert analysis. With future real-time/parallel/machine-intelligent improvements, we hope that DSP can help physicians, pathologists, and patients everywhere to get immediate diagnosis for timely/effective treatment, and can show accuracy within acceptable levels that are comparable to human pathologists in dealing with cell-overlapping and noncell objects existing in slide images. Keyword: Pathological Image Analysis, Morphology, Cell Density, Nucleus Diameter, Real-Time DSP Acknowledgement: Sample brain cell slide images were provided by UTMB-Galveston. 1. Computer-Based Pathology One of the biggest challenges faced in image analysis at the microscopic cellular level today is the randomness of the cells and the uniqueness of each cell, as well as the presence of other objects such as blood vessels, nerves, etc. The presence of these other objects within typical sample slides encumbers the sample slide image analysis. The presence of abnormal cells complicates the analysis even further. The purpose of this study was to evaluate and design a computer-based tool for screening pathological slide samples, providing slide specific statistics to aid in determining normality (or abnormality) of the sample. Utilizing previous research, “Image Analysis and Segmentation of Brain Cells” by Luis Hernandez [1], as a starting point, we expanded the philosophy to optimize the analysis methodology. The goal was to enhance the accuracy of statistical results. In addition, a Graphical User Interface (GUI) was designed to simplify the usability of the tool (e.g. a selectable image listing to expedite analyses of multiple samples). In the previous research, the method chosen to perform image segmentation was grayscale thresholding. The threshold methodology is performed by obtaining a digital picture of a slide and then by converting the picture to grayscale (divided into 256 shades of gray) for computation efficiency. Since the areas of interest are the cells’ nuclei, which appear darker with a circular geometry, the grayscale threshold reference is chosen to focus on these features. Once the distinction between nuclei and other objects is made, the image is filtered to highlight cell nuclei. At this point, we were left with a cell segmentation issue for cell nuclei that were touching/overlapping. They appear as one cell to the computer-based tool, which distorts the statistical data. Several enhancement techniques were attempted, such as functions like strel and morphology techniques like tophat and watershed, which will be discussed in detail later. The issue of statistical data accuracy was resolved and the optimized MATLAB script was combined with the GUI user interface to form the final product [2]. 2. Counting and Measuring Cells on a Slide The initial MATLAB script consisted of reading an image from the computer hard drive into memory using MATLAB’s function imread. Once the image was in memory, it was converted to grayscale for faster processing using the function rgb2gray. The grayscale image, in a range from 0 to 255 shades, can greatly reduce computation complexity of the original color image and can also eliminate possible complications caused by the stain/lighting used when the picture was taken. In order for the image conversion to take place, the original image has to be in .jpg format. Care must be taken when imaging the slide samples so that the pictures are not established in .gif format. The properties of .gif files are not recognized by the rgb2gray function and the script would cease operation at that point. To view the density distribution of the different shades of gray the function imhist is used to create a histogram. Typically, each cell has one nucleus, and cells with abnormally bigger nuclei are typically bigger than normal cells. For cell counting and relative cell size measuring, the cells’ nuclei are the items of interest in each image, because the nuclei appear darker and clearer than the rest of the objects in the picture. To simplify cell segmentation, the function imhmax is used to filter out the light areas and create a uniform background with the histogram analysis. As a result, the cells’ nuclei are highlighted, as can be seen in Figure 1. Figure 1. Original gray and filtered images Now that the light areas have been eliminated and the cells’ nuclei are highlighted, another filter is applied to eliminate the lighter areas of the image. The function imopen is used with the strel structuring function to create a binary image of the region of interest. The strel function uses the syntax var = strel (shape, parameters). In this case, we use the disk shape, parameter three for the radius of structuring element. Figure 2 shows the disk-structuring element with a radius of three. The purpose of the imopen function is to have only elements that fit the shape of the strel function segmented into the binary image. The binary image has all bits that fit the structuring element turned on, with the rest turned off. Figure 2. Disk structuring element with R = 3 The cleaned cell nuclei result of the imopen function applied to the filtered image and applied with the strel function is shown in Figure 3. Figure 3. Cleaned binary image From Figure 3, it can be seen that not all the cell nuclei are round and some areas that are not parts of cell nuclei appear in the image. To filter the extra parts from the image, the strel function is used again, but this time with the line structuring element applied in the vertical and horizontal direction in conjunction with the imdilate function. Another function, used after the imdilate is used to remove the parts that are not part of the cell nuclei, the imfill function is used with the ‘holes’ parameters to fill in any nonuniformities inside the cell nuclei and make the inside of the cell nuclei uniform in the binary image. At this time, all the cell nuclei are segmented from the rest of the image, but if we are to obtain statistics of the cell nucleus sizes, the cell nuclei touching the border are not complete cell nuclei and will distort the statistics. The function imclearborder eliminates the cell nuclei touching the border from the image. The number of cell nuclei touching the borders was so small in comparison to the difference in cell numbers between normal and abnormal cells in the brain cell samples we tested that the partial cell nuclei on the borders are negligible. Alternatively, after the average nucleus size is calculated later excluding the incomplete border nuclei, it is possible to estimate the equivalent total number of border cell nuclei by adding all partial cell nucleus areas to be divided by the average size, if the border cell count is needed in analyzing different types of tissue sample. Figure 4 shows the filtered and dilated image with holes filled and the cell nuclei touching the border removed. This is not entirely accurate since the cells that are touching are treated as one element. Figure 4. Border elements removed When the statistics were performed on this picture, the area of the cells that are touching was twice as large as the single cells. Further work was done to the script to segment the overlapping cells. One method that was researched is to shrink the cells in the binary image until they separate and then enlarge them back until they touch creating a mask that can be applied to the original image to segment the individual cells. To visualize the accuracy of the script, the binary image shown in Figure 4 is outlined and superimposed on the original image. Figure 5 shows visually how the script outlined the cell nuclei. The bwlabel function is used to label the connected components of the binary image and this data can be used to get a count of the cell nuclei using the numObjects function and the area of the connected components using the regionprops function. Figure 5. Original with outline of cell nuclei As can be seen from Figure 5 above, the problem with this un-optimized script is that the overlapping cells are counted as one cell. One of our challenges was to determine a way to segment the touching cells in order to be able to produce more accurate statistics. The data obtained with un-optimized script from this picture was 15 objects with an average size of 220 pixels. From the distribution chart generated, we get the following statistics as in Table 1. Table 1. Area and distribution of cell nuclei Number of Objects Area in Pixels