A Comparison of Mean Models and Clustering Techniques for Vertebra Detection and Region Separation from C-Spine X-Rays

In Computer Aided Diagnosis (CAD) tools, vertebra localization and detection are the essential steps for the diagnosis of cervical spine injuries. The accurate localization leads to accurate treatment, which is more challenging in case of poor contrast and noisy radiographs. This paper targets c-spine radiographs for the localization of vertebra using di ff erent vertebra templates, vertebra detection at each level using two di ff erent clustering techniques and gives a comparison between them. Moreover it separates the regions for each individual c-spine. It takes the poor contrast x-ray as input, enhance the contrast and detect the edges of enhanced image. After the edge detection, manually selected Region of Interest (ROI) helps in getting the edges of area covering C 3 − C 7 only. These edges along with 4 di ff erent template models of vertebra are used for the localization by Generalized Hough Transform (GHT). The results obtained are analyzed visually for the best localization template. Then, on voted points obtained after pruning, two clustering techniques Fuzzy C Means and K-Means are applied separately, to form clusters and centroids for each vertebra. Another part of this paper is to separate vertebra regions. For this, intervertebral points are calculated and then along these points, centroids are rotated using A ﬃ ne Transformation. It gives parallel lines to vertebrae and joining them gives region for each vertebra. The comparison and testing of proposed technique has been performed using dataset ’NHANES II’ publicly accessible at ’The National Library of Medicine’, total 150 cervical spine scans are used securing accuracies 93 . 76% , 84 . 21% and 83 . 1% for FCM, K-Means and region separation, respectively.


Introduction
Spinal cord proves to be the most important element of human anatomy. It works as a backing for other segments of human body so that one can bend, twist and move easily. If this most essential segment of human structure is damaged in any way, a person cannot even stand up straight. Figure 1 illustrates the division of human spinal cord which consists of 33 individual bones known as vertebra. First 7 cervical vertebra (C 1 − C 7 ) collectively form the neck, next 12 thoracic vertebra (T 1 − T 12 ) form the chest, next 5 lumbar vertebra (L 1 − L 5 ) form the lower back, next 4 sacral vertebra (S 1 − S 4 ) form the pelvis and the last 4 fused vertebra form the tail bone of human structure are known as coccyx bones.and fall down [1] [2].
In the past few decades, medical imaging has been developed in dramatic way and helping radiologists for the diagnosis and treatment of cervical spine disorders including osteoporosis, cervical spine injuries and trauma [3]. The most common sources for c-spine injuries (CSI) are accident of vehicles and outdoor games. In youngsters age ranging 15-25, hyperextension and vehicles accident where as in senior citizens and osteoarthritic victims, sudden fall is reported as the most common reason of CSI [4]. Latterly, a signifi-A. Mehmood et al. / Advances in Science, Technology and Engineering Systems Journal Vol. 2, No. 3, 1758-1770(2017 cant amount of Traumatic Spinal Cord Injuries (TSCI) has been reported which may become more problematic and critical if the patient is not treated on time by accurate diagnosis [5].

Figure 1: Spinal Column: Anatomical Features
In Computer Aided diagnosis (CAD) tools, vertebra localization and detection at each cervical level are initial and essential steps to be performed and it becomes more difficult when images are low contrast and noisy like X-rays. These steps work significantly in many orthopedics and neurological applications for the diagnosis and treatment of spinal column disorders. The accurate localization and detection leads to accurate treatment of abnormalities. Thus, great success rate in vertebra localization and detection with separated regions for each vertebra would be very helpful for radiologists' community, not only for the diagnosis but also in surgeries. Figure 2 shows the (a) Normal cervical spine x-ray with perfect relationship between posterior, anterior and spinolaminar lines. They are aligned representing a healthy radiograph where as (b) shows loss of alignment at C 6 and C 7 representing unhealthy or fractured X-ray. This figure shows that the fractures can be lo-cated using parameters like posterior, anterior and spinolaminar lines by getting the alignment information between them. In literature, many techniques like Generalized Hough Transform (GHT) [6], Active Shape Model (ASM) [7], discrete dynamic contour model (DDCM) [8] and Template Matching [9] have been described for the localization, detection and segmentation of spinal cord using different set of images including magnetic resonance imaging (MRI) and computed tomography (CT) scans. Klinder et al. [10] described a methodology for the extraction of vertebra shape using CT scans. They designed a methodology for the detection, identification and segmentation of vertebra from CT scans. They applied Generalized Hough Transform (GHT) with the combination of adapted triangulation shape for the localization and segmentation of vertebra. They tested the proposed technology on 64 CT Scans with success rate of 70%. Alomari et al. [11] presented a methodology of localization using MRI images. They used two datasets of 50 and 55 scans attaining success rate of 87% and 89.1%. Their proposed model was based on two steps targeting intervertebral discs. Korez et al. [12] presented an automated technique for the detection and segmentation of vertebra and spine using 3D CT Scans. They used interpolation theory for the localization of spine which is further used to locate the individual vertebra. The localization results obtained helped in the segmentation of each vertebra by enhanced shape-constrained deformable model approach. They tested the technique using two CT Scans databases of 50 lumbar and 170 thoracolumbar vertebrae and achieved high success rate. Lecron et al. [13] presented a methodology taking benefit of edge polygonal approximation to locate the vertebra and perform the segmentation using Active Shape Model (ASM). They enhanced the performance of the methodology by parallel computing and heterogeneous architectures for the vertebra extraction. They used X-ray images for the testing of proposed methodology. Larhmam et al. [14] described a technique for the vertebra localization targeting x-rays image. They used a novel combination of GHT and Kmeans clustering for the localization of vertebra using template matching theory. Benjelloun et al. [15] presented an analysis of vertebra based on segmentation from x-ray images. They described a relative study of two algorithms to segment out vertebra. Lecron et al. [16] presented a model targeting the vertebra localization from X-rays using SVM model and SIFT descriptor. They evaluated their methodology using 50 scans and attained satisfactory success rate of 81.6%. Dong et al. [17] presented a graphical model based vertebra identification which need no training steps for processing. They designed it to automatically detect the total number of visible vertebra in scans and localize them. Larhman et al. [18] [19] proposed a scheme based on polygon regions for the extraction of vertebra boundries and perform segmentation. Later in [20], they presented a technique for the localization and segmentation based on ASM. This paper is basically an extension of model originally presented in IEEE International Conference on Communication, Computing and Digital Systems (C-CODE 17) [21]. This paper is extended in terms of comparison of template models for better localization and then a comparison and analysis of clustering techniques used for the detection of centroids. A section which is extension to original paper, is dedicated to the region separation for each individual vertebra which can be used further for the segmentation process and will be very helpful for the diagnosis of several c-spine disorders. Section II describes the methodology of proposed technique, Results are analyzed and discussed in Section III and Section IV presents the conclusion of this paper.

Methodology
The presented technique comprises five stages to give a comparison of techniques for better localization and detection results along with separated regions for each vertebra. The flow chart of presented model is shown in Figure 4, representing the main steps of model including Preprocessing, Creation of Mean models, Vertebra Localization, Centroid detection and Region separation.

Preprocessing
Preprocessing is the first and most significant stage of the presented model for attaining high success rate. The steps involved in this stage are contrast enhancement, detection of edges and manual selection of Region of Interest (ROI). These steps are performed to get enough data for our vertebra localization stage.

Contrast enhancement
The input X-ray images are poor contrast and noisy set of images which cannot be processed directly to achieve high accuracy of presented technique. The superimposition of other bony structures and level of brightness at C 6 and C 7 leads to wrong localization results. So 'Contrast Limit Adaptive Histogram Equalization'(CLAHE) [22] is applied to input radiographs so that the contrast can be enhanced for better results. CLAHE works like ordinary adaptive histogram equalization, the only difference is it uses a specific threshold to clip the histogram. For X-ray images, CLAHE is one of the most efficient contrast enhancement algorithm when compared with Gamma Correction (GC) and Histogram Equalizer (HE) [23].

Detection of edges
After the contrast enhancement, the edges of input image are detected using 'Canny Edge Detector' [24]. The reason behind the edge detection is that the GHT algorithm works with edges only. The process of localization takes place using edges. So we detected the edges of input image for any further processing.

Manual selection of Region of Interest (ROI)
The edge detection step gives us the edges of whole input image, but the proposed technique requires edges for the C 3 − C 7 only. so in this step we constructed the Region of Interest (ROI) covering the area of lower 5 cervical vertebrae only. Then this ROI is multiplied with the edges to get the edges of this area only. This is the last step of our Preprocessing stage.

Creation of Mean Models
The creation of mean models is next stage of proposed technology. In this stage, 4 different template models For the construction of these template models, 25 vertebra images for each template model are created using some drawing tools and then mean image is created using these 25 images. Eq. 1 is used to create mean model of each shape.
where 'V t ' presents the total vertebra images (25) created manually and 'V x ' is one vertebra image with 'x' varying from 1 to 25.
The reason behind using these 4 mean models is just to analyze the results and give a comparison between them. So that one can select best mean model for localization of vertebra securing high accuracy. M1 and M2 represents the body of vertebra whereas M3 and M4 represents complete vertebra shape including body. These created models will be used as a template image for the detection process of GHT. The results are generated using all four template images one by one and then analyzed visually to select the best template image.

Vertebra Localization(GHT)
The third and most important stage of proposed methodology is Vertebra Localization which helps in the detection of centroids. In this stage, the selected www.astesj.com edges of Preprocessing stage are used and GHT is applied. Ab initio, Hough Transform [25] was introduced as a technique for the detection of lines, circles, elipse etc following a modified concept by Ballard, known as generalized Hough Transform [6] used in various applications of image processing and computer vision. GHT is a concept used widely for the detection of arbitrary shapes and pattern recognition in all fields of imaging including biomedical imaging. The most positive point of this technique is it is invariant to any kind of transformations. It works with two factors R- Table which basically represents the template model of vertebra which is to be detected in the image and second one is Accumulator, which is Hough Space and stores the voted points localizing the area of C 3 − C 7 . GHT is based on the template matching theory and uses the information stored in R-Table for the detection process.

R-Table creation
For the construction of R-table, a reference point (r x , r y ) is selected. The coordinates of extracted edges helped in this regard. The reference point is selected by taking the mean of all the edges and next, gradient is calculated. Then for each point, gradient direction is computed and saved as a function of gradient. There are more than one entries of gradient direction where in both equations (r x , r y ) is the reference point All the voted points obtained by this process give the positioning of vertebra in X-rays. However, few outliers are also calculated by this process which are removed in next step.

Pruning
Pruning [26] is a technique used to remove unwanted data points known as outliers. These outliers may effect the success rate of the proposed model. The window scheme is applied and voted points are removed if they are less than the specified number. Then the voted points obtained after pruning are used for the centroid detection. For each candidate point, a window placed such that candidate point lies at center of window and all points lying inside window are computed. Now, if the count of points is less than a specific number then that candidate point is removed.

Centroid Detection of vertebra body
After the localization of vertebra from C 3 −C 7 , the next stage of proposed technique is to detect the centroids of each vertebra using the voted points obtained by all four template models. The centroid detection is performed using two different clustering techniques K-Means and Fuzzy C Means. Each clustering technique forms clusters using the voted points and then gives the centroid for each cluster representing each vertebra (C 3 − C 7 ).

K-Means clustering
K-Means [27] is a clustering algorithm works simply to segment out the data into clusters by calculating the euclidian distance between them. Initially, the cluster's center are selected randomly from obtained voted points, it randomly selected the 5 cluster centers representing 5 cervical vertebra (C 3 − C 7 ). Then for each voted point, euclidean distance is calculated between the voted point and all the cluster centers.
And the cluster at minimum distance is assigned to that voted point. This process is performed for all the voted points, completing the first iteration of k-means algorithm. For next iteration, cluster centers are selected by calculating the mean of all the points belonging to the same cluster. Then again distance computation is carried out and clusters are assigned and this process continues until two or more consecutive iterations give same results. The cluster centers obtained in last iteration represents the centroid of each vertebra.

Fuzzy C Means clustering
Fuzzy C-Means (FCM) is another clustering technique developed by Dunn [28] in 1973, then in 1981, Bezdek [29] enhanced the working of this algorithm. It works with the concept of fuzziness and assign clusters in such a way that one data point may belong to more than one cluster at a time. It assign membership to each data point for all the clusters. The range of membership varies from 0 to 1. This factor of fuzziness makes FCM less sensitive to outliers. Initially, FCM selected the 5 cluster centers randomly representing 5 cervical vertebra. Then for each voted point, total 5 memberships are computed, between this point and all the cluster centers. The membership varies from 0 to 1 and is computed using Eq. 4 which basically gives the information about the point that how much this point relates to which cluster. The cluster with greatest membership is the most closes to that voted point.
where 'i' varies from 1 to 't' representing the total clusters i-e 5, 'c x ' and 'b j ' represents the cluster and voted point for which membership is to be calculated, respectively. This process of assigning memberships creates a level of fuzziness and one voted point belongs to more than one cluster at a time. First iteration is completed, after calculating the membership for all the voted points and new cluster centroids are selected using Eq. 5 where 'c x ' and 't p ' represents the new cluster computed and total number voted points, respectively. Then in next iteration for these new computed cluster centroids, membership is calculated and this process continues until we get similar centroids in 2 or more consecutive iterations, representing the 5 cervical vertebra from C 3 to C 7 .

Separation of vertebra regions
The separation of each vertebra region is another stage and extension to original work, which allows us to extract the region for vertebra individually using the center points of vertebra. These extracted regions are very helpful in the segmentation process which further leads to the diagnosis of many spinal cord disorders. The steps involved in this stage are calculation of Intervertebral Points and Affine Transformation.

Intervertebral Points
To extract the regions covering the area for each vertebra,intervertebral points are required. The intervertebral points are the location between the two vertebra. In our case we required total 6 intervertebral points, from which 4 are easy to find out by just calculating the mean of centroids from C 3 − C 7 which we already have. Eq.6 represents the calculation of these 4 intervertebral points.
The other two intervertebral points, one before C 3 and second after C 7 couldn't be computed using this equation as it require centroids before and after these points. So, a simple technique using equations 7 and 8 is applied to obtained these two intervertebral points. The difference between C 3 and IV C 3 is subtracted from the coordinates of C 3 to get an estimated intervertebral point before C 3 i-e IV C 2 Similar technique using C 7 and IV C 6 is applied for IV C 7 but instead of subtracting the difference, it is added into the coordinates of C 7 to get points greater than it's location.
Now, for next step there are total 11 points, 6 intervertebral and 5 centroids in the same sequence as IV C 2 , C 3 , IV C 3 ,...,C 7 , IV C 7 .

Affine Transformation
A transformation following the rule of collinearity is known as Affine Transformation [30]. The term collinearity defines that points stay on a line at same distance and the parallel lines remains parallel, before and after the transformation. But in case of parallel lines, collinearity is not applicable on the angles between them. The term Affine Transformation is also called Affinity.
In proposed technique, affine transformation is used to form lines parallel to the vertebra. For each line, 3 points of vertebra are required, and location of two points is transformed in such a way that they stay on same line before and after the transformation, Affine Map helps in this regard. The calculation of Affine Map is shown in Eq. 9 where 'a', 'R' and 'c' are rotational point, rotational matrix and directional matrix, respectively. These three matrices are the general Affine transformation matrix.
The rotational matrix requires angle Θ to rotate the lines accurate enough and make them parallel to each vertebra. To obtain this angle, initially two angles are calculated: one between the first intervertebral point and centroid and second between the centroid and next intervertebral point, then taking average of these two angles and adding 90 into it, gives an exact angle for making lines parallel. Using this angle Θ + 90, Affine Map is constructed using Eq. 9 and multiplied with each point to rotate them along intervertebral points. As a result, total 6 lines are formed covering C 3 to C 7 . Then these lines are joined to make separate regions for each vertebra.

Results and Evaluation of proposed technique
The proposed technique has been implemented in MATLAB R2013a. The dataset NHANES II [31] used for the evaluation of our proposed technique is publicly accessible at U.S. National Library of Medicine, incorporating 17,000 scans (10,000 cervical spine and 7,000 lumbar) of patients age ranging 25-74, captured in 1976-1980. These X-rays images had been taken under varying scale, orientation and environment. For evaluation of our proposed technique we used 150 cervical spine scans of this dataset, selected on random basis. In literature, several methods has been tested using the same dataset but varying number of images. In these papers, no one ever mentioned the criteria following which they has selected the specific number of images. Neither they defined exactly which images has been selected. So it is clear that everyone is using different images of the same dataset. For fair testing, we selected subset with larger number of images than literature. For the comparison of results, a ground truth is maintained by visually examining each image. For each image, 5 center points A. Mehmood et al. / Advances in Science, Technology and Engineering Systems Journal Vol. 2, No. 3, 17582, No. 3, -17702, No. 3, (2017 representing each vertebra body are marked manually, targeting C 3 to C 7 . These annotated points are stored and used for the testing purposes. A comparison of FCM and K-Means is given in this section using Statistical and Visual results.

Statistical Results
The parameters used to obtain the statistical results include pixel distance, mean, standard deviation and accuracy. Figure 8 shows the pixel distance of 50 images for both K-means and FCM. For better visualization, the result of 50 images is shown in figure but is calculated for all 150 images. Each graph represents each vertebra with red dotted line representing the mean distance of K-means and black dotted line is for FCM, for all 150 images. The difference is calculated between the annotated points and detected centroids, representing how much detected centroid is away from the center point. The mean error lines show that at each vertebra level FCM works better than K-Means, the mean error for FCM is less than that of K-Means, but at level C 7 there is a minor difference between the two. The presence of high brightness and superimposition of other structures make the false detection at this cervical level. Figure 5 shows the calculated mean of the distance. The green bar shows the mean of k-means which is larger than FCM at every level, represented by blue bar. This parameter also marked FCM as a better Figure 5: Mean of calculated distance: K-Means vs FCM clustering technique for centroid detection of vertebra from X-rays. The eq. 10 is used for the calculation of mean.

Mean
Where 'd i ' represents the distance at each cervical and 'T' represents total images used.

Standard Deviation
The standard deviation is another statistical parameter of our presented methodology. Figure 6 shows the calculated standard deviation in both cases. Figure 6: Standard Deviation: K-Means vs FCM Each level shows less variation in case of FCM than K-means, making FCM better than the K-Means. The standard deviation is calculated using Eq. 11 where 'd i ', 'Mean error ' and 'T ' represents distance, calculated mean and total number of images, respectively.

Accuracy
The accuracy of presented technique is measured at two levels Visual and Experimental. In case of visual accuracy, labels are assigned to all 150 images at each cervical label. If the detected vertebra is correct label '1' is assigned and in case of wrong detection label '0' is assigned. The presented model consider the vertebra detection as correct if it is within the body of vertebra.So in visual examination, this point is followed for labeling process and each vertebra has been given label '1' if it is inside or on the boundary of vertebra body and '0' is it is outside the vertebra body. Using this criteria all the images has been assigned total 5 labels representing 5 vertebra and then using these labels overall accuracy of 94.7% and 79.4% are measured for FCM and K-Means, respectively.
A. Mehmood et al. / Advances in Science, Technology andEngineering Systems Journal Vol. 2, No. 3, 1758-1770 (2017) The accuracies at each cervical level are shown in figure 7 where green bars are representing greater accuracies for FCM than the K-means represented by blue bars.
Similar method of labeling is used for measuring the accuracies of separated regions. An overall accuracy of 83.1% is reported for separated regions with 90.5%, 93%, 88.5%, 73%, 70.5% at each cervical level from C 3 to C 7 , respectively. In case of Experimental accuracies, ROC curves are formed for both FCM and K-Means shown in figure 9. Each line represents the accuracy measure of each cervical level from C 3 to C 7 with varying threshold from 0 to 20. The threshold here represents the width of vertebra. We selected threshold 14  representing C 3 , C 4 , C 5 , C 6 C 7 for K-Means and FCM, respectively.In both cases, visual and experimental ac-curacies FCM secured more accuracy than k-means.
The accuracy when compared with other techniques in literature, it has been observed that only Larhman [14] secured greater accuracy of 97.5% than proposed technique i-e 93.6%. But it is not a fair comparison as both are using different subset of same dataset. They used 66 images of NHANES II dataset whereas presented methodology has been tested using 150 images of NHANES II dataset.

Visual Results
The visual analysis of each stage are shown in this section including steps of each stage. All the results shown are of 5 different cases of NHANES II dataset. Each column represents different case, whereas each row represents each step. shows the low contrast input x-rays which are enhanced by using CLAHE and shown in second row, it is clearly observed that the contrast of second row is improved and now these images can be used for better results. Next row shows the result of edge detection step, the edges are extracted for complete input image which are reduced to the ROI C 3 − C 7 and shown in 4th row.

Creation and selection of vertebra Models
The next stage of our model is creation of different vertebra models and figure 11 shows the results ob-tained by these models. Each row shows the detected centroids obtained using different models but same cases and it is clearly observed that M1 has given the most accurate results than other models.

Vertebra Localization (GHT)
The visual results obtained in vertebra localization stage are shown in figure 12, first row represents the hough space created by each case and voted points are represented in row 2, row 3 shows the voted points obtained after pruning where many outliers are removed, which can be observe in row 2.

Centroid Detection
The centroid detection is carried out using two clustering techniques and their results are shown in figure 13 where first two rows represent the clusters and next two rows represents the detected centroids for each vertebra using K-Means and FCM clustering, respectively. Last row represents a comparison between annotated centroids (blue points), FCM centroids (red points) and K-Means (magenta point). It is clearly observed that FCM works way much better than the K-Means. In same cases FCM marked the correct centroids where as K-Means failed to do so.

Separation of vertebra regions
The steps involved in the separation of vertebra regions are shown in figure 14 where first row shows the blue centroids and 4 intervertebral points marked by red star. In next row, two additional intervertebral points are shown by yellow stars. The rotated lines by Affine transformation can be observed in 3rd row. Then after joining lines the separated regions are shown in 4th column.

Conclusion
This paper presents a comparison between 4 different vertebra template models for localization and 2 clustering techniques for centroid detection of cervical vertebra from x-ray images. The proposed model gives the separated regions for 5 targeted vertebra C 3 − C 7 . The comparison of clustering techniques, vertebra template models and region separation technique is the contribution to this paper. For the localization of vertebra, GHT is applied along with each template model and results are analyzed. For GHT, M1 proves to be the best vertebra template. The voted points obtained after pruning are used for centroid detection. For the detection procedure two different clustering techniques are used FCM and K-Means. The results obtained by these two clustering techniques are analyzed at statistical and visual level and FCM proves to be much better than K-Means clustering for the detection of c-spine from x-rays. The results at level C 7 are less than the other levels in both clustering techniques, reason behind this is the presence of high brightness and other structures which are superimposed. The testing and comparison of proposed technique has been performed using 150 scans of NHANES II dataset accessible publically at U.S National Library of Medicine. The obtained accuracies of centroid detection are 84.21 and 93.76 for K-means and FCM, respectively. From all the experiments it is concluded that the FCM is more accurate than the K-means for the localization and detection of cervical verterba from X-rays. It is due to the fact that the fuzziness of FCM makes it less sensitive to outliers  than K-means. Moreover, the proposed method secured satisfactory success rate of 83.1% for the separated regions which can be increased by increasing the width of the parallel lines. In future, our work is focused on segmentation using the separated regions and detected centroids.