# Classification of Shoulder X-ray Images with Deep Learning Ensemble Models
## 4 Experiments
### Data Pre-Processing for Shoulder Bone X-ray Images  
There is both noise and a dark background in the images observed in this study, which may adversely affect the classification and/or fracture detection processes. Various pre-processing steps were applied to the dataset to eliminate the abovementioned adverse effects as much as possible and to obtain more accurate results in the classification process. These pre-processing steps are listed below:  
* Detection of the Corresponding Area: Most of the X-ray images in the used dataset were insufficient in terms of semantic information in relation to the image size. In order to eliminate such insufficiency, the images were first converted to gray-scale and then subjected to double thresholding and to an adaptive threshold value determined using [PERSON]'s thresholding value method. In the gray-scale images, the within-class variance value corresponding to all possible threshold values for the two color classes assumed as background and foreground was calculated. The threshold value that made this variance the smallest was the optimal threshold value. This method is known as [PERSON]'s thresholding value method [35]. Subsequently, the edge in the thresholded image was determined using edge detection methods. After this process, the original image was cropped based on the calculated values.
* CLAHE Transformation: In the next step, the contrast-limited adaptive histogram equalization (CLAHE) transformation in the OpenCV library was used. In the transformation used, the input image was divided into parts by the user, with each part containing a histogram within itself. The histogram of each part was then adjusted based on the histogram cropping limit entered by the user, and all parts were finally brought together to obtain a Clahe-transformed version of the input image [36,37]. New outputs were achieved by contrast equalization of the cropped images by the CLAHE method.
* Normalization and Standardization: In the last step, the images were normalized and standardized using the image-net values.  
\begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Shoulder Bone** & **Image** & **Train** & **Test** & **Org.** & **New Image** \\
**X-ray Images** & **Types** & **Dataset** & **Dataset** & **Image Size** & **Size** \\ \hline
**Class 0:** & & png, & & & \\
**Normal (Negative)** & png, & & & & \\
**Bone X-ray Images** & & & & & \\
**Class 1:** & & & & & \\
**Abnormal (Positive)** & png, & & & & \\
**Bone X-ray Images** & & & & & \\
**Total** & png, & & & & \\  & & & & & \\  & & & & & \\ \end{tabular}
\end{table}
Table 2: Details of the shoulder bone X-ray images used in the study [2].  
For each class (normal/abnormal (fracture)), an original shoulder bone X-ray image and an image subjected to the abovementioned pre-processing steps are provided as examples in Figure 20.  
In the figure above, section a shows an original version of a normal (negative) shoulder bone X-ray image; section b shows a cropped and CLAHE pre-processed version of this normal image; section c shows an original version of an abnormal (positive, fractured) shoulder bone X-ray image; section d shows a cropped and CLAHE pre-processed version of this abnormal image.