Automatic Detection and Segmentation of Kidneys in Magnetic Resonance Images Using Image Processing Techniques
Mariam Saii, Zaid Kraitem
Department of Computer Engineering, Faculty of Electronic and Electrical Engineering, Tishreen University, Latakia, Syria
Email address:
To cite this article:
Mariam Saii, Zaid Kraitem. Automatic Detection and Segmentation of Kidneys in Magnetic Resonance Images Using Image Processing Techniques. Biomedical Statistics and Informatics. Vol. 2, No. 1, 2017, pp. 22-26. doi: 10.11648/j.bsi.20170201.15
Received: December 27, 2016; Accepted: January 12, 2017; Published: February 4, 2017
Abstract: Kidney Detection and Segmentation in MR images allows extracting meaningful information for nephrologists, also for practical use in clinical routine, thus we should apply an fast, automatic and robust algorithm. We demonstrate the possibility of construct an algorithm that achieve these requirements. Therefore, a novel kidney segmentation algorithm was created depending on multiple stages. The Region of Interest (ROI) is extracted after we convert the input image to binary one via specific thresholding level yields from K Mean Clustering algorithm. The resulted binary image contain both of kidneys as the biggest regions, so we can isolate them after we calculate the objects areas in labeled image. Finally we can use some morphological operation to remove small objects surrounding the kidney region. The effectiveness of this method is demonstrated through experimental results on complex MR slices. Kidneys were accurately detected and segmented in a few seconds.
Keywords: Automatic Kidney Segmentation, K Mean Clustering, Magnetic Resonance Images MRI
1. Introduction
Image segmentation is one of the most important issues in computer aided medical imaging. It is used in the analysis and diagnosis of numerous applications such as the study of anatomical structure, localization of pathology, treatment planning, and computer-integrated surgery [1]. Nowadays, medical image processing plays an essential tool in diagnosis therapy, surgical planning, preventing the diseases and complications of various body organs such as brain, heart, kidney, liver and so on [2]. In most cases, tissue segmentation in medical images is the beginning stage in analyzing those images. Segmentation of medical images is a valuable step to gathering anatomical information for diagnosis or interventional planning. Automatic and fast segmentation algorithm are thus needed for practical usage. It is yet still challenging to construct an algorithm robust enough to noise, acquisition artifacts or leakages in neighboring organs [3-4]. Systems have been developed to assist in the making of precise and objective diagnoses for lung cancer, liver tumor, and breast diseases [5-8]. However, relatively little research has been focused on kidney segmentation. A typical kidney MR image is very complicated. It usually contains kidney, liver, spleen, vertebral column, fat, and pathologies. Therefore the proposed method must be created to extracting the desired area accurately and efficiently.
2. Research Objectives and Its Methods
Kidney image segmentation is a key role for diagnosis and treatment of kidney diseases using medical image technologies. However, accurate kidney image segmentation is a challenge due to the difficulties in finding the object boundaries in MR images. This paper proposes an effective segmentation method for 2D Magnetic Resonance Images (MRI) of the human kidneys. Kidney image segmentation is not an easy task. It is one of the most difficult tasks in the visualization processes. The most Important algorithm which used to determine the thresholding level is K Mean Clustering algorithm.
2.1. K Means Clustering Algorithm
K-means clustering (k-means for short), also known as Forgy's algorithm, is one of the most well-known tool for data clustering. The goal of k-means is to find k points of a dataset that can best represent the dataset in a certain mathematical sense. These k points are also known as cluster centers, prototypes, centroids, or codewords, and so on [9-10]. K-means is also a method of partitioned clustering in which we need to specify the number of clusters before starting the clustering process. Suppose that the number of clusters is m, then we can define an objective function as the sum of square distances between a data point and its nearest cluster centers. We can follow a procedure to minimize the objective function iteratively by finding a new set of cluster centers that can lower the value of the objective function at each iteration. The data points in cluster p are represented by a set G_{p} with a cluster center c_{p}. Then the square error of cluster p can be defined as [11]:
(1)
Where x_{i} belongs to G_{p}. We can then define the objective function as the square error of all the m clusters, as follows:
(2)
The above objective function is also referred to as the distortion when using these cluster centers to represent the whole dataset. It is obvious that the objective function depends on the cluster centers. Therefore we need to find a systematic method for identifying these clusters and their corresponding centers for minimizing E [11-12].
2.2. Region Properties Function
It is a tool used to measure the characteristics of Regions areas in the labeled binary image. Common formula for this within the MATLAB program are as follows [13]:
From the previous version, we find that Regionprops function measures the properties of Labeled Regions in the labeled matrix L. Correct positive elements corresponding to different areas of the binary image, for example: if the group elements in the matrix L is equal to one, this means that they match the region 1. The value STATS refers to the return value, it is a structure array of length equals to the greatest region length in the L matrix i.e. max (L (:)), the fields in the resulting structure matrix refer to the different measurements for each region, as they defined within the second entrance to the regionprops function. Many of the properties offered by a this function, and they are Strings series separated by a comma. If we put the string ' all ' as an entry to function, this means that all measurements of the region will be calculated, but in case it is not explained any string or were placed 'basic', the function will be calculate only the following measurements, which is: 'Area', 'centroid', and 'Bounding Box' [13]. In this research we use the 'Area' property to calculate the area of resulting foreground elements in binary labeled image, and choose the biggest ones to detect the kidney regions.
2.3. Small Objects Removing
After getting the biggest two areas, we should improve the resulted binary image, This is accomplished through morphological operations and remove small items [6]. MATLAB program offers function to do this task known as 'bwareaopen', represented as follows:
BW2 = bwareaopen (BW1, P, conn)
BW1 symbol represents binary input image, while BW2 represents the resulting binary image, and conn symbol defines the communication between the elements, or the neighborhood. It is a method to remove related items to the binary image, which is an area of less than P, where P represents an area of pixels that pre-defined by the user. Removing small objects is done by following algorithm:
1. defines the connected objects in the image.
2. calculate the area of each object.
3. removes objects that area quite smaller than the P area [6].
3. Discussion
Kidney tissue is very similar to the neighboring organs tissues, so we have to create an innovative way to isolate the Kidney component, particularly the presence of two Kidneys in the single image. First, we identified a number of clusters (m=4), and apply the K Means algorithm, Figure 2 shows the clusters resulting from the input image.
We reshape the image to the raw matrix, and then we apply the clustering algorithm, after that we arrange ascending order of clusters centers, and calculate the level of thresholding relying on third and fourth clusters according to the following equation:
(3)
Then we convert binary image to an labeled image, and calculate the areas of all resulting labeled regions, after that we choose the biggest two areas which represent the regions of the kidney in the image. We Enhance the ROI Boundaries, and remove small objects from binary image through some morphological operation (i.e. BW-Area-Open). Finally we color the binary image and overlapping it on the original image to indicate the resulting of detection and segmentation processes. Figure 3 shows the stages of proposed method.
4. Results
We apply the series of pervious steps on MR image, and we can notice that the proposed method can detect the kidney region, and isolate it from the neighboring regions. Figure 4 illustrates the output of each stage.
We can overlap the result of segmentation on original image, to see the kidney regions clearly, as the figure 5 shows.
The proposed method proved its effectiveness in extracting the kidney's area in several MR images, as we notice in figure 6.
Get a satisfactory result segmentation comes from several factors, the most important factor is the pre-choice of the optimal number of clusters, figure 7 shows that the choice of four clusters gives the best result. Table 1 shows the most important parameters of the K Means algorithm for each image, where we note the different number of iterations needed to reduce the Objective Function E, with the updating of the clusters centers with each iteration.
Objective Function Value | Iteration Num | |
Image 1 | 288.726 | 40 |
Image 2 | 1298.479 | 100 |
Image 3 | 545.485 | 34 |
Image 4 | 406.059 | 38 |
Compared with the most famous thresholding methods (Otsu Thresholding), we note that the result of thresholding by relying on the K Means algorithm is the best, as the Table 2 shows the quotient difference between the levels which resulting from applying the Global Thresholding way, and the second one which resulting from clustering stage.
Otsu's Level | K Means Level | |
Image 1 | 0.266 | 0.374 |
Image 2 | 0.231 | 0.357 |
Image 3 | 0.152 | 0.401 |
Image 4 | 0.317 | 0.536 |
5. Conclusion
Our automatic segmentation system is expected to assist physicians in both clinical diagnosis and educational training, thus the paper presented a fully automatic method to detect and segment both kidneys in any MR Images without preprocessing step, we apply thresholding after getting four clusters from K Means algorithm, after that we enhance the output binary image via morphological (BW-Area-Open) operation which removes the small foreground elements. This method implements on different images with several sizes and comes from multiple sources.
Acknowledgements
We acknowledge the help extended by Dr. Hussam Hassoun, Al- Basel Hospital, for providing various MR images to conduct this study.
References