Rheumatoid Arthritis Detection Using Thermal Imaging and Fuzzy-C-Means algorithm Nizami Mohiyuddin Pradeepkumar Dhage Krishna K. Warhade M.E student Department of Electronics and Telecommunication MIT C.O.E. Pune Assistant Professor Department of Electronics and Telecommunication MIT C.O.E. Pune Professor Department of Electronics and Telecommunication MIT C.O.E. Pune nizami.mohiyuddin@gmail.com pradeep.dhage@mitcoe.edu.in krishna.warhade@mitcoe.edu.in ABSTRACT Rheumatoid arthritis (RA) is a chronic autoimmune disease which affects the hand joints, wrist, feet, knee, shoulders and other regions of the body. Even various imaging modalities like x-rays, CT and MRI are available in evaluation and diagnosing the disease; those modalities are expensive and have radiation effects. Thermal imaging plays a vital role in evaluation and monitoring the inflammation in rheumatoid arthritis Thermal imaging is a non invasive method for detecting the pathogenesis of the disease compared to other diagnostic methods. The advantage of this imaging technique is that it is a noninvasive thermographic examination, both from an operational and health standpoint. The objectives of this study is to evaluate the rheumatoid arthritis based on heat distribution index and skin temperature measurements and to analyze the difference in skin temperature measurement in various parts of body of RA patients and normal persons. The algorithm automatically segments the abnormal regions of the hand especially for arthritis patients using fuzzy-cmeans algorithm and Expectation Maximization (EM )algorithm. Infrared imaging is ideally suited to the study of skin temperature, because the human epidermis has a high emissivity. This was noted by Hardy, an American physiologist in 1934 [l]. Sixty years later, with more sophisticated technology and greater knowledge of physiology, we still agree with these data. Critics of thermal imaging point out that the technique only records the skin temperature. This often stems from a limited and sometimes outdated understanding of thermal physiology, still taught from the background of thermocouple recordings in elaborate laboratory settings. Technical advances in thermal imaging, particularly since the addition of image processing techniques have revolutionized the study of skin temperature. We now know much more about thermoregulation in man, and the effects of extremes of hot and cold environment [2]. When inflammation occurs in deeper tissues and joints, the skin will under the right conditions show an altered thermal behaviour. Keywords—Rheumatoid arthritis, hand bone segmentation, joint margin, automatic joint detection, thermal imaging, thermography. I. INTRODUCTION Rheumatoid arthritis is still a disease of unclear aetiology. It is a autoimmune disease which causes chronic and inflammatory disorders and affects the primary joints and it principally attacks flexible joints. This results in painful condition which may lead to substantial loss of functioning and mobility of body. Fig. 1 shows the hand affected with Rheumatoid Arthritis. Rheumatology embraces a spectrum of diseases, most of which affect the locomotor system. Arthritis is a general term which describes articular joint inflammation. During the inflammatory process the synovial membrane which supplies lubricant to the joint becomes thickened and increased blood supply increases the temperature. In other diseases, such as scleroderma the circulatory system in the extremities undergoes many changes, but blood supply is reduced. These and other rheumatic diseases result in localized changes in temperature. Fig. 1 Hand affected with Rheumatoid arthritis This means that normal control subjects can be used to establish a healthy baseline, from which patients with known disease can be compared. This has been achieved in rheumatology, and good international agreement reached over the application of thermal imaging. Ultrasound is dependent on user for imaging, this modality could quantify changes in synovitis and effusion. For a normal subject, thermogram shows uniform and symmetrical temperature variation [3-4]. The assessment of joints with magnetic resonance imaging (MRI) is too costly and time-consuming for routine use [5]. Hence Thermal imaging method is considered as a valuable tool in diagnosing the rheumatoid arthritis disease. Thermogram depicts a thermal variation in the skin temperature of various parts of the body But in case of abnormality condition abnormal areas shows sudden increase in temperature. The RA affected region appears as red spot area showing higher temperatures in the thermogram obtained [6]. To enable earlier diagnosis, various rheumatological societies have reviewed their diagnostic criteria and incorporated modern imaging methods and modalities into their diagnostic algorithms. II. RELATED WORKS Many different thermal imaging systems have been tested over the years since dedicated medical thermographs have been available Many studies have been performed which show the anticipated normal pattern of temperature shown in a thermal image. Mikhail S. Tarkov et al. have proposed Evaluation of a Thermogram Heterogeneity Based on the Wavelet Haar Transform [7]. This method approach is based on a statistical processing of the thermal image histograms. It is shown that the histogram transform analysis gives much new information about change of the human organism state. At the same time, it is stated that both a sharply heterogeneous and a sufficiently smooth for visual perception (diffusive) thermal pictures can give the same histograms. For this reason, the image heterogeneity degree, being independent informative characteristic of the thermal pattern, necessitates a development of special methods for its quantitative description. The mentioned method devote efforts to search the quantitative criteria of the image heterogeneity and adequate algorithms for evaluating the heterogeneity degree. Maria del C. Valdes et al. have proposed Multidimensional filtering approaches for pre-processing thermal images [8]. The method proposed by them effectively corrects some blurring effects typically found in thermal infrared images. For the case of a single frame image determines the direction and width of the blur slope and re-assigns the max and min values to the correspondent pixels in the gradient direction. Then, the area is shifted and the same process is done again, up to cover the full image. Image evaluation methods demonstrate the accuracy and quality of the results Christophe L Herry et al. [9] used quantitative assessment of pain-related thermal dysfunction through clinical digital thermal imaging. This methods presents methods for automated computerised evaluation of thermal images of pain, in order to facilitate the physician'sto make proper decision. Firstly, the thermal images are pre-processed to reduce the noise introduced during the initial acquisition process and to extract the digressive background. Then, potential regions of interest are obtained using fixed dermatomal subdivisions of the body, isothermal analysis and segmentation techniques. Finally, they assess the degree of asymmetry between contra lateral ROI using statistical computations. Mariusz Marzec et al. [10] described automatic method for detection of characteristic areas in thermal face images. This paper presents an algorithm for image analysis which enables localization of characteristic areas of the face in thermograms. The algorithm is resistant to subjects’ variability and also to changes in the position and orientation of the head. In addition, an attempt was made to eliminate the impact of background and interference caused by hair and hairline. The algorithm automatically adjusts its operation parameters to suit the prevailing room conditions. L.A. Bezerra et al. [11] proposed Estimation of breast tumor thermal properties using infrared images. Firstly is the development of a standardized protocol for the acquisition of breast thermal images which includes the design, construction and installation of mechanical apparatus. The second part is related to the challenge for the numerical computation of breast temperature profiles that is caused by the uncertainty of the real values of the thermo physical parameters of some tissues. Then, a methodology for estimating thermal properties based on these infrared images is presented in the paper. Carsten Siewert et al. [12] Difference method for analyzing infrared images in pigs with elevated body temperatures. The only prerequisite is that there are at least 2 anatomical regions which can be recognized as reproducible in the IR image. Noise suppression is guaranteed by averaging the temperature value within both of these ROI. The subsequent difference imaging extensively reduces the offset error which varies in every thermal IR-image The aim of this study was to evaluate and analyse the RA based on skin temperature differences measurements, and to automatically segment the abnormal regions of thermogram using EM algorithm and fuzzy c-means. II. METHODOLOGY A. Standardization protocol Optimal conditions for quantitative thermal imaging have been published, as consensus reports[13-14]. These technique which falls within these conditions establishes the following criteria. 1. Information is supplied to the patient prior to the test, to avoid major disturbances to the circulation, heart rate or skin condition. These include smoking, exercise, and ointments applied to the skin. 2. The patient is briefed, and then rested in a controlled ambient temperature for a fixed period prior to the test. Areas to be examined are unclothed, and legs and arms are stretched out, not crossed during this equilibrium period. A large chair with arms and a leg rest is ideal for this. 3. The imaging system is calibrated, to an external source if required, and allowed to run for a period to achieve full stabilisation. Investigations for inflammatory disorders are conducted in a 20°C ambient 4. Patients with definite RA (satisfying American Rheumatism Association criteria) and normal persons (subjects) were included in this study. The average age of patient was about 35 years and they were suffering from the disease for duration of average 6 years. We had taken data of 4 subjects out of which two are healthy and two are affected with definite Rheumatoid Arthritis. Consent statements were signed by each patient. 1 (a) If πΌπ =π, then π’ππ π+1 = B. Thermal imaging process. ∑ππ=1( Imaging was performed at The Centre for Biofield Sciences, M.I.T College, Kothrud, Pune. Using an infraRent LLC camera (Lakeland, FL 8007099565).The images were analyzed using MedHot pro IR version 2.0 REV 3 proprietary software. The humidity and air temperature of the imaging room were maintained stable, with maximum oscillation in temperature of ±2°C. Thermographic images ofvarious parts of body were obtained. All thermographic images are captured at approximately same time of the day and in the same room. C. Image processing maximization algorithm by 2 πππ (π−1) πππ (3) ) (b) Else π’ππ (π+1) =0 for all i∉ I and ∑π∉Ik π’ππ π+1 =1; next k. 6. If||π’π − π’π+1 || <∈, stop; otherwise set b=b+1 and go to step 4. Thermal image of RA and NRA subjects were captured and images were converted to HSV and further Fuzzy-c-means algorithm applied, the segmented image is then superimposed with original image as shown in Fig 2. extraction Thermal image of RA patient Expectation–Maximization (EM) algorithm is an iterative method for finding maximum likelihood or maximum a posteriori (MAP) estimates of parameters in statistical, where the model depends on unobserved latent variables. The EM iteration alternates between performing an expectation (E) step, which creates a function for the expectation of the log-likelihood evaluated using the current estimate for the parameters, and a maximization (M) step, which computes parameters maximizing the expected log-likelihood found on the E step. The steps of EM algorithm are as follows. Conversion of thermal image to HSV Hue saturation intensity obtained Fuzzy C means algorithm applied 1. Set K= and initialize θ0 such that πΏθk (Y) is finite. 2. Expectation E step: Compute Q (θ,θπ ) = πΈθk {log πθk (Z, Y)|Y) = ∫log πθ (Z,Y) πθk (Z|Y) dz. 3. Maximization (M) step: Compute θ k+1 = πππθ max Q (θ, θπ ) Segmented image superimposed with original image Fig 2. Image segmentation with Fuzzy C Mean algorithm 4. If not converged update k = k + 1 and return to step 2. D. Image processing by Fuzzy C Mean Algorithm The Fuzzy C-Means (FCM) clustering algorithm was ο¬rst introduced by Dunn [15] and later was extended by Robert L [16]. The algorithm is an iterative clustering method that produces an optimal c partition by minimizing the weighted within the group sum of squared error objective function π½πΉπΆπ [16]. π½πΉπΆπ =∑ππ=1 ∑ππ=1((π’ππ π )π2 (π₯π , π£π )) (1) A solution of the object function π½πΉπΆπ can be obtained via an iterative process, which is carried out as follows. 1. Set values for c, q and Ξ. 2. Initialize the fuzzy partition matrix U=[π’ππ ] 3. Set the loop counter b = 0. 4. Calculate the c cluster centers π£π (π) with π’(π) π π ∑π π=1(π’ππ ) π₯π π π ∑π π=1(π’ππ ) π£π (π) = (2) 5. Calculate the membership π’(π+1) . for k=1 to n, calculate the following. πΌπ = {π|1 ≤ π ≤ π, πππ = |(π₯π − π£π )|| = 0} / πΌ; ; for the π π‘β column of the matrix, compute new membership values. III. EXPERIMENTAL RESULTS A. Skin temperature measurement It has been observed that the heat distribution in RA subject is much more than that of the healthy subject. In case of abnormal conditions the abnormal regions show abrupt variations in temperature. This variation of temperature is analyzed for prediction of Rheumatoid Arthritis. Fig 3 represents thermal image of rheumatoid arthritis patients showing skin temperature higher in abnormal regions than the normal regions and also indicates the region of interest measuring the skin temperature in the abnormal areas. Fig 4 shows the thermal image of the skin temperature for a normal patient in an area of interest. Fig. 3 Increased skin temperature in palm RA patients Fig. 5(b) Input image of Rheumatoid arthritis subject\ Fig. 4 Skin temperature distribution at palm in normal individual After obtaining the HSV image the EM algorithm was applied Expectation–Maximization (EM) algorithm is an iterative method for finding maximum likelihood or maximum a posteriori (MAP) estimates of parameters in statistical, where the model depends on unobserved latent variables. The EM iteration alternates between performing an expectation (E) step, which creates a function for the expectation of the loglikelihood evaluated using the current estimate for the parameters, and maximization (M) step, which computes parameters maximizing the expected log-likelihood found on the E step. The superimposed image which is obtained from the final output of non rheumatoid subject is as shown in the Fig 5(c). The output image of EM algorithm superimposed after segmentation for rheumatoid subject is as shown in Fig 5(d). for rheumatoid arthritis subject. B. Image segmentation results for chest thermal images Fig. 5(a) Indicates image of Non rheumatoid arthritis subject and Fig. 5(b) shows image of rheumatoid arthritis subject These images were captured by thermal imaging camera and used for image segmentation process the images were first converted to HSV image. Fig. 5(c) Chest NRA image superimposed after segmentation by EM algorithm Fig. 5(a) Input Image of Non Rheumatoid subject Fig. 5 (g) Temperature comparison graph Fig. 5(d) Chest RA image superimposed after segmentation by EM algorithm Fuzzy C-Means algorithm is used for segmentation of the images which resulted in better output than compared to EM algorithm. The output images after segmentation are superimposed by the original input image. The superimposed image after segmentation by fuzzy-c means algorithm for non rheumatoid arthritis subject is as shown in Figure 5(e). The output after segmentation of the image by FCM algorithm is superimposed with original image as shown in the Figure 5(f). for RA subject. The bar graph in Fig. 5(g) indicates the variation in the measured skin temperature for rheumatoid arthritis patient compared to normal participant. C. Image segmentation results for knee thermal images Knee thermal image were analyzed as there is a major joint knee involved in the leg area which resulted in the rise in temperature. The thermal images of knee area of Rheumatoid and Non-Rheumatoid subject were captured. Rheumatoid Arthritis patient had mentioned pain in this area so we considered this area in the analysis. The Non Rheumatoid arthritis subject is as shown in Fig 6(a). The Rheumatoid subject is as shown in the Fig 6(b). Fig. 6(a) Knee input image of Non rheumatoid subject Fig. 5(e) Chest NRA image superimposed after segmentation by FCM algorithm . Fig. 5(f) Chest RA image superimposed after segmentation by FCM algorithm Fig. 6(b) Knee input image of rheumatoid arthritis subject These images were used as input which had shown difference in temperature distribution of Non-Rheumatoid Arthritis subject and Rheumatoid Arthritis patient the knee area had specially shown the significant increase in temperature as compared to that of the normal subject. The EM algorithm was applied to these images for the healthy subject the EM output image is shown in Fig 6(c). The image of unhealthy subject after superimposition and segmentation by EM algorithm is as shown in Figure 6(d). Fig. 6(f) Knee image of RA subject superimposed after segmentation by FCM algorithm The comparison graph shows the difference in temperature levels of normal and abnormal subject as shown in Figure 6(g). The variation in the measured skin temperature for Rheumatoid Arthritis patient compared to normal participant was 1-1.5β. Fig. 6(c) Knee NRA image superimposed after segmentation by EM algorithm Fig. 6(g) Temperature comparison graph Fig. 6(d) Knee RA image superimposed after segmentation by EM algorithm Fig. 6(e) Knee NRA image superimposed after segmentation by FCM algorithm The output of the superimposed image after segmentation by Fuzzy C-Means algorithm for healthy subject is as shown in Figure 6(e). The unhealthy subject with knee pain is as shown in Figure 6(f). The Fuzzy C-Means algorithm shows good extraction performance. VI. CONCLUSION One of the great virtues of this technique is that it is objective and non-invasive. This means that when the examination of a patient is difficult, e.g. dealing with young children or psychosomatic illness, thermal imaging is particularly useful. In many cases, the technique is not essential for diagnosis. However, in rheumatology, monitoring of disease progress is a major concern. In a disease with no known cure, drug treatment has to be rigorously assessed. In rheumatic diseases this is not a simple process. This is borne out by the extensive literature on the subject and the large number of available tests. No one single test adequately reflects the complex changes which occur in the whole patient with an inflammatory arthritis.. In this paper, we used two segmentation algorithms like fuzzy-c-means algorithm and EM algorithm for quantifying and extracting the abnormality of rheumatoid arthritis patients. The fuzzy clustering algorithm compares the colors in a relative sense and groups them in clusters. EM algorithm is an iterative algorithm of first order so it is slower in convergence. EM algorithm which is applied for the thermal image processing of hand region did not provide the accurate and good results. Rather fuzzy c-means algorithm produced better results compared to that of EM algorithm. The need for objective and non-invasive monitoring of inflammation is therefore ideally met by quantitative thermal imaging. It is relatively simple and inexpensive, reproducible under the right conditions, and acceptable to the patient even when in pain this technology can be used as a valuable tool for diagnosing the RA patients. Thermal imaging needs strict protocol, but provides a low cost and objective tool for non-invasive investigation VII ACKNOWLEDGMENT We are thankful to Dr. Aniruddha G. Tembe Rheumatologist at Aditya Birla Memorial Hospital, Chinchwad, Pune for his valuable discussion on causes of RA disease Dr. Aniruddha G. Tembe has provided us the overview of recent detection techniques used in hospitals for RA detection and help us in preparation of RA patients databank. We are also thankful to the Centre for Biofield Sciences MIT Pune for providing thermal imaging facilities. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] J.D,Hardy,“The radiation of heat from the human body”, J Clin Invest, vol. 13, pp. 539-615, 1934. Y. Houdas, E. F. J. Ring, “Human body temperature:its measurement and regulation”, Newyork, Plenum, 1982 N. Selvarasu, “Wavelet based abnormality extraction and quantification algorithm for thermographs depicting diseases in human”, International Conference on Fiber Optics and Photonics. December 13-17, 2009, IIT Delhi, India. Yinghe Huo, Koen L. Vincken, Max A. Viergever, Floris P. Lafeber “Automatic joint detection in rheumatoid arthritis hand radiograph”, In IEEE 10th International Symposium on Biomedical Imaging: From Nano to Macro San Francisco, CA, USA, April 7-11, 2013. P. T. Kuruganti and H. Qi. “Asymmetry analysis in breast cancer detection using thermal infrared images”. In Proc. Of the SPIE, vol. 5959, pp. 147-157, 2005. Syaiful Anam, Eiji Uchino, Hideaki Misawa, and Noriaki Suetake. “Automatic bone boundary detection in hand radiographs by using modified level set method and diffusion filter”, In IEEE 6th International Workshop on Computational Intelligence and Applications, Hiroshima, Japan, July 13, 2013. J. Mikhail S. Tarkov, Boris G. Vainer Horvath, “Evaluation of thermogram heterogeneity based on the wavelet haar transform”, In Siberian Conference on Control and Communications SIBCON-2007. Maria del C. Valdes, Minoru Inamura, J. D. R. Valer, Yao Lu,”Multidimensional filtering approaches for pre-processing thermal images”, Multidim Syst Sign Process, vol. 17, pp. 299-325, 2006. Christophe L. Herry, Monique Frize, “Quantitative assessment of pain-related thermal dysfunction through clinical digital thermal imaging”, In BioMedical Engineering Online, pp. 3-19, 28th June 2004. [10] Mariusz Marzec, Robert Koprowski, Zygmunt Wrobel, Agnieszka Kleszcz, SΕawomir Wilczynski, ”Automatic method for detection of characteristic areas in thermal face images”, In multiple tools appl, vol. 13, pp. 145149, 2013. [11] L.A. Bezerra, M. M. Oliveira, T. L. Rolim, A. Conci, F. G. S. Santos, P. R. M. Lyra, R. C. F. Lima. “Estimation of breast tumor thermal properties using infrared images”, In signal processing journal, springer, vol. 93, pp. 2851-2863, 2013. [12] Carsten Siewert, Sven Danicke, Susanne Kersten, Bianca Brosig, Dirk Rohweder, Martin Beyerbach, Hermann Seifert, “Difference method for analysing infrared images in pigs with elevated body temperatures”, In Z. Med. Phys, vol. 24, pp. 6-15, 2004. [13] J. M. Engel, J. A. Cosh, E. F. J. Ring, "Thermography in locomotor diseases recommended procedure", Eur. J. Rheum. Inflamm. vol. 2, pp. 299-306, 1979. [14] E. F. J. Ring, J. M. Engel, D. P. Page Thomas, “Thermologic methods in clinical pharmacology", Int. J. Clinical Pharmacology, Therapy and Toxicology, vol. 22 no. 1, pp. 20-24, 1984. [15] Dunn J. C. “A fuzzy relative of the ISODATA process and its use in detecting compact well separated clusters”. Journal of Cybernetics, vol. 3, 1974, pp. 32– 57. [16] Robert L. Cannon, Jitendra V, “Efficient implementation of the fuzzy c-means clustering algorithms”, IEEE transactions on pattern analysis and machine intelligence. vol. PAMI-8, no. 2, March 1986.