# Real-Time Automated Segmentation and Classification of Calcaneal Fractures in CT Images
## 2 Materials and Methods
### Step 1: Detection of Calcaneus Location  
In the first step, the extended local binary pattern (LBP) [23] and cascade classifier [24] are used to determine the anatomical plane orientation in the input image based on the shape of the tarsal bone. The basic idea behind LBP is that the image is composed of a micro-pattern. LBP is the first-order circular derivative pattern generated by concatenating the direction of the binary gradient. CT scans are generally available as DICOM files, where each image contains a 2D array with pixel intensity. The CT DICOM image is a grayscale image in which the bone area is represented by white pixels  
Figure 1: The Sanders system of fracture classification on the calcaneus [1,2,20]: (**a**) Normal calcaneus in transverse and coronal images; (**b**) Type II; (**c**) Type III; and (**d**) Type IV. Figure 3: System overview of the proposed method. Figure 2: Classification of calcaneus fractures in sagittal images [1,8,10]: (**a**) Normal calcaneus; (**b**) Type A; (**c**) Type B; and (**d**) Type C.  
surrounded by gray pixels. Therefore, LBP is suitable for defining the information in CT DICOM images, based on texture descriptors. The LBP operator is the sum of the gray-level intensities label computed at each pixel location. The LBP code labels can be expressed as:  
\[LBP(S,R)\ =\ \sum_{S\ =\ 0}^{S-1}b(g)2^{S} \tag{1}\]  
where \(g\ =\ g_{s}-g_{c}\), \(S\) is the number of pixels in a small circular neighborhood with radius \(R\) (R can be the value within 1-3, in this study we set \(R\) = 1), \(g_{s}\) is the grey-level intensities label of \(S\), \(g_{c}\) is the grey-level intensity of the center pixel, and the function \(b(g)\) is defined as:  
\[b(g)\ =\ \left\{ \begin{array}{c}1,\ \text{if}\ g\geq 0\\ 0,\ \text{otherwise}\end{array} \right.. \tag{2}\]  
The LBP code label histogram contains information about edge distribution and other local features in the image, so it can be used to describe the image texture in the CT DICOM image. The LBP feature is extracted from the input image at the pixel location (_i,j_). Then, the image is divided into several small non-overlapping blocks to get the feature histogram. The region blocks A\({}_{\text{k}}\) are the same size, where \(k\ =\ 0,\ldots,K\) and \(K\) is the number of blocks in the image. The LBP histogram of the labeled image is defined as:  
\[H(L)\ =\ \sum_{(i,j)\in A_{k}}h_{(i,j)}(l) \tag{3}\]  
where \(h_{(i,j)}(l)\) is the value of the bin 1 which consists of a look-up table of 29-1 = 511 bins, l is the LBP feature computed at location (_i,j_) and L is the number of different labels produced by the LBP operator. Figure 4 shows the process that is used to provide three types of information: Code labels for local textures, histograms in local regions, and feature histograms whereby the tarsal bone structure in each anatomical plane orientation is described. The feature histogram is the concatenation of each region histogram into a single LBP histogram. In this step, the AdaBoost algorithm [25; 26] is used to select the features of the classifier in the training stage. The classifier is selected to evaluate a single LBP histogram which maximizes the margin between positive and negative samples. The classifier determines the best threshold classification function for each histogram so that the number of misclassified instances can be minimized. The negative image input of each anatomical plane is the orientation of the other plane. In the training stages, the features in positive and negative images will be learned as positive, and negative labels, respectively. Figure 5 shows the example images for training, which are the tarsal bone shape in each anatomical plane of various sizes of input images. In this study, the images used have minimum and maximum sizes of \(126\times 147\), and \(980\times 1024\), respectively. Figure 4: Input image region.