By Author
  By Title
  By Keywords

September 2022, Volume 72, Issue 9

Research Article

Machine vision-based Statistical texture analysis techniques for characterization of liver tissues using CT images

Mehrun Nisa  ( Institute of Physics, The Islamia University of Bahawalpur, Bahawalpur, Pakistan; )
Saeed Ahmad Buzdar  ( Department of Physics, The Islamia University of Bahawalpur, Pakistan. )
Muhammad Arshad Javid  ( Department of Basic Sciences (Physics), University of Engineering and Technology, Taxila, Pakistan; )
Muhamamd Saeed Ahmad  ( Department of Computer Sciences and Information Technology, Government Sadiq College Women University, Bahawalpur, Pakistan; )
Ayesha Ikhlaq  ( Institute of Physics, The Islamia University of Bahawalpur, Bahawalpur, Pakistan; )
Sadia Riaz  ( Department of Diagnostic Radiology, Bahawal Victoria Hospital, Bahawalpur, Pakistan. )


Objective: To characterize human liver tissues by demonstrating the ability of machine vision, and to propose a new auto-generated report based on texture analysis that may work with co-occurrence matrix statistics.


Method: The retrospective study was conducted at Bahawal Victoria Hospital (BVH), Bahawalpur, Pakistan, and comprised clinically verified computed tomography imaging data between October 2018 and September 2020. The image samples and related data were used to segregate classes 1-4. Appropriate image classes belonging to the same disease were trained to confirm the abnormalities in liver tissues using supervised learning methods, principal component analysis, linear discriminant analysis, and non-linear discriminant analysis. Robust and reliable texture features were investigated by generating testing classes. Overall performance of the presented machine vision approach was analyzed using four parameters; precision, recall/sensitivity, F1-score, and accuracy. Statistical analysis was done using B11 software.


Results: There were 312 image samples from 71 patients; 51(71.8%) males and 20(28.2%) females. Among the patients, 19(26.7%) had abscess, 15(21.1%) had metastatic disease, 23(32.4%) had tumour necrosis, 6(8.5%) had vascular disorder, and 8(11.3%) were normal. Principal component analysis, linear discriminant analysis, and non-linear discriminant analysis showed high >97.86% values, but the discrimination rate was 100% for class 4.


Conclusion: Abnormalities in the human liver could be discriminated and diagnosed by texture analysis techniques using second-order statistics that may assist the radiologist and medical physicists in predicting the severity and proliferation of abnormalities in liver diseases.


Keywords: Liver abscess, Computed tomography imaging, Liver diseases, Image processing. (JPMA 72: 1760; 2022)






The liver is a vital and the largest internal organ of the human body that performs fundamental functions, like detoxification, protein production, and blood filtration. Liver diseases account for approximately 2 million deaths per year worldwide due to complications of cirrhosis, viral hepatitis, and hepatocellular carcinoma (HCC).1 According to the World Health Organisation (WHO) Global Health Estimates (GHE), liver diseases account for 62.6% of global deaths, 54.3% of cirrhosis, and 72·7% of HCC and acute viral hepatitis.2 The past several decades show that abnormalities, like liver abscess, sometimes are severe diseases and have experienced substantial epidemiology changes and risk factors. The most common liver abscess is caused by blood infection, an abdominal infection, an infection due to injury, and bacterial or parasitic infection. It is essential to recognize the abscesses' severity, diagnosis, and treatment to avoid untreated patients' complications.3 Infections and drug exposure cause damage to the liver. Sometimes this leads to generating scars tissue or non-functioning cells in the liver, called fibrosis.4 Liver cirrhosis is the next stage of fibrosis caused by liver diseases, like liver injury, swelling, and abnormal growth of non-functioning cells.5 Hepatic metastases are 18-40 times more conjoint than primary liver tumours.6 Liver metastases typically hypo-attenuate on unenhanced computed tomography (CT). If there is concomitant hepatic steatosis, the lesions may be isolated or slightly hyper-attenuating.

Necrosis, also mentioned as cell death or death of body tissues, happens when viable cells turn out to be nonviable, resulting in suspension of the cell contents. It is an irreversible process caused by injury, radiation, or chemical effects. Necrosis is a common finding in acute and chronic liver disease, and with the persistence of the underlying cause, it is followed by progressive fibrosis.7 The extent of necrosis ranges from individual cell necrosis to massive hepatic necrosis. The pathologist's role is to evaluate the pattern and capacity of tumour necrosis in the context of other morphological changes and to suggest one or more possible underlying causes.8 In others, most of the liver's vascular disorders are uncommon, except portal vein thrombosis (PVT) in patients with cirrhosis. PVT is the second cause of portal hypertension after liver cirrhosis.9 A cross-sectional study in Pakistan10 discussed non-alcoholic fatty liver diseases.

Traditionally, trained physicians visually assess medical images for the detection, characterization, and monitoring of diseases in radiology practice. Machine vision methods provide computer-aided analysis in automatically recognizing complex patterns in imaging data and providing quantitative assessments.11 Image processing and machine vision approaches are productive and beneficial for the analysis of medical data. A study12 worked on image analysis using colour and texture descriptors.

The current study was planned to characterize human liver tissues by demonstrating the ability of machine vision and to propose a new auto-generated report based on texture analysis that may work with co-occurrence matrix statistics.


Materials and Methods


The retrospective study was conducted at Bahawal Victoria Hospital (BVH), Bahawalpur, Pakistan, and comprised clinically verified computed tomography imaging data between October 2018 and September 2020. Grey level co-occurrence matrix (GLCM) was constructed which contains second-order statistics to retrieve pixels' information from grey-level distribution within the regions of interest (ROIs) as introduced by Haralick et al.13 IRB (364/IOP) was obtained from the Islamic University of Bahawalpur (Institute of Physics).

The samples were studied after discussion with expert radiologists involved in the management. Each patient's different sample sizes were taken according to the variation based on the disease's apparent visual symptoms. The range of the samples was 2-5 per patient. The imaging data were collected on digital video discs (DVDs). Doctors and radiologists involved were consulted at each step.

The images were collected from infected patients, metastatic having secondary tumour, tumour necrosis, and vascular disorders. Patients on ventilators, patients with renal function tests, and children were excluded. Due to the low socioeconomic status of the area, the biopsy was not possible for patients to confirm clinical data. The golden standard for the final diagnosis was serum alpha-fetoprotein (AFP) and liver’s triphasic multidetector CT in which non-ionic intravenous (IV) ultravist contrast was used to enhance the diseased pattern.

The first step consisted of a collection of image datasets with two categories of the liver; normal liver (NL) and diseased liver (DL). The second category included four subcategories; infected liver, liver metastasis, tumour necrosis liver, and vascular disorder liver. Four DL classes were constructed to compare them for tissue characterization (Figure 1). Comparison between NL and DL led to the identification of ROIs. Disease details, tumour size, and gross features were obtained from pathology reports. The CT images were loaded separately on an image processing software.14 ROIs having dimensions 8x8 were chosen to compare NL and DL tissue texture (Figure 2). In the next step, the CT images were converted into a grey-level eight-bit image format, followed by image segmentation by refining the texture of the lesion by considering its exact position. By extraction of ROIs, Haralick texture features were calculated. Data were statistically analyzed using B1115 software. The B11 module allowed visualization of sample distributions within a feature space, statistical analysis of these distributions, and classification of feature vectors. Moreover, it implements non-linear supervised classification procedures: 1-nearest neighbour (1-NN) classifier and an artificial neural network (ANN). Projection techniques provided further feature reduction. Methods implemented in the B11 module comprised principal component analysis (PCA),16 linear discriminant analysis (LDA)17 and nonlinear discriminant analysis (NDA).18

Confusion matrices were subsequently constructed to classify NL and DL data, and the following parameters were calculated:19 Precision = true positive (TP) / (TP + false positive [FP])(1); Recall / Sensitivity = TP / (TP + false negative [FN])(2); F1-score = (2˟TP) / (2˟TP + FP + FN)(3); and Accuracy = Sum of TP / Total number of ROI(4).






There were 312 image samples from 71 patients; 51(71.8%) males and 20(28.2%) females. Among the patients, 8(11.3%) had NL, and 63(88.7%) had DL; 19(26.7%) abscess, 15(21.1%) metastatic disease, 23(32.4%) tumour necrosis, and 6(8.5%) vascular disorders (Table 1). From the 3210 ROIs, 224(7%) were from NL images and 2986(93%) from DL images. During the comparative study of class 1, 1209(40.5%) ROIs were chosen, 302(10.1%) from class 2, 1171(39.2%) from class 3, and 304(10.2%) from class 4. PCA, LDA, and NDA classification rates were worked out for all the four DL classes (Table 2). The texture features for ROIs related to DL and NL were compared (Figure 3). Confusion matrices were obtained from all classes for PCA, LDA, and NDA, which showed accuracy >97.86%, but the discrimination rate was 100% for class 4 (Table 3).









The study focussed on classifying four liver diseases; infection, metastasis, tumour necrosis, and vascular disorder. This was done with the help of texture analysis using machine vision-based statistical methods.

A comparative study20 presented a classification rate of about 95% for fatty and cirrhosis liver CT images. The sensitivity and specificity were 96% and 94%, respectively, using the probabilistic neural network (PNN) classifier. A study21 proposed the classification of liver lesions into malignant and benign using comparative analysis. The final accuracy obtained by positron emission tomography (PET)/CT, magnetic resonance imaging (MRI), and fused PET/CT and MRI was 66.7%, 80.0%, and 94.7%, respectively. One study22 found an accuracy of 84.5%, sensitivity 84.1%, and specificity 84.9% for the diagnosis of HCC using the optimal binary logistic regression model. One study23 worked with the grouping of the conventional statistics and machine learning tools convolutional neural network (CNN) for the extraction of features from CT images using composite hybrid feature selection (CHFS) system, and obtained 96.07% accuracy compared to CNN accuracy 94.11%. A study24 explored a technique to classify ultrasonic normal and abnormal cirrhotic images and data parameters verified through a neural network classifier using scanning dimensions of 64×64. Another study25 proposed a stochastic gradient descent-based solver for liver disease classification.

Genetic background is an important contributor to the progression of liver diseases.26 HCC is a common disorder throughout the world that can develop due to various factors, including genetics.27 In liver disease progression, environmental and viral factors may be implicated, and information about genetic variation might be useful in clinical practice, allowing prioritisation of patients with a genetic background that may expose them to hepatitis C virus (HCV)-related liver disease.26 The factor needs to be further studied.

The various techniques reveal the variation in NL and DL texture patterns. The findings indicate variation in liver texture from disease to disease, and even from mild to severe stages in a single disease. The combination of different techniques can provide promising results in discriminating different tissue textures. Future work should include using multiple analysis software to ensure clinical outcomes and set standardisation.




The texture analysis of CT images was found to be a practically independent method that may help classify normal to abnormal status at different liver stages. Abnormalities in the human liver could be discriminated and diagnosed by texture analysis techniques that may assist radiologists and physicians to predict the severity and proliferation of abnormalities in liver diseases.


Disclaimer: The text is based on a PhD thesis.


Conflict of Interest: None.


Source of Funding: None.




1.       Asrani SK, Devarbhavi H, Eaton J, Kamath PS. Burden of liver diseases in the world. J Hepatol 2019;70:151-71. doi: 10.1016/j.jhep.2018. 09.014.

2.       Sarin SK, Kumar M, Eslam M, George J, Al Mahtab M, Akbar SMF, et al. Liver diseases in the Asia-Pacific region: a Lancet Gastroenterology & Hepatology Commission. Lancet Gastroenterol Hepatol 2020;5:167-228. doi: 10.1016/S2468-1253(19)30342-5.

3.       Akhondi H, Sabih DE. Liver Abscess. Treasure Island, FL: StatPearls Publishing LLC; 2022.

4.       Burt AD, Ferrell LD, Hübscher SG. MacSween's Pathology of the Liver, 7th ed. Philadelphia, Pennsylvania: Elsevier Ltd; 2018.

5.       Zhou WC, Zhang QB, Qiao L. Pathogenesis of liver cirrhosis. World J Gastroenterol 2014;20:7312-24. doi: 10.3748/wjg.v20.i23.7312.

6.       Zambrano AR, Quesada JC, Torres AM, Escobar J, Prasad ML, Renjifo ME, et al. Diagnostically Challenging Case: Metastatic Hepatocellular Carcinoma With No Liver Lesion at Imaging. J Glob Oncol 2018;4:1-5. doi: 10.1200/JGO.17.00009.

7.       García-Doval I, Hernández MV, Vanaclocha F, Sellas A, de la Cueva P, Montero D. Should tumour necrosis factor antagonist safety information be applied from patients with rheumatoid arthritis to psoriasis? Rates of serious adverse events in the prospective rheumatoid arthritis BIOBADASER and psoriasis BIOBADADERM cohorts. Br J Dermatol 2017;176:643-9. doi: 10.1111/bjd.14776.

8.       Krishna M. Patterns of necrosis in liver disease. Clin Liver Dis 2017;10:53-6. doi: 10.1002/cld.653.

9.       Manzano-Robleda Mdel C, Barranco-Fragoso B, Uribe M, Méndez-Sánchez N. Portal vein thrombosis: what is new? Ann Hepatol 2015;14:20-7.

10.     Ansari AM, Gul N, Bhatti MM, Meraj L, Khan Z, Munir MW. Risk Factors For Non-Alcoholic Fatty Liver Disease: A Cross-Sectional Study In Pakistani Population. Khyber J Med Sci. 2020;13:287-92.

11.     Hosny A, Parmar C, Quackenbush J, Schwartz LH, Aerts HJWL. Artificial intelligence in radiology. Nat Rev Cancer 2018;18:500-10. doi: 10.1038/s41568-018-0016-5.

12.     Akram MU, Khan MA, Naveed M, Gul S. Liver image analysis using color and texture descriptors. In: The International Conference on Digital Information Processing, Electronics, and Wireless Communications (DIPEWC2016). Dubai, UAE: The Society of Digital Information and Wireless Communications (SDIWC), 2016; pp 1-6.

13.     Löfstedt T, Brynolfsson P, Asklund T, Nyholm T, Garpebring A. Gray-level invariant Haralick texture features. PLoS One 2019;14:e0212110. doi: 10.1371/journal.pone.0212110.

14.     Ahmad MS, Naweed MS, Waraich MM, Nisa M. Texture Analysis Approach to Quantify and Discriminate Normal and Pathological Human Lung CT-Images. Sindh Univ Res Jour (Sci Ser) 2017;49:375-80.

15.     Strzelecki M, Szczypinski P, Materka A, Klepaczko A. A software tool for automatic classification and segmentation of 2D/3D medical images. Nucl Instrum Methods Phys Res A: Accel Spectrom Detect Assoc Equip 2013;702:137-40. DOI: 10.1016/j.nima.2012.09.006.

16.     Fung CP, Kang PC. Multi-response optimization in friction properties of PBT composites using Taguchi method and principle component analysis. J Mater Process Technol 2005;170:602-10. doi: 10.1016/ j.jmatprotec.2005.06.040.

17.     Luebke K. Weihs C. Implementation of a Simulated Annealing Algorithm to Overcome Problems of the Linear Discriminant Analysis. [Online] 2004 [Cited 2022 May 20]. Available from URL: Luebke+Weihs.pdf

18.     Park CH, Park H. Nonlinear discriminant analysis using kernel functions and the generalized singular value decomposition. SIAM J Matrix Anal Appl 2005;27:87-102. doi: 10.1137/ S0895479804442334

19.     El Asnaoui K, Chawki Y. Using X-ray images and deep learning for automated detection of coronavirus disease. J Biomol Struct Dyn 2021;39:3615-26. doi: 10.1080/07391102.2020.1767212.

20.     Malaa K, Sadasivam V, Alagappanc S. Neural network based texture analysis of CT images for fatty and cirrhosis liver classification. Appl Soft Comput 2015;32:80-6. doi: 10.1016/j.asoc.2015.02.034.

21.     Parsai A, Miquel ME, Jan H, Kastler A, Szyszko T, Zerizer I. Improving liver lesion characterisation using retrospective fusion of FDG PET/CT and MRI. Clin Imaging 2019;55:23-8. doi: 10.1016/j.clinimag. 2019.01.018.

22.     Stocker D, Marquez HP, Wagner MW, Raptis DA, Clavien PA, Boss A, et al. MRI texture analysis for differentiation of malignant and benign hepatocellular tumors in the non-cirrhotic liver. Heliyon 2018;4:e00987. doi: 10.1016/j.heliyon.2018.e00987.

23.     Farid AA, Selim GI, Khater HAA. A novel approach of CT images feature analysis and prediction to screen for corona virus disease (COVID-19). Int J Sci Eng Res 2020;11:82. doi: 10.14299/ijser. 2020.03.02

24.     Ullah H, Andleeb F, Aftab S, Hussain F, Gilanie G. Classification of Liver Cirrhosis with Statistical Analysis of Texture Parameters. International Journal of Optical Sciences 2017;3:1-8.

25.     Hamid K, Asif A, Abbasi W, Sabih D, Minhas FUAA. Machine Learning with Abstention for Automated Liver Disease Diagnosis. In: 2017 International Conference on Frontiers of Information Technology (FIT). Islamabad, Pakistan: IEEE; 2017. DOI: 10.1109/FIT.2017.00070

26.     Medrano LM, Jiménez-Sousa MA, Fernández-Rodríguez A, Resino S. Genetic Polymorphisms Associated with Liver Disease Progression in HIV/HCV-Coinfected Patients. AIDS Rev 2017;19:3-15.

27.     Tavakolpour S, Sali S. Tumor Necrosis Factor-α-308 G/A Polymorphisms and Risk of Hepatocellular Carcinoma: A Meta- Analysis. Hepat Mon 2016;16:e33537. doi:10.5812/hepatmon.33537.

Journal of the Pakistan Medical Association has agreed to receive and publish manuscripts in accordance with the principles of the following committees: