The pupil is a tiny dark hole located in the center of the iris that regulates the amount of light coming into the eye. Greater intensity light causes the pupil to become smaller (allowing less light in), whereas lower intensity light causes the pupil to become larger (allowing more light in), a mechanism called the pupillary light reflex (PLR). The PLR is governed by the antagonistic actions of the dilator and sphincter muscles of the iris in response to environmental light. Activation of the dilator muscles which causes the pupil to dilate (i.e., mydriasis) is under sympathetic control through superior cervical ganglion controlled by EW nucleus, and the sphincter muscles cause the pupil to constrict (i.e., miosis) under parasympathetic control [1,2]. The pupil size for miosis and mydriasis can be measured and compared to each other. The observation of the different pupil size can allow non-invasive diagnosis of many different diseases such as Parkinson’s disease, autism spectrum disorder and diabetes [3-6].
Traditionally the pupil size has been measured by using specially designed millimeter rulers or gauges and a method called the Rosenbaum card, in which the horizontal pupil diameter is matched by the examiner with a series of increasing half-circle diameters, but all the manual methods of pupil measurement are not quantitative and cannot be used in dim light [7,8]. Recently, a hand-held Colvard pupillometer, infrared videography and computerized pupillometry have been developed to control the light stimulus and record pupillary movements. These automatic devices allow clinicians to quickly measure the pupil diameter at any illumination level and the infrared videography is capable of describing the dynamics of pupil function. However, these digital devices are costly, big, and only available in the hospital for use by trained examiners [8-11].
In this study, the prototype of the smartphone-based pupillometer was designed with an optical apparatus attached to the smartphone’s camera. This prototype system is small to handle and can not only be easily manufactured at low cost but also distributed to many places such as developing countries, outlying regions, general clinics and private spaces as a home-use healthcare device. Also this study describes a simple method for calculating the constriction ratio of the pupillary area in response to PLR through the proposed algorithm for pupil analysis. This is a different analysis compared with existing pupillometers which usually measure the variation of the pupil diameter, and very suitable for the smartphone application that provides built-in functionality for detecting an object on still images [10-12].
Sixteen healthy college students (Male 7, Female 9) participated in this study. The average age of the participants was 21.6 ± 1.6 yrs. and written informed consent was obtained from all participants. All subjects were Asians and they had dark brown colored irises. During the experiments, the participants remained for 3 minutes in a quiet room (< 0.1 lux) in order to approach the maximum darkness area. Each subject was instructed to look into the device and fixed on the camera lens at a virtual distance of 6 cm.
The prototype system was set with a smartphone (KM-S120, KT Tech, Korea) which had a 3-megapixel main camera on the back panel (Fig. 1). It consisted of a main body, 4 infrared LEDs, 1 white LED, an infrared cut-off filter (IR720, Horusbennu, Korea) and a microcontroller (ATmega 328 based Arduino Uno board). The main body was 6 cm length and 4 cm in diameter. It provided tight occlusion around the subject’s eye so that pupil size could not be influenced by any ambient light. The presence of the infrared LEDs (λmax = 850 nm) allowed taking the mydriasis image under the dark condition. The infrared light does not affect pupil size but is recognized by the charge-coupled device camera in the pupillometer system. The white LED (λmax = 570 nm) shone on the eye (4 lux) was used to cause miosis, and it was placed at a distance of 2 cm in front of the eye. The stimulus duration was less than a few seconds. In front of the camera, the infrared cut-off filter was placed to pass only wavelengths that correspond to the infrared emission, thus the reflected light emanating from the white LED was blocked. Those LEDs were powered by the Arduino microcontroller, an open-source microcontroller based on the ATmega328 that can be simply connected to a computer with a Universal Series Bus (USB) cable to get started.
Figure 2 shows the whole process chart of this study. The raw eye images were processed by the proposed algorithm which extracts only the pupil region, and then the constriction ratio of the pupillary area in response to PLR was calculated and compared to the standard ratio for diagnosis. In this pilot study, all the eye images were transferred to a laptop computer through the smartphone and processed on MATLAB to verify the effectiveness of the proposed algorithm.
There were three major procedures in image processing involving pre-processing, segmentation, and morphological processing. As pre-processing, both the contrast enhancement process and the noise reduction operation by the median filter were applied to the raw eye images. The contrast enhancement was performed to distinguish the regions between the pupil and iris by intensity mapping, which is used to stretch out the intensity values to a wider range. In this operation, both the lowest and highest intensity values were mapped to bottom and top, respectively, while the values between low and high were mapped linearly to values between bottom and top. The main objective of the filtering procedure was to reduce and eliminate possible noise that appeared during eye image acquisition via optical sensors. The rationale behind adaptation of the median filter was used for the important property of edge preserving smoothing that does not shift boundaries [13].
The pre-processed eye image and the grayscale histogram of this image are shown in Fig. 3(a) and Fig. 3(b), respectively. The left side on the histogram was mainly due to the contribution of pupillary area pixels and this part was referred to as a standard point for the threshold. The middle and right sides represent the iris and reflected light
regions, respectively. The segmentation procedure was then performed by the thresholding operation to convert the contrast-enhanced image from grayscale into a binary image, and thus the pupil region was roughly separated from its background. To completely isolate the pupil region, morphological operations (erosion and dilation) were performed as a following step. These operations not only eliminate unnecessary parts but fill in holes and small gaps on the pupil region. In consequence, the remaining unnecessary parts in the processed images were effectively removed while preserving the pupil region.
The processed images corresponding to the dilated and constricted pupils are shown in Fig. 4. Although the smartphone’s camera used in this study featured relatively low resolution, and there occurred some noise to the raw eye images, the pre-processing operation efficiently enhanced contrast of the eye images and made edges clear. Thus the pupil region that had the lowest pixel values in the eye images could be separated with intact shape by the segmentation and morphological processes.
From the isolated pupil region, the number of pixels that correspond to the pupillary area was returned as a positive integer value. This value was equated with the size of the pupil region and used for calculating the constriction ratio of the pupillary area in response to PLR. Unlike measuring the pupil diameter, the analyzing method in this study concerned the whole size of the pupillary area. There are some advantages when trying to figure out the variation rate of pupil size. It is explained that the rate of change of the pupillary area was larger than the rate of change of the pupil diameter according to mathematical geometric formulas [14]. It means that the different pupil size between miosis and mydriasis could be much more clearly observed when
comparing the variation of area to the variation of diameter. In addition, the pupil is not a perfect circle. Thus, by using the existing pupillometers, the measurement of the pupil diameter could be dependent on a reference point by which the pupil diameter is measured [10]. It can be expected that measurement errors among the various existing devices including digital infrared pupillometers could occur. However, the pixel-number based method applied in this study clearly extracted the pupil region and it was capable of calculating the constriction ratio of the pupillary area regardless of any reference points. One required condition is that the pupil has to be placed within the boundary of camera view when the eye image is taken.
Even if the infrared videography can also provide dynamic analysis including constriction velocity, most studies on pupil analysis in ophthalmology and neuroscience have still been focused on the variation of pupil size [15-21]. This is because the difference of pupil size (diameter or area) in response to PLR directly reflects the state of the autonomic nervous system resulting from both the sympathetic and parasympathetic influences that can be used for non-invasive diagnosis. Therefore, the prototype system of the smartphone based pupillometer can be used to efficiently observe the variation of the pupil size in terms of pupillary area.
To evaluate the segmentation accuracy, five randomly selected eye images taken with the prototype system were employed. Each of these images was processed by both the proposed algorithm on MATLAB and Adobe Photoshop 7.0 (Adobe Systems Inc., San Jose, California, USA) operation with manual segmentation. In Photoshop, the region of interest can be easily selected by using the brush tool with a high precision because it was attributed to the manual work. Thus, much research including pupil analysis utilized this simple method for evaluating their results [22,23]. When the results of the proposed algorithm were compared with the results of the Photoshop operation, the average accuracy rate was 97.7 ± 1.3%. The maximum and minimum accuracy rate was 99.3% and 96.1%, respectively. This was an acceptable rate when comparing to the results of other studies (generally above 95%) in terms of pupil extraction [24].
The distance change between the pupil and the smartphone’s camera in each measurement step (dilated and constricted pupil) was considered for the system performance evaluation. As the distance between the pupil and the camera varies in each measurement, the number of pixels corresponding to pupillary area becomes changes linearly, which can cause errors. To compensate these variations, the correction coefficient referred to the iris size was multiplied by the results of the constriction ratio of the pupillary area, as shown below:
where
From the randomly selected six sets of images, the corrected ratios were calculated and compared to the constriction ratio of the pupillary area without using the correction coefficient. The iris region was cropped in fixed 1 by 1 aspect ratio and the results showed that the average error rate was 1.4 ± 0.6% which is equivalent to 3 mm distance variation between the dilated and constricted conditions. Although individual face shape may vary with different participants, the applied apparatus body that tightly fit with the circumocular region limited the subject’s movement.
Figure 5 shows the results of the constriction ratio of pupillary area from 16 healthy participants. All participants had no known diseases which could affect the results and only the right eye was measured. The average constriction ratio of pupillary area in response to PLR was 4.89 ± 0.49 and the maximum and minimum ratios were 5.84 and 4.19, respectively. There was no significant difference between male and female. In this study, a standard ratio value was set for 4.0 because the normal constriction ratio of pupillary area in response to PLR is above 4.0 [25,26].
Since the ultimate goal of the development of the smartphone based pupillometer is to implement the whole process including
image processing into the Android mobile operating system, the Android application has been also programmed as depicted in Fig. 6. The Android platform is very suitable for image processing researching and provides higher flexibility to third parties on development and licensing issues, compared to the closed approach of the iOS platform [27]. The user can take a picture of the eye or load an existing image from the photo library in a smartphone. The image is then either processed or analyzed through the proposed algorithm on the phone, and the results of the constriction ratio of the pupillary area are displayed on the screen. The whole process was not well-organized yet, so the application is still under-developed.
From the results, the pupillometer system based on a smartphone is likely to be a good candidate for pupil analysis. In addition, the accuracy of the proposed algorithm for pupil localization has proved to be reliable with relatively high precision. However, the actual performance of this system should be compared with existing pupillometers since the different diseases may show similar variations in the constriction ratio. It means that the smartphone-based pupillometer needs to be specialized in certain diseases for clinical implementation. Since only healthy humans were recruited in this study, the results only reflected the normal state. It means that abundant data on the constriction ratio from abnormal conditions would be required for utilizing this system in clinical purposes to precisely distinguish abnormal conditions from the normal condition by observing the variation of the pupillary area in response to PLR. Therefore, more subjects with certain diseases which can affect the pupil size will be enrolled to establish a database about the constriction ratio of the pupillary area based on the number of pixels in the future study.
In this pilot study, the constriction ratio of pupillary area in response to PLR was observed by using the prototype system of the smartphone based pupillometer, and the proposed algorithm was applied to extract the pupil region from the raw eye images taken by the smartphone’s camera. The performance of the proposed algorithm was evaluated by the Photoshop processed results, and the average accuracy rate was 97.7 ± 1.3% which can be considered as a relatively high precision. The results from the sixteen healthy subjects showed that the average constriction ratio of pupillary area in response to PLR was 4.89 ± 0.49, and no one had the constriction ratio under 4.0 which is the standard value for differentiating normal or abnormal conditions. It is expected that the smartphone-based pupillometer could be easily manufactured and distributed to many places such as developing countries, outlying regions, general clinics and private spaces such as a home at low cost. Future studies will assess the applicability and accuracy of this pupillometer based on a smartphone for non-invasive diagnosis.