Algorithm for Automated Segmentation and Feature Extraction of Thermal Images

. Medical infrared thermal imaging techniques can provide the high-quality images for monitoring and pre-clinical diagnostic of the diseases by showing the thermal abnormalities available in the body. Its biggest advantage is non-contact, non-invasive and very fast way of use. However, the incorrect interpretation of the thermal images via simple observation or manual analysis and detection approximate regions of interest lead to the numerous false positive results. The main objective of this research work is to develop an algorithm for automated image processing and analysis of the extracted features on thermal images for screening or pre-diagnosis of the diseases. This work presents the results of our previously developed Copyright algorithm applied to thermal images obtained from the patients with Axial Spondyloarthritis. This processing and analysis of the extracted features from thermal images can offer a novel quick and non-invasive tool for diagnosis and monitoring of rheumatoid diseases.


Introduction
Medical infrared thermal imaging (MITI) is currently a rapid developing technique that can provide the images for monitoring and pre-clinical diagnostic of thermal abnormalities present in the body in real time.MITI technique is a non-contact, noninvasive, imaging procedure which offers the two-dimensional temperature spatial distribution measurement.
With modern technology, a single image may contain several thousands of temperature points recorded in a fraction of a second.It has been used to study number of diseases where the increased skin temperature can signal the presence of inflammation, or where blood flow is increased or decreased due to a clinical abnormality.MITI ware widely tested in the following areas of medical diagnostics, as: thermoregulation study [1], muscular pain [2], breast cancer [3], vascular disorder [4], rheumatoid diseases [5], osteoarthritis [6,7], Raynaud's phenomenon [8] etc. Various thermography studies have been performed during the last decade for the assessment of thermal symmetry in hand regions [9].Recently the thermographic technology was successfully applied in animal models as a tool for the quick evaluation of inflammation after invasive intervention in reconstructive plastic surgery [10].
In medical IRT, the abnormalities can be diagnosed by visual and subjective analysis, but the human based diagnoses are more likely to errors due to visual exhaustion, negligence, mental workload, etc.The segmentation by Regions of Interesse (ROI) is often an initial step in thermographic medical analysis, where the automatic approaches could lead to fast and highly reproducible outcomes [11].Due to different geometrical shapes and proportions of body parts, it's not possible to capture the ROIs properly without background while data acquisition.Based on the procedure used to define these parameters, the segmentation process can be categorized as: a) manual, where software is used to manually mark the ROI with pre-defined or userdefined shapes; b) semiautomated, when the human intervention is required to reduce the search space for automatic segmentation or to inspect visually and modify the automatically obtained ROI; c) fully-automated, where the different approaches, like thresholding, clustering, geometric and thermal features are used for automatic determination of parameters which define the ROI.
Thermography shows the exact location of thermal abnormalities related to physiological and metabolic processes; therefore, it has a great potential in medical use.However, MITI technology still has a limited use in diagnostic due to a lot of false negative and false positive rates.The problem is not connected to the equipment because the infrared (IR) cameras with a high thermal sensitivity, above the 0.06°C, provide the high-quality images.One of the main problems is the wrong interpretation of the obtained results due to the lack of automated feature extraction on thermal images for specific diseases.Therefore, the main objective of this research work was to develop an algorithm for automated segmentation and extracted features on thermal images in order to support medical decision-making and help to specify feature that can be significant signs for disease classification.

Contribution to Life Improvement
The information extracted from the IR images after its proper analysis is the basis for identifying, monitoring or pre-diagnostic of different types of diseases.To automate this process, modern devices have enough capacity to provide superficial analysis using the special analytical tools.However, the huge amount of diseases and various individual anatomical thermal features of human body cause difficulties to implement one or few well-known algorithms for all cases.
The important contribution of the present work is development of a novel algorithm for the IR image segmentation and feature extraction for each cohort of patient with specific disease, related with the inflammation processes in the human body.Ankylosing spondylitis (AS) is one of subtypes of axial spondyloarthritis that primarily affects the spine, although other joints can become involved.The most common early symptoms of AS are frequent pain and stiffness in the lower back.Early diagnosis is critical for establishing a proper therapy that halts the natural progression of the disease and clinical evaluation requires complementary radiological information through a combination of techniques (radiography, computed tomography and MRI) [12].
The algorithm suggested in this paper combined with IR thermal camera can offer a novel quick and non-invasive tool for diagnosing and monitoring some kinds of rheumatoid diseases.Another important task of this work is to improve protocol of thermal measurements and increase a database of thermal images of patients with specific diseases that may contribute to the use of medical thermography in hospitals in the future.

Materials and Methods
Present study was carried out in partnership with the Center for the Study of Chronic Diseases of the Faculty of Medical Sciences of the Nova University of Lisbon (CEDOC|FCM-UNL) in the research project: "MyoSpA: o papel do músculo nas espondiloartropatias, um novo paradigma" [13].
The participant's cohort of 48 volunteers, 16 females and 32 males, between 18 to 70 years old, an average height 1.72±0.1 (m) and weight 74.6±0.1 (kg).The participants were divided into two groups: I group of 22 individuals with AS disease and II control group with 26 participants.The pain syndrome had more than 90% of participants with AS and 9.1% were without pain, thus signalizing that this disease has a big influence of daily lifestyle.On the other side, in the control group, without AS diagnosis, the 65.4% of participants had pain syndrome, which signalized that a lot of people are suffering from the back pain even without associated diagnosis.Almost all participants who had pain syndrome with AS disease indicated the pain in the lumbar region or along of the all spine.
The measurements were performed in the ambient temperature using a thermal camera FLIR® E6, with a thermal sensitivity of <0.06°C.An IR resolution of 160x120 pixels was interpolated to 320x240 resolution within the camera electronics.The camera was switched on 15 minutes before acquisition.The emissivity parameter on the camera was set as that for the skin, ε = 0.98.The camera lens was placed in parallel to the frontal plane of the subject's body at the distance of 1.5 m.The measurements have been carried out in the laboratory room with no access of solar radiation and/or any heaters, the room temperature was about 21°C and humidity was maintained at approximately 50%.The black matte curtain was used as background to prevent any infrared reflections and to make the background uniform.
All volunteers were completed a questionnaire regarding the general information and agreement to participate in the project.The volunteers were asked not to smoke, abstain from alcohol or coffee, not to perform physical activity, use skin creams or spray on the research area 6 hours before the examination.Before measurement, each participant had to stay undressed for 10 minutes for the purpose of accommodation to the ambient temperature.During the measurements each participant was in the same standing position, facing the wall, the feet were together, the head was looking straight ahead and the arms were down to the sides.

Methodology
The medical images edge detection (MIED) is an important step toward understanding image features.With the increasing numbers of medical images techniques, the use of computers for processing and analysis of images has become critical necessary.The MIED is extensively used in image segmentation when images are divided into areas of interest.This information has greatly increased the knowledge of normal and pathological anatomy and are the critical components in diagnostic and treatment planning [11][12][13][14]16].
Ankylosing spondylitis (AS) primarily affects the spine and the sacroiliac joints that connect the lower spine to the pelvis, resulting in pain in the lower back, hips, and buttocks.So, our work was concentrated on the posterior of the back, the target region was specified in the thermal abnormalities in lumbar region, as one of the possible feature of AS disease.The principal steps that were taking into consideration during this study are shown in the fig.1:

Fig. 1. Algorithm for automated segmentation and feature extraction of thermal image
Thermal images were obtained in pseudo colors and, as the first step, the infrared images were converted to a grayscale, using the formula: The linear Gauss filter was applied to blur images and remove the noise: where x is the distance from the origin in the horizontal axis, y is the distance from the origin in the vertical axis, and σ is the standard deviation of the Gaussian distribution.
In our work the Sobel's operator [14] (fig.4, a) was used to detect edge of human body in each thermal image.The Im defined as the source image, and Gx and Gy were two images which at each point contain the vertical and horizontal derivative approximations respectively, the computations were as follows: (2)  In the healthy persons the temperature distribution on the back is usually symmetrical relatively to the vertebral column (VC).Asymmetry on the region of temperature distribution relative to the VC is the main criteria on diagnosis of an inflammatory process or chronic disease.From the areas with an abnormally high or low temperature, the symptoms of many diseases can be recognized in the early stages of their occurrence.
Thus, after detecting the edges of the human body, the axes of vertical symmetry X and horizontal Y were found (fig.4, b) using the formulas: (4) where n and m are the numbers of pixels in Li columns and rows, respectively; Ri are the coordinates of left and right edge pixels of each row, Lwj, Aj -coordinates of lower and upper back edge pixels of each column.
Segmentation of medical images is an important challenging task in detecting the temperature abnormalities present in the body.Despite the huge effort in solving it, there is no single approach that can generally solve the problem of segmentation for the huge among of image varieties.In this study the K-means clustering algorithm was used for segmentation of infrared thermal images.This algorithm is based on minimization of the objective function using the formula: (5) where is the Euclidean distance between xi and vj, ci -the number of data points in i th cluster and c -the number of cluster centers.The algorithm consists in choosing the number of cluster K, and then implying the K-means clustering to the image.In the fig. 3 is shown an example of results obtained after applying the proposed k-mean clustering algorithm onto thermal images of the back of healthy person and one with AS disease.It could be clearly noticed from the cluster 5 that in healthy patient were not detected inflammatory zone, in opposite, as in patient that had AS disease.After ROI detection the targeted region was selected from vertical Ys axis of symmetry starting on the cervical part and ending on the sacral spine.This region was divided into two parts: left and right lower back.The areas of regions and horizontal Xs coordinates were calculates by using the formula (5).The deep and objective diagnostic information, like severity and type of a disease can only be obtained by statistical analysis of the ROI.The segmentation of ROI is often an initial step in thermographic analysis, where the automatic approaches lead to fast and highly reproducible outcomes [14,15].Due to different geometrical shapes and proportions of body parts, it is not possible to capture the ROIs properly without the background during the process of data acquisition.The human back thermal picture varies individually, and it is difficult to state the exact features for some disease.This requires a large amount of measurements of significant cohort of patients with one specific disease.As thermal asymmetry distribution is not good enough for manual analysis, which can be appropriate only when a significant strong difference in color on thermal images are observed for the feature extraction and segmentation, the ROI needs to be solved automatically.The most significant benefit of the developed algorithm is automated segmentation of ROI with analyzing the side of asymmetry based on the central axis of the spine.The proposed algorithm for automatic segmentation of body regions is consistent with the solutions provided by other research groups [14,15].During its developing the main question were considered: i) entire region segmentation, where the edge detection and thresholding techniques are commonly used to extract the body region from background [16]; ii) anatomical region segmentation, geometric and local thermal features to locate the specific anatomical regions [17]; iii) diseased area segmentation, in order to locate the hottest or coldest regions [18].The developed experimental protocol for IR thermal measurements turns to be appropriate for measurements in the hospitals, as well as it was well accepted by the participants.Analyzing features from the IR images of the patients with AS diseases we observe that for almost all patients with AS the significant feature was an abnormal temperature distribution among lumbar region or/and along all spine.The skin temperature distribution of those healthy as well as individuals with associate diagnosis represents the different pattern.Another important result observed in this study: the thermal images of the participants with the back pain complains clearly demonstrated the difference of temperature exactly in the places indicated by the participants.This allows to assume that thermography clearly shows the area of pain syndrome or thermal abnormalities.An additional information which can be obtained from thermal measurements: it was noticed that a lot of women has an area of higher temperature as a result of a bra strap that is too tight, that can cause poor posture, back and neck pain, shoulder grooves leading to numbness in the fingers and restrict circulation to muscle.It should be mentioned that the local temperature abnormalities and the asymmetry of the IR thermal image depends on the disease stage and severity, as well as the period of the disease treatment process.

Conclusions
The paper presents an algorithm for IR image segmentation as well as its features extraction.Its application to the cohort of patient with specific disease, ankylosing spondylitis (AS), shows that it can be used for automatic thermal image-processing, segmentation and feature.Proposed solution solves problem of ROI's detection by automatic segmentation and the location of thermal abnormalities in the patients' back.The experimental protocol used in present for the IR thermal camera measurements shows a good correlation with a medical observation.However, the methodology needs to be validated in the further research study by increasing the database of IR images and statistical analysis.The developed algorithm and measurements protocol with combination of IR thermography can offer a novel quick and non-invasive tool for diagnosis and monitoring of rheumatoid diseases in real time for saving lives.

( 3 )
As example, in the Fig 2 is shown a comparison between results from applying of different gradient operators into thermal image of patient with AS.

Fig. 3 .Fig. 4 .
Fig.3.Results of k-mean clustering for IR images: a) normal case; b) patient with AS In the fig.4. is shown results of automated segmentation and feature extraction of thermal image on one patient with AS disease.