An Approach towards Ultrasound Kidney Cysts Detection using Vector Graphic Image Analysis

This study develops new approach towards detection of kidney ultrasound image for both with single cyst as well as multiple cysts. 50 single cyst images and 25 multiple cysts images were used to test the developed algorithm. Steps involved in developing this algorithm were vector graphic image formation and analysis, thresholding, binarization, filtering as well as roundness test. Performance evaluation to 50 single cyst images gave accuracy of 92%, while for multiple cysts images, the accuracy was about 86.89% when tested to 25 multiple cysts images. This developed algorithm may be used in developing a computerized system such as computer aided diagnosis system to help medical experts in diagnosis of kidney cysts.


Introduction
In kidney, some of the common cystic diseases are simple renal cysts, medullary sponge kidney, medullary cystic disease, and polycystic kidney disease. Simple cysts are more common and mostly are symptom free [1], while medullary sponge kidneys often cause problems to urinary concentration and renal calcium handling [2]. Polycystic kidney disease, can be defined as either autosomal dominant polycystic kidney disease (ADPKD) or autosomal recessive polycystic kidney disease (ARPKD) [3], where ADPKD is the most frequent heredity disease [4,5] with features like multiple renal cysts and renal enlargement [5]. Generally, by using ultrasound, the cysts were in round shape, echo free and hypoechoic [1,3].
However, in kidney diagnosis, due to the quality of ultrasound images that are oftenly degraded by speckle noise [6 -8], human error may occur if depending only on the sonographers' expertise to interpret (locate, segment, measure, analyze, etc.) the ultrasound images. Computer aided diagnosis (CAD) system is a computerized method that can be used to help in limiting the dependency of the diagnosis on machine operators. Besides, the system also can make the diagnosis become easily reproducible without or with limited variation in result. Besides that, development of automatic system in locating, detecting and analyzing the required images can also be as the alternative solutions to the stated limitations.
Segmentation of the kidney ultrasound images has been previously performed using various methods based on texture analysis [9,10], active contour method [11 -13], region growing method [14], levelset method [15], and spline contour method [16]. However, most of those methods require manual and initial mask, or points to be set before applying further steps of segmentation. Therefore, these methods are not effective to be used especially in developing computer aided diagnosis system for kidney cysts detection as mentioned earlier as it will become more time consuming. In our approach, a new automatic algorithm has been developed for detecting and segmenting cysts in kidney ultrasound images for both images with single cyst and multiple cysts as discussed in the next sections.

Model Development
For this study, all images were gathered by medical experts using Hitachi Aloka Prosound F15 ultrasound machine, together with informed consents from the patients. The implemented ultrasound probe was of a convex abdominal transducer type with frequency 3.5MHz. The scanning sessions were made in supine position, where the subjects lay on the bed and facing up, and both right and left kidney were considered.
In this study, we implemented our proposed algorithm to two types of input images, the one with single cyst as well as with multiple cysts. Figure 1 shows kidney ultrasound images with (a) single cyst, and (b) multiple cysts.  Figure 2. The input image will first be converted into vector graphic image. Based on input value selected, the vector graphic analysis was performed. Then, selection of threshold value took place before converting the image into white and black image (binarization). After filtering the noise and unwanted region, a roundness test were performed. If it was single cyst, the remaining regions would be ranked based on the roundness test result and the result with highest value would be considered as cyst. If the input image contained multiple cysts, the roundness test would be performed to all remaining regions, and regions with roundness test value equal or more than 0.5 (half of perfect score for roundness test) were considered as cysts regions. The entire possible cyst regions were then marked with red borders.

Vector Graphic Image Formation
Vector graphic is the representation of the images in computer graphics by using geometrical objects such as points, lines, curves, or polygons [17]. Vectorization process, which is used to convert input image into vector graphic image, is mainly based on thresholding, thinning, contour tracing, and skeletonization [18], so that lines, region and text can be extracted [17,19]. Currently, image vectorization can be performed using commercial vectorization softwares, such as Adobe "Live Trace", Corel CorelTrace, Vector Magic [20] and AutoTrace. The development of this vector image formation algorithm in MATLAB does not only convert the image, but also enables the user to predefine the input value, so that the output can be viewed in different preferred ways.
During the formation of vector graphic image, the user firstly needs to define the number of colors, Ncolor as input to the algorithm. The value of Ncolor will then vary the output images as this value changes the number of layered images obtained from an image, as well as changes the number of different pixel intensity values in the output image. As example, if input value, Ncolor = 3, the number of layered images is also 3, thus the pixels will also have 3 different intensity values. When the value of Ncolor is increased, the pixel intensity values of the next image is merged from any of one pixel intensity value of previous image. Figure 3 shows the illustration of vector graphic formation. After defining the Ncolor value, the input images will be first converted into indexed image to simplify and reduce the number of colors in the image. For our algorithm, indexed image was formed using minimum variance quantization, where we specified an array, MAP that held the index of the colors of input images; Image enhancement is then applied, to improve the quality of the image. Wiener filter was chosen to be implemented in enhancing the image. Then, the image is splitted into white and black mask layers, before being stored in a cell array. If IIN is the input image, for i = 1: Ncolor, the layered image can be obtained by using: where EQ is the equality test between IIN and (i -1) where it compares the pixels in array IIN with pixels in array (i -1), and returns an array with pixel = 1 if IIN and (i -1) are equal, or pixel = 0 if they are not equal, and IWF is the output image after being filtered using Wiener filter.
Then, for i = 1: Ncolor also, any holes in ILAYERED are filled and edges are traced. After that, the number of shapes, Nshape in each layer will be calculated by using: Lastly, for i = 1: Ncolor and for k = 1: Nshape, the shapes are plotted as polygons using patch as in Equation (4), using C = 1 by implementing P and T as in Equation (5) and (6).
In detecting the cysts, the input image, IIN will first undergo the vector graphic image formation. Cyst is a fluid filled object, and in ultrasound images, it appears echogenic and having sharp borders [1,3]. In our study, the value of Ncolor was set to 4 (minimum), as this value was the best value that able to separate cysts region from its background. After vector graphic image formation with Ncolor = 4, the threshold value needed to be selected to convert the image into white and black image. Since the cyst region appeared as dark region in the image, therefore the threshold was selected using below Equation; = min( ), IVG >0 The white and black image was then filtered using morphological operations to remove the noise and unwanted region. The filtered image might contain cyst region as well as other boundary connected regions that had the same pixel intensity values as the threshold value, TC. Thus, the image needed to be further processed.

Roundness Test
Since the filtered image might contain non-cysts regions as well, we used the roundness formula, R to test each remaining region. This roundness test was chosen as in the literature, cysts appear to be in round shape. The values were varied between 0 to 1 and the higher the value, the closer the region would be to the round shape.
where n is the number of remaining regions, A is the number of pixel in a region and p is the perimeter of the region.
For this roundness test, different approaches were performed based on the input image, either contain single cyst or multiple cysts. If the image contain single cyst as confirmed by medical experts, the remaining regions in the test image need to undergo this roundness test. Then, the region was ranked, where in the first rank was when R of a region was closest to 1 and the lowest rank was when R of a region was furthest from 1. The region in the first rank was considered as the cyst, thus the boundary of this region was detected, while other regions were removed. If the image contain multiple cysts, all remaining regions need to undergo the roundness test. This time, a threshold value was selected to distinguished between cysts regions and other regions. Since we assume that cyst appear to be in round shape, we set the threshold as 0.5 (half value of perfect round shape). The region with R more than 0.5 were considered as cysts. This threshold value was acceptable as from the experiment performed, the lowest value of R for the cyst region (confirmed by medical experts) is 0.62.

Experiment Results and Analysis
Current medical practice depends on the sonographers' skill to accurately detect and segment the cyst from background structures. The development of this automatic algorithm may help in reducing the human error as mentioned earlier. Figure 4 shows the input and output images for kidney image with single cyst, while Figure 5 shows the input and output images for kidney image with multiple cysts. Value of Ncolor was set to 4 as it was the minimum value that was able to separate the cysts region from other kidney region. To validate the proposed method, we evaluate the performance by measuring the accuracy of the algorithm. The measures of accuracy describe how well the proposed detection test performs against an agreed gold standard test. In this study, the detection of cysts in ultrasound images by group of experts was considered as gold standard. Even though the use of group of experts as gold standard for cysts detection may be considered outdated or inadequate, any new test designed to improve or replace the gold standard to be initially validated against the gold standard [3]. Total Detection (TP +FP + FN + TN) As in Table 1, if a cyst region is proven present in a kidney, the algorithm also indicates the presence of that cyst region, the result of the detection is considered true positive (TP). Similarly, if a cyst region is proven absent in a kidney, the algorithm suggests the cyst is absent as well, the detection result is true negative (TN). Both true positive and true negative suggest a consistent result between the algorithm and the proven condition by group of experts (gold standard). However, no medical test is perfect. If the algorithm indicates the presence of cyst in a kidney which actually has no such condition, the detection result is false positive (FP). Similarly, if the result of the algorithm suggests that the cyst is absent for a kidney with cyst for sure, the detection result is false negative (FN). Both false positive and false negative indicate that the test results are opposite to the actual condition and accuracy measures how correct developed algorithm identifies and excludes a given condition, as calculated below; In this study a total of 50 single cyst kidney ultrasound images were tested using newly developed algorithm. All images have been verified as single cyst images by group of experts, thus by referring to Table 1 algorithm successfully detect the presence of cyst in image while it is FN when the algorithm is unable to detect the presence of cyst in image with single cyst for sure. Table 2 shows the performance evaluation of developed algorithm for single cyst detection. As in Table 2, out of 50 single cyst images, 46 images gave true positive result while the rest gave false negative result. The total accuracy of cyst detection using developed algorithm was 92%. A total of 25 multiple cysts kidney ultrasound images were tested using developed algorithm for cysts detection. These images were as well been verified by group of experts. Since it is multiple cysts image, test of detection was made according to each cyst region in the image. By using Table 1 as reference, possible test results were true positive, false positive and false negative. The result is TP if the cyst region detected by developed algorithm were the same as been detected by sonographers earlier.
The result is FN if the cyst region cannot be detected by developed algorithm while it is actually cyst region as detected by group of experts. Lastly, the result is FP if the developed algorithm detected the cyst at which actually has no such condition. Table 3 shows the performance evaluation of developed algorithm for multiple cyst detection. As in Table 3, out of 25 single cyst images, there were about 145 cysts region detected by experts. 139 of them were correctly detected using algorithm (TP) while FN is 9 and FP is13. The average accuracy of developed algorithm in detecting cycts regions in multiple cysts images were 86.1%. In this experiment of model designed, some limitations could be observed. Firstly, in multiple cysts kidney ultrasound images, there were few cysts regions that were not successfully detected. Unsuccessful detection of these regions were based on two main parameters, which was size and shape. In order for the cyst to be detected, it must be large enough as very small regions could be mistaken as noise, thus were eliminated during filtering steps. Besides that, cysts that had echoes or somehow were connected to other cyst region or boundary region cound not be detected as this condition would affect the shape, thus the roundness test value might fall below threshold.
Nevertheless, based on the accuracy results, this model designed for automatic detection and segmentation of cysts in kidney ultrasound images is reliable and can be implemented into CAD system. On the perspective of the authors, while experts' expertise remains the gold standard, the proposed algorithm for detection of kidney cysts is important and could be further investigated.This model is also fast, and does not need any initial mask or points to be set before performing the segmentation. In this paper, we successfully implemented our proposed automatic algorithm to two types of input images, the one with single cyst as well as with multiple cysts. An automatic tool of cysts detection and segmentation is very useful to the sonographers, as it is time-saving. The formation of vector graphic image allows the user to manipulate the output image, before can be analyze for cysts detection. Performance evaluation to 50 single cyst images gave accuracy of 92%, while for multiple cysts images, the accuracy was about 86.89% when tested to 25 multiple cysts images. For future study, it is recommended that further image analysis should be made especially for reducing the shadowing effect in ultrasound images that can affect the performance of cysts at the boundary region to be detected.