Local information pattern descriptor for corneal diseases diagnosis

Light penetrates the human eye through the cornea, which is the outer part of the eye, and then the cornea directs it to the pupil to determine the amount of light that reaches the lens of the eye. Accordingly, the human cornea must not be exposed to any damage or disease that may lead to human vision disturbances. Such damages can be revealed by topographic images used by ophthalmologists. Consequently, an important priority is the early and accurate diagnosis of diseases that may aﬀect corneal integrity through the use of machine learning algorithms, particularly, use of local feature extractions for the image. Accordingly, we suggest a new algorithm called local information pattern (LIP) descriptor to overcome the lack of local binary patterns that loss of information from the image and solve the problem of image rotation. The LIP based on utilizing the sub-image center intensity for estimating neighbors' weights that can use to calculate what so-called contrast based centre (CBC). On the other hand, calculating local pattern (LP) for each block image, to distinguish between two sub-images having the same CBC. LP is the sum of transitions of neighbors' weights, from sub-image center value to one and vice versa. Finally, creating histograms for both CBC and LP, then blending them to represent a robust local feature vector. Which can use for diagnosing, detecting.


INTRODUCTION
The human cornea is a window in the front of the eye, susceptible to infections, allergies, and trauma; besides, affected by genetic conditions. Corneal topography, a sophisticated tool obtains by a Pentacam [1], is used by Ophthalmologists to evaluate corneal conditions. The Pentacam provides information about the front and back elevations, sagittal, and the thinness of the cornea, that utilize by specialists to make an optimum diagnosis decision [2]. Corneal parameters provide a huge amount of information that must revision by ophthalmologists, which adds difficulty and obstacles regarding finding clinical decisions [3]. The arising problem is disease diagnosis depends extremely on the experience of specialists, who may not be able to remember whole parameters [4]. Accordingly, in this work for accurate, reliable, and swift diagnosis, we propose to engaging machine learning techniques that could extract significant features from the medical images, which is considered as one of the most application of machine learning in computer vision [5], hence, passes to a classifier to examine the corneal conditions. Humans receive an enormous amount of data into their brain by seeing and interacting with their surroundings. Therefore, providing machines with the ability to comprehend their surroundings makes it able to help people in various ways and facilitate many of the works and tasks that they perform. For example, assistance in the security aspects [6], facilitates a lot of factory works, disease diagnosis, and searching in the contents of pictures or videos [7], which is known as computer vision [8].
Many types of images contain attributes called texture, which can be defined as areas in the image that contain a spatial distribution of various intensities and colors. For instance, the X-ray of the human brain is a "texture" image [9], [10], as it contains different spatial distributions of healthy and damaged tissues. This makes these characteristics of texture play a vital role in the diagnosis process. The same applies to many computer vision applications such as medical image analysis [11]- [13], satellite image analysis [14], factory image analysis [15], and computer graphics [16], [17]. In the sixties of the last century, many proposals were put forward on the issue of discrimination texture [18]. However, most of them failed in real-world applications to provide a good performance that meets the real-time requirements due to the complex calculation [19]. Recently, an effective local descriptive has been developed, where the description vectors are easy to calculate called local binary pattern (LBP) [20], [21]. It was used in many modern applications like face recognizing [22], expression faces analysis [23], [24], retrieve components from images or videos [25]. LBP is a simple and easy method to extract local features from images by giving values to the pixels in sub-image, which represent logic outputs of it's comparison with the center of the sub-image. This code however, is converted from binary to decimal. The most important properties of LBP are easy to apply in the true-world, it is not affected by the different lighting, ease of calculation, and speed [26].
The basic idea of LBP did not change in all previous researches in this field [27] that the approach remains just thresholding the center of the sub-image. The center intensity was excluded that it is not used in estimating the LBP. In this case, the neighbors compensated by certain weights according to their locations in the sub-image, whereas excluded the center values that expressing the real intensity of the sub-image center, hence, their exclusion is considered a loss in the amount of information, which could be regarded as an essential factor of classification, discrimination, and diagnosis. Besides, the values of contrast were also excluded, when the uniformity measures, were suggested to overcome the image rotation problem [19]. Therefore, the focus of LBP calculations was only on pattern. The problem is that patterns can be repeated in different locations of the image, or maybe the same pattern is present in an image of the different categories. In reality, these similar patterns have been calculated in completely different intensities. Consequently, losing such information determines the utilization of LBP description in some applications that use datasets contain images with little textures.
Accordingly, we suggested a new algorithm called local information pattern (LIP), to overcome the loss of information from the image as well as to solve the problem of image rotation. LIP is based on utilizing the sub-image center intensity for estimating neighbors' weights that can be used to calculate what so-called contrast based centre (CBC) value. proposed calculating the local pattern (LP) for each block, to distinguish among sub-images having the same CBC value. LP represents the sum of neighbors' intensity transitions, from one into the sub-image center's value, and vice versa. Finally, the histograms for both CBC and LP values are calculated to preserve the information about the distribution of the patterns and CBC, then combining both histograms to be represented the feature vector that is used to diagnose corneal diseases, Figure 1 illustrate the whole structure of the LIP algorithm. The novelties of this paper are: Establish a system, using machine learning techniques, capable to swift and accurate clinical diagnosis of corneal diseases. Compose a creative system that eligible to be employed in eye centers and clinics to help to monitor the diseases and evaluate possible new treatments. Create reliable algorithm (LIP) for classification, diagnosis, and object recognition. The LIP could be used with applications that required real-time processing, moreover, extract images' features without affected by the problem of image rotations.

RESEARCH METHOD 2.1. Design of proposed algorithm
In this work, we suggest a new algorithm to gain the local information to defeat the loss of information from the image as well as solve the problem of image rotation. The proposal is based on utilizing the sub-image center intensity to estimate neighbors' weights that can be used to calculate the CBC value, which is the sum of neighbor's weights over the number of samples, as calculated in (1). The CBC illustrated in Figure 2. Where, is number of samples, is the center of sub-image, and is the thresholding value of each neighbor with the value of the . CBC= 1 8 * [9 0 + 9 1 + 9 1 + 9 1 + 9 0 + 9 0 + 9 0 + 9 1 ] = 5 On the other hand, weights are estimated using the center value as a base for the exponent . The represents the value of thresholding a pixel with the value of the . As for the , however, it is the sum of neighbor's weights. Thus, the CBC value per se is a constant value, and would not be affected by image rotation, therefore it is a solution to the image rotation problem. Further, to distinguish between to sub-image with a size of 3×3 having the same value, we suggest calculating the for each block, which is the sum of transitions of the neighbors' weights from one into the value of C, and vice versa.
To simplify the calculation and more understanding, lets select a 3x3 sub-image. Since LBP thresholding 3x3 neighbors of each pixel with the value of center, which is incapable to describing more detailed information, the LIP uses the information of the center of each sub-image, see Figure 2. In contrast to LBP that does not care about the intensity of the sub-image's center, the LIP uses the center intensity to estimate the LIP code value to gain more details from the image information and pattern. A selected 3x3 sub-image, as in Figure 3, Lets I(A 0 ) is the center of sub-image, where the thresholding is representing f(. , . ) which calculated by (2). Consequently, the local information CBC code for a sub-image can be represented as shown in (3).
Where f(. , . ) is binary code function. Finally, the CBC, is defined as summation of neighbors' binary code function (as exponent) for with respect to center's value (as basis). So, the (3) can be as form as shown in (4).
The lowest value of is 8, when the all neighbors' intensities are lowest than , whereas the highest is 8 when the all neighbor's intensities higher than . Therefor this method gives realistic information of the sub-image. Moreover, rotating the image with specific angle ∝(45, 90, 135, 180, 255, 270, and 315), not effect the value of the code. The reason for this is the constant relationship between the center and its neighbors, see Figure 4. Let the in angle ∝= 0 is 0° therefore rotating a sub-image with angle ∝= 45 the 45° still same, in (5) and (6) illustrate the invariant in case anticlockwise image rotate.
Therefore, the general equation of each individual pixel could form as shown in (7) and (8).
Where, = � 44 The is still a constant value in variance angle rotation. So, the general formula in different angle is as shown in (9).
Generally, after rotation with angle calculated as by (10).
The flaw for use this method is that the sub-images may be have the same despite they have different neighbors (pattern) as clarified in Figure 5. To distinguish among sub-images with block size of 3×3, we suggest calculating LP for each block, which is the number of changes in neighbors' intensities in the subimage from values higher than C to less than C and vice versa. The LP of a sub-image could calculate in (11).
Where, P is the number of samples. It also could be represented the sum of transitions the neighbors' values from the of to one and vice versa as shown in Figure 6.
Where, is the histogram of local features extracted from region . is the histogram of local patterns calculated from region , as shown in Figure 7.

Practical experiments
The image of the human cornea dataset was used as an input to the system. The image of the cornea consists of four maps [31] as shown in Figure 7. Corneal maps are sagittal map, corneal thickness, elevation front, and elevation back. Thus, a group of clinical diseases can be diagnosis by testing each map individually using machine learning technique such as SVM, Naïve Bayes (NB), decision tree (DT), and K-nearest neighbors (KNN) algorithms.

Dataset
Corneal topography is provided by a device, scan the human eye with various angles, called Pentacam. Each eye is scan separately and produced four maps (images), which used by the Ophthalmologists to exam the cornea conditions. Pentacam is based Scheimpflug where provides an information and report about the front and back corneal surfaces. The dataset collected and labeled with help of ophthalmologists. Our dataset includes 4348 images of different maps, each image with size 351x336x3. Example of the four maps shown in Figure 8.

Results
A set of investigations were conducted on the dataset in order to diagnose different cornea diseases. The proposed algorithm is trained and tested on the corneal dataset using cross-validation technique to estimate the performance, hence, the experimental results are compared with the results applying the standard algorithm. In real-life, patients' data might be available in different quantities. Accordingly, a system that simulates reality could be built via evaluating the system performance when training/testing with different numbers of the dataset. Consequently, experiments showed in five scenarios; 20%with 80%, 30% with 70%, 50% with 50%, 70% with 30%, and 80% with 20 of the data for training and test respectively as shown in Tables 1-4.  For more reliability of the efficiency of the proposed algorithm, it has evaluated using three other classifiers, NB, DT, and the KNN classifiers, as it applied using the four maps of corneal topography. The accuracies of the diagnosis are calculated as shown in Table 5. Furthermore, LIP algorithm tested on four public datasets, namely skin cancer MNIST: HAM10000 [32], chest X-ray images (Pneumonia) [33], MIAS MiniMammographic databases [34] and LISC dataset [35] which included samples that taken from peripheral blood. It should be noted that the Skin Cancer MNIST dataset contains several categories. Therefore, it is classified on the basis of category. For example, benign keratosis (bkl), dermatofibroma (df), melanocytic nevi (nv), and vasal cell carcinoma (bcc). For comparison and testing, each of the two categories selected separately. The chest X-ray and MIAS MiniMammographic datasets labeled as normal and abnormal. The performance of the proposed and the standard LBP algorithms are compared by calculating the diagnosis accuracies using three different classifiers, which are NB, DT, and SVM classifiers. The results are shown in Table 6.

Discussion
The results have been obtained by applying the standard LBP and the suggested LIP algorithms in various strategies (data training and testing percentages). Using a group of metrics to assess the system's performance extremely helped to understand the algorithm's behaviors and the proposed as well. Results reflect that applying the proposed algorithm provides high diagnostic accuracy as compared to applying standard LBP in all the experiments and strategies. In Table 1, the sagittal images were used to diagnose the existent of corneal Astigmatism disease. We observed when low rate training data, the results of the specificity using LIP are slightly less than the standard LBP, whereas increasing training data, led to increasing specificity rates permanently. It indicates to response of the proposed algorithm for improving the performance when increasing the training data more than its counterpart. Additionally, once applying LIP, we note ameliorating the precision results when increasing the number of training rates while losing the improvement in the standard algorithm. Finally, as is clearly visible, we find in any conditions the LIP outperforms the LBP in terms of accuracy and precision. Table 2 refer to the efficiency of the algorithms to diagnose corneal thinness and Pupil deviation from the cornea center. The results report that applying standard LBP on the Corneal Thickness maps is unsatisfying as compared with LIP. Apply LBP shows the classifier biased to classify both categories to one class, which can be called comprehensive bias. It is evident either from the precision ratio is 100% and the specificity is zero, or when both recall and precision are 0%, as well as the value of accuracy and specificity are similar.
The elevation front map is used for diagnosing the anterior corneal surface such as isolated land, and like tang shape diseases. Table 3 tales that diagnosis accuracies and specificities using the LBP algorithm are less than using the proposed LIP. On the other hand, we observed the results of recall and precision are impacted using high training data rate while applying LIP, which led to outperforming the standard LBP. Table 4 presents the potential of LIP for diagnosing the posterior corneal surface condition such as normal, isolated land, and like tang shape. We note that some metrics values slightly low when using the proposed algorithm due to the scarcity of abnormal corneal elevation-back images. Strongly notable from Table 5, implement the LIP to all types of maps provides higher diagnostic rates than the LBP even when using different classifiers. Table 6 points out the LIP outperforms the standard algorithm even in cases examined with different datasets, except in rare cases, the reason might be attributed to the nature of the data that trained and the LIP behavior, it tends to improve skillfully when available suitable numbers of training data are. Despite the minor errors, LIP stills a promising algorithm that has an explicit positive impact on improving the efficiency of the system performance. Generally, the reports of the above-mentioned tables reflect the LIP aptitude to diagnose the corneal condition. This may be attributed to the failure of LBP to extracting suitable characteristics which might help the system to achieve satisfactory performance.

CONCLUSION
In general, corneal diseases directly and seriously affect the susceptibility of the human eye vision. Therefore, it has become necessary to build an automatic system that helps diagnose these diseases. The most important stage of building such systems is to extract features from the medical images, particularly the local features of the images. Losing some features for the image leads to weakness in the CAD system performance. Accordingly, to prevent such loss LIP is proposed, it utilizing the image center to extract local features. Besides involving the pattern of image for calculating feature vector, hence, increases the diagnosis accuracy. LIP is fast, reliable, easy to calculate, and less time-consuming. It is suitable for applications that need real-time processing, besides with the systems where real features description is required accurately and in detail. Finally, we recommend using such a system in hospitals and eye health centers to help ophthalmologists in the thorough, reliable, and fast clinical diagnosis of corneal disease.