The process of medical image classification is still carried out manually using the knowledge of the physician or radiologist, which leads to inaccurate and slow process of object identification. Thus, we need an automatic system that can classify medical images, accurately and faster from query images into one of the pre-defined classes. In this research, we are dealing with the classification of medical image to the image classes that are defined in the database. We focus on managing the shape of X-ray image to perform the classification process and use the Euclidean distance and Jeffrey Divergence techniques to obtain image similarity. We use Freeman Code to represent the shape of X-ray images. This paper shows the development of the Freeman Code representation by simplifying the shape of X-ray image conducts to obtain the best recognition rate.