Open access peer-reviewed chapter

Utilization of Portable Digital Camera for Detecting Cataract

By Retno Supriyanti, Hitoshi Habe and Masatsugu Kidode

Submitted: November 28th 2011Reviewed: May 9th 2012Published: September 19th 2012

DOI: 10.5772/48428

Downloaded: 2365

1. Introduction

Cataract is a kind of eye disease [1]; that is a clouding in the lens of the eye that affects vision. Cataract exhibits a lot of whitish color inside a pupil. The three classes of cataracts are immature, mature and hypermature, which differ in seriousness. In an immature cataract, a whitish color appears inside the pupil but less so than in mature or hypermature cataracts. Usually, the condition is not yet serious. A Hypermature cataract exhibits much whitish color inside the pupil and can cause the lens of the eye to break if surgery is not carried out. This condition is very dangerous. Figure 1 shows examples of the range of serious and non-serious conditions.

The World Health Report published in 2001 estimated that there were 20 million people who are bilaterally blind (i.e., with eyesight of less than 3/60 in the better eye) whose blindness was caused by age related cataracts [2]. That number will have increased to 40 million by the year 2020. Increasing age is associated with an increasing prevalence of cataracts, but in most developing countries, cataracts often occur earlier in life. One of the developing countries that have the highest number of people with cataracts is Indonesia. There are about 6 million people in Indonesia who suffer from cataracts, but Indonesia only has about 1160 ophthalmologists for a population of more than 200 million people (one for every 350.000 people). In addition, ophthalmologists are not evenly distributed. Many ophthalmologists are located in the capital city, yet many people have no access to ophthalmologists because of geographic conditions.

Usually ophthalmologists will use various equipment like slit lamp or ophthalmoscope to determine the type, opacities and the location of the cataract, and to distinguish it from other eye diseases that have symptoms similar to cataracts. Basically, both equipments use a light source to determine the condition of the patient's eye lens. By using these kinds of equipment, lens opacities can be assessed by observing the width of the edge of the iris in a cloudy lens. If the remote location and the large shadow means immature cataracts, if it is a small shadow and close to the pupil occurs in mature cataracts. It is expected with early diagnosis, the cataract can be monitored whether to continue or will cause complications that must be treated to prevent blindness; However, using this equipment have some limitations including expensive price and special training needed. It will be a problem for some developing countries which has a limited number of both ophthalmologists and health facilities like Indonesia, Nepal, and Vietnam, for example. To solve this problem, we developed a method for detecting cataract based on digital image processing techniques. These techniques support the use of low-cost and easy-to-use equipment such as digital camera. We choose to use a digital camera as the main equipment with reference to the working principle of the slit-lamp camera and ophthalmoscope in which this equipment using the light to check the condition of the eye lens, so we adopted the use of the slit-lamp camera or ophthalmoscope light with a flash light on digital camera lenses to represent the condition. The two types of equipment are shown in Figure 2.

Figure 1.

Example of eye images

In our method, we extracted all information about cataract from pupil area only because all information about cataracts comes from the lens only. This is based on the fact that the opacities as an important sign of cataracts occur in the lens. However, when using a compact digital camera, we found problems such as insufficient image quality and uncontrolled illumination. For example, if we employ intensity value for screening cataract, i.e. higher intensity corresponds to a serious condition; it would fail for a cataract eye image taken under low illumination as shown in Figure 3. It appears that a non-serious condition eye image has an average intensity about 155 inside a pupil while a serious condition eye image only has an average intensity about 55 inside a pupil. In order to develop a robust cataract screening techniques, we proposed to use specular reflection analysis as the core method for cataract screening because specular reflection always brighter than surrounding area and it is not depend on illumination condition. We also were considering texture information as the supporting method.

This chapter will discuss step by step instructions on the use of digital cameras as the main equipment for detecting cataract, complete with an explanation of image processing techniques for the analysis of digital images produced by digital cameras.

Figure 2.

Examination using (a) slit lamp (b) our system

Figure 3.

Example of photographs under uncontrolled illumination

2. Images processing analysis

2.1. Definition of pupil

As discussed in Section 1, we extracted all information inside the pupil including specular reflection and texture appearance because all information about cataract is taken from the pupil region only. The pupil of the eye is simply a hole in the iris through which one can peer into the eye. It appears black because of the darkness inside [3][4]. Based on these definitions, we can conclude that the color of the pupil is universal; it does not depend on ethnicity, although the color of the iris is different for different ethnicity, as shown in Figure 4.

Figure 4.

Color of pupil does not depend on ethnicity

The pupil gets wider in the dark but narrower in light. When narrow, the diameter is 3 to 4 millimeters. In the dark it will be the same at first, but will approach the maximum distance for a wide pupil of 5 to 8 mm depending on a person’s age [5]. There are some definitions regarding pupil size in Figure 5.

Figure 5.

Definitions of pupil

The pupil’s size always changes while the iris’s size is fixed, therefore, to make pupil size independent in various conditions, in this paper we will use a ratio between pupil and iris as a unit to express size measurement, indicated by the symbol Pr and ex pressing by Equation 1.


2.2. Pupil localization

In general, the algorithm used in pupil localization is using 3 stages. Before performing these steps, the original image size changed to 50%. This is done to simplify the image processing operations.

  1. Masking Step, namely the separation process of facial images based on skin color. How this is done by utilizing the luminance component and Cb and Cr to form the face of the box based on skin color as described in Figure 6.

Figure 6.

Face masking process

  1. Region of eye Step, when it was getting a face image in the box and then take the eye area. Cutting the eye area is based on the normal form has a face that the proportion of 1 / 3 the length of a human face [6] as described in Figure 7.

Figure 7.

Estimation of eye area

  1. Pupils Step, at this stage to use Lab color characteristics to determine the image of the pupil. Then using a fixed radius circle Hough to determine the center point of the circle which is the center point of pupil candidates as described in Figure 8.

Figure 8.

Pupil circle

2.3. Specular reflection analysis

The core of our method is specular reflection analysis. We develop our algorithm refer to the working principles of ophthalmoscope and slit lamp. An ophthalmoscope is an instrument that enables a doctor to examine the inside of a person's eye. The instrument has an angled mirror, various lenses, and a light source. A slit lamp is an instrument that enables a doctor to examine the entire eye under high magnification and that allows measurement of depth. The slit lamp focuses a bright light into the eye. Both equipments have a similarity for diagnosing cataract.

Figure 9 describes the principle work of the specular reflection method. Light hits the frontal surface of the lens and makes a reflection called frontside reflection. But actually light also hits the rear side of the lens. For a non serious condition, there is not a whitish color inside the lens so it will be reflected again, which is called backside reflection. For a serious condition especially, because there is a lot of clouding in the lens, light will not be reflected again. The different characteristics are shown in Figure 10. Based on the reflection theorem, the direction of the normal vector always goes to the center of the pupil, so when we look at the image appearance we can find the relationship of the location between the two reflections and the center of the pupil; they are on a single line

Figure 9.

Model of reflection characteristics in eye

Using the relationship between both reflections, we conducted a search to find the backside reflection, as depicted in Figure 11. Using coordinate of the center and the radius of frontside reflection, we then searched for the backside reflection by searching for areas of higher intensity beside frontside reflection compared with their immediately surrounding areas in a line that expressed by Equation 2


Where A is the length of backside reflection searching, d is the distance between center of pupil and center of frontside reflection, r is the radius of pupil and is the radius of backside reflection.

In fact, the shapes of specular reflections are varied as described in Figure 12. As shown in Figure 12, some variations of the specular reflections shape are circle, cube, rectangular and ellipse, although we used the same flash light during taking photographs. Therefore, during searched for backside reflections area as described in Figure 11, we considered to assume various shapes of specular reflections and did intensity searching based on the shape that we assumed before as shown in Figure 13.

Figure 10.

Example of Reflection Appearance

Figure 11.

Searching backside reflection area data

Figure 12.

Various shapes of specular reflections inside the pupil

Figure 13.

Intensity tracking using various shapes of specular reflections

We apply Eq. 2 which the value of is determined by following the assumption of specular reflection as shown in Figure 14.

Figure 14.

The size using for intensity tracking

Then, we compare the performance of each shapes of specular reflections in order to provide a recommendation on the tendency of specular reflection's shape that can give the best results for cataract screening sistem we apply an Eq.4.

Based on the result of intensity tracking as shown in Figure 11, we implemented a differential function in a discrete system to develop an automatic screening between the serious condition and not serious condition based on intensity tracking result and expressed by Equation 3.


Where I is intensity and S is a distance between center of frontside reflection and the next circle that will be investigated. During intensity searching, if D(S) >0 it means there is an increasing intensity value. Otherwise if D(S) <0 it means there is a decreasing intensity value. Based on the discussion in above paragraph, that non serious condition always have a great increasing intensity that indicated existence of backside reflection but it doesn’t mean that serious condition didn’t have increasing intensity during intensity tracking. Because we have variations of the numbers of intensity searching so we define normalized number of increasing value determined by Equation 4.


Where P is the numbers of point that has increasing intensity value and n is the numbers of point along an intensity tracking line. The main characteristic of serious and non-serious conditions depends on the presence of backside reflection in an image that is shown by increasing intensity in an area during intensity searching. Figure 15 shows the examples of the result of intensity tracking for serious and non-serious.

Figure 15.

Analyzing backside reflection

2.4. Texture analysis

2.4.1. Uniformity

An important approach to region description is to quantify texture content. In statistical texture analysis, the descriptor measures properties such as smoothness, coarseness and regularity. Basically, there are two kinds of textures inside the pupil; smooth and coarse. This can be calculated by the uniformity value expressed in Eq.5. Where U is the value of uniformity, H is probability histogram of the intensity levels in a region, and N is the number of pixel in an image, Let i = 0, 1, 2, ….,, L − 1, be the corresponding histogram, where L is the value of possible intensity. Uniformity will be maximum when all gray levels are equal [7]. Whitish color inside the lens has two kinds’ distributions. First, whitish color spread smoothly inside the pupil. In the early stage, this kind of cataract has a thin layer of whitish color and covers the whole lens surface gradually until the whitish color layer becomes thick. Second, whitish color spread uneven inside the lens. It will appear a coarse texture inside the pupil. Almost all non serious conditions have a smooth texture with a high value of uniformity.


For example, in a 3 x 3 region and belongs to a smooth texture as shown in Figure 16, the uniformity is shown in calculation below:


Figure 16.

Example of Smooth Texture

Another example, in a 3 x 3 region and belongs to a coarse texture as shown in Figure 17, the uniformity is shown in calculation below:

Figure 17.

Example of coarse Texture


Figure 18(a) shows an image of eye in serious condition with a high value of uniformity caused by the whitish color is spreading smoothly inside the pupil. In the early stage, this kind of cataract has a thin layer of whitish color and covers the whole lens surface gradually until the whitish color layer becomes thick. Figure 18(b) shows an image of an eye with a coarse texture because the whitish color is spreading unevenly inside the pupil. Figure 18(c) shows an image of an eye in non-serious condition. Almost all non-serious conditions have a smooth texture with a high value of uniformity.

2.4.2. Average intensity

The equation to measure an average intensity expressed in Equation 6, where m is mean (average) of intensity, I is possible intensity, and N is number of pixel in an image [7]. It will be very simple intuition that cataract eyes have brighter intensities than normal eyes.


Figure 18.

Example of Texture Appearance

For example, in a 3x3 region as shown in Figure 19, the average intensity is shown in calculation below :


Figure 19.

An example of average intensity

The whitish color inside a pupil has a corresponding with increasing intensity. Figure 20 shows an eye normal image and a cataract eye image. It appears that a cataract eye image has a higher intensity than a normal eye image. By assuming that a serious condition has a higher intensity than a non-serious condition, we distinguish both conditions.

Figure 20.

Intensity difference between normal and cataract

3. Diagnosing by classification

To build the system, we used Matlab R2007B with image processing toolbox. Also, for building a classifier to classify between serious and non-serious condition, we use SVM toolbox developed by Canu [3]. In order to make a classification for cataract screening we need two kinds of data: training data and testing data. Training data used to train the system to recognize the characteristics of a serious condition and non-serious condition so the system can determine the threshold for distinguishing between two conditions automatically. While testing data used to evaluate system performance refer to the characteristics obtained in the training data.

To test the performance of our system, we use several parameters. The first is True Positive Rate (TPR). TPR determines a classifier or a diagnostic test performance on classifying positive instances correctly among all positive samples available during the test. The second is FPR (False Positive Rate). FPR, on the other hand, defines how many incorrect positive results occur among all negative samples available during the test.

Criterion values for getting TPR and FPR parameters are described in Figure 21.

Figure 21.

Parameter for measuring performance

To evaluate the overall system performance, we use cross validation techniques in which we did evaluation several times until all data were evaluated.. So that all images produced by various kinds of cameras are grouped into two groups. The first group is the images that show the serious conditions, while the second group is the images that show the non-serious conditions. We did some testing times by taking 90% of data as training data and 10% of data as testing data. Data changed each time, until finally all data used as training data and testing data. Figure 22 shows a summary of performance our algorithm. The result shows that current method has a good performance than other method.

Figure 22.

Performance comparison for each method

4. Practical screening system and data acquisition

As discussed in subsection 2.3, the core of our method is specular reflection analysis. Referring to the reflection theorem, light hits the frontal surface of the lens and makes a reflection called frontside reflection. However, light also hits the rear side of the lens. For a non-serious condition, there is not a whitish color inside the lens, therefore, it will be reflected again, which is called backside reflection. For a serious condition especially, because there is a lot of clouding in the lens, light will not be reflected again. In order to investigate the availability of frontside reflection and backside reflection inside the lens, and also to obtain a minimum distance between two reflections that can be observed by our algorithm, we did a simulation. Refer to the experiments, our algorithm can observe availability of two reflections with minimum ratio between distance and iris of about 0.125. It is an important value because if our algorithm fails to investigate availability of the two reflections, will face problems. First, patient really has a serious condition. Second, it is caused by a wrong position between camera and patient during taking a photograph.

Regarding these problems, we have to make sure that we put camera and patient in an appropriate position. Therefore, a simulation of the angle’s position is very important. In our simulation, we assume that a light is attached in camera. The purposes are:

  1. Getting an optimal position of angle between camera and lens.

  2. Getting an optimal pupil size to get an appropriate distance between two reflections.

The lens has an ellipsoid, biconvex shape. It is typically circa 10 mm in diameter and has an axial length of about 4 mm [5]. An iris is a colored disk inside the eye with diameter of about 12 mm [5]. Figure 23 describes the shape and size of the lens, pupil and iris in our simulation.

Figure 23.

Typical shape and size of pupil

In this part, there are three conditions. First is a condition where the reflection does not occur inside the lens. Second is a condition where only a frontside reflection occurs and can be observed inside the lens. Third is an appropriate condition where a frontside reflection and backside reflection occur and can be observed in an image plane. Figures 24-26 show each condition, respectively.

During simulation, we change the position of the camera with light attached based on angle () between camera and lens. It starts from angle 1o to angle 180o. Figure 24 shows that the position of light cannot reach the lens because light hits the surface of the iris; therefore, there is no reflection in the lens

Figure 24.

Condition in which no reflection occurs

Figure 25 shows that light hits the frontal surface of the lens therefore, a reflection occurs and is observed. However, when the light hits the rear side of the lens, a reflection occurs but it cannot be observed in the image plane. Therefore, in this condition, only frontside reflection is observed in the image plane. Figure 26 shows an appropriate condition in which both reflections occur and are observed in the image plane. This kind of parameter will be useful for distinguishing between serious and non-serious conditions.

Figure 25.

Condition in which only frontside reflection occurs and is observed in an image plane

Figure 26.

An appropriate condition in which both reflections occur and are observed in an image plane

In the real condition, As already discussed in the section 1, that our system is expected to be used by all people in all places, so that the equipment will be used in our system must also be simple as shown in Figure 28. Brief description about the function of equipment is described in the following paragraph.

  1. Chin rest - This is equipment for patient to lean forward and place his or her in the chin rest and forehead against the bar. We use a simple chin rest created manually by using a board that is placed on something that could make it stand upright. The main goal is to put the patient's chin so that patients feel comfortable during taking a photograph. On the other hand, by using a chin rest so will allow a user to get the right eye image during taking a photograph because the patient does not move his head movement that will result in the patient's eye movement. We should be emphasized here that this tool is not absolutely necessary in our system, if users can take photograph that make an appropriate input image and the patient feel comfortable, not moving their head so that the position of the eyes in a state of permanent, then the use of these tools are not needed.

  2. Tripod - Tripods are used for both still and motion photography to prevent camera movement. The main purpose of using a tripod in our system is to make it easier to get good quality photo because the camera will be in a fixed position and not moving so the possibility of blur can be prevented. Another reason is to get more accurate angular position between the camera and the patient because they will affect the existence of specular reflection inside a pupil as be described in above paragraph. It should be noted here that as well as the use of chin rest, the use of a tripod in our system is not an absolute thing. If users able to get an appropriate input image without using a tripod therefore this equipment is not required in our system.

  3. Digital Camera - This is the most important equipment in our system because all the input images are taken from a digital camera. In our system, we use all types of digital cameras from various brands available such as Canon and Nikon. We do not consider about the performance of cameras such as the number of pixels, zooming capabilities,and other facilities. Most important for our system is the camera has flash facility as a light source to get specular reflections, has a macro facility to get a good enough quality when taking photographs for the pupil of the eye area. Referring to Figure 2, it can be said that the performance of each camera is almost evenly.

Figure 27.

System performance based on types and brands of digital camera

  1. Scale - This is equipment to provide guidance angle camera placement. We use a kind of plastic mats that have been marked to measure the angle between the patient and the camera.

  2. Personal Computer - The main function is an interface for analyzing of input images that have been obtained in the data acquisition session. Our method written in the form of graphical user interface (GUI) so that user easily uses it just by pressing the command buttons available. Users do not need to analyze the complicated result because our methods give results about the patient's condition which he included in serious or non serious condition.

Figure 28.

Equipment were used in our system

Figure 29 and Figure 30 describe about the implementation of data acquisition in the real condition.

Figure 29.

Side view of camera configuration

Figure 30.

View from above camera configuration

5. Conclusion

Regarding the conditions in developing countries which have limitations both of eye doctors and health facilities, using simple equipment such as digital camera for cataract screening is promising and sufficient. Because digital camera is small and easily carried out, easy to use and inexpensive. Also, the method for supporting digital camera has a good performance for distinguishing between serious and non-serious condition; therefore, it is very useful for determining people who need a surgery as soon as possible.


We Would like to thank the head and staffs of the Kamandaka Eye Clinic in Purwokerto Indonesia, Students and staffs of Electrical Engineering Dept, Jenderal Soedirman University Indonesia.The staffs of NAIST Japan, all members of the Advanced Intelligence Laboratory at NAIST, and members of the elder peoples house (CHOMEISHO) in Ikoma Japan, for their permission and willingness have photographs taken of cataract and normal patients. Also, this work is partly supported by the Konika Minolta Imaging Science Foundation and the Foundation for NAIST, also DIPA Jenderal Soedirman University through International Research Collaboration Project.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Retno Supriyanti, Hitoshi Habe and Masatsugu Kidode (September 19th 2012). Utilization of Portable Digital Camera for Detecting Cataract, Ocular Diseases, Adedayo Adio, IntechOpen, DOI: 10.5772/48428. Available from:

chapter statistics

2365total chapter downloads

1Crossref citations

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Clinical Application of Photodisruptors in Ophthalmology

By Emina Alimanović Halilović

Related Book

First chapter

Evidence of Oxidative Stress Damage in Glaucoma

By Sandra M Ferreira, Claudia G Reides, Fabián S Lerner and Susana F Llesuy

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More about us