Next Article in Journal
Anxiety, Stress, and Social Support in Pregnant Women in the Province of Leon during COVID-19 Disease
Previous Article in Journal
SARS-CoV-2 Transmission Control Measures in the Emergency Department: The Role of Rapid Antigenic Testing in Asymptomatic Subjects
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Stateful-Service-Based Pupil Recognition in Natural Light Environments

1
Department of Computer Science and Information Engineering, Southern Taiwan University of Science and Technology, Tainan 71005, Taiwan
2
Chi Mei Hospital, Tainan 71005, Taiwan
*
Author to whom correspondence should be addressed.
Healthcare 2022, 10(5), 789; https://doi.org/10.3390/healthcare10050789
Submission received: 4 February 2022 / Revised: 20 April 2022 / Accepted: 21 April 2022 / Published: 23 April 2022

Abstract

:
Smartphones are currently extensively used worldwide, and advances in hardware quality have engendered improvements in smartphone image quality, which is occasionally comparable to the quality of medical imaging systems. This paper proposes two algorithms for pupil recognition: a stateful-service-based pupil recognition mechanism and color component low-pass filtering algorithm. The PRSSM algorithm can determine pupil diameters in images captured in indoor natural light environments, and the CCLPF algorithm can determine pupil diameters in those captured outdoors under sunlight. The PRSSM algorithm converts RGB colors into the hue saturation value color space and performs adaptive thresholding, morphological operations, and contour detection for effectively analyzing the diameter of the pupil. The CCLPF algorithm derives the average matrix for the red components of eye images captured in outdoor environments. It also performs low-pass filtering, morphological and contour detection operations, and rule-of-thumb correction. This algorithm can effectively analyze pupil diameter in outdoor natural light. Traditional ruler-based measurements of pupil diameter were used as the reference to verify the accuracy of the PRSSM and CCLPF algorithms and to compare their accuracy with that of the other algorithm. The errors in pupil diameter data were smaller for the PRSSM and CCLPF algorithms than for the other algorithm.

1. Introduction

Physicians often use advanced medical devices for pupil examination to identify a patient’s condition. Pupil examination devices are expensive and thus increase a hospital’s expenditure on medical equipment. Pupil testing is a crucial topic in the medical field. When advanced medical devices for testing pupils are unavailable, doctors can use a small medical flashlight to observe changes in the eyes of patients. The successful use of this method often requires years of knowledge and practical experience, and diagnostic results differ by physician.
Currently, smartphones are widespread worldwide, and with advances in hardware quality, the image quality of smartphone cameras is increasing. Specifically, smartphones contain high-resolution cameras and multiple applications and are equipped with high-speed internet functions to facilitate web browsing. For these reasons, smartphones have become critical devices in daily life. As smartphones have high penetration and are easy to access worldwide, in the present study, we examined whether eye images captured using smartphones can be analyzed using medical devices for pupil assessment.
Smartphone images are presented in the RGB color space. In general, most Asian people have dark brown or black irises. Figure 1 displays Asian people’s eye images obtained in outdoor and indoor environments.
Image recognition is being increasingly used to support diagnostic procedures, and imaging technology is being incorporated into an increasing number of end devices or applications to aid tasks. In this study, we designed two analytical algorithms for analyzing pupil images that were captured under outdoor sunlight and indoor lighting for an Asian population.
The rest of this paper is organized as follows. Section 2 describes the literature related to image recognition and image analysis. Section 3 details the architecture of the developed image analysis system, which includes a pupil recognition mechanism for indoor pupil analysis and a low-pass filtering (LPF) algorithm for outdoor pupil analysis. Section 4 presents a comparison of the proposed algorithms with the other algorithm [1]. Finally, Section 5 presents the findings of this study and directions for future research.

2. Related Work

2.1. Image Recognition

With advances in hardware technology and decreases in hardware costs, the use of image recognition has increased considerably in various applications, including medical image processing, robotic analog vision, surveillance (including military surveillance), and remote sensing applications.
In image analysis, images are usually preprocessed to analyze relevant image features quickly and accurately. Image preprocessing methods include noise reduction, mathematical morphological operations, and color processing.
Noise reduction involves reducing the noise in images. Image noise reduction algorithms include Gaussian smoothing (blur) and median filtering. In addition to basic noise reduction algorithms, researchers have proposed improved noise reduction algorithms. For example, Chowdhury et al. proposed a dynamic filtering algorithm [2] that eliminates Gaussian noise in digital images by using a Gaussian kernel and Gaussian function. Lyakhov et al. proposed an adaptive median filtering algorithm for reducing image pulse noise [3]. This algorithm can effectively eliminate extreme noise from images.

2.2. Mathematical Morphology

Mathematical morphological operations, including image dilation, erosion, opening, filling, and closing, are often used for image preprocessing. In the dilation operation, structural elements are used to enlarge an image. If the edge pixels in the original image and the pixels of the structural element overlap, pixels are added at the center of the structural element. In this study, we used the aforementioned technique to filter out noise from eye images.
In the erosion operation, structural elements are used to reduce the number of shapes in an image. In contrast to the dilation operation, in the erosion operation, the center of the structural element traverses the image. A pixel in the original image is eroded if this pixel is located at the center of erosion and some pixels overlap the structural element.
In the opening operation, erosion is conducted first, followed by dilation. The opening operation results in the passivation of the sharp angle of the graphic extrusion. In the closing operation, dilation is conducted first, followed by erosion. This operation results in the passivation of the sharp angle inside the graphic and the filling of small holes in the image.
Many scholars have proposed grayscale processing algorithms (Figure 2). For example, Tian et al. proposed a grayscale projection image stabilization algorithm [4], which can improve the stability of grayscale projection images. Hasan et al. proposed a contrast enhancement scheme for deriving high grayscale contrast [5].
Several have been conducted on binary image processing. For example, Bonteanu et al. proposed a binarization process based on adaptive thresholding [6], which can effectively determine the distribution range of pupils in human eyes. Wentao et al. proposed an optimal thresholding method [7] for effectively identifying smart cars in images. To ensure accurate routing information for smart cars, Cao et al. proposed a QR code recognition algorithm for complex and fuzzy environments [8]. In this algorithm, binary images are obtained through adaptive thresholding, and the binarized QR code is then decoded. Figure 3 displays a binarized image.
In general, an image is composed of the three primary colors: red, green, and blue. Images in the RGB color space are converted into the Hue Saturation Value (HSV) color space to obtain an increased number of image color features in order to diversify image pixels.
Mary et al. proposed a method involving the use of histogram thresholding and the HSV color space for establishing the level of sweetness of Muntingia calabura, a well-known roadside fruit tree, in the Philippines [9]. Sari et al. [10] proposed an HSV color space conversion method for processing rice leaf images and determining the correct fertilizer dosage for different rice varieties. Nugroho et al. proposed an HSV saturation channel to classify Plasmodium as malignant or benign [11]. Figure 4 displays an image in the HSV color space. In the present study, we analyzed images of pupils captured under an indoor environment through HSV color space conversion.

2.3. Image Analysis

Image processing involves image adjustment processes, such as image encoding, color contrast adjustment, and noise reduction. In addition to the aforementioned processes, image analysis involves the interpretation of image content.
To explore the content of an image in detail, mathematical models and image processing techniques must be used to analyze the relationship between the underlying and upper-level information in an image. Image processing is a type of signal processing technique, and many signal processing techniques such as LPF can be used for analyzing image features. As image analysis techniques involve analyzing the relationship between the underlying and upper-level information, the rule-of-thumb principle can also be used to determine image characteristics.
Several studies have used low-pass filters in image analysis. Matsuo et al. developed an 8 K film codec preprocessing device with the functions of LPF and noise reduction [12] to improve the efficiency of film encoding. Moreover, Liu et al. proposed a frequency-domain LPF method for noise reduction in images [13]. In the present study, LPF was used to analyze the color components of the pupil in eye images captured in an outdoor environment.
The rule of thumb is a widely used principle for memorizing certain values and making decisions in various fields, including mathematics, psychology, and computer science. This rule focuses on practical applications rather than theory. In computer science, Youn et al. proposed a rule of thumb for the cross-array size of resistive random-access memory to avoid a high HRS current in read operations [14]. Gao et al. proposed a rule of thumb for evaluating deep implant antenna loss to improve radiation efficiency [15]. In the present study, the rule-of-thumb principle was used for image analysis. In [16,17,18], we have developed a fast method that can be applied to universal mobile devices and can perform and check for pupil changes in general mobile devices, since most of the users are doctors, however, in most cases it can be used in a space environment or without a network, so the deep learning method is not used in this study.
This study involved image recognition and image analysis. An image analysis system was adopted to determine the relative pupil diameter under different light sources. Image recognition is a method used for object identification, tracking, and measurement, and the term “image recognition” is closely related to the term “image analysis.” Image analysis involves exploring the data of an image to identify the features of the image and investigating the characteristics of different layers in the image.

3. Proposed System

The motivation of the present study was to analyze eye images captured under different light sources for an Asian population. Such images were captured through smartphones and sent to a server for calculation and analysis. A data curve of the individuals’ pupil diameters was established to identify pupil constriction. The aim of this study was to obtain pupil diameter data for assisting physicians in diagnosing conditions. Figure 5 displays the architecture of the system developed for pupil diameter detection. This system comprises a color component LPF (CCLPF) algorithm and a stateful-service-based pupil recognition mechanism (hereafter referred to as PRSSM). Table 1 presents the abbreviations used in the system.

3.1. CCLPF Algorithm

The CCLPF algorithm was designed for processing 333 × 250 pixel eye images captured in outdoor sunlight in an Asian population. This algorithm uses a 3 × 3 matrix to extract data related to the red component in the RGB space after adjusting the image exposure by using the ImageEnhance function from the Python Imaging Library (PIL). Thus, a total of 82,088 data points are extracted from the red component. LPF is executed to remove the first 5000 data points belonging to the lowest color component; subsequently, the maximum and minimum values are extracted and averaged to obtain the final threshold for extracting the red color component.
After extracting pixels with a lower intensity than the final intensity threshold, morphological operations and contour detection can be used for effectively obtaining the pupil contour. Pupil correction is then used to correct the obtained pupil diameter data. After the aforementioned steps are completed, the color of a pupil captured in outdoor sunlight can be determined, and the pupil diameter curve for an individual can be obtained.
The PRSSM algorithm was designed for analyzing eye images captured for Asian individuals under indoor artificial light sources. The color differentiation between the iris and the pupil in indoor artificial light can be enhanced through HSV color space conversion. In the present study, the pupils in the captured images exhibited high saturation. Correlation, by adjusting the extraction threshold of saturation, can be well extracted from the pupil color distribution range.
We designed an adaptive thresholding method for automatically determining the optimal saturation threshold by detecting the increase in color ratio after adjusting the saturation threshold. After the color distribution range of pupils is extracted using the optimal saturation threshold, morphological opening and contour detection techniques, such as CCLPF, can be used for effectively extracting the pupil contour. Finally, pupil correction can be used to correct the pupil diameter. The PRSSM algorithm was determined to provide more accurate results than the CCLPF algorithm.
The RGB mode is currently the main mode for displaying images in electronic systems. In this study, smartphones were used for quickly capturing images of the eyes of 80 Asian individuals under sunlight. The captured images were resized to 333 × 250 pixels for analysis. As both the iris and pupil exhibit dark colors, distinguishing their color distribution ranges by using grayscale operations is difficult. Figure 6 illustrates a grayscale operation on one of the aforementioned images.
To solve the difficulty in distinguishing the color distribution ranges of the pupil and iris through grayscale operations, we analyzed the RGB tricolor channel of trilogromatic light mode. In outdoor environments, strong light factors often engender improvements in Exposure value (EV). Table 2 presents the EV in different environments.
As presented in Table 1, the illuminance under the hot sun is higher than that in an office or a classroom by four EV. In eye images that are captured in this environment in an Asian population, the colors of the iris and pupil are extremely similar. To distinguish between the iris and the pupil in the aforementioned images, a 3 × 3 matrix was used in this study for analyzing the components of each color channel for the iris and pupil. Figure 7 illustrates the matrix mean analysis for one of the captured images.
Figure 8 displays the means of each color component matrix. As indicated in this figure, the rate of change of the color components increased in the red frame. Most of the examined pupils were black, which is represented by an intensity of zero in the red, green, and blue channels. Therefore, considering the color components with the lowest average value (i.e., the red frame, as indicated in the figure), this study examined the correlation between the RGB patterns and pupil color.
We used the ImageEnhance function from the PIL for increasing the exposure of images and improving the color distinction between the pupil and the iris. The enhancement parameter in this function was set to three. Figure 9 depicts a comparison of the eye image obtained after increasing the exposure with an unadjusted image (i.e., Rainbow). The color difference between the iris and the pupil was effectively enhanced by increasing the exposure.

3.1.1. Extraction of Color Components

After increasing the exposure of the images, an average 3 × 3 matrix was applied to the image again for analysis. Figure 10 illustrates the analysis results, indicating enhanced exposure.
We analyzed the matrices for the images with enhanced exposure and visualized the new matrix average data. Figure 11 displays a graph of the average matrix of color components for an image with enhanced exposure. As displayed in this figure, each color component improved considerably, and the light color components were flattened. As black has an intensity of zero in all channels of the RGB color space and most Asians have black pupils, we extracted and analyzed the dark interval of each color component to find the color of the pupil. Figure 11 depicts the dark interval of each color component.
To find the color components of the pupil, we searched for the minimum values of each color component in the array of matrix averages; recorded the index values after determining the minimum average matrix of color components; and extracted 5000 pieces of data for analysis. Figure 12 and Figure 13 display the plots of the minimum average matrix index and color component interval, respectively.

3.1.2. CCLPF Module

Figure 14 depicts the graph of the extraction interval, indicating considerable noise, which could cause large fluctuations in the graph. Although noise is not noticeable in the curve depicted in Figure 12, image noise can be significantly ameliorated through data subdivision.
To filter out noise from the curve, LPF can be performed. A CCLPF module was designed in this study, and Figure 15 illustrates the architecture of this module.
The first value of the data series input into the CCLPF module serves as the initialization cutoff frequency. A check is performed to determine whether the entire sequence has been filtered. If the entire sequence has not been filtered, a check is performed to determine whether the values in the sequence are less than or greater than the cutoff frequency. The CCLPF module modifies values greater than the cutoff frequency to the current cutoff frequency. Moreover, if a value is less than the cutoff frequency, the CCLPF module reduces the cutoff frequency to this value.
The purpose of filtering the mean color component matrix through the CCLPF module is to analyze filtered data gradients. The matrix sequence filtered by the CCLPF module allows the overall data curve to be flatter. Figure 16 depicts the plot of the mean color component matrix obtained after LPF.

3.1.3. Component Threshold Decision

We designed a component threshold decision module to determine optimal component thresholds for calculating color component differences. Figure 17 depicts the architecture of the developed component threshold decision module. We can analyze the correlation between the mean components of the matrix of each color channel and the pupil color by using the optimal threshold calculated by the developed component threshold decision module. This module first filters the mean color component matrix, beginning from the lowest value. Figure 18 displays the sequence detection direction of the developed component threshold decision module.
During the sequence detection process, the difference between the current and previous pieces of data is calculated. If this difference is greater than five, the final piece of data is extracted as the upper component limit as this piece may represent the threshold for differentiating the colors of the iris and pupil. Finally, the upper and lower component limits are added to the average. The mean of the aforementioned three values is used as the threshold for extracting the color of the pupil to reduce the effect of extreme values. Figure 19, Figure 20 and Figure 21 illustrate the extraction of the upper limits for the blue, green, and red components, respectively.

3.1.4. Pupil Diameter Analysis

After the derivation of the threshold for each color component by using the developed component threshold decision module, the RGB color channels are analyzed. In this study, four data sets were analyzed: Data Set 1, comprising an eye image captured for an Asian individual under outdoor sunlight; Data Set 2, comprising eye images captured for Asian individuals under outdoor sunlight; Data Set 3, comprising an eye image captured for an Asian individual under outdoor sunlight; and Data Set 4, comprising eye images captured for Asian individuals under outdoor sunlight. Images for which the mean color component was less than the threshold of each color component were derived for comparison with the original image. Figure 22, Figure 23, Figure 24 and Figure 25 depict eye pupils from Data Sets 1–4, respectively.
We identified the pupil areas in the images from Data Sets 1–4. The eye images taken in different outdoor light environments can be marked less than red the matrix area of the color component threshold; thus, the pupil position could be accurately determined. Therefore, we used this feature to conduct pupil diameter analysis. We designed a CCLPF-based pupil analysis module to extract the blocks marked by the matrix for analysis. Figure 26 depicts the architecture of this module.
We first created a blank image and plotted a matrix area below the red threshold. Figure 27 illustrates this matrix area. The middle area of the drawn blank image contained some white noise due to the reflection from the pupil.
To filter out noise, the opening operation was conducted using 10 × 10 structural elements. Reflections (considered noise) were removed from the images. Figure 28 displays an image obtained after the opening operation. After an image was filtered through the opening operation, the pupil contour was extracted using the contour detection (findContours) function from the Python OpenCV library. This function is based on the topological structure described by Suzuki [16]. The pupil contour could be accurately extracted using the aforementioned function; thus, the pupil diameter data could be analyzed smoothly.
Figure 29 displays the results of the contour test. The collected pupil data sets included some imperfect images; therefore, some imperfect pupil contours were obtained. To reduce the error caused by imperfect pupil contours, the maximum height and width of the pupil contours were used to determine the pupil diameters.
We used the rule-of-thumb principle to compare the current and previous pupil diameters. If the difference between these pupil diameters was higher than 10 pixels, the previous pupil diameter was used as the current pupil diameter to filter out inaccurate pupil diameter data. Figure 30 and Figure 31 illustrates the analysis of inaccurate pupil diameter data for Data Set 4.

3.1.5. CCLPF Algorithm

The proposed CCLPF algorithm, whose pseudocode is displayed in Figure 32, conducts pupil diameter analysis by reading an imported image of the eyes. The imported image is adjusted (see lines 10 and 11). This image contains three color channels, and a 3 × 3 average matrix is derived for the red component in the image (see line 12). Noise is filtered through LPF (see line 17), and upper limit extraction is then performed for the red component (line 25). The threshold operation for the red component is executed (line 31). Finally, a new white image is created (line 32), and areas for which the average matrix is less than the threshold for the red component are derived. After the morphological operations, contour detection, and pupil diameter filtering, the pupil diameter is recorded in the array and then output.
The CCLPF algorithm can detect the eyes of Asian people in images captured under outdoor sunlight. By analyzing the components of each color channel, we found that the red component was correlated with the color of the pupils of Asian individuals in the aforementioned images. We compared the detection results of the CCLPF algorithm with those of the other algorithm [1].

3.2. PRSSM Algorithm

Color space conversion can be conducted to enhance the accuracy of pupil diameter analysis for images captured under different light sources. Images in the RGB color space can be transformed into the HSV color space through a simple transformation. The HSV color space represents the hue, saturation, and luminance of an image. We found that for images captured in outdoor environments, the pupil and iris of Asian individuals could be effectively differentiated through HSV color space conversion. In this study, the maximum error obtained in the classification of Data Set 5 using the PRSSM algorithm, which involves HSV conversion, was 20 pixels lower than that obtained in the same classification using the CCLPF algorithm. The PRSSM algorithm is described in detail in the following subsections.

3.2.1. HSV Color Space Conversion

The RGB color space is represented using a linear combination of three highly correlated color components. Thus, to achieve continuous color transformation for an RGB image, the intensities of all three color components should be varied simultaneously. The three color components of an RGB image are closely related to image darkness. When the image darkness changes, variations occur in the intensities of these three components. No intuitive method exists for expressing these variations.
Accordingly, the RGB color space is suitable for the display of hardware systems, although not for image processing. The HSV color space is suitable for image processing, and the formula for converting the RGB color space into the HSV color space is as follows:
h = {   0 , i f   max = min   60 × g b m a x m i n + 0 , i f   max = r , g b 60 × g b m a x m i n + 360 , i f   max = r , g b 60 × b r m a x m i n + 120 , i f   max = g 60 × b r m a x m i n + 240 , i f   max = b s = {   0 , i f   max = 0   max m i n m a x = 1 m i n m a x     , o t h e r w i s e v = m a x
The term max in Equation (1) indicates the highest intensity in the RGB color space, and min represents the lowest intensity in this space. Figure 33 displays the image obtained after conducting HSV color space conversion on a pupil image captured for an Asian individual in an indoor environment.
Figure 33 indicates that the color contrast between the iris and the pupil is considerably higher in the HSV image than in the original RGB image. Therefore, we should extract the distribution range of the pupil color in the HSV color space.
We designed an HSV analysis program to analyze the correlation between HSV color channels and the pupil color. Figure 34 depicts the interface of the aforementioned program. In this figure, the lower H, S and V represent the lowest hue, saturation, and luminosity thresholds, respectively; moreover, the upper H, S and V represent the highest hue, saturation, and luminosity thresholds, respectively.
We investigated the color marking phenomenon by fixing the threshold interval of two channels in the HSV color space and adjusting the upper and lower thresholds of the remaining channel (Figure 35). The lower H, S, and V thresholds in the red frame displayed in Figure 35 were set to zero. The upper H and V thresholds were set to 180 and 255, respectively. The upper S threshold obtained under the aforementioned conditions effectively indicated the pupil color range.
For the portion of outdoor light reflection, this paper uses HSV color space conversion to adjust color saturation in the image by using color space conversion. If the image has light reflections, we can still search for the contour position of the pupil through the color space conversion method. The lost pupil data will be corrected by using the algorithm of open and closed operation mentioned in this study.
The section on the test case is shown in Figure 34 through Figure 35 of this paper. Even if the light reflects, it does not affect the general position of the pupil, and the contours of the pupil can still be drawn.

3.2.2. Adaptive Saturation Threshold Filtering

After the analysis of HSV color markers, the saturation in the HSV color space can be assessed. We can adjust the color saturation and then reduce the upper limit of the color saturation threshold by five each time to examine the increase in the pixel growth ratio. As shown in Equation (2), the pixel growth ratio can be derived as follows:
G r = ( P n P n 1 ) S       ,   i f   n > 0
where Gr denoted the pixel growth ratio; Pn and Pn − 1 denote the numbers of pixels extracted in stages n and n − 1, respectively; and S denotes the total number of pixels. Figure 36 displays a graph of the ratio of pixel growth.
In Figure 36, the x-axis represents the current index value, and the y-axis represents the pixel growth ratio. As the pupil color can be obtained by adjusting the saturation, the pixel growth ratio would first drop at the upper saturation threshold. Figure 37 illustrates the first decline in the pixel growth ratio.
In this study, we varied the color saturation threshold and examined the corresponding first declines in the pixel growth ratio. We found that the first drop in the pixel growth ratio occurred at the upper saturation threshold. Figure 38 shows the pupil color distribution and the eye image obtained when the upper saturation threshold was used.
We designed a module for adaptive thresholding for extracting indoor artificial light from the first drop in the color saturation rate to effectively determine the pupil color distribution. Figure 39 depicts the aforementioned module.
The developed adaptive thresholding module first reads the input HSV image and initializes the upper saturation threshold of 255. For every five pixels, it then checks whether the current pixel growth ratio is less than the previous pixel growth ratio. If the current pixel growth ratio is higher than the previous pixel growth ratio, the module reduces the number of pixels until the current ratio is less than the previous ratio and then extracts and outputs the color saturation extraction threshold for the final decision.

3.2.3. Pupil Diameter Analysis

We used a pupil diameter analysis module based on the PRSSM algorithm to analyze the pupil diameter in images captured for Asian individuals under indoor artificial light conditions. The CCLPF algorithm defines a matrix area below the decision threshold of the red component on a blank image. By contrast, the PRSSM algorithm defines pixels in the HSV color space below the final decision on a blank image and decreases the comparison threshold for the final decision step to five pixels as this algorithm is more stable than the CCLPF algorithm. The PRSSM-based pupil diameter analysis module is illustrated in Figure 40.
The developed PRSSM-based pupil analysis module creates a blank image (similar to the CCLPF-based pupil analysis module) and defines a pixel below the final decision on the blank image. Figure 41 depicts the pixel coordinate image obtained with this module. A low level of white noise exists in this image due to the reflection of the pupil crystal.
To filter out this noise, the developed PRSSM-based pupil analysis module uses the opening technique for filling in the drawn image. After the open operation is performed, the pupil contour is calculated using the findContours function from the Python OpenCV library, which allows for the smooth analysis of pupil diameter data. Figure 42 displays Image obtained with the PRSSM-based pupil diameter analysis module after the opening operation.
Figure 43 displays the results of the contour tests obtained with the PRSSM-based pupil diameter analysis module. After contour detection, the maximum height and width of the contour are considered as the pupil diameter as the pupil marking in the input images is imperfect. The aforementioned step can reduce the error in pupil diameter analysis.
The current pupil diameter is compared with the previously analyzed pupil diameter in the CCLPF and PRSSM-based pupil diameter analysis modules. In the CCLPF-based module, if the error between the current and previous pupil diameters is higher than 10 pixels, the previous pupil diameter is used as the current pupil diameter. In the PRSSM-based module, the maximum permissible pupil diameter error is five pixels for images captured under indoor conditions. The developed PRSSM-based module can detect the pupil diameter through a stable process with low error rates.

3.2.4. PRSSM Algorithm

The pseudocode of the developed PRSSM algorithm is presented in Figure 44.
The developed PRSSM algorithm performs pupil diameter analysis on an input eye image captured for an Asian person in an indoor environment. The input image is read and converted into the HSV color space (see line 7). Subsequently, the algorithm performs color saturation threshold extraction on the obtained HSV image (see line 8). It then calculates the growth rate of the extracted pixel. If the current growth rate is higher than the previous one, pixel extraction continues; however, if the current growth rate is less than the previous one, this threshold is used as the color saturation threshold, and a white image is created to depict the extracted pixel coordinates. After contour detection and pupil diameter filtering, the pupil diameter is recorded in an array, and the pupil diameter data set is output.
We executed the CCLPF and PRSSM algorithms on Data Set 5, which comprises 80 eye images captured for Asian people under indoor artificial light. These images have a resolution of 333 × 250 pixels and were captured using smartphones. For comparison, pupil diameter data that were obtained using a conventional ruler were included as the standard reference. Figure 45 displays a graph of the pupil diameter data obtained for Data Set 5. In this figure, the x-axis represents the picture index, and the y-axis represents the pupil diameter. The solid purple, dashed green, and dashed orange curves in Figure 45 represent the pupil diameter data obtained through the conventional ruler, using the PRSSM algorithm, and using the CCLPF algorithm, respectively. The results obtained with the PRSSM algorithm were considerably closer to the reference data than those obtained using the CCLPF algorithm. Thus, for images captured under indoor artificial light, the PRSSM algorithm can provide more accurate pupil diameter results compared with the CCLPF algorithm.
However, the PRSSM algorithm is unsuitable for determining the pupil diameter from images captured under outdoor sunlight due to the presence of different ambient light sources in outdoor environments. The color contrast between the pupil and iris of an Asian individual in HSV images captured under outdoor environments is lower than that in HSV images captured indoors. Figure 46 depicts HSV eye images captured for Asian people in indoor and outdoor environments.
The CCLPF algorithm can effectively determine the pupil diameter in images captured under outdoor sunlight by analyzing the characteristics of the red component threshold and extracting the matrix area below this threshold. The PRSSM algorithm can effectively determine the pupil diameter by converting an RGB image into an HSV image through adaptive thresholding and the extraction of pixel coordinate points under the color saturation threshold. Experiments were performed to compare these two algorithms with the other algorithm [1].

4. Results

The developed CCLPF and PRSSM algorithms were compared with the other algorithm [1]. In [1], the RGB channels are converted into HSV channels, and grayscaling and histogram equalization are applied.
The fourteen data sets used in this study contained images of fourteen Asian individuals, of whom seven were men and seven were women (Table 3). Figure 47 shows a schematic of the experimental data set. During our experiment, these individuals were invited to visit fourteen sites; Table 4 indicates the locations at which the images in the data sets were captured. Each data set contained 80 images of the eyes of the individuals. These images had a resolution of 333 × 250 pixels and were captured quickly using a smartphone in different light environments. All images were captured with the smartphone’s flash light activated. We compared the experimental results obtained for the 14 adopted data sets using the CCLPF and PRSSM algorithms with those obtained using the other algorithm [1]. The programing language used in this study was Python (version 3.8.3), and the adopted hardware was an Intel Core i7-8550U CPU with a 1.80- and 1.99-GHz processor and 8.00 GB RAM. All the smartphones used for capturing the images hosted the Android (version 10) operating system.
One image was selected from each of the data sets (Data Sets 1–14) and input into the other algorithm [1]. The intensities of the blue and red components were manipulated to obtain a grayscale version of the input image, thus effectively enhancing the iris detection effect. The general grayscale operation involved obtaining a grayscale image by multiplying the intensities of the red, blue, and green components by different values. This operation can be expressed as follows:
Gray = R × 0.299 + G × 0.587 + B × 0.114
where R, G, and B represent the intensities of the red, blue, and green components, respectively, and Gray represents the grayscale intensity. We replaced the intensity of the green component in Equation (3) with the intensity of the blue component to obtain the following grayscaling formula:
Gray = R × 0.299 + B × 0.587 + B × 0.114
As shown in Equation (4), this formula was used for image grayscaling. Figure 48 displays the grayscaling results for each data set.
After grayscale images were obtained for each data set, Canny edge detection was executed on these images by using the Canny function in Python OpenCV. The literature does not mention suitable threshold values for Canny edge detection; therefore, we set 50 and 150 as the lower and upper thresholds, respectively. Figure 49 depicts the Canny edge detection results obtained for each data set.
We used the HoughCircles function in Python OpenCV for circle detection. As the iris could be accurately identified only for Data Sets 1 and 7, we compared the performance of the other algorithm [1] with that of the CCLPF and PRSSM algorithms for these data sets only. Figure 50 illustrates the Hough detection results for each data set. In this figure, the images in the red frame (i.e., Data Sets 1 and 7) were adopted for further analysis; the results for Data Set 8 are not shown in this figure as the iris position could not be determined using the HoughCircles function.
After comparing the results obtained with the three investigated algorithms, we used the proposed method to perform single-channel grayscaling, histogram equalization, and Gaussian fuzzy calculation for each RGB and HSV channel. Figure 51 shows the iris color range obtained after each processing stage for Data Sets 1 and 7.
When an iris image is subjected to Gaussian blurring, Canny edge detection based on Hough circles must be performed to automatically increase the detection threshold and obtain the pupil contour. The detection threshold should be increased by 10–70 in increments of five. As two thresholds are used in Canny edge detection, we defined a lower threshold as well as an upper threshold that was twice the lower threshold to achieve optimal results. Pupil contour extraction was performed for Data Sets 1 and 7. The extracted pupil profile indicated the type of channel and the required Canny threshold. Figure 52 displays the Canny edge detection results obtained for each color channel for the two data sets. Figure 53 depicts the results of the Hough circle test for the two data sets. This test was conducted after the execution of Canny edge detection.
In Figure 53, the results obtained using the other algorithm [1] are indicated in the red frames. For Data Set 1, we extracted pupils through Hough circle detection by using the hue and saturation channels and by setting the upper and lower thresholds for Canny edge detection to 65 and 50, respectively. For Data Set 7, we extracted pupils through Hough circle detection by using the green channel along with the hue channel and by setting the upper and lower thresholds for Canny edge detection to 60 and 40, respectively.
On the basis of the aforementioned analysis, we determined the pupil diameters for the images from Data Sets 1 and 7. We compared the results obtained for Data Set 1 using the other algorithm [1] with those obtained for this data set using the CCLPF algorithm. We also compared the results obtained for Data Set 7 using the other algorithm, [1], with those obtained for this data set using the PRSSM algorithm.
Pupil diameters measured using a traditional ruler were used as the reference. For pupil diameter measurement using the other algorithm [1] for Data Set 1, the hue and saturation channels were used, and the upper and lower thresholds for Canny edge detection were set to 65 and 50, respectively. The measurement results obtained using this algorithm and those obtained using the CCLPF algorithm were compared with the reference data. Figure 54 displays the measurement errors for Data Set 1.
In Figure 54, the x-axis represents the image index, and the y-axis represents the errors between pupil diameter measurements obtained with a traditional ruler and the pupil diameter values obtained with the other algorithm [1] and the CCLPF algorithm. The error curve for the CCLPF algorithm was considerably lower and flatter than that for the other algorithm [1]. Thus, the CCLPF algorithm had higher stability and accuracy than did the other algorithm [1] for Data Set 1.
Pupil diameters measured using a traditional ruler were also used as the reference. For pupil diameter measurement using the other algorithm [1] for Data Set 7, the green and hue channels were used, and the upper and lower thresholds for Canny edge detection were set to 50 and 40, respectively. The measurement results obtained using this algorithm and those obtained using the PRSSM algorithm were compared with the reference data. Figure 55 depicts the measurement errors for Data Set 7.
In Figure 55, the x-axis represents the image index, and the y-axis represents the errors between pupil diameter measurements obtained with the traditional ruler and the pupil diameter values obtained using the other algorithm [1] and the PRSSM algorithm for Data Set 7. The error curve for the PRSSM algorithm was lower and flatter than that of the other algorithm [1] for Data Set 7. Thus, the PRSSM algorithm had higher stability and accuracy than the other algorithm [1] for Data Set 7. We also compared the other algorithm [1] with the developed CCLPF and PRSSM algorithms. The CCLPF and PRSSM algorithms achieved higher accuracy rates than the other algorithm [1] for Data Sets 1 and 7, respectively.
The pupil diameter data obtained for Data Sets 1–14 by using the traditional ruler methods were compared with those obtained using the CCLPF (for Data Sets 1–5 and 11–12) and PRSSM (for Data Sets 6–10 and 13–14) algorithms. Figure 56 displays the measurement errors for the PRSSM and CCLPF algorithms for different data sets.
As displayed in Figure 56, for Data Sets 1–5 and 11–12, the difference between the pupil diameters obtained using the CCLPF algorithm and those obtained through ruler measurements was less than 25 pixels. For Data Sets 6–10 and 13–14, the difference between the pupil diameters obtained using the PRSSM algorithm and those obtained through ruler measurements was less than 10 pixels.
A previous study revealed that pupil diameter detection results could indicate pupil constriction. Accordingly, we used Data Sets 1–14 to explore changes in pupil size. We observe changes in pupil size between images captured in outdoor environments and those captured in indoor environments. This is due to the fact that in outdoor environments, the light prompted individuals to constrict their pupils, whereas in indoor environments, the relatively strong illuminance caused by the camera flash prompted the individuals to further constrict their pupils. Figure 57 displays a graph of the measured pupil diameter data for Data Sets 1–14.
The measured pupil diameter data for Data Sets 1–5 and 11–12, which was comprised of images captured outdoors, did not indicate noticeable constriction. However, the measured pupil diameter data for Data Sets 6–10 and 13–14, which were captured indoors, indicated clear pupil constriction. The PRSSM algorithm could effectively detect pupil constriction.

5. Discussions

We looked for the pupils of white people in most of the public data sets. Experimental analysis found that the pupil pattern is different from that of beige people, so the method we propose can analyze the pupil images of beige people. Color morphology analysis is needed to achieve a high accuracy rate.
We have developed a fast method that can be applied to universal mobile devices and can perform and check for pupil changes in general mobile devices, since most of the users are doctors. In most cases, this can be used in a space environment or in an environment without an internet connection.
In iris and pupil identification, infrared cameras are usually employed to capture eye images. The pupil position can be clearly identified in eye images captured using an infrared camera. However, most camera systems capture images using the RGB color channel. The eyes and iris of Asian individuals are usually brown or black. Such similar colors make it difficult to analyze pupil images captured for Asian individuals under natural and artificial light sources. Accordingly, the components of the RGB color space should be analyzed and converted to the HSV color space for pupil detection in images captured for Asian individuals.
Among the other methods we compare, we have compared the pupil with the only algorithm of the same type of algorithm applied to beige people and found that our proposed method has a higher accuracy rate and no drift problem. Since most of the methods currently require specific medical devices, we have developed a mobile device that is suitable for universal use, is fast, can be performed on general mobile devices and can check for pupil changes. We also compared the other algorithm [1] with the developed CCLPF and PRSSM algorithms. The CCLPF and PRSSM algorithms achieved higher accuracy rates than the other algorithm [1] for Data Sets 1 and 7, respectively.
This paper contributes to the research literature in four major areas: (1) We propose the PRSSM algorithm and CCLPF algorithm, which can be used to analyze Asian pupil diameter under indoor artificial light and outdoor sunlight; (2) Solving the difficulty of analyzing the pupil diameter in Asians with similar color to iris; (3) We develop a universal mobile device that can be performed and checked for pupil changes on a general mobile device; 4) Improve recognition, application penetration and execution speed in different environments to realize these goals.

6. Conclusions

We developed the PRSSM and CCLPF algorithms for pupil diameter analysis on images captured under indoor artificial light and outdoor natural light, respectively. HSV color space conversion can effectively increase the contrast between the pupil and the iris in images captured in indoor environments with artificial light sources. The developed PRSSM algorithm was used to detect the pupil in eye images that were captured indoors in an Asian population. The relevant experimental results indicate that the PRSSM algorithm had high accuracy and stability in the aforementioned detection, with the error between the pupil diameter data obtained through conventional ruler measurements and with the PRSSM algorithm being less than 10 pixels.
The intensity of the red component of RGB images was found to be highly correlated with the color of the pupils in the Asian population. Therefore, an LPF algorithm was designed to detect the pupils of Asian individuals in images captured in outdoor environments under natural sunlight. The error between the pupil diameter data measured through conventional ruler measurements and data measured using the CCLPF algorithm for outdoor environments was less than 25 pixels; thus, the measurement accuracy and stability of the CCLPF algorithm were verified.
We develop a mobile device that can be used for universal use and can be performed and checked for pupil changes on a general mobile device. There is a set limit on the mobile device; you need to set the distance between the mobile device and the pupil first. However, we experimented with the flash brightness of each mobile device and found that it is slightly different on each device, which may affect the identification results, although this should only have a slight impact on the actual experiment.

Author Contributions

Conceptualization, G.-J.H., K.-T.C. and K.-C.L.; methodology, R.-S.K. and G.-J.H.; software, R.-S.K.; validation, K.-T.C.; investigation, R.-S.K.; resources, G.-J.H.; writing—original draft preparation, R.-S.K. and G.-J.H.; writing—review and editing, G.-J.H.; supervision, G.-J.H.; project administration, G.-J.H.; All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki, and approved by The Institutional Review Board of Human Research, Chi-Mei Medical Center (Approval code 11010-015 and Nov. 11 2021 of approval).

Informed Consent Statement

Informed consent was obtained from all participants involved in the study.

Data Availability Statement

Not applicable.

Acknowledgments

This work was supported in part by the “Allied Advanced Intelligent Biomedical Research Center, STUST” from Higher Education Sprout Project, Ministry of Education, Taiwan, and in part by the Ministry of Science and Technology (MOST) of Taiwan under Grant MOST 110-2221-E-218-007.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Tachi, K.; Takano, H. Effective Color Components for Pupil Diameter Measurement of Brown Eye Using a Visible-Light Camera. In Proceedings of the 2018 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Miyazaki, Japan, 7–10 October 2018; pp. 850–855. [Google Scholar] [CrossRef]
  2. Chowdhury, D.; Das, S.K.; Nandy, S.; Chakraborty, A.; Goswami, R.; Chakraborty, A. An Atomic Technique For Removal Of Gaussian Noise From A Noisy Gray Scale Image Using LowPass-Convoluted Gaussian Filter. In Proceedings of the 2019 International Conference on Opto-Electronics and Applied Optics (Optronix), Kolkata, India, 18–20 March 2019; pp. 1–6. [Google Scholar] [CrossRef]
  3. Lyakhov, P.A.; Orazaev, A.R.; Chervyakov, N.I.; Kaplun, D.I. A New Method for Adaptive Median Filtering of Images. In Proceedings of the 2019 IEEE Conference of Russian Young Researchers in Electrical and Electronic Engineering (EIConRus), Moscow, Russia, 28–31 January 2019; pp. 1197–1201. [Google Scholar] [CrossRef]
  4. Tian, S. Grayscale Projection Image Stabilization Algorithm Based on Gray Bit-Plane for Moving Object. In Proceedings of the 2018 Eighth International Conference on Instrumentation & Measurement, Computer, Communication and Control (IMCCC), Harbin, China, 19–21 July 2018; pp. 610–613. [Google Scholar] [CrossRef]
  5. Hasan, T.; Khan, E. Contrast Enhancement using Efficient Gray-Level Grouping. In Proceedings of the 2019 International Conference on Electrical, Electronics and Computer Engineering (UPCON), Aligarh, India, 8–10 November 2019; pp. 1–5. [Google Scholar] [CrossRef]
  6. Bonteanu, P.; Cracan, A.; Bozomitu, R.G.; Bonteanu, G. A Robust Pupil Detection Algorithm based on a New Adaptive Thresholding Procedure. In Proceedings of the 2019 E-Health and Bioengineering Conference (EHB), Iasi, Romania, 21–23 November 2019; pp. 1–4. [Google Scholar] [CrossRef]
  7. Hu, W.; Zhao, Y. The Threshold Optimization of Track Image Under Strong Sunlight. In Proceedings of the 2020 5th International Conference on Smart Grid and Electrical Automation (ICSGEA), Zhangjiajie, China, 13–14 June 2020; pp. 236–239. [Google Scholar] [CrossRef]
  8. Cao, Z.; Li, J.; Hu, B. Robust Hazy QR Code Recognition based on Dehazing and Improved Adaptive Thresholding Method. In Proceedings of the 2019 IEEE 15th International Conference on Automation Science and Engineering (CASE), Vancouver, BC, Canada, 22–26 August 2019; pp. 1112–1117. [Google Scholar] [CrossRef]
  9. Sahagun, M.A.M. Determination of Sweetness level of Muntingia Calabura using HSV Colorspace. In Proceedings of the 2020 International Conference on Data Analytics for Business and Industry: Way Towards a Sustainable Economy (ICDABI), Sakheer, Bahrain, 26–27 October 2020; pp. 1–5. [Google Scholar] [CrossRef]
  10. Sari, Y.; Alkaff, M.; Maulida, M. Classification of Rice Leaf using Fuzzy Logic and Hue Saturation Value (HSV) to Determine Fertilizer Dosage. In Proceedings of the 2020 Fifth International Conference on Informatics and Computing (ICIC), Gorontalo, Indonesia, 3–4 November 2020; pp. 1–6. [Google Scholar] [CrossRef]
  11. Nugroho, H.A.; Tantowi, F.L.; Anggara, R.; Aldibra, T.D.; Nurfauzi, R.; Frannita, E.L.; Prananda, A.R. Segmentation of Plasmodium using Saturation Channel of HSV Color Space. In Proceedings of the 2019 International Conference on Information and Communications Technology (ICOIACT), Yogyakarta, Indonesia, 24–25 July 2019; pp. 91–94. [Google Scholar] [CrossRef]
  12. Matsuo, Y.; Iguchi, K.; Kanda, K. Pre-processing equipment of 8K video codec with low-pass filtering and noise reduction functions. In Proceedings of the 2018 IEEE International Symposium on Signal Processing and Information Technology (ISSPIT), Louisville, KY, USA, 6–8 December 2018; pp. 1–6. [Google Scholar] [CrossRef]
  13. Liu, M.; Wei, Y. Image Denoising Using Graph-Based Frequency Domain Low-pass Filtering. In Proceedings of the 2019 IEEE 4th International Conference on Image, Vision and Computing (ICIVC), Xiamen, China, 5–7 July 2019; pp. 118–122. [Google Scholar] [CrossRef]
  14. Youn, Y.; Kim, K.; Kim, B. A Rule-of-thumb Condition to Avoid Large HRS Current in ReRAM Crossbar Array Design. In Proceedings of the 2018 International SoC Design Conference (ISOCC), Daegu, Korea, 12–15 November 2018; pp. 17–18. [Google Scholar] [CrossRef]
  15. Gao, M.; Nikolayev, D.; Bosiljevac, M.; Sipus, Z.; Skrivervik, A.K. Rules of Thumb to Assess Losses of Implanted Antennas. In Proceedings of the 2021 15th European Conference on Antennas and Propagation (EuCAP), Dusseldorf, Germany, 22–26 March 2021; pp. 1–5. [Google Scholar] [CrossRef]
  16. Suzuki, S. Topological Structural Analysis of Digitized Binary Images by Border Following. Comput. Vis. Graph. Image Process. 1985, 30, 32–46. [Google Scholar] [CrossRef]
  17. Khan, W.; Hussain, A.; Kuru, K.; Al-askar, H. Pupil Localisation and Eye Centre Estimation Using Machine Learning and Computer Vision. Sensors 2020, 20, 3785. [Google Scholar] [CrossRef] [PubMed]
  18. Khan, W.; Ansell, D.; Kuru, K.; Amina, M. Automated aircraft instrument reading using real time video analysis. In Proceedings of the 2016 IEEE 8th International Conference on Intelligent Systems (IS), Sofia, Bulgaria, 4–6 September 2016; pp. 416–420. [Google Scholar] [CrossRef] [Green Version]
  19. Exposure-value-measurements. Available online: https://www.pixelsham.com/2020/12/26/exposure-value-measurements/ (accessed on 26 December 2020).
Figure 1. Eye images of Asian people that were captured under different light sources.
Figure 1. Eye images of Asian people that were captured under different light sources.
Healthcare 10 00789 g001
Figure 2. Grayscale image.
Figure 2. Grayscale image.
Healthcare 10 00789 g002
Figure 3. Binarized image.
Figure 3. Binarized image.
Healthcare 10 00789 g003
Figure 4. Image in the HSV color space.
Figure 4. Image in the HSV color space.
Healthcare 10 00789 g004
Figure 5. Schematic of the developed system for pupil diameter detection.
Figure 5. Schematic of the developed system for pupil diameter detection.
Healthcare 10 00789 g005
Figure 6. Grayscale operation on one of the captured images.
Figure 6. Grayscale operation on one of the captured images.
Healthcare 10 00789 g006
Figure 7. Matrix mean analysis for one of the captured images.
Figure 7. Matrix mean analysis for one of the captured images.
Healthcare 10 00789 g007
Figure 8. Graph for the average color component matrix.
Figure 8. Graph for the average color component matrix.
Healthcare 10 00789 g008
Figure 9. Eye image obtained after increasing the exposure.
Figure 9. Eye image obtained after increasing the exposure.
Healthcare 10 00789 g009
Figure 10. Average matrix for an image with enhanced exposure.
Figure 10. Average matrix for an image with enhanced exposure.
Healthcare 10 00789 g010
Figure 11. Dark component intervals for an image with enhanced exposure.
Figure 11. Dark component intervals for an image with enhanced exposure.
Healthcare 10 00789 g011
Figure 12. Color component minimum matrix mean index plot.
Figure 12. Color component minimum matrix mean index plot.
Healthcare 10 00789 g012
Figure 13. Plot of the color component extraction interval.
Figure 13. Plot of the color component extraction interval.
Healthcare 10 00789 g013
Figure 14. Graph of the extraction interval.
Figure 14. Graph of the extraction interval.
Healthcare 10 00789 g014
Figure 15. Architecture of the developed CCLPF module.
Figure 15. Architecture of the developed CCLPF module.
Healthcare 10 00789 g015
Figure 16. Plot of the mean color component matrix obtained after low-pass filtering.
Figure 16. Plot of the mean color component matrix obtained after low-pass filtering.
Healthcare 10 00789 g016
Figure 17. Architecture of the developed component threshold decision module.
Figure 17. Architecture of the developed component threshold decision module.
Healthcare 10 00789 g017
Figure 18. Sequence detection direction of the developed component threshold decision module.
Figure 18. Sequence detection direction of the developed component threshold decision module.
Healthcare 10 00789 g018
Figure 19. Upper limit extraction for the blue component.
Figure 19. Upper limit extraction for the blue component.
Healthcare 10 00789 g019
Figure 20. Upper limit extraction for the green component.
Figure 20. Upper limit extraction for the green component.
Healthcare 10 00789 g020
Figure 21. Upper limit extracted for the red component.
Figure 21. Upper limit extracted for the red component.
Healthcare 10 00789 g021
Figure 22. Image from Data Set 1.
Figure 22. Image from Data Set 1.
Healthcare 10 00789 g022
Figure 23. Image from Data Set 2.
Figure 23. Image from Data Set 2.
Healthcare 10 00789 g023
Figure 24. Image from Data Set 3.
Figure 24. Image from Data Set 3.
Healthcare 10 00789 g024
Figure 25. Image from Data Set 4.
Figure 25. Image from Data Set 4.
Healthcare 10 00789 g025
Figure 26. Architecture of the developed CCLPF-based pupil analysis module.
Figure 26. Architecture of the developed CCLPF-based pupil analysis module.
Healthcare 10 00789 g026
Figure 27. Matrix area below the red threshold.
Figure 27. Matrix area below the red threshold.
Healthcare 10 00789 g027
Figure 28. Image obtained after the open operation.
Figure 28. Image obtained after the open operation.
Healthcare 10 00789 g028
Figure 29. Results of the contour test.
Figure 29. Results of the contour test.
Healthcare 10 00789 g029
Figure 30. Imperfect pupil image.
Figure 30. Imperfect pupil image.
Healthcare 10 00789 g030
Figure 31. Analysis of inaccurate pupil diameter data for Data Set 4.
Figure 31. Analysis of inaccurate pupil diameter data for Data Set 4.
Healthcare 10 00789 g031
Figure 32. Pseudocode of the CCLPF algorithm.
Figure 32. Pseudocode of the CCLPF algorithm.
Healthcare 10 00789 g032
Figure 33. Original RGB image and corresponding image obtained after HSV color conversion.
Figure 33. Original RGB image and corresponding image obtained after HSV color conversion.
Healthcare 10 00789 g033
Figure 34. HSV color marker.
Figure 34. HSV color marker.
Healthcare 10 00789 g034
Figure 35. Adjustment of the color of each channel threshold mark.
Figure 35. Adjustment of the color of each channel threshold mark.
Healthcare 10 00789 g035
Figure 36. Graph of pixel growth ratio.
Figure 36. Graph of pixel growth ratio.
Healthcare 10 00789 g036
Figure 37. First decline in the pixel growth ratio.
Figure 37. First decline in the pixel growth ratio.
Healthcare 10 00789 g037
Figure 38. Pupil color distribution.
Figure 38. Pupil color distribution.
Healthcare 10 00789 g038
Figure 39. Developed module for adaptive saturation threshold filtering.
Figure 39. Developed module for adaptive saturation threshold filtering.
Healthcare 10 00789 g039
Figure 40. Developed pupil stateful recognition service mechanism (PRSSM)-based pupil diameter analysis module.
Figure 40. Developed pupil stateful recognition service mechanism (PRSSM)-based pupil diameter analysis module.
Healthcare 10 00789 g040
Figure 41. Pixel coordinate image obtained with the PRSSM-based pupil diameter analysis module.
Figure 41. Pixel coordinate image obtained with the PRSSM-based pupil diameter analysis module.
Healthcare 10 00789 g041
Figure 42. Image obtained with the PRSSM-based pupil diameter analysis module after the opening operation.
Figure 42. Image obtained with the PRSSM-based pupil diameter analysis module after the opening operation.
Healthcare 10 00789 g042
Figure 43. Results of the contour test obtained with the PRSSM-based pupil diameter analysis module.
Figure 43. Results of the contour test obtained with the PRSSM-based pupil diameter analysis module.
Healthcare 10 00789 g043
Figure 44. Pseudocode of the developed PRSSM algorithm.
Figure 44. Pseudocode of the developed PRSSM algorithm.
Healthcare 10 00789 g044
Figure 45. Pupil diameter graph for Data Set 5.
Figure 45. Pupil diameter graph for Data Set 5.
Healthcare 10 00789 g045
Figure 46. HSV eye images captured for Asian people in indoor and outdoor environments.
Figure 46. HSV eye images captured for Asian people in indoor and outdoor environments.
Healthcare 10 00789 g046
Figure 47. Schematic of the experiment data set.
Figure 47. Schematic of the experiment data set.
Healthcare 10 00789 g047
Figure 48. Results obtained after grayscaling for each data set.
Figure 48. Results obtained after grayscaling for each data set.
Healthcare 10 00789 g048
Figure 49. Results obtained for each data set through the Canny edge detector.
Figure 49. Results obtained for each data set through the Canny edge detector.
Healthcare 10 00789 g049
Figure 50. Results of the Hough circle test for each data set.
Figure 50. Results of the Hough circle test for each data set.
Healthcare 10 00789 g050
Figure 51. Iris color range obtained after each processing stage for Data Sets 1 and 7.
Figure 51. Iris color range obtained after each processing stage for Data Sets 1 and 7.
Healthcare 10 00789 g051
Figure 52. Results obtained after Canny edge detection.
Figure 52. Results obtained after Canny edge detection.
Healthcare 10 00789 g052
Figure 53. Results of the Hough circle test.
Figure 53. Results of the Hough circle test.
Healthcare 10 00789 g053
Figure 54. Measurement errors for Data Set 1.
Figure 54. Measurement errors for Data Set 1.
Healthcare 10 00789 g054
Figure 55. Measurement errors for Data Set 7.
Figure 55. Measurement errors for Data Set 7.
Healthcare 10 00789 g055
Figure 56. Pupil diameter errors for the PRSSM and CCLPF algorithms for the 10 data sets.
Figure 56. Pupil diameter errors for the PRSSM and CCLPF algorithms for the 10 data sets.
Healthcare 10 00789 g056
Figure 57. Measured pupil diameter data.
Figure 57. Measured pupil diameter data.
Healthcare 10 00789 g057
Table 1. Abbreviations.
Table 1. Abbreviations.
Full TitleAbbreviations
Pupil stateful recognition service mechanismPRSSM
Color component low-pass filteringCCLPF
Hue Saturation ValueHSV
Low pass filteringLPF
Table 2. Illuminance in different environments [19].
Table 2. Illuminance in different environments [19].
EnvironmentExposure value (EV)
Under the hot sun16
Under a cloudy sky15
Mappings14
In a reading room13
In a baseball field at night12
In an office or a classroom12
Under street lights8–11
Under a full moon8–9
Under starlight8
Table 3. Information on the data sets used in this study.
Table 3. Information on the data sets used in this study.
Data setParticipantAge (Years)GenderOccupation
Data Set 1A18FemaleStudent
Data Set 2B21FemaleStudent
Data Set 3C17FemaleStudent
Data Set 4D24MaleStudent
Data Set 5E23MaleStudent
Data Set 6F30MaleTechnology industry
Data Set 7G22FemaleStudent
Data Set 8H18MaleStudent
Data Set 9I20MaleStudent
Data Set 10J28FemaleService industry
Data Set 11K53Malewoodworker
Data Set 12L51Femalehairdresser
Data Set 13M21FemaleStudent
Data Set 14N40MaleIT Engineer
Table 4. Sources of each experimental data set.
Table 4. Sources of each experimental data set.
Data SetSource Of The Data Set
Data Set 1Outdoor sunshine riding downstairs shooting (1)
Data Set 2Outdoor sunshine riding downstairs shooting (2)
Data Set 3Captured outdoor under natural sunlight (1)
Data Set 4Captured outdoor under natural sunlight (2)
Data Set 5Captured outdoor under natural sunlight (3)
Data Set 6Captured in an office room
Data Set 7Captured in a shady warehouse
Data Set 8Captured under faint orange light in a washroom
Data Set 9Captured in a bedroom
Data Set 10Captured in a living room (1)
Data Set 11Captured outdoor under natural sunlight (4)
Data Set 12Captured outdoor under natural sunlight (5)
Data Set 13Captured in a living room (2)
Data Set 14Captured in a living room (3)
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ke, R.-S.; Horng, G.-J.; Chen, K.-T.; Lee, K.-C. Stateful-Service-Based Pupil Recognition in Natural Light Environments. Healthcare 2022, 10, 789. https://doi.org/10.3390/healthcare10050789

AMA Style

Ke R-S, Horng G-J, Chen K-T, Lee K-C. Stateful-Service-Based Pupil Recognition in Natural Light Environments. Healthcare. 2022; 10(5):789. https://doi.org/10.3390/healthcare10050789

Chicago/Turabian Style

Ke, Rih-Shen, Gwo-Jiun Horng, Kuo-Tai Chen, and Kuo-Chang Lee. 2022. "Stateful-Service-Based Pupil Recognition in Natural Light Environments" Healthcare 10, no. 5: 789. https://doi.org/10.3390/healthcare10050789

APA Style

Ke, R. -S., Horng, G. -J., Chen, K. -T., & Lee, K. -C. (2022). Stateful-Service-Based Pupil Recognition in Natural Light Environments. Healthcare, 10(5), 789. https://doi.org/10.3390/healthcare10050789

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop