Meibomian gland cyst detection and classification using hyperspectral imaging

Abstract The primary role of the oily secretion (meibum) is to ensure tear film stability and retard evaporation. In addition to these is providing ocular surface lubrication, which is necessary for smooth eyelid movements. When a gland is blocked, it is described as a Meibomian gland cyst (MGC), which can be a meibomian cyst, usually referred to as chalazion (eye bump), or in the case of inflammation, it is considered to be a hordeolum (sty or stye). Topical ophthalmic ointments and eyelid heat massages can treat early diagnosed MGC; otherwise, surgical operation is required. The current techniques of diagnosing MGC are usually uncomfortable or invasive, such as examining the tarsal plate after everting the eyelid or by biopsy procedures. The purpose of this work is to propose a non-invasive MGC evaluation and classification technique using hyperspectral imaging and image processing. The proposed technique was carried out on a single patient (i.e., case study) for a period of 4 months to monitor the MGC evolution until postsurgery-recovery and was compared with a normal eyelid patient. The collected hypercube data were processed using Multivariate Curve Resolution (MCR) and image analysis to classify the MGC severity levels. The proposed work built the threshold of the complete system, where early diagnosis of an MGC is possible before it becomes visible to the eye, hence reducing the treatment duration and avoiding any further complications that require clinical lancing. Also, the system can be used as a postoperative check postsurgery to make sure the eyelid went back to normal.


PUBLIC INTEREST STATEMENT
Meibomian gland cyst (MGC), usually referred to as eye bump, is a common disease that blocks the eyelid gland. Topical ophthalmic ointments and eyelid heat massages can treat early diagnosed MGC; otherwise, surgical operation is required. The current techniques of diagnosing MGC are usually uncomfortable or invasive, such as examining the tarsal plate after everting the eyelid or by biopsy procedures. The purpose of this work is to propose a non-invasive MGC evaluation and classification technique using hyperspectral imaging and image processing. The proposed work built the threshold of the complete system, where early diagnosis of an MGC is possible before it becomes visible to the eye; hence reducing the treatment duration and avoiding any further complications that requires clinical lancing. Also, the system can be used as a postoperative check postsurgery to make sure the eyelid went back to normal.

Introduction
The Meibomian gland are holocrine glands responsible for oily secretion, also known as meibum. There are about 50 meibomian glands located in the upper eyelid and about 25 in the lower eyelid (Encyclopaedia Britannica, Inc., 2010).
Meibum forms the tearfilm lipid component and protects the tear film from evaporation, lubricates the ocular surface and ensures smooth eyelid movements (Millar & Schuett, 2015). Bacterial infection of the meibomian glands results in a red inflamed bump in the eyelid, also known as a hordeolum or sty (Chalazion, 2015). They usually appear suddenly and are painful (Carlisle & Digiovanni, 2015). On the other hand, if the meibomian glands are blocked, the oily secretion (meibum) accumulates and manifests as a cyst that is commonly known as a chalazion (Chalazion, 2015). Unlike the hordeolum, a chalazion is usually located in the middle of the eyelid and is not painful, the process of developing a chalazion can be gradual over a few weeks (Carlisle & Digiovanni, 2015).
Chalazia are common, and the treatment procedure may vary depending on the severity and the size of the manifested chalazion. In some cases, the patient may develop both chalazion and hordeolum together (Carlisle & Digiovanni, 2015). An early diagnosed chalazion can be treated using warm compresses and antibiotic ointment or an injection of corticosteroids. However, if it is diagnosed late, clinical lancing is recommended. Reoccurring chalazion in the same area may be a symptom of sebaceous cell carcinoma which is a type of skin cancer (Arita et al., 2014;Carlisle & Digiovanni, 2015). Table 1 summarizes the differences between chalazion and hordeolum.
Meibomian cysts contain accumulated meibum which is mainly composed of wax esters, cholesterol, and cholesterol esters, which are pus and blocked fatty secretions (Foulks & Bron, 2003;Osae et al., 2020). The blocked secretions of the chalazion are accumulated in a small area and are white in color. However, unless the patient has an invasive check or everts their eyelids, it is relatively difficult to identify the MGC.
The current methodology of identifying a Meibomian gland cyst (MGC) is performed by an eye care practitioner by examining the eyelids. Patients usually visit the eye care practitioner once the MGC is visible by the human eye or inflamed (Carlisle & Digiovanni, 2015). Diagnosing MGC is usually invasive and requires everting the eyelid to spot the meibomian cyst. It is difficult to identify the meibomian cyst directly without this process since the size of the cyst can be around 3 mm.
There is still no advanced technology that can help in early diagnosis of the MGC, and it is only possible to spot the MGC through the orbit-computerized tomography (CT) scan once it becomes visible by the human eye. Figure 1 shows a comparison between two orbit CT scans of a normal individual (Ibrahim, 2020) and a patient suffering from MGC. It can be seen that the patient was suffering from two MGC-type chalazia in each eye, and the right eye was more severe, hence the bigger eye bump. These orbital CT scans were collected from volunteers, one of whom is the subject of the work.
(a) normal individual orbit CT scan should show no eye bumps on either side (Ibrahim, 2020); (b) the patient was diagnosed with two MGC-type chalazia, and it can be seen that the chalazion on the right is bigger in size than the left chalazion.
Normal red, green, and blue (RGB) cameras or thermal cameras cannot spot the MGC directly without everting the eyelid, since the visible spectral range of the RGB does not reveal much information when the MGC is still small. However, for the past decade, hyperspectral imaging (HSI) cameras have shown promising results in the medical field, since the spectral range covered by the HSI includes both the RGB and infrared light ranges that helped in detecting different diseases (Lu & Fei, 2014). Unlike X-rays or Gamma rays (1 nm -1 pm), HSI spectral range (430 À 1000 nm) is safe to be used on human eyes without the need for a dosimeter next to the eye lens (Kartubi et al., Ladino Gomez et al., 2020).
The work related to diagnosing MGC is still invasive: authors either use a biopsy scan or capture images of the inverted eyelid (tarsal plate), which can be dangerous if done by a regular individual. For example, researchers have collected samples to evaluate the tear break-up time through hyperspectral stimulated Raman scattering microscopy (Paugh et al., 2019). The approach was conducted by acquiring a biopsy from the donors to study the difference between normal meibum and MGC composition only without automating the process of detection.
Other researchers evaluated the differences related to MGC using nuclear magnetic resonance (NMR) (Borchman et al., 2012). This work studied the biopsy response to NMR that resulted in quantifying lipid wax, cholesterol ester terpenoid, and glyceride competitions.
Although no work has been done on detecting MGC directly from the patient's eyelid via HSI, researchers explored this topic using oculus corneal topography (Koprowski et al., 2017), that is, image processing to locate the MGC by mapping the abnormal surface of the tarsal plate after inversion.
Other authors mapped the MGC tarsal plate using infrared meibography (Srinivasan et al., 2012); again, this approach required everting the eyelid to evaluate the case. The authors (Arita et al., 2013) relied on processing raw Charge-Coupled-Device images with an IR light source to monitor the case's treatment process.
This paper introduces a non-invasive mechanism for the early detection of chalazion. The work includes capturing HSI data from the eyelid and applying image processing to identify the presence of chalazion and level of severity. Table 2 compares and summarizes the review with our proposed work.

Figure 1. Orbital computerized tomography (CT) scan for a meibomian gland cyst (MGC) normal individual vs. patient.
Authors applied similar image processing approach in identifying and categorizing marble slabs impurities and streaks with 97.8% accuracy (Kardan Moghaddam et al., 2018). While other researchers applied Kalman filter to count vehicles captured by the camera (Espejel-García et al., 2017), applying Kalman filter to the captured data from the HSI is very slow, since the captured data are in a hypercube format not normal 2D.
Hyperspectral imaging cameras can capture a large range of the spectrum, unlike regular cameras, which are designed to capture only the RGB spectrum (Lu & Fei, 2014). An HSI camera reveals the reflected light absorbance with an external light source only, which makes it possible to identify MGC appearance since the eyelid layer is very thin and can be penetrated by the light source.
The main objective of this study is to build a system that can identify the presence of an MGC before it becomes visible to the eye, hence reducing the treatment duration and avoiding any further complications that requires clinical lancing.
Our previous work in this matter showed a deflection in the spectral signature between an infected eyelid with MGC and a healthy eyelid (Shehieb et al., 2019). In this work, a case study of developing MGC-type chalazion was monitored and evaluated from the beginning until postsurgery to form the system reference in early diagnosis of a chalazion.

Materials and methods
All procedures performed in this study were done on one of the authors Mr Wessam Shehieb in accordance with the ethical standards of Ajman University's ethics committee.
This work focused on automating the detection approach using image processing to identify the severity level. This work consists of two main parts: data acquisition setup and processing unit as seen in the conceptual diagram of Figure 2.

Data acquisition setup
The data acquisition workspace was conducted using an HSI camera (FX10, SPECIM, Finland) (Specim FX10; Specim.fi, 2020). This camera has a spectrum range of 400-1000 nm that covers  Figure 3 shows the actual workspace setup.
Prior to each data acquisition, test hygienic standards were maintained and evaluated for the setup and the patient's eyelid. The total test time for each patient was around 10 seconds.

Data analysis
For 4 months, a case study was conducted on a newly manifesting MGC-type chalazion (Shehieb et al., 2019). Data collection of the chalazion was performed during this period to monitor the light absorbance deflection until it became severe. The analysis also included postrecovery data from the same patient after the surgical operation.
The collected light absorbance peak was compared with a normal individual upper eyelid with no history of MGCs. Since the upper eyelids have twice as many meibomian glands as the lower eyelids (Encyclopaedia Britannica, 2010), the selected area of interest for this work was the upper eyelid only as shown in Figure 4.
It was noticed that the chalazion showed a deflected peak in the spectral signature at the range of 600-650 nm. However, the peak value kept decreasing from the normal threshold gradually until it stabilized once it became severe.
As seen in Figure 5, the analysis clearly shows a decrement of the absorbance rate. This is a result of the meibomian cyst accumulating in one location, making it stiffer and reddish. Once the  meibomian cyst area becomes red, it indicates a developing infection, which is referred to as a hordeolum. A patient may have both MGC types, chalazion and hordeolum, at the same time, as mentioned earlier (Chalazion, 2015).
For samples 4 and 5, as shown in Figure 5, the peak light absorbance remained relatively the same. At this stage, the patient started to feel pain after forming the hordeolum. Postsurgery peak light absorbance crossed the normal threshold, which proved the possibility of evaluating the case non-invasively without a biopsy test or everting the eyelid.

Preprocessing
The collected data from the HSI camera are referred to as a hypercube, which is a collection of multiple images at each spectrum from the HSI range. Each pixel of a single image stores its corresponding light absorbance value; if all the stored values of a single pixel were plotted, it would reveal the spectrum range where the most deflection is shown. The HSI lens does not allow zooming; however, any correction/scaling factor applied after cropping the images.
Although the acquired range of the spectrum is high, not all the wavelengths show any important information as seen in Figure 6. The extra wavelengths will not affect the results, but it will cause unnecessary delays for the processing time.  The hypercube spectral range narrowed down to the interval of 430-750 nm due to the fact that the chalazion and hordeolum's light absorbance varies between yellow and red ranges even underneath the eyelid skin layer.
The raw hypercube data are scattered and noisy, making it difficult to interpret and analyze. Thus, two filtering methods are applied: Standard Normal Variate (SNV) (Hyperspectral Imaging for Food Quality Analysis and Control, 2010) and Savitzky-Golay (Sav-Gol) Smoothing Filter (Press, 2002). Including SNV in the input data allowed centering and scaling every spectrum in the hypercube as well as correcting the scatter around the signal. The Sav-Gol Smoothing filter, as represented by equation (1), increased the precision of the data by avoiding distortions and removing noise, using 2nd order polynomial coefficient C and selecting the average data points of the moving window to 15 from f i À n L to f i þ n R , where n L is the number of points to the left of the data and n R is the number used to the right. The filter replaces each value of f i with a linear combination g i of the current value and some nearby neighbor value (Press, 2002).

Image analysis
Data analysis of the MGC was conducted manually by locating the peak value of the light absorbance of each sample and mapping the points together. However, to identify the severity of the case, the diameter of the MGC should be identified.
One technique is called Multivariate Curve Resolution (MCR) (Mobaraki, 2018;Zhang & Tauler, 2013). MCR is a statistical algorithm that can be applied to the hypercube data, and its advantage is that it color-groups each similar concentration value in the hypercube and displays them in one 2D image (distribution map). Hence, each pixel where the MGC is accumulated will have similar light absorbance spectral signature and correspondingly will have a similar color representation.
The algorithm model can be written in this matrix form: (2) where D is a 2D image showing the distribution map of the hypercube, C is the concentration, S T is the pure spectra, and E is the experimental error or noise (Hyperspectral Imaging for Food Quality Analysis and Control, 2010).

Figure 6. Spectral interval crop to 430-750 nm.
The resultant 2D image shows three main color scales which are interpreted as follows: Blue/ Dark blue indicates normal eyelid area with no MGC or eye inflammation, Red/Dark red area is the detected MGC spot, and Orange/Yellow is the inflammation region associated with the MGC, especially with hordeolum. Table 3 shows the relation for each color.
After this observation, the quantity of each pixel's color in the 2D image was evaluated in percentage with respect to the total area of interest as seen in Figure 4. The evaluation was implemented on each collected sample, which concluded in classifying the severity level of an MGC.
The MGC severity was classified into four levels, as shown in Figure 7. Collected results were from Level 2 to 4, while Level 1 was interpolated from the collected data since it is considered as an early stage of the MGC. The results showed a high increment in the Red color, which indicates the accumulation of the chalazion position, and a relatively minor deflection in both orange and yellow colors was maintained, which is interpreted as the hordeolum's inflammation.
The number of pixels in the area of interest as seen in Figure 4 was counted out of 100%; however, for the severity level equation, it was noticed that the red pixels dominated and showed  a clear indication of the severity level. Therefore, they were given 70%, while 20% and 10% were given to orange and yellow pixels, respectively. Table 4 shows the distribution of severity levels based on studying each colored pixel from the collected samples. Levels were selected even though there were no sample data collected for level 1. The interpolation shows that in the range of 10-20, it is predicted that the patient is suffering from an early stage MGC-type chalazion, while if it is below 10%, it is either the patient is suffering from minor eye inflammation if orange and yellow pixels are found or simply a normal eyelid due to the absence of red pixels. Level 4 does not usually exceed 70% MGC severity. The severity level equation can be expressed as follows: where NRP stands for normalized red pixels,NOP stands for normalized orange pixels, and NYP stands for normalized yellow pixels over the total area of interest and multiplied by its corresponding weight.

Results
In order to build the classifying threshold, the work proposed in this paper are based on one study to evaluate the manifesting process of the MGC, so that in future work, scanning any patient's eyelid can spot the appearance of the MGC and to confirm its removal postsurgery.
The process can be divided into four main steps; step one is capturing the HSI image of the eyelid, step two is applying prepreprocessing methods to specify the wanted spectral range and filter the collected data, step three is applying MCR to find the spectral signature similarity points, step four is to evaluate and classify the results from the previous step by counting the results pixels.  The entire image analysis performed on the hypercube data is illustrated in Figure 8, where the hypercube contains 256 bands, and at every band, each pixel contains its own spectral signature as shown in the right graph. The 2D image result from the MCR analysis can be seen in Figure 8, grouping the information with their similar concentration value.
Results from each stage are shown in Table 5, where the HSI visualization image, which is a normal RGB image, is used to visualize the captured subject. MCR results are shown next to each RGB image represented to show the MGC-type chalazion development until it became inflamed, which is an indication of an MGC chalazion and hordeolum together.
It can be noticed that in some cases, red, orange, and yellow pixels can be spotted across the sides of the eye, which is considered to be the light absorption of eye discharge/oils. For that reason, as mentioned in Figure 4, the area of interest is just the eyelid. Cropping and rotating tools were employed to focus on the eyelid only.  Shehieb et al., Cogent Engineering (2021) Similarity can be spotted between the post-recovery and the normal eyelid samples, in which there are no signs of chalazion or hordeolum inflammation in the patient's eyelid, making the results similar to a normal eyelid.
The evaluation tool for the MCR results is shown in Figure 9. Based on the proposed classifications, each color quantity was extracted for the cropped eyelid only (area of interest), and then each color was scaled based on the proposed weights in Table 4.
The developed software will request the user to insert the 2D-image MCR results, then crop and rotate as required. Once the user clicks Analyze, the second window will extract the region of the chalazion in red and hordeolum in yellow and orange. The last button, results, evaluates the MGC severity level based on the accumulated chalazion and hordeolum found in the eyelid.
The algorithm will classify the severity levels based on Table 4 into Level 1, Level 2, Level 3, Level 4, and normal eyelid/after recovery. Figure 9 demonstrates all the levels excluding Level 1, since the collected samples started from Level 2. Due to the fact that the HSI camera reads the light absorbance levels accurately, it is expected to help in the early detection of an MGC.

Discussion
The proposed work built the threshold of classification to identify the appearance of MGC on the eyelids, the captured HSI images were analyzed using multiple filters and MCR algorithm to identify the severity of the MGC. It is still difficult for the eye care practitioner to early diagnose the MGC unless the patient starts to complaint about having dry eyes symptom or eye bump, only then it will be noticeable. However, using the proposed system the eye care practitioner can simply scan the eyelids of the patient as a normal routine to make sure no MGC is manifesting.
As mentioned earlier, the patient might be suffering from both chalazion and hordeolum at the same time, which will cause inflammation around the meibomian cyst. Levels 2 and 3 shown in Section 3 indicate an MGC-type chalazion, while Level 4 shows inflammation as well, which indicates chalazion and hordeolum at the same time. Patients who reached Level 4 need to undergo a surgical operation to remove the developed chalazion/hordeolum because it becomes stiff and difficult to be treated using ointments and eye heat massage. However, Levels 2 and 3 can still be non-surgically treated, which is a preferred treatment approach.
In some cases, patients might suffer from multiple MGC pimples at the same time and on the same eyelid. Although multiple MGC pimples can be simultaneously detected, it may reduce the accuracy of the developed severity algorithm.
During the data acquisition process, the scanned area was larger than the area of interest to avoid deformation due to the aberration's effects of the HSI camera; however, the scanned area finally cropped to a smaller area to avoid aberrations.
Some previous studies showed a harmful impact of ultraviolet (UV) light for up to 500 nm wavelength; however, this is only if the patient was exposed to the UV light for up to 5 hours (Pardhan & Sapkota, 2016). In our current study, the subject was scanned for only 10 seconds, hence, this study is harmless.
The severity level developed algorithm was based on a single-case study of the patient and the coauthor Mr Wessam Shehieb; hence, the accuracy is limited. However, a research collaboration agreement with a local hospital is currently under review by authorities to use the hyperspectral imaging (HSI) camera on a large number of subjects/patients with eyelid diseases.

Conclusion
In this work, a case study of the meibomian gland cyst (MGC) evolution of chalazion and hordeolum eye disorders was successfully achieved using an HSI camera and image processing. The study was carried out on a single patient for a period of 4 months, and images were collected regularly from the patient to identify the chalazion size and location. Additionally, a severity level classification is proposed to evaluate the eyelid status and estimate the size of the chalazion. The main findings of this research are the ability to identify the appearance of an MGC by simply capturing an HSI image of the eyelid while its closed and evaluate the severity of the case. Furthermore, the proposed work built the threshold of the complete system, where early diagnosis of an MGC is possible before it becomes visible to the eye; hence reducing the treatment duration and avoiding any further complications that require clinical lancing. Also, the system can be used as a postoperative check postsurgery to make sure the eyelid went back to normal.