Segmentation and registration of 2D multiphoton microscopy images
Abstract
Optical microscopy exhibits many challenges for digital image analysis. In general, microscopy volumes are inherently anisotropic, suffer from decreasing contrast with tissue depth, and characteristically have low signal levels. This thesis describes the initial work in segmenting and registering multiphoton fluorescent microscopy images via a combination of methods. In particular, it describes a method that utilizes image enhancement and spatial filtering along with registration (to correct translational motion) and temporal filtering. Experimental results indicate the methods are promising.
Full text
SEGMENTATION AND REGISTRATION OF 2D MULTIPHOTON MICROSCOPY IMAGES A Thesis Submitted to the Faculty of Escola T`ecnica Superior d’Enginyers de Telecomunicaci´o de Barcelona (Universitat Polit`ecnica de Catalunya) by Francisco Serrano Cebollero In Partial Fulfillment of the Requirements for the Degree of Enginyer T`ecnic Superior de Telecomunicacions May 2009 Purdue University West Lafayette, Indiana
ii Habr´a un d´ıa en que todos al levantar la vista, veremos una tierra que ponga libertad... -Jos´e Antonio Labordeta-
iii To my family...
iv ACKNOWLEDGMENTS I would like to express my sincere thanks to my advisor Edward J. Delp for his guidance and patience. During the last 8 months I have encouraged in so many aspects. Thanks Professor Paul Salama for his support every Wednesday at noon. Kevin S. Lorenz, this work wouldn’t have been possible if we hadn’t worked as a team. Thanks Kevin for your understanding even if I sometimes drove you crazy. I think that the four of us have performed a good team. A would also like to thank Prof. Luis Torres, Prof. Ferran Marqu´es and Prof. Phillipe Salembier. They have taught me all the knowledge I needed for developing this project. The support of everyone at VIPER Lab: Golnaz, Ka ki, Kevin, Ying, Marc, Satyam, Maggie, Aravind, Nitin and Deen has helped me during my stay at Purdue. I would like to thank the neprhology group at Indiana University who have provided us the data for analysis. Finally, thanks all the people around the world who have been there when I needed their support. I would specially like to mention my family: Francisco, Mar´ıa Dolores, Amalia, Ricardo, Sandra, Gregorio, Irene, Lorea and Abril. Gracias! This work was partially supported by Fundaci´on VODAFONE Spain and Obra social Bancaja.
v PREFACE Nuevas t´ecnicas en adquisici´on de imagen a trav´es de microscopio se est´an desarrollando en los ´ultimos a˜nos [1]. Antes de que aparecieran dichas t´ecnicas, la microscop´ıa era utilizada como una herramienta de simple visualizaci´on. Gracias a la obtenci´on de im´agenes digitales, se pueden desarrollar t´ecnicas de procesado de imagen que de forma autom´atica o semiautom´atica, eval´uen los diferentes tejidos. Este proyecto trata la segmentaci´on y el alineamiento de pilas de im´agenes tomadas a trav´es de microscopios multifot´on. Dichos microscopios se basan en un l´aser de luz cuyos fotones excitan el objeto a visualizar. Figure A.2 muestra el diagrama de este tipo de microscopios. Las estructuras biol´ogicas que se analizan en este estudio consisten en su mayor parte en vasos sangu´ıneos de h´ıgados y ri˜nones de ratas vivas. El objetivo del estudio, con las dificultades que conlleva, es el an´alisis de dichas im´agenes teniendo en cuenta que los espec´ımenes est´an vivos y por lo tanto se est´an produciendo movimientos debidos a que los animales respiran. Es por ello que el problema del alineamiento de las im´agenes se hace todav´ıa m´as exigente. En este documento se describen dos t´ecnicas utilizadas para el procesado de las im´agenes. En la Section 2 se explica la primera idea desarrollada que m´as adelante se abandona en favor de la segunda. En el siguiente apartado, se opta por un filtrado paso bajo, binarizaci´on adaptativa y filtrado morfol´ogico con un alineamiento de las im´agenes como paso intermedio. Todo ello es explicado en la Section 3. Seguidamente, se muestra un amplio cap´ıtulo donde se presentan y se eval´uan resultados. El siguiente cap´ıtulo (Section 5) muestra alternativas que se han estudiado en el proyecto. Finalmente, se exponen las conclusiones y se proponen ideas que pueden ser estudiadas en el futuro. Adem´as, se incluyen tres anexos, el primero de ellos desarrolla el funcionamiento de los microscopios utilizados para la adquisici´on de las
vi im´agenes, el segundo ampl´ıa resultados y el tercero sirve de ayuda para el acceso a las im´agenes analizadas v´ıa web. El m´etodo descrito en Section 2 hace, en primer lugar, la descomposici´on multinivel con filtros de apertura (Ver Figure 2.2) de la imagen obteniendo diferentes objetos en las consecutivas im´agenes dependiendo del tama˜no de los mismos. La suma de algunas de estas im´agenes hace obtener estructuras deseadas despreciando el ruido de fondo. Despu´es de ello, se segmentan las im´agenes utilizando el algoritmo de contornos activos, produciendo a su salida una imagen binaria. Dicha imagen es posteriormente filtrada con un filtro morfol´ogico de apertura y luego cerradura con reconstrucci´on para eliminar peque˜nos objetos indeseados que han sido segmentados y tambi´en rellenar los objetos segmentados ya que no son uniformes. Finalmente, se toma la imagen binaria como m´ascara para reconstruir la original. El siguiente paso del m´etodo consiste en cambiar el algoritmo de contornos activos por una simple binarizaci´on. Tras el filtro multiescala, se diferencia claramente entre vasos sangu´ıneos y fondo de la imagen lo que hace posible que s´olo sea necesaria la binarizaci´on para obtener los dos niveles (vasos y fondo de imagen). Debido a la diferencia de iluminaci´on entre las primeras im´agenes de cada pila y las ´ultimas, es necesario alg´un algoritmo que se adapte a dicha iluminaci´on. Se decide implementar K-means cuya funci´on es separar los p´ıxeles en dos grupos minimizando la suma de cuadrados. Resultados de este proceso se pueden ver en la Figure 4.1 para las im´agenes introducidas en la Figure 1.1. El motivo por el cu´al se desprecia este m´etodo y se opta por el siguiente es que, dependiendo del tipo de im´agenes, la selecci´on de las diferentes salidas de los filtros no es uniforme. Adem´as, el siguiente m´etodo trata el problema del alineamiento de las im´agenes. En la Section 3 se desarrolla el algoritmo que en la Section 4 presenta extensos resultados. Figure 3.1 muestra el diagrama de bloques del proceso. En primer lugar, y debido a que las caracter´ısticas del ruido introducido por el microscopio se modelan como de Poisson, se aplica un filtro MAP (Maximum a Posteriori). El objetivo de este filtro es disminuir el ruido. Como se puede ver en la Figure 2.1, despu´es de
vii que las im´agenes son filtradas, el ruido ha disminuido aunque todav´ıa es notable. Despu´es se aplica un filtrado espacio-temporal para apaciguar el ruido ya que el ruido est´a presente en forma de impulsos. En primer lugar, la imagen es filtrada en el dominio espacial usando un filtro triangular de tama˜no 5x5 p´ıxeles. S´olo si todas las im´agenes est´an alineadas, se puede aplicar el filtro temporal. Por ello se introduce en este punto el alineamiento de las im´agenes explicado en el siguiente p´arrafo. Para el filtrado temporal de la imagen se opta por un filtro triangular de tama˜no 5 im´agenes (2 previas y 2 posteriores). Para la binarizaci´on de la imagen, se aplica el mismo algoritmo explicado en el p´arrafo anterior (K-means). El siguiente bloque consiste en un filtro de apertura y cerradura para eliminar peque˜nos objetos tal como se explica en el primer m´etodo. Finalmente, y a partir de la imagen binarizada se construye la imagen original segmentada y alineada. El alineamiento de la imagen se lleva a cabo solamente teniendo en cuenta movimientos horizontales y verticales entre consecutivas im´agenes. La m´etrica utilizada minimiza en el error cuadr´atico medio. Adem´as, el algoritmo de descenso de gradiente es utilizado en lugar de una b´usqueda exhaustiva de forma que se minimiza el tiempo de computaci´on. Tambi´en se utiliza interpolaci´on bilineal de forma que en lugar de utilizar los p´ıxeles de la imagen como rejilla, se utilizan fracciones de los mismos. Finalmente y como condici´on de borde se utiliza la condici´on de Neumann de forma que se aplica el valor m´as cercano dentro de la imagen para el computo de la m´etrica. Gran cantidad de pilas de im´agenes han sido procesadas y comparadas en este trabajo. Section 4 y Section B muestran, comparan y comentan gran parte de ellas. Debido a que la mejor forma de visualizar el alineamiento de las im´agenes es mediante la reproducci´on de toda la pila en forma de video, y ya que eso no es posible en el documento escrito, Section C explica como acceder v´ıa web a estos archivos. Los resultados incluidos en este documento consisten en la representaci´on de 2 consecutivas im´agenes y seguidamente los resultados del procesado de las mismas (V´ease Figure 4.2, Figure 4.3, Figure 4.4, Figure B.3, Figure B.5, Figure B.7 y Figure B.9). Adem´as de estos resultados, y en las siguientes respectivas figuras, se pueden ver las
viii gr´aficas de los movimientos verticales y horizontales adem´as de la gr´afica del valor del umbral obtenido despu´es de la binarizaci´on. Debido a la naturaleza del movimiento entre im´agenes, en algunas de las pilas no se consigue el perfecto alineamiento, pues es necesario tener en cuenta otro tipo de movimientos (rotaci´on, escalado). Tambi´en se requiere el alineamiento de los diferentes objetos en la imagen debido a la respiraci´on de los animales. As´ı, en la pila ruben34 (V´ease Section C), se pueden apreciar movimientos ondulatorios que con los m´etodos arriba expuestos, pueden ser corregidos. La segmentaci´on tambi´en puede ser perfeccionada con m´etodos m´as avanzados como se explica en la Section 6 Se pretende que con el conocimiento de la forma, tama˜no, movimiento de estructuras biol´ogicas, se llegue a una interpretaci´on y futuro desarrollo de soluciones para problemas m´edicos. Por ello, el trabajo realizado espera aportar un grano de arena al complejo mundo de la bioingenier´ıa.
ix TABLE OF CONTENTS Page LIST OF TABLES ................................ xi LIST OF FIGURES ............................... xii ABSTRACT ................................... xiv 1 INTRODUCTION .............................. 1 2 INITIAL APPROACH ............................ 7 2.1 Maximum a Posteriori Filtering .................... 7 2.2 Morphological Filtering and Segmentation . . . . . . . . . . . . . . 7 3 PROPOSED APPROACH .......................... 14 3.1 2-D Spatial Low-Pass Filtering ..................... 14 3.2 Registration ............................... 16 3.3 1-D Low-Pass Filtering ......................... 18 3.4 K-Means Threshold ........................... 20 3.5 Morphological Filtering ......................... 23 4 EXPERIMENTAL RESULTS ........................ 24 5 USER ADJUSTABLE PARAMETERS IN PROPOSED APPROACH . . 34 5.1 2-D Spatial Low-Pass Filtering ..................... 35 5.2 Registration ............................... 35 5.3 1-D Low-Pass Filtering ......................... 38 5.4 Morphological Filtering ......................... 39 6 CONCLUSIONS AND FUTURE WORK .................. 40 LIST OF REFERENCES ............................ 42 A Microscopy Imaging .............................. 45 B Extended Results ............................... 49 B.1 Green Component Clamping ...................... 49
2 this knowledge often requires the analysis of microscopy image sets and using segmentation methods to identify and separate relevant biological structures. In attempts to perform automated segmentation of cellular structures in microscopy images, several segmentation methods have been proposed for microscopy data, including methods that rely on a priori shape information and methods that do not. For example, methods proposed in [5] identify cells with a circular structure based on a priori knowledge, while in [3] active contours are used to segment and track cells by minimizing a piece-wise constant energy function that includes terms that penalize the variance of the intensity inside and outside the boundary as well as a regularization term that penalizes total boundary length. In [6] a combination of thresholding and watershed segmentation is used to segment nuclei in time-lapse fluorescence microscopy images. This was followed by a scheme in which segmented nuclei less than some experimentally determined size threshold are merged together and those greater than this size threshold are split. In [4] chromosome feature extraction by using a Kohonen self organizing feature map is described. Neuron segmentation is described in [7] by identifying edges via a multiscale wavelet edge detection technique [8]. Microscopy image sets are frequently obtained from live specimens. Therefore, motion artifacts are introduced into the scene as a result of factors such as respiration and voluntary muscle contractions. It has also been demonstrated that using registration schemes can aid with segmentation, especially with volumetric data. Image registration involves matching two or more images taken at different times or from different viewpoints. Registration aligns the images so that they all share a common coordinate system, a condition aiding in future image analysis. The process is often described as finding an explicit function that performs a backward mapping of a target image onto a source image [9, 10]. Methods proposed in [11] use motion patterns of cells to register consecutive images, while methods in [6] use a matching process between consecutive images to determine displacement distances. Nonetheless, there exists much controversy over approaches to image segmentation with confocal and multiphoton microscopy. Some argue [12] that user interaction is
3 best suited since no automated procedure can truly reproduce the accuracy of the human visual system in correctly identifying individual cellular objects. While the entire segmentation process is not completely manual, it requires at least a manual input of an initial seed value or starting point. Additionally, several authors have based their registration schemes on manually selecting landmarks [13–15]. Finding an optimal relation between images given specified landmarks is described as NP-hard, and therefore heuristics is often used to make the matching process practical [16]. Introducing a smoothness/regularity constraint to reduce the effects of noise on elastic materials have been promising [17]. Other authors have mixed the use of landmarks with contribution from the image [18]. However, others argue [2] that a completely automated process is necessary to obtain quantitative, objective, and repeatable results. User interaction causes varying results for identical input data sets which may be unacceptable in certain applications. This document describes a method to segment multiphoton fluorescent microscopy images via a combination of segmentation and registration methods. In particular, the proposed method utilizes image enhancement and spatial filtering along with registration (to correct for translational motion) and temporal filtering. Motivation for the development of our proposed technique is provided by the desire to analyze two types of data sets of multiphoton fluorescent microscopy images. One data set type consists of a progression of images corresponding to focal planes looking deeper in the tissue. Outside literature may refer to this type of data set as “z-series” data, as the z-axis typically corresponds with depth. A specific example of this data set type used in this work is referred to as the nuclei data set, which contains approximately onehundred images of rat kidney cells. The other data set type consists of a progression of images corresponding to a series of time instances. Outside literature may refer to this type of data set as “time-series” data. A specific example of this data set type used in this work is referred to as the vascular flow data set, which contains approximately two-hundred images comprising vascular flow in a rat liver. Example images from each data set are shown in Figure 1.1. Both data sets have been corrupted with noise
4 (a) Image 29 of nuclei data set (b) Image 70 of vascular flow data set Fig. 1.1. Example of Images Used in Our Study from a variety of sources, including photon shot noise and detector noise due to the small number of photons available to illuminate each pixel or voxel, creating low SNR values. The goals of this project include:
5 Image segmentation The goal is to identify and segment individual nuclei from the nuclei image set for the purpose of quantifying the number and volume of nuclei in the scene. In this data set, given any particular image, some nuclei appear with significantly increased intensity. This is expected, as cells that are currently in the middle of the focal plane will appear with more intensity, while cells that are on the edge of the focal plane will appear with less intensity. This is a common occurrence with multiphoton microscopy as opposed to confocal microscopy. This effect is caused by the dye concentrating within the middle of the nuclei creating a non-homogeneous distribution. Naturally, selecting which cells are relevant in any given image is subjective. Additionally, the objective is to identify the path of blood flow in the vascular flow image set for the purpose of quantifying the area occupied by vascular vessels in the scene. Image registration In the nuclei data set, since there does not appear to be significant movement between images, registration techniques may not need to be utilized. This is expected as the tissue was fixed and not live. Regarding the vascular flow data set, movement between images is much more significant due to specimen motion during acquisition. Therefore, registration is needed to correct these movements between images. Registration is expected to improve segmentation performance. However, registration is also a goal in itself of the project. The general goal of this work is to segment a sequence or “stack” of confocal fluorescent microscopy images. Concerning data set types consisting of progressive tissue depths such as the nuclei data set, the images are acquired at various (known) depths across a 3D sample of renal structures in a rat. Regarding time series data set types such as the vascular flow data set, the images are acquired at evenly spaced time intervals across a single focal plane of liver structures in a rat. Two fundamental approaches have been developed to address the aforementioned issues, with the second approach replacing the initial approach. This thesis is organized as fol-
6 lows: Section 2 describes the initial approach for image segmentation despite later being abandoned, Section 3 describes the second approach for image segmentation and registration, Section 4 shows experimental results from the second approach, Section 5 discusses alternatives and modifications available to the second approach, and Section 6 discusses future work and concludes the document.
7 2. INITIAL APPROACH This section describes the initial approach for image segmentation. Despite sufficient performance and results as shown in Figure 4.1, this approach is later abandoned in favor of the approach described in Section 3. 2.1 Maximum a Posteriori Filtering The first step in this initial approach is a denoising filter. Specifically, this filter is a maximum a posteriori (MAP) filter [19] which takes advantage of the known characteristics of the noise, as photon noise is known to predominantly have a Poisson distribution. By utilizing this additional information about the characteristics of photon noise, particularly in the nuclei data set, cellular objects become more welldefined to enhance the performance of the segmentation process to follow. Figure 2.1 shows the effects of the filter on an example image. 2.2 Morphological Filtering and Segmentation With respect to image segmentation, the initial approach was to consider a grayscale morphological multi-scale analysis of both data sets [20], as shown in Figure 2.2. Raw data images are provided as the input to the system, shown at the bottom of the figure as xi, indicating a single image. Each operator Fkrepresents a morphological opening followed by a morphological reconstruction, both using the same structuring element. Morphological reconstruction is a series of repeated dilations of an image, known as the marker image, until the profile of the marker image is entirely less than the profile of a second image, known the mask image. This process causes the peaks in the marker image to dilate [21]. The marker image is given as the morphologically
8 (a) Original Image (b) MAP Filtered Image Fig. 2.1. Maximum a Posteriori Filtering of Image 29 from Nuclei Data Set
9 opened image, while the mask image is given as the original input image. Each operator Fkuses a flat, square structuring element of size 2k+ 1 ×2k+ 1. Due to the multi-scale structure, subsequent images, lk, extract increasingly larger objects from the previous gk−1images. The gkimages contain the remaining objects after objects segmented in lkhave been removed. The results of the morphological multi-scale analysis for an example image in the nuclei data set are shown in Figure 2.3, and results for an example image in the vascular flow data set are shown in Figure 2.4. In selecting which filter outputs should appear in the final output, the analysis was subjective. Compositions such as l4+l5+l6+g6and g4appeared to produce acceptable results. However, the segmented objects in these composition images often contained small holes. To eliminate these holes, a single morphological closing operation with a flat, square structuring element of size 5 ×5 was used. The size of this structuring element was selected empirically. The resulting image now contained large, undesired dark artifacts. Only the cells with the greatest intensity are desired. Therefore, a binary image was created by using a simple thresholding technique, where the threshold was chosen subjectively to eliminate the dark artifacts and retain the desired cell objects. From this binary image, the final output image was created. For black pixels in the binary image, the corresponding pixels in the output image remain black. For white pixels in the binary image, the corresponding pixels in the output image are restored to the corresponding pixels in the original image. The binary image acts as a segmentation mask for the original image: F(m, n) = B(m, n)O(m, n) (2.1) where Fis the final image, Bis the binary image, and Ois the original image. It should be noted that this approach is a causal system. Furthermore, the current output image only depends on the current input image. No dependencies on previous or future images are created. However, a drawback with this approach became apparent due to the nature of the data set. In the majority of the images, individual cells are composed of individual pixels that are not very contiguous. Images of the cells
10 do not appear as solid objects and often contain many black pixels interspersed between white pixels. This is due to the cell itself not having a rigid boundary, or more likely due to characteristics of the image acquisition system. For extreme cases, the morphological opening operations eliminated all of these cells, and the corresponding images turned out to be essentially completely black, particularly for beginning and ending images in the sequence. In an attempt to improve on this approach, active contours were introduced as a replacement for the subjective threshold.1However, the results showed no noticeable improvement, but greatly increased computational complexity. Therefore, active contours were abandoned and the simple subjective threshold was used. 1The active contour based segmentation was provided by: F. Marqu´es and P. Salembier, Signal Theory and Communications Department, Technical University of Catalonia
11 Operator F3 Operator F2 Operator F4 Operator F5 Operator F6 Operator F1 l3 g3 l4 g4 l5 g5 l2 g2 l1 g1 g6 l7 l6 xi Fig. 2.2. Morphological Multi-Scale Analysis
18 corresponding with increasing time instances, as the same cellular objects are expected to be in view for every image in the sequence. Future enhancements to this registration process will involve considering other linear and non-linear transformations in addition to translation. This will further reduce artifacts caused by specimen movements and data acquisition limitations. It can be seen on Figure 4.7(c) that the input image has been placed, after registering, on a bigger image. The first image of the stack is located at the center of the output image and the consecutive images are placed in their respective locations taking into account the movement values of the registration process. 3.3 1-D Low-Pass Filtering Thus far, any information about the current image that is contained in previous and/or future images has not been utilized. If a particular object was segmented in the previous image, it is highly likely that this same object should also appear and be segmented in the current image. It has been observed in our images, particularly for the nuclei data set, that the intensity of a specific pixel related to an object of interest, as a function of depth (image number), starts out low, increases as the dye concentration in the object of interest increases in the current focal plane, peaks, and then decreases as the object fades away. However, noise interferes with this expected behavior, as seen in Figure 3.2(a), which displays an example of the pixel intensity as a function of image number. With the noise inducing sharp discontinuities in pixel intensity, objects segmented in the current image may disappear in the next image, then reappear in the following image. Therefore, to address this effect and restore the expected behavior of a pixel’s intensity as a function of image number, a 1-D low-pass filter is used across the images. The filter is given by: Tn=1 10In+2 10In−1+4 10In−2+2 10In−3+1 10In−4(3.4)
19 Parameter Options Available Option Selected Boundary condition Neumann Constant padding Circular Error metric Mean squared error Normalized correlation Mean reciprocal squared difference Mutual information Kullback Liebler distance metric Normalized mutual information Mean squares historgram Correlation coefficient histogram Cardinality match Kappa statistics Gradient difference Optimizer Amoeba Conjugate gradient Gradient descent Quaternion rigid transform gradient descent Limited memory minimization Bounded limited memory minimization One plus one evolutionary Regular step gradient descent Powell Simultaneous perturbation stochastic approximation Versor transform Versor rigid 3D transform Interpolator Nearest neighbor Bilinear B-Spline Windowed sinc Table 3.1
20 where Tndenotes the n-th filtered image corresponding to the n-th input image In and its four preceding images In−1,In−2,In−3, and In−4, respectively. The coefficients of this filter were selected empirically. The filter is chosen so that the system remains causal, with the idea of establishing a real-time system. The largest coefficient is chosen to correspond with the second previous image. Therefore, the system will have a time delay of two images. For images at the beginning of the sequence, where not all of the four previous images are available, the n-th filtered image is obtained by: Tn=1 4In+1 4In−1+1 4In−2+1 4In−3 Tn=1 3In+1 3In−1+1 3In−2 Tn=1 2In+1 2In−1 Tn=In (3.5) The filtered intensity profile corresponding to Figure 3.2(a) is shown in Figure 3.2(b). It has been observed that if consecutive images have significant movement or displacement, then any analysis following the 1-D filtering fails. This is because the relationship between image number and pixel intensity shown in Figure 3.2 is no longer valid. Therefore, this movement must be corrected using registration before the 1-D filter. Image Figure 4.7(d) shows the output of that filter compared with the input on previous figure. Note here that the light intensity inside the blood vessels is now more constant which was the objective of the filter. Also, note that the boundaries are less defined. 3.4 K-Means Threshold After filtering and registration, K-means (K= 2) is used to generate binary images to serve as segmentation masks [30]. The objective here is to generate image
21 0 10 20 30 40 50 60 70 80 90 100 0 20 40 60 80 100 120 140 160 180 (a) Pixel values vs. depth 0 10 20 30 40 50 60 70 80 90 100 0 20 40 60 80 100 120 140 160 180 (b) Pixel values after 1-D filtering Fig. 3.2. This shows the effects of image number or depth (x-axis) on the pixel values (y-axis)
22 dependent thresholds, whereby binary segmentation masks can be constructed. The threshold obtained clusters each pixel from every image into one of two classes, segmented and unsegmented objects. K-means is a method that achieves thresholding based on the shape properties of the histogram. It is an iterative scheme which uses the average of the foreground and background class means. The computation of the mean is computed as follows: mb(Tn) = Tn X g=0 gp(g) mf(Tn) = G X g=Tn+1 gp(g) (3.6) where mfand mbare the computed means for the foreground and the background respectively, Tnis the value of the threshold (inizialiced to 256/2) and p(g) is the value of the histogram for the intensity g. After the means are computed, a new threshold is found as: Tn+1 =mf(Tn) + mb(Tn) 2(3.7) Finally, the algorithm stops once |Tn−Tn−1|< α with α= 1 in our case. It can be seen that for all the images in the stacks we tried, the number of iteration is smaller than 10 iterations. Each binary mask was initially obtained by setting all pixels whose values fall below the image’s corresponding threshold to zero, and those whose values are greater than or equal to the threshold to 255. It was observed, however, that the threshold does not change drastically between consecutive images. Therefore, K-means does not have to be used for every image, rather only when there is significant movement or a scene change. K-means is necessary because a static threshold obtained subjectively may work for a given specific data set, but would not be adaptive to other data sets.
23 The output of the binarization process can be seen on Figure 4.7(e). We can appreciate that the filter has split the image on two groups but there still are undesired objects that have been segmented. 3.5 Morphological Filtering Upon examining the resulting binary masks, we observed that they often contained small black holes inside objects and small white objects in the background. To remove these isolated objects, several morphological filters were used [20]. First, a binary morphological opening with a flat, square 7 ×7 structuring element was used to remove small objects. Next, a morphological closing with a flat, square 4 ×4 structuring element was used to remove small holes. The sizes of these structuring elements were selected empirically. This resulted in the final binary masks used to segment the original images. Denoting an original image by O, its corresponding mask by B, then the segmented image Fis given by F(m, n) = B(m, n)O(m, n), just as was performed in the initial approach. The output of the morphological filter and the reconstruction image can be seen on Figure 4.7(f) and Figure 4.7(g) respectively.
24 4. EXPERIMENTAL RESULTS Example images displaying the segmentation results for both the nuclei and vascular flow data sets for the initial approach described in Section 2 are shown in Figure 4.1. Despite satisfactory segmentation results, this approach did not include any registration techniques and was therefore abandoned. All of the results henceforth in this section now pertain to the second approach described in Section 3. A table summarizing all data sets processed with the second approach is shown in Table 4.1. Due to the similarity among the ruben34min, ruben62min,ruben70min, and ruben120min data sets, only the results from the ruben34min data set have been shown in this document for brevity. Likewise, the glomerulus1 and glomerulus2 data sets are very similar, and therefore only the results from the first data set have been included in this document. The rest of the Section 4 shows finals results of segmentation and registration of nuclei data set, vasculature data set and ruben data set. For the three stacks, outputs of two consecutive images are shown. A brief discussion of the registration and binarization technique is introduced here through the plots of horizontal and vertical movement and also the value of the threshold. The rest of the data sets of Table 4.1 are shown on Section B. Just one image of each stack is shown as a result, the complete stack of images in png format and also videos in avi format can be found on the following web page: https://redpill.ecn.purdue.edu/~kidney/thesisSerrano/ (See Section C). Representative images showing the performance of our entire system for the nuclei, vascular flow and ruben data sets are given in Figure 4.2, Figure 4.3 and Figure 4.4, respectively. As it can be seen, nuclei with the greatest intensity are retained, while those with the lowest intensity are eliminated. Similarly, structures with the greatest intensity are retained in the vascular flow and ruben data sets, while those with the lowest intensity are eliminated. Note that in the ruben data set, the results images
25 (a) Image 29 of nuclei data Set (b) Image 70 of vascular flow data Set Fig. 4.1. Morphological segmentation results using initial approach
26 Name in Filename Objective Main Problem Report Prefix nuclei BCHAN Segment nuclei in sharp focus Severe photon noise vascular flow rat1-infusion Segment vasculature structures Translational motion hmang hmang Segment vasculature structures shown in red Endosomes and tubular lumen have large red component ruben ruben34min Segment vasculature structures shown in red Registration requires non-linear distortion correction unnamed ruben62min Segment vasculature structures shown in red Registration requires non-linear distortion correction ruben70 ruben70min Segment vasculature structures shown in red Registration requires non-linear distortion correction unnamed ruben120min Segment vasculature structures shown in red Registration requires non-linear distortion correction glomerulus glomerulus1 Segment vasculature structures Artifacts due to respiration and acquisition unnamed glomerulus2 Segment vasculature structures Artifacts due to respiration and acquisition liver vasculature vasculature-live Segment vasculature structures shown in green Significant green background fluorescence outside of blood vessels Table 4.1 List of Data Sets
27 are the original with the boundary of the segmentation instead of the output of the block diagram shown on Figure 3.1. Registration results for the vascular flow,nuclei and ruben data sets are shown in Figure 4.5. Movements on vascular flow data set are almost constant values on positive direction for both, horizontal and vertical directions. Large spikes appear in the middle of the data set. It can be an indicator to possible distinguishes between multiple separate data sets. Playing the video for this data set, we observe a change of scene near image 103. The video also proves the constant value of the traslation in the same direction for the entire stack despite of some negative values. In a similar way, nuclei data set movements are also constant in the same direction in the first 60 frames. The last frames show a random movement. The reason of this movement is that the light intensity is too dark and the algorithm fails. For ruben data set we can appreciate a negative vertical movement but no horizontal movement is distinguished. After each data set was denoised, filtered and registered, it was thresholded via K- means. Figure 4.6 shows the threshold value for the three stacks. vascular flow data set threshold is a constant value for all the images with a smaller value when a change of scene is present. In contrast, nuclei data set has a big variation of the threshold values. It’s because of the fact of different light intensity on the stack having a low threshold values when the image is darker. Most clear is the case of ruben data set where there is a constant value until image 33 due to the light is constant in these images. From here to the end, there is a linear decreasing of the threshold due to the out of focus of the images. Finally, to demonstrate intermediate results from every block in Figure 3.1, the output of each block from the analysis of an example image from the ruben data set is shown in Figure 4.7.
34 5. USER ADJUSTABLE PARAMETERS IN PROPOSED APPROACH The second approach has completely automated the image processing of the data sets. However, user interaction may be introduced to modify certain parameters of the analysis. Specifically, in the second approach, the following four parameters may be modified by the user: 2-D spatial low-pass filter, registration, 1-D low-pass filter, and morphological filter. These parameters may be adjusted depending on specific input data sets to produce more desired results. A diagram depicting these user adjustable parameters is shown in Figure 5.1. out f (m,n) sp f (m,n) t f (m,n) bin f (m,n) m f (m,n) reg f (m,n) in f (m,n) MAP f (m,n) Size / shape of filter Offset yes/no Binarization Morphological Pass Filter MAP Filter Registration 1−D K−means Binary Restoration Algorithm Time Filtering 2−D Low Error metric Size / shape of filter Size / shape of structuring element Fig. 5.1. User Adjustable Parameters in Block Diagram
35 5.1 2-D Spatial Low-Pass Filtering The simplicity of the 2-D low-pass blurring filter lends itself well to this application. Other filters such as Gaussian smoothing [31] have a higher computation cost without necessarily producing improved results. An edge-preserving smoothing filter has also been studied. However, due to the characteristics of image noise, the edge preserving filter may perform poorly, as edges of objects are not well defined in the original data images. Additionally, the form of the 2-D spatial low-pass filter introduced previously was selected experimentally. The coefficients and dimension of the filter may be modified to produce slightly different blurring effects. A filter with impulse response: h= 0.03 0.03 0.03 0.03 0.03 0.03 0.05 0.05 0.05 0.03 0.03 0.05 0.12 0.05 0.03 0.03 0.05 0.05 0.05 0.03 0.03 0.03 0.03 0.03 0.03 (5.1) with h(0,0) = 0.12 being the center element of the filter, has also shown to produce acceptable results. 5.2 Registration In addition to the mean squared error metric used, the following metrics have been evaluated: (u, v) = argmax (u,v)(X mX n xi−1(m, n)xi(m−u, n −v)) (u, v) = argmin (u,v)(X mX n |xi−1(m, n)−xi(m−u, n −v)|)(5.2) where xi−1(m, n) and xi(m, n) denote the pixels at location (m, n) within the reference image and target image, respectively. The registration was performed using
36 both metrics, where the results were visually identical. If the reference images are binary, computation will be greatly reduced using the first metric, where a logical AND operation is significantly faster than a subtraction operation. However, for grayscale reference images, the mean square error metric is a common metric with a large capture radius [9]. Additionally, the mutual information metric has been evaluated [32]. The mutual information metric consists of maximizing the following: (u, v) = argmax (u,v) {I(xi−1(m, n), xi(m−u, n −v))}(5.3) where I(x(m, n), y(m−u, n−v)) = H(x(m, n))+H(y(m−u, n−v))−H(x(m, n), y(m−u, n−v)) (5.4) and the operator Hdenotes the entropy. The mutual information implementation from Mattes et al. [33] has been used on this approach. Figure 5.2 shows the registration results. Unlike the mean squared error metric, when there is significant movement between images, the mutual information metric does not produce large peaks in the metric value. Additionally, the mutual information metric values contains more variation than the mean squares metric values. More information about this technique can be found in [34,35]. Surprisingly, worse results have been obtained using this metric. However, it is known that the mutual information metric produces optimal results when images of different modalities are involved. In such cases, metrics based on direct comparison of gray levels are not applicable. It has been extensively shown that metrics based on the evaluation of mutual information are well suited for overcoming the difficulties of multi-modality registration. If the system is not required to be real-time where the entire stack of images is available, the system can be implemented using non-causal methods. Therefore, there is the advantage of being able to analyze the entire data set before creating
37 20 40 60 80 100 120 140 160 180 200 −30 −20 −10 0 10 20 30 (a) Row (vert.) displacement 20 40 60 80 100 120 140 160 180 200 −30 −20 −10 0 10 20 30 (b) Column (hor.) displacement 0 20 40 60 80 100 120 140 160 180 200 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 (c) Mutual information metric Fig. 5.2. Registration Results from Vascular Flow Data Set Using Mutual Information Metric
38 any output images. In the second approach introduced previously, the output image size is unknown unless the maximum total displacement due to registration is known. However, this information is not available until the entire data set has been analyzed. For the system to be causal, an assumption about the output image size had to be made, and the placement of the first image in the output image had to be chosen. However, with a non-causal approach, the system is able to analyze the entire data set before producing any output images. After all images have been analyzed, the maximum displacement across all images can be determined to set the output image size so that no source images are truncated. 5.3 1-D Low-Pass Filtering By continuing through with a non-causal approach, the 1-D vertical low-pass filter can be made non-causal as well. The filter can now be given by: Tn=1 10In−2+2 10In−1+4 10In+2 10In+1 +1 10In−2(5.5) where Tndenotes the n-th filtered image corresponding to the n-th input image Inand its two preceding and two succeeding images In−2,In−1,In+1, and In+2, respectively. Implementing this filter requires analyzing all input images twice, once for the spatial low-pass filter, and a second time for the 1-D low-pass filter. For images at the beginning and end of the sequence, where not all of the four previous images are available, the n-th filtered image is obtained by: Tn=1 3In−1+1 3In+1 3In+1 Tn=In (5.6) Additionally, similar to the 2-D spatial low-pass filter, the form of the 1-D lowpass filter introduced previously was also selected experimentally. The coefficients and length of the filter, for both the causal and non-causal cases, may be modified to produce slightly different smoothing effects.
39 5.4 Morphological Filtering The size and shape of the structuring elements used in the morphological filter were also selected experimentally. By altering the size and shape of the structuring elements for the opening and closing operations, the user can remove smaller or larger objects, and remove smaller or larger holes, respectively, from the binary mask.
40 6. CONCLUSIONS AND FUTURE WORK This document described two techniques to segment microscopy image data sets. The second approach is deemed to be a more comprehensive method in addressing the issues and is chosen as the preferred method over the second approach. Experimental results indicated that this method was promising in segmenting objects in time series data sets as well as data sets comprised of images acquired at increasing tissue depths. Nevertheless, evaluation of results proves to be difficult without having any ground truth data available. This makes evaluation significantly more subjective and less objective. Future work will involve developing registration schemes that correct rotations and other non-linear distortions, especially those prevalent in the new data sets. All methods have been implemented in both MATLAB and in C using ITK 1. The computational complexity of the MATLAB implementation is extremely high, particularly for the registration component of the process. However, the ITK implementation has a speedup factor of 200 over the MATLAB implementation. All figures of analyzed results in Section 4 have been created with the ITK implementation. A complete guide of this image processing toolkit is presented in [22]. Lastly, it is becoming increasingly common in medical imaging to analyze high dimensional images. For this reason, future work can be based on the implementation of higher dimensional filters. The 2-D morphological filter may be replaced with a 3-D filter which takes into account the time/depth dimension. However, it is important to note that, registration must be performed on all the frames before applying any type of 3-D filter due to the specimen movements. 1National Library of Medicine Insight Segmentation and Registration Toolkit (http://www.itk.org)
41 Also, it’s important to note that in future implementations; it can be useful, processing the different channels separately for obtaining a better performance in terms of segmentation and registration. For example, on hmang data set (see Figure B.1), red channel could be used for segmentation while green channel (Undesired objects) can be used for registration. Blood vessels (on red) are not useful for registration due to the movement of the blood inside them. Endosomes and tubular lumen, with a high ratio of green to red signal, however could be used for registration.
LIST OF REFERENCES
42 LIST OF REFERENCES [1] R. L. Bacallao, W. Yua, K. W. Dunna, and C. L. Phillips, “Novel light microscopy imaging techniques in nephrology,” Current Opinion in Nephrology and Hypertension, vol. 12, no. 1, pp. 455–481, 2003. [2] B. Luck, K. Carlson, A. Bovik, and R. Richards-Kortum, “An image model and segmentation algorithm for reflectance confocal images of in vivo cervical tissue,” vol. 14, pp. 1265–1276, Sept. 2005. [3] A. Dufour, V. Shinin, S. Tajbakhsh, N. Guillen-Aghion, J.-C. Olivo-Marin, and C. Zimmer, “Segmenting and tracking fluorescent cells in dynamic 3-D microscopy with coupled active surfaces,” vol. 14, pp. 1396–1410, Sept. 2005. [4] M. Kyan, L. Guan, M. Arnison, and C. Cogswell, “Feature extraction of chromosomes from 3-D confocal microscope images,” vol. 48, pp. 1306–1318, Nov 2001. [5] K. Nandy, P. Gudla, and S. Lockett, “Automatic segmentation of cell nuclei in 2D using dynamic programming,” in Proceedings of 2nd Workshop on Microsopic Image Analysis with Applications in Biology, Piscataway, NJ, USA (D. Metaxas, J. Rittscher, S. Lockett, and T. Sebastian, eds.), 2007. [6] X. Chen, X. Zhou, and S. Wong, “Automated segmentation, classification, and tracking of cancer cell nuclei in time-lapse microscopy,” vol. 53, pp. 762–766, April 2006. [7] A. Dima, M. Scholz, and K. Obermayer, “Automatic segmentation and skeletonization of neurons from confocal microscopy images based on the 3-D wavelet transform,” vol. 11, pp. 790–801, Jul 2002. [8] S. Mallat and S. Zhong, “Characterization of signals from multiscale edges,” vol. 14, pp. 710–732, Jul 1992. [9] L. Brown, “A survey of image registration techniques,” ACM Computing Surveys, vol. 24, no. 4, pp. 325–376, 1992. [10] B. Zitov´a and J. Flusser, “Image registration methods: A survey,” Image and Vision Computing, vol. 21, pp. 977–1000, October 2003. [11] E. Meijering, I. Smal, O. Dzyubachyk, and J. Olivo-Marin, Time-Lapse Imaging, ch. 15, pp. 401–440. Elsevier Academic Press, Burlington, MA, USA, 2008. [12] D. McCullough, P. Gudla, B. Harris, J. Collins, K. Meaburn, M.-A. Nakaya, T. Yamaguchi, T. Misteli, and S. Lockett, “Segmentation of whole cells and cell nuclei from 3-D optical microscope images using dynamic programming,” vol. 27, pp. 723–734, May 2008.
48 Fig. A.2. Two-photon microscope diagram
49 B. EXTENDED RESULTS New data sets similar to the vascular flow data set are presented now, also consisting of liver structures of a rat across a series of time instances. These data sets will be referred to as the hmang data set, ruben 70 data set, glomerulus data set, and liver vasculature data set. Example images from each data set are shown in Figure B.1. See Section C for the complete data set. The objective is to segment vasculature structures in all of these new data sets. Vascular structures are shown predominantly in red in the hmang and ruben70 data sets, and predominantly in green in the liver vasculature data set. Therefore, regarding the ruben70 and liver vasculature data sets in color, the respective color component is extracted. Then, only this color component is analyzed using the proposed approach, just as the nuclei and vascular flow data sets were analyzed. However, the hmang data set must undergo additional preprocessing due to the image set characteristics and desired objects to be segmented. This preprocessing is called green component clamping, and is explained in the following section. B.1 Green Component Clamping The images in the hmang data set contain many yellow structures (endosomes and a tubular lumen have a combination of red and green fluorescence), which are undesired to be segmented. Therefore, simply using the red component of these images will cause segmentation of unwanted objects in addition to the vasculature. Therefore, to reduce the visibility of yellow structures, a new image is constructed by identifying unique ratio of red to green signal as follows: ˜ fr(m, n) = 0 if fr(m,n) fg(m,n)<1 α fr(m, n) else (B.1)
50 (a) Image 13 of hmang data set (b) Image 26 of ruben70 data set (c) Image 20 of glomerulus data set (d) Image 32 of liver vasculature data set Fig. B.1. Example of New Images Used in Our Study
51 where frand fgare the red and green components, respectively, of the current image in the stack being analyzed, and αis a constant greater than one. Selecting α= 3 has been experimentally shown to produce sufficient results. Then, ˜ fris analyzed using the proposed approach, but only with regard to the hmang data set due to its unique characteristics. The effects of this preprocessing can be seen in Figure B.2. Segmentation and registration results for hmang data set are shown on Figure B.3. Figures of the registration and thresholding are shown in Figure B.4. There, we can see that the horizontal and vertical movements are almost constant and equal to 1 pixel in the positive and negative axes respectively. The value of the threshold decreases on the second half of the stack due to the low light intensity on the last images. B.2 Other results Results of ruben70 data set are shown on Figure B.5. Red channel has been used for processing this stack of images. As it can be shown on the video (See Section C) there is some vibration on that image, so this is the nature of the horizontal and vertical movements shown in Figure B.6. Both movements can be represented by a sinusoid of a 3-4 images of period. Glomerulus data set results are presented on Figure B.7. There we can appreciate that some non desirable structures have been segmented (See endosomes on the bottom left of the images). Also, as can be shown in the complete stack (See Section C, we can see that as the light intensity is decreasing (we are out of focus), it’s even more difficult segmenting some parts of the image. For example, see the center of the image 19. Regarding to the movements on Figure B.8, we cannot appreciate a arranged movement in some direction as it was clear on the ruben70 data set. The value of the threshold is almost constant for the entire stack. The last stack of images we are showing is the liver vasculature data set. Image results are shown on Figure B.9. Due to the noise present on the images and the low
52 (a) Red component (b) Green component (c) New image Fig. B.2. Image 10 of hmang data set
53 (a) Image 13 (b) Image 14 (c) Image 13 (d) Image 14 Fig. B.3. Original Images (a, b) from hmang Data Set; Output Images (c, d)
54 (a) Horizontal movement (b) Vertical movement (c) K-means Threshold Fig. B.4. Graphs of hmang data set
55 (a) Image 46 (b) Image 47 (c) Image 46 (d) Image 47 Fig. B.5. Original Images (a, b) from ruben70 Data Set; Output Images (c, d)
56 (a) Horizontal movement (b) Vertical movement (c) K-means Threshold Fig. B.6. Graphs of ruben70 data set
57 (a) Image 13 (b) Image 14 (c) Image 13 (d) Image 14 Fig. B.7. Original Images (a, b) from glomerulus Data Set; Output Images (c, d)