The identification of liver cirrhosis with modified LBP grayscaling and Otsu binarization

Liver cirrhosis is considered as one of the most common diseases in healthcare. The widely accepted technology for the diagnosis of liver cirrhosis is via ultrasound imaging. This paper presents a technique for detecting the cirrhosis of liver through ultrasound images. The region of interest has been selected from these ultrasound images and endorsed from a radiologist. The identification of liver cirrhosis is finally detected through modified local binary pattern and OTSU methods. Experimental results from the proposed method demonstrated its feasibility and applicability for high performance cirrhotic liver identification.

Image texture can be qualitatively defined in following categories of fineness, coarseness, smoothness, surface granulation, randomness, irregular or hummocky (Hawlick 1979). In the textural images, the intensity and spatial arrangement of pixels describes all the above mentioned features (Castellano et al. 2004). This irregular pattern/hummocky is due to rough as well as eruptions/sores/scares on the surface of cirrhotic liver. The regular pattern in normal liver and irregular pattern in cirrhotic liver is shown in Fig. 1a.
Image texture can be qualitatively defined in following categories of fineness, coarseness, smoothness, surface granulation, randomness, irregular or hummocky. In the textural images, the intensity and spatial arrangement of pixels describes all the above mentioned features.
The most common pattern or hummocky of human liver disease is micronodular cirrhosis, a condition characterized by fibrosis and the conversion of normal liver architecture into uniform sized regenerating small nodules. Microscopically, normal liver architecture is distorted by scar tissue which forms a band of connecting tissue joining the periportal and perivenous areas. It is often said that micronodular cirrhosis may be converted into cirrhosis of macronodular type (Fauerholdt et al. 1983). The progression may lead to complete cirrhosis. This becomes a very tedious job to differentiate the change when ultrasound scanning is done. Radiologist needs a very critical analysis to differentiate between these two. If a diagnostic tool can be developed based on the concept of image processing, early disease detection is possible.
Of course, ultrasound images are to be taken for spatial domain analysis as texture differentiation appears to be the vital parameter (Lee 2013;Wu et al. 2012Wu et al. , 2013. Here, the main problem lies in identifying smaller granular or hummocky bodies (about the size of millet seed measuring from 1 to 2.5 mm in diameter) in case of normal liver and substantially, clustered and inflammatted matrices of granular hummocky bodies (because of scarring) for the case of Cirrhotic Liver. The widely accepted techniques in spatial domain are LBP and OTSU methods. LBP technique reduces a grayscale image to mean weighted grayscale image i.e. grayscale value of central pixel is calculated as per the mean of its surrounding pixels which is defined by the radius parameter of LBP technique.
Regeneration of the ultrasound image on the basis of local binary patterns (LBP) technique has been applied to various uniform texture patterns detection (Brunenberg et al. 2006;Caballero et al. 2006;Keramidas et al. 2007;Pujol et al. 2003). The most important properties of LBP are its tolerance regarding monotonic illumination changes and its computational simplicity. LBP was originally proposed for texture analysis (Ojala et al. 1996) and hence proved to be a simple yet powerful approach to describe local structures. It has been extensively exploited in many applications, for instance, face image analysis Hadid et al. 2004), image and video retrieval (Huijsmans and Sebe 2003;Grangier and Bengio 2008), environment modeling (Ali et al. 2008;Nanni and Lumini 2008), visual inspection (Maenpaa et al. 2003;Turtinen et al. 2006), motion analysis (Heikkila and Pietikainen 2006;Kellokumpu et al. 2008), biomedical and aerial image analysis (Oliver et al. 2007;Kluckner et al. 2007), and remote sensing (Lucieer et al. 2005). However, this very technique can be seen very useful for cirrhotic liver images obtained through ultrasound.
On the other hand, Otsu's method (Rodríguez 2006;Huang and Wang 2009) a highspeed and effective thresholding approach is applied for image binarization. In this method, it is mainly exploited to discriminate the background and objects on a gray level histogram. It has indeed the advantage to be highly efficient and demands less computation time when the number of classes is two (Tamim et al. 2015;Filipczuk et al. 2013).
The present research work is an effort to detect and classify liver cirrhosis based on their structure and texture pattern retrieved from USI. During the past few years, LBP has aroused increasing interest in image processing and computer vision due to its nature of nonparametric method and Otsu method has the capability in changing grayscale images to binary images using adaptive thresholding. That's why OTSU is additionally added to LBP generated weighted gray scale image. OTSU is doing its normal job but it is applied not to the original image but to the modified LBP image. This modification of LBP method is represented as differential local binary pattern (DLBP) in our further discussion.

Methodology
The US images were acquired from radiology center under supervision of an experienced radiologist. The ultrasound images each of size 381 by 331 in JPG format were specified in two categories as normal and cirrhotic liver. All the images were acquired from same ultrasound machine to nullify the effects of change in dimensions and texture values on the images which may have happened if it is taken by different sources. The ultrasound probe used for acquiring these images was having depth of 15 cm and frequency of 5 MHz. Radiologist also specified the portion in the images which belonged to cirrhosis as shown in Fig. 2 for cross evaluation. Region of interest (ROI) has been selected as templates of size 50 × 50 each from both normal liver and cirrhotic liver ultrasound images as in Fig. 2a Accordingly, one template was selected from each image, i.e. total of 6 templates were taken from 6 images of normal liver. Similarly, 44 templates were selected from 44 images of cirrhotic liver. Modified LBP with OTSU approach was applied on to the selected templates of both normal and cirrhotic liver. Ojala et al. (2002) presented the LBP operator for texture classification. LBP operator is that value of the pixel where the accumulative value is calculated from comparing its gray value with its neighbors as given in Eq. (1).
(1) LBP P,R x c , y c = P p=1 s g p − g c 2 P−1 where where g c is the gray value of the center pixel, g p is the gray value of neighbor at radius R from the center pixel (g c ) and P is the number of neighbors at a distance (radius) R from the center pixel (g c ) in an image. Examples of such circular neighbor sets for different configurations of (P, R) are shown in Fig. 3. The LBP operator when processed onto the entire image creates new LBP image with desired intensity at each pixels. The concept used to get this desired intensity at pixel level is: If the gray level of the neighboring pixel is higher or equal to the center pixel, the value is set to one otherwise the value is zero.
Otsu's method is a clustering-based image thresholding, which is based on the selection of the optimal thresholds from the gray-level histogram of an image that maximizes the between-class variance (Fukunage 1972). Otsu defines the between-class variance using the discriminate analysis based on statistics of the 1-D histogram (Otsu 1979).
Assuming an image with the size M × N and gray range L, the number of pixels at gray level i is denoted by n i , thus the probability of gray level i can be gained by If we divide the pixels of the image into two classes of object C 0 and background C 1 by the threshold t, the gray level probability distributions for the two classes can be expressed by The gray means of the class C 0 and C 1 are The between-cluster variance of the class C 0 and C 1 can be given by During the image segmentation process by the OTSU method, the between-cluster variance is considered as an important index for the uniformity of gray distributions (Chaou et al. 2015). The larger the between class variance is, the greater the difference between the two classes becomes. The optimal threshold t * can be figured out through maximizing the between-class variance σ B .
Being a nonparametric approach, LBP summarizes local structures of images efficiently by comparing each pixel with its neighboring pixels (Murala and Jonathan 2014;Hu and Zhao 2010). Here, it is important to mark the radius i.e. R for the computation of LBP operator. In the present study, a technique for detecting the liver cirrhosis through ultrasound images has been developed by exploiting LBP operator's computing principle. Widely used local binary pattern encodes the relationship among the surrounding neighbors for a given referenced pixel in an image. The possible relationships among the surrounding neighbors are depending on the number of neighbors. The LBP approach has been observed as a good approach for texture analysis of regular pattern. Hence, found to be advantageous for simultaneously classification between a regular and an irregular pattern.
LBP technique has been slightly modified in terms of difference value between neighboring pixels and centre pixel. The modified approach is: If the difference value is less than or equal to standard deviation of that matrix then difference value is replace by 0 and otherwise the difference value is replace by one.
Hence, the macro granular in the hummocky type structure of liver appears in the form of black portion in the binary images. Therefore, a technique is needed so that binarization and thresholding becomes so accurate to figure out difference between the normal and cirrhotic liver. Now if the dimension or size of these black portions can be calculated in terms of no. of consecutive pixels either horizontally or vertically placed, classify between a normal texture and cirrhotic texture is possible.
In the present work the ideology used is to measure black portion or spot or granular as count of horizontally connected black pixels. This count is called here as connectivity. The concept is further extended by counting three such consecutive pixels then four and lastly five such pixels. These 3, 4 and 5 connected pixels can further be explored to segregate the stages of cirrhosis. The concept of radius is used to generate spatially equalized LBP grayscale image. Three such selection were made; firstly LBP with radius = 1, secondly = 2 and lastly = 3. Bigger the radius leads to more spatial equalization and thus less chance to detect irregularisation or hummocky type structure.
The same has been projected as an experiment below. In this, Fig. 4a, b were regular and irregular texture images. Figure 4c, d were LBPs' images of regular and irregular images respectively. Figure 4e, f were the results after applying OTSU on LBPs' images. Figure 4g, h were complement of the OTSU images.
If the image is of any regular texture as shown in Fig. 4a then regularity is in its gray level distribution. As first step, Modified LBP approach was applied which removed variation of grayscale and generated Fig. 4e. As there was no abrupt change of grayscale, compliment of 4e becomes a white (blank) image. Therefore, connectivity of black portion comes zero as shown in 4i. Similarly, if any image contains an irregular texture as in Fig. 4b, this means that there is a non-uniform distribution of its grayscale; therefore connecting of the cells will be increased as shown in Fig. 4h. There is a values in 3, 4 as well as in 5 connected pixels as shown the value in Fig. 4j.
In normal liver, because granular or hummocky structure is about uniform in sizes, the value will come very lesser in all 3, 4 or 5 connectivity. If cirrhotic liver is taken, due to the non uniformity, it may appear more. That is the basic of this connectivity. The detailed methodology has been presented in the flow chart shown in Fig. 5.

Results and discussion
Firstly, by applying Otsu method directly to the all templates and get these all 3, 4 and 5 connected counts as shown in Table 1. This method is not giving any specific result.
Secondly, standard LBP is used and Otsu method is applied on that LBP images. LBP radius (R) is used to compute the LBP operator as shown in Fig. 3. If radius (R) is 1, 2 and 3 then matrix become of 3 × 3, 5 × 5 and 7 × 7 respectively. Then, 3, 4 and 5 connected pixels as explained earlier and are getting these all counts for all three radiuses separately as shown in Table 2. There is again no specific result as observed from table.
Finally, modified LBP (DLBP) is used and Otsu method is applied on that DLBP images. Then, again 3, 4 and 5 connected pixels are getting these all counts for all three radiuses separately as shown in Table 3. This is giving the specific result for identification of liver cirrhosis from normal liver.
As observed from the Table 3, if the counts of 3 connected pixels for radius 1 are <58 then the liver is normal liver and if the counts are >71 then the liver is cirrhotic liver. Similarly, the counts for 3, 4 and 5 connected pixels for radius 1, 2 and 3 are explained in Table 4 for normal liver and cirrhotic liver.
There are some problem in counts for cirrhotic liver because which are assuming as cirrhotic liver that might be at the first stage of cirrhosis i.e. fibrosis. So, further methodology can be amending to stage the cirrhosis. That's why radius 2 and radius 3 is chosen. As the granular and scarring increases that much part is cirrhosis. If it does not lie in the range of cirrhosis then it might be fibrosis.
For statistical interpretation, widely accepted classifiers are used. Here, two classifiers have been selected; one is support vector machine (SVM) and other one is K-nearest neighbor (KNN) support vector machine (SVM) has been chosen for the classification task because classifier designs which use regularization like SVM are less prone to over fitting and obtain good generalization performance to a certain extent even without feature space dimensionality reduction. KNN has been chosen because KNN is non-parametric, i.e. it makes no assumption about the data distribution. Accuracy of both the classifier will justify our methodology and decision. Figures 6 and 7 are the classifications of OTSU with LBP method and OTSU with DLBP method respectively. In these classifiers, x axis is 4 connected black objects and y axis is 5 connected black objects for LBP radius of 3.
In SVM classification of Figs. 6a and 7a, pink plus sign '+' indicates the normal liver and blue plus sign '+' indicates the cirrhotic liver. The line divides the region of the normal and cirrhotic liver. When OTSU with LBP method is used, there are only 32 out of Image acquired from radiologist of both cirrhosis and normal liver LBP value is computed by taking the difference of gray value with its centre.
ROI defined by radiologist LBP window radius is of 1, 2 & 3, so respectively LBP window is of (3x3),(5x5 Then class probability (w) was found i.e. cumulative sum of probability (P) of each level.
From this table, probability (P) of each level was found.
The variance was found by using mean and class probability (w) Then, mean of the intensity from whole image was found.
By using this level, LBP Image was converted in to binary image.
By taking the maximum variance, threshold level was created.
Take the complement of this image and check connected objects in horizontal direction.
Are the Connected objects greater in value?
Normal liver Cirrhosis liver  44 blue plus signs falls in the cirrhosis region and 5 out of 6 red plus signs in normal region as shown in Fig. 6a. So accuracy is 72.7 % for the cirrhotic liver and 83.3 % for normal liver of OTSU with LBP method. When OTSU with DLBP is used, there are 42 out of 44 blue plus signs falls in the cirrhosis region and all red plus signs in normal region as shown in Fig. 7a. So accuracy is 95.45 % for the cirrhotic liver and 100 % for normal liver of OTSU with DLBP method. In KNN classification of Figs. 6b and 7b, blue dots for normal liver and red dots for cirrhotic liver. In this, all blue dots are accumulated together and red dots are accumulated together. In this classification, plus (+) sign is the point that separates the region of cirrhosis and normal liver and circles are the nearest neighbors of this plus (+) sign. When OTSU with LBP method is used, there are 40 out of 44 red dots falls in the cirrhosis region and 2 out of 6 blue dots falls in the normal region as shown in Fig. 6(b). So, accuracy is 90.9 % for the cirrhotic liver and 33.33 % for the normal liver of OTSU with LBP method. When OTSU with DLBP method is used, there are 43 out of 44 red dots falls in the cirrhosis region and 5 out of 6 red dots falls in the normal region as shown in Fig. 7b

Conclusions
In this study, a modified LBP with OTSU method has been proposed for better identification of texture in ultrasound images of liver in which uncertainty is introduced by inherent noise. The proposed inspection technique was evaluated on a real dataset of 44 templates of 44 cirrhotic liver and 6 templates of 6 normal liver ultrasound images. The promising results achieved in detecting cirrhotic liver. SVM classifier has given the accuracy of 95.45 % for cirrhotic liver and 100 % for normal liver. Similarly, KNN has given the accuracy of 97.72 % for cirrhotic liver and 83.3 % for normal liver. The sensitivity is 97.2 % and specificity is 83.3 %. In the future study; the performance of this technique can be investigated on ultrasound images to classify different stages of cirrhotic liver.