Computers in Biology and Medicine 39 (2009) 947 -- 952
Contents lists available at ScienceDirect
Computers in Biology and Medicine journal homepage: w w w . e l s e v i e r . c o m / l o c a t e / c b m
Gray-scale edge detection for gastric tumor pathologic cell images by morphological analysis夡
Tian-gang Li, Su-pin Wang ∗ , Nan Zhao The Key Laboratory of Biomedical Information Engineering of Education Ministry, School of Life Science and Technology, Xi'an Jiaotong University, Xi'an 710049, China
A R T I C L E
I N F O
Article history: Received 7 May 2008 Accepted 27 May 2009 Keywords: Cell images Morphology Gray-scale Edge detection Structuring element
A B S T R A C T
For the purpose of analyzing gastric tumor pathologic cell images, a novel method is developed with gray-scale edge detection of mathematical morphology in this study. In combination with texture features of the image under investigation, this paper works on edge detection with various structuring elements (SEs) and gray-scale values. The results of the experiment are presented, and we found several advantages by using the morphological edge detection scheme for the analysis of gastric tumor pathologic cell images. Meanwhile, the results of the binary morphological edge detection are given for comparison. © 2009 Published by Elsevier Ltd.
1. Introduction Similar to other malignant tumor cells, gastric tumor pathologic cells could be recognized according to several representative characteristics as follows: (1) the volumes of the nuclei expand to 5–10 times as big as the normal ones; (2) the shapes of the cells are irregular, while the normal ones are usually circular, elliptical or rod-shaped; (3) the chromatin of the cells would increase and conglomerations would appear, while the chromatin in normal nuclei are homogeneous; (4) the nucleolus envelopes of the cells are obviously thicker than normal ones; (5) the nucleolus splits increase resulting in prominent tumor cellular proliferation; (6) cytoplasm decreases in the cells, therefore, the ratios of the area of the nucleus to the area of the cytoplasm increase. Sometimes, it is difficult to distinguish the benign tumor from malignant ones. With the aid of image processing methods such as mathematical morphology which define the edge of the images, it becomes easier to identify the sizes, shapes and characteristics of pathologic cell images [1,2]. The edges of an image always include inherent information (such as direction, step character, shape, etc.), which are significant attributes for extracting features in image recognition. In most cases, pixels along an edge change gradually, whereas those perpendicular
to the direction of the edge usually have much sharper changes. Generally speaking, arithmetic for edge extraction is to detect whether mathematical operators of the pixels are coincident with the features of the edge. Additionally, edge-based segmentation methods can extract the points at the boundary and then reconstruct the figures of segmentation regions, as discussed in Refs. [3,4]. Assorted approaches can be used to recognize gastric tumor pathologic cells. Among these measures, gray-scale edge detection by mathematical morphology is a new one. This method detects the investigated image with a structuring element (SE), examining if the SE can be well filled in the image, and checking whether the method of filling the SE is effective. By marking the position where the SE is filled in the image, the information of the image, which is related to the size and the configuration of the SE, can be attained. Therefore, by constructing various SEs, different image analysis can be performed and different structural information can be obtained. In order to achieve gray-scale edge detection for images of gastric tumor pathologic cells, gray morphological theories are applied, which are adjusted based on tumor cellular features and investigated to obtain image texture information [5]. We also performed simulation studies, in which various SEs are constructed and analyzed to compare with the experimental results. 2. Gray-scale morphological edge detection
夡 Project supported by a grant from National Science Foundation of China (no. 30630024) and the Doctor Foundation of National Education Ministry (no. 20050698044). ∗ Corresponding author. Tel.: +86 29 82668668. E-mail addresses:
[email protected] (T.-g. Li),
[email protected] (S.-p. Wang),
[email protected] (N. Zhao). 0010-4825/$ - see front matter © 2009 Published by Elsevier Ltd. doi:10.1016/j.compbiomed.2009.05.010
2.1. Erosion and dilation for gray-scale cell images In morphological operation, erosion could contract an image in accordance with a certain SE; and on the other side, dilation could expand an image.
948
T.-g. Li et al. / Computers in Biology and Medicine 39 (2009) 947 – 952
Fig. 1. Original images of typical gastric tumor: (a) tubular adenocarcinoma and (b) mucous adenocarcinoma.
2.1.1. Gray-scale erosion of images Suppose F(x, y) is a function of a gray-scale image and B(i, j) is a SE, F(x, y) ∈ R; x, y ∈ Z2 , DF and DB are the definition domain of F(x, y) and B(i, j), respectively. The difference operation defined by Minkowski [3] is as follows: F B = ∧ F(x − i, y − j) − B(i, j)
(1)
where ∧ stands for the minimum operation of F(x, y) and B(i, j). For each point B(i, j) in the definition domain of SE, the signal F(x, y) is initially moved in parallel by (−i, −j), and the value is then subtracted from B(i, j) at each time. In this way, each point in the definition domain of the SE will have a signal value, and the result of erosion for all the signals can be obtained by selecting the minimum value point by point. As for the pixels at the edge of the image, part of the region in the definition domain of the SEs will go beyond the image boundary. In order to process pixels at the edges, excess images are usually given to the functions, which are necessary for the process of mathematical morphology. Definite values are assigned to the pixels of the excess images, which are shown as extra rows and columns given to the images. The assigned values of the pixels by dilation operation are different from those given by erosion operation. As for erosion, the values of the pixels beyond the image boundary are defined as the allowable maximum value of that data type. On the contrary, for dilation, the values are defined as the allowable minimum value of that data type.
2.1.2. Gray-scale dilation of images Similar to the gray-scale erosion of an image, the dilation operation defined by Minkowski summation can be performed as follows: F ⊕ B = ∨ F(x + i, y + j) + B(i, j)
2.2. Edge detection for gray-scale cell images Both opening and closing operation are also used in the gray-scale edge detection. Opening operation could smooth the protuberances in images, and then it makes possible to reserve and detect the peak by subtracting the original images. Closing operation could smooth the concaves in images, so it could reserve and detect the trough by subtracting the original images. Since there are greater gray gradient distributions nearby the edges in images, the edges could be detected by morphological gradient method. When the SE is located in smooth regions, there will be no significant differences between the input and the transformed output signals. The gray-scale values of the image in the “window” are similar. On the other hand, when the SE comes into the leaping regions (the edges of images are considered as leaping regions), there will be a decline of the gray-scale degree of the transformed output compared with the original images, because the gray-scale B ⊆ F, the subtraction values are remarkably different. Because of F of the original images from the corresponding eroded ones reflects the edge information of the original images. Here B is the reflex of B if rotating B by relative to the origin. Because the contrast between the cells and the background of the image is not obvious enough, we should design special methods such as gray-scale erosion and dilation and edge detection arithmetic rather than binary methods to process the images. By choosing the suitable SE which can change the original geometrical shape and configuration and using the integrated means of mathematical morphology operation, the specific purpose of the designed algorithm can be more clearly and correctly to calculate the result of transformation. Due to the characteristics of the basic operation of mathematical morphology, erosion and dilation should satisfy the expression as follows: ∧
(2)
where ∨ stands for the maximum operation of F(x, y) and B(i, j). According to the above expression, gray-scale dilation can be achieved through the following steps: For each point B(i, j) in the definition domain of SEs, the signal F(x, y) is moved in parallel by (i, j), and then B(i, j) is added to the moved signal value each time. Via this way, each point in the definition domain of SEs may have a signal value, and the result of dilation can be obtained by selecting the maximum value from all the signals point by point. Similar to erosion, it is more convenient to compute when using the dilation operation defined by Minkowski summation [3].
F B ⊆ F ⊆ F ⊕ B
(3)
∧
∧
Hence, F − F B, F ⊕ B − F, F ⊕ B − F B can all be used to extract the edges of an image. The external edges can be achieved by subtracting the original image from dilation, i.e. F ⊕ B − F; the internal edges can be obtained by subtracting the eroded SE from the origi∧
∧
nal image, i.e. F − F B, and F ⊕ B − F B is used to extract the onboundary edge. Fig. 1 shows two images of gastric tumor pathologic cell selected for process, in which Fig. 1(a) is a pathological image of gastric tubular adenocarcinoma, and Fig. 1(b) is one of gastric mucous adenocarcinoma. Fig. 2 shows the images of detected internal and external edges of Fig. 1(a), using the algorithms described above, with a square SE of size 5×5, 7×7, 9×9 pixels, respectively, and the SE is 8-adjacent region. For further comparison, Fig. 3 also shows the
T.-g. Li et al. / Computers in Biology and Medicine 39 (2009) 947 – 952
949
Fig. 2. The gray-scale edge detection with square SEs of different sizes: (a) 5×5 inner edges, (b) 5×5 external edges, (c) 7×7 inner edges, (d) 7×7 external edges, (e) 9×9 inner edges and (f) 9×9 external edges.
∧
Fig. 3. Gray-scale morphological edge detection of Fig. 1(b): (a) the image inner edges by F − F B and (b) the image external edges by F ⊕ B − F.
processing results of Fig. 1(b), with a square SE of size 7×7 pixels and 8-adjacent region. In this study, MATLAB software is used as the analysis platform [6]. From results in Figs. 2 and 3, we can find that detected images of the external edges are better than internal ones. Apparently, the bigger the SE is, the wider the edges are.
From the results, it can be seen that the continuity of the edge detected by gray-scale is better than that detected by the binary method, and the consecutive edges detected by morphological grayscale method are the most accurate among the methods. Moreover, gray-scale edge detection is not similar to the binary method, which
950
T.-g. Li et al. / Computers in Biology and Medicine 39 (2009) 947 – 952
is more sensitive to the shape of SE. However, the gray-scale edge detection needs relatively more complex computation, which includes the following steps. The first step for a gray-scale image is contrast adjustment and histogram equalization, followed by edge detection using gray value structure element. After the expansion of structure element, the result of the original image subtracted from the image corroded by structure element is the internal edge; and on the contrary, the external edge can be obtained. 3. The influence of changing SEs While edge detection of pathologic cell images is executed, we should firstly analyze the configurations of the images to confirm the general morphology of tumor cells, and then choose the appropriate SEs, in order to detect the images correctly by analysis and comparison. SE is the key to execute image operations. Choosing suitable SEs could contribute to better results [7]. Usually, SEs with similar
shape relative to the investigated image is a perfect choice. While choosing SE, the width, the height and the shape of a SE should all be taken into consideration. Generally, rectangular SEs (including square) can be used to detect the upper, nether, left and right edges of the image, while the disk SE can obtain the result of erosion and dilation unrelated to directions, because it is symmetrical relative to the origin. However, when choosing SE, straight lines cannot be used, since they can just detect a single border. That is to say, the mathematical morphology process based on a line cannot detect all borders of the gastric tumor cells; Fig. 4 shows the result of a line SE. In gray-scale edge detection for the gastric tumor pathologic cell images, we made experimental comparisons by applying rectangle SE and diamond SE, which are different in size and shape, as shown in Figs. 5 and 6 , respectively. In general, rectangle SE can be applied to get strongly connected edges, while diamond SE is suitable for weakly connected ones. The results indicate that diamond
Fig. 4. Experimental image by line SE: (a) line SE and (b) detected image by line SE.
Fig. 5. Experimental image by rectangular SE: (a) rectangular SE and (b) detected image by rectangular SE.
Fig. 6. Experimental image by diamond SE: (a) diamond SE and (b) detected image by diamond SE.
T.-g. Li et al. / Computers in Biology and Medicine 39 (2009) 947 – 952
951
Fig. 7. The results of binary edge detection: (a) 3×3 inner edges, (b) 3×3 external edges, (c) 5×5 inner edges, (d) 5×5 external edges, (e) 7×7 inner edges and (f) 7×7 external edges.
SE could not effectively reflect the edges of the cells. In contrast, rectangles, especially small ones, can achieve better results of erosion or dilation. 4. The influence of changing gray-scale value Because the gray-scale undulations of the gastric tumor pathologic cell images are not obvious, using gray-scale method can reflect the details of the image edges, while using simple binary method ∧
will result in fuzzy phenomena [8–11]. However, if F − F B and F ⊕ B − F are chosen as the basic algorithm to change the gray value for each pixel of the obtained image, the detection of the details of the edge of an image will be more effective. Since the bright region will be brighter (vice versa) when adding or subtracting the threshold value, the identification for the shape of the image is much eas∧
ier. In the algorithm F − F B (subtracting the erosion image from the original image), because the gray values of the cell in the image are much smaller and the image is dark, increasing the threshold value can make the bright region of the image edge even brighter, and therefore improve the effect of segmentation of the image. On the contrary, in the algorithm F ⊕ B − F (subtract the dilation image from the original image), the whole image will be even darker if the threshold value is reduced. In comparison, Fig. 7 shows the results based on binary edge detection. White pixel points always congregate together in binary edge detecting image. Therefore, if there is a black pixel point in the definition domain of the pixel points, the point might be at the edge of the image. From Fig. 7, we can also see that the images are lacking in abundant gray layer information. 5. Conclusions Benign tumors usually grow slowly, expand with a clear boundary, and usually have envelopes. They fissure well, with color and texture similar to normal tissue. The configurations of tissue and cells have a lesser variation, and the mitotic figures are not easily found. On the contrary, the malignant tumors usually grow rapidly, with no envelope or only a fake envelope, and can destroy the surrounding tissue. The malignant tumor fissures badly, with configuration of tissue and cells quite different from the corresponding normal tissues. Nucleolus, the shapes of which are irregular, increase and expand during growing. It is difficult to distinguish the benign tumors from malignant ones. However, mathematical morphology
image processing can help doctors to identify the size, shape and characteristics of the pathologic cells. The morphological processing is based on the conception of filling SEs. The distribution of gray-scale near the edges of the images usually has a bigger gradient, so the morphological gray-scale edge detection method has more redundancy than the simplex image binary edge detection. By changing the threshold values in accordance with the different images, ideal results of the edge detection for the images can be obtained. 6. Summary The work done by the authors has proved that traditional edge detection methods (such as Sobel, Roberts, Prewitt, Log and Canny operator, etc.) processing gastric tumor pathologic cell images with intense texture features fail to achieve satisfying result. This is because these operators are firstly used to extrude partial edges of the image by edge enhancement, and then the “edge intensity” of the pixels is defined and the edges are extracted by setting the threshold value. The totally processed results of edge detection for cell images are like this: the edges have no connective region, tend to be discrete and lack hierarchical structure. In order to achieve gray-scale edge detection for gastric tumor pathologic cells images, morphological theories are employed, which are adjusted to tumor cellular features and investigated image texture information. Advantages have been achieved using the proposed morphological edge detection scheme for the research of gastric tumor pathologic cell images. Combining with the texture features of the image under investigation, the paper discusses the results of edge detection with various structuring elements and gray-scale values. In the simulation studies, various SEs are constructed to analyze and compare the experimental methods and results. The work of the paper proves that using mathematical morphology methods to define the edge of the image can help doctors to identify the size, shape and characteristic of pathologic cell images. Conflict of interest statement This work is supported by a grant from National Science Foundation of China (no. 30630024) and the Doctor Foundation of National Education Ministry (no. 20050698044). All work described in the article has original, and all results of the article were accomplished by
952
T.-g. Li et al. / Computers in Biology and Medicine 39 (2009) 947 – 952
programming of MATLAB v7.0 computer language, which the article has submitted in standard format as a guide for authors. The article has not been published previously anywhere, and its publication is approved by all authors and tacitly or explicitly by the responsible authorities where the work was carried out. We promise that it will not be published elsewhere in the same form, in English or in any other language, without the written consent of the publisher. Acknowledgments The authors would like to thank Mr. C.H. Fan and Mr. Z.Y. Chen (students of Xi'an Jiaotong University, China) for their self-less help in the experimental work. References [1] F. Mayer, An overview of morphological segmentation, International Journal of Pattern Recognition and Artificial Intelligence 15 (7) (2001) 1089–1118. [2] F. Meyer, S. Beucher, Morphological segmentation., Visual Common Image Repress 1 (1) (1990) 21–46. [3] Y. Cui, Image Processing and Image Analysis—Mathematical Morphology Methods and Application, Science Publishing House, Beijing, 2002. [4] H.S. Wu, J. Barba, et al., A parametric fitting algorithm for segmentation of cell image, IEEE Transactions on Biomedical Engineering 3 (45) (1998) 400–408. [5] J.P. Thiran, B. Macq, Morphological feature extraction for the classification of digital images of cancerous tissues, IEEE Transactions on Biomedical Engineering 43 (10) (1996) 1011–1023. [6] F. Xu, X.H. Shi, Applied Image Processing by MATLAB, Publishing House of Electronic Science and Technology University of Xi'an, Xi'an, 2002. [7] F.G. Huang, G. Yang, et al., The application of soft morphology in image edge detection, Journal of Image and Graphics of China 5 (4) (2000) 284–288.
[8] V. Chalana, Y.A. Kin, Methodology for evaluation of boundary detection algorithms on medical images, IEEE Transactions on Medical Imaging 16 (5) (1997) 642–652. [9] Y.D. Ma, R.L. Dai, Development of segmentation technology for biological cell image, Journal of Biomedical Engineering 19 (3) (2002) 487–492. [10] Y.L. Luo, J.X. Wang, et al., The application of image segmentation in biomedical engineering, Application of Computer 22 (8) (2002) 20–22. [11] W. kenong, G. David, et al., Live cell image segmentation, IEEE Transaction on Biomedical Engineering 42 (1) (1995) 1–12.
Tian-gang Li was born in Xi'an, China, in 1959. He received the MD degree from University of Xi'an Jiaotong, China, in 1990. Now he is the in-service doctor graduate. Since 1981, he has been with the University of Xi'an Jiaotong, China, where he is Associate Professor of Biomedical Engineering. His research interests focus on biomedical information and image processing. He has published more than 20 papers on kernel journals in and out of China, and he has been taking part in many important scientific research projects and has won great honors in several national key research projects. Su-pin Wang was born in Beijing, China, in 1950. Since 1976, she has been with the University of Xi'an Jiaotong, China, where she is Professor of Biomedical Engineering. Her main research interests focus on biomedical information and voice signal processing. She has published more than 30 papers in kernel journals both at home and abroad. She has been taking part in several key research projects and received honors for her achievement.
Nan Zhao was born in 1981, a twice year graduate student in Department of Biomedical Engineering at School of Life Science and Technology, Xi'an Jiaotong University, and has graduated from Computer Science and Technology Faculty at Xi'an Jiaotong University with a bachelor degree in 2004 and has now majored in physiological signal processing and medical image processing. Moreover, he is participating in the research program supported by the National Natural Science Foundation of China at the Key Laboratory of Biomedical Information Engineering of Ministry of Education, Xi'an Jiaotong University.