You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/325638168

Optical power measurement using image processing techniques

Conference Paper · May 2018


DOI: 10.1109/ICSIGSYS.2018.8372667

CITATION READS

1 139

4 authors, including:

Mahmoud Elsayed Abdelsalam Hamdi


Multimedia University Multimedia University
9 PUBLICATIONS   37 CITATIONS    2 PUBLICATIONS   8 CITATIONS   

SEE PROFILE SEE PROFILE

Salman Al-Ahdal
Multimedia University
2 PUBLICATIONS   7 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Vision Based Robotic Routing View project

Development of Bioelectric Stimulation System for Alzheimer’s Disease Therapeutics View project

All content following this page was uploaded by Mahmoud Elsayed on 23 November 2018.

The user has requested enhancement of the downloaded file.


The 2018 International Conference on Signals and Systems (ICSigSys)

Optical Power Measurement using Image Processing


Techniques
Mahmoud El-Sayed*, Fawaz Sammani*, Abdelsalam Hamdi and Salman Ali Al-Ahdal
Faculty of Engineering and Technology, Multimedia University
75450 Melaka, Malaysia
mahmoud.mohmmed.mustafa@gmail.com; fawaz.sammani@aol.com; abdelsalam.h.a.a@gmail.com; alahdalsalmanali@gmail.com;

Abstract— Although the lensometer, also known as manufactured lenses before patients start to use, in order to
a focimeter or vertometer, has shown high efficiency and insure it is the required power. The power of the lens is
accuracy, it involves a lot of human participation such as determined in term of the refraction power with canonical
observation and manual calculations. This is besides its length of one meter .The power refraction with canonical
high cost. However, the device has been developing to length of one meter is known as diopter [1]. Lensometer is the
dispense the human involvement as much as possible, but known device to measure lenses’ power. Some automatic
yet the cost factor still has an effective drawback. In this lensometer consist of spectrometer which contain visible and
paper, we propose measuring the lens power using image ultraviolet spectrum. This spectrometer is used to measure the
processing techniques, and thus avoiding the human work. transfer spectrum of the lens in rang of UV-B, UV-A, and
The method is based on measuring the image blur for a visible. The use of this device has some disadvantages which
number of lenses, and then developing an equation that are time consuming, cost and complexity. Using Image
represents how blur is the image in reference to a processing to measure the power’s lens based on Newton's law
particular lens power. The proposed method may be in optics for visible light was proposed in [1]. In this paper, we
designed as a device to replace the lensometer, and thus proposed a new technique of measuring the lenses’ power
reducing cost and complexity. using Image processing. After few experiments we notice that
image blur differs behind the spectacles’ lens depending on
the type of the lens as well as the power of the lens in front of
Keywords—optical power, lens power, image blur the camera while the picture is taken. Here we propose to
measure the power of the lens by determining the blurriness of
I. INTRODUCTION the image taken behind the lenses with respect to the original
As it is well known the power of the lens differ from person image taken without any lens. There are several algorithms to
to person and from eye to eye, as well as it’s not constant over measure the blurriness of an image. We did some compression
the time. The power of the eye’s lens can decrease due to the between these different methods and chose the best of them to
straight interact between the human’s eye and the rays coming implement our proposed technique to measure the lenses’
out of electronics devices’ screens. It can also be reduced due power.
to unhealthy food …etc. The power of the eye’s lens can be
II. RELATED WORK
adjusted to be perfect again by using laser surgery and some
other surgeries. For normal vision in an eye, spectacles or lens Previously, there was no much involvement of image
are used. Spectacles are a pair of glasses for correcting processing techniques in the glass lenses’ power measurement.
defective vision of the eye’s lens. Myopia, Hyperopia, and Usually, physical machines, such as lensometers, were used to
Astigmatism are three different issues that any human eye can measure the lenses’ power. Figure 1 below shows the
suffer from. However people usually wear spectacles or lensometer used for lens power measurement.
contact lens to overcome these three issues. Myopia causes
blurriness in the vision for distant items, Hyperopia causes
blurriness in the vision for near items, and Astigmatism results
in a blurred vision.
There are three type of lens that are usually used in glasses
manufactories or in lens’ shops .Concave lens are used to
adjust the view to be in it’s original for those who has Myopia
problem .For those having Hyperopia problems, Convex lens
are used. For Astigmatism, the lens used is known as
Astigmatism’s lens which has to be placed in a certain angle; Fig 1. The Lensometer
however Astigmatism is a commune issue which can be
attached with any of Myopia or Hyperopia. The lensometer has shown high efficiency and accuracy.
In optic science or medicine, measuring the power of the lens However, obtaining the results may be tedious as it involves a
is necessary in some application, including testing lot of observation and manual calculation. Nevertheless, the

978-1-5386-5689-1/18/$31.00 ©2018 IEEE 205


The 2018 International Conference on Signals and Systems (ICSigSys)

device has been developing to dispense the human computed. Then the result will be stored in A for the reference
involvement as much as possible, but yet the cost factor still image, and in B for the blurred image.
has an effective drawback. One of the rare involvements of the
image processing in the lenses’ power scale was building an x1 x2 x3
automatic lensometer that works by the image processing
techniques. Practically, by using Gaussian law and Newton’s x4 x x5
law. The laws are listed below [1]
x6 x7 x8
Newton’s Law:
Fig 3. A pixel x with its eight neighbors

Gaussian Law, Reference image calculation:


Compute (x – xi) for each pixel
A = max (x – xi) for each pixel
(h, f, s, x) are related to object and primed symbols (h', f', s',
x') are related to image of object [2],[3]. Blurred image calculation:
In Gaussian Law, received images convert to grayscale and Compute (x – xi) for each pixel
get filtered by a Gaussian smoothing filter [4], [5], [6], [7] B = max (x – xi) for each pixel
Figure 2 below illustrates Newton’s law.
2- A and B are now (N-2) × (M-2) matrices containing the
maximum values of the intensity variations. Then, the average
of maximum values for both images will be calculated.

Z1 = average (A) Z2 = average (B)

3- The percentage of the image blur is calculated as:


Fig 2. Newton’s Law Blur % = abs (Z1 - Z2) / Z1

However, the created machine is yet more complicated than In this way, the image blur can be calculated. Several Lenses
the used methods in this paper. The used methods are mainly with different powers were gathered, and images were taken
depended on differentiating the amount of blur created by the using a camera placed behind the lens. Figure 4 shows the lens
different focal lenses. used to perform this study.
III. METHODOLOGY
The proposed method depends on the measurement of the
-
blurriness created by changing the power of the camera’s facial
+
lens. Thus, through experiments, a database could be created to
relate the blurriness percentage with lens’s power. The created
relationship could be represented mathematically and
graphically, as will be shown in the results. Later after the Fig 4. The Lens used in this study. Positive (+) are black, and
lens’s power is determined another thresholding technique is negative (-) are red.
applied to determine whether the lens zoomed in or zoomed
out, hence the type of lens will be determined accordingly IV. RESULTS
whether it’s a convex or concave (positive or negative).
Figure 5 shows the images taken from the Lenses in the order
In order to achieve the correct relationship the object, the stated in Table 1. The first image is the reference image.
resolution of the used camera, and the distance between the
camera and the object had to be fixed, due to the significant
attenuation caused by the change in these factors. This
methodology could be fabricated in an automatic lensometer.
The algorithm used to measure the image blur is explained
as follows:

1-Both the reference and the blurred images are assumed to be


of size (M × N). The difference between the center pixel and
its 8 neighbor pixels is computed for each pixel in the both
images. In other words, the intensity variation of the 8
neighbor pixels for each pixel of both images will be
Fig 5. Images captured (dataset)

978-1-5386-5689-1/18/$31.00 ©2018 IEEE 206


The 2018 International Conference on Signals and Systems (ICSigSys)

The resultant image blur for the following lens power was as R² = 0.9588 with reference to a polynomial curve
follows:
For a simpler equation, we will reduce some data to conclude
TABLE 1: RESULTS OBTAINED FROM LENSES with the results shown in Table 2.
Power 0.12 1 1.5 2 2.5 3 3.5 4
Blur 10.7 12.9 23.9 25.6 38.2 46.38 49.67 54.95 TABLE 2: REDUCED RESULTS
(%) Power Blur (%)
1 12.99
Power 4.5 5 7 8 10 12 2 25.6
Blur 57.38 58.46 59.59 59.61 60.11 60.27 3 46.38
(%) 4 54.95
5 58.46
Power 14 18 20
Blur 60.81 61 61.28 The equation obtained from these results was:
(%)
y = -1.1025x3 + 7.7504x2 - 0.9571x + 6.906
The equation developed from the data above resulted as:
y = 0.0001x6 - 0.0075x5 + 0.1728x4 - 1.7594x3 + 6.852x2 +
2.7527x + 8.3899

R² = 0.993 with reference to a polynomial curve

R² = 0.9848 with reference to a polynomial curve However, the equation can still be reduced, in order to refer it
to a fully linear line. Table 3 shows the reduced results.
For a simpler, but less accurate result, the equation can be
simplified to: TABLE 3: REDUCED RESULTS
y = -0.002x4 + 0.1179x3 - 2.4093x2 + 20.411x + 1.0176 Power Blur (%)
1 12.99
2 25.6
3 46.38
4 54.95

The equation developed from the above data was:


y = 14.666x - 1.685

This equation is the simplest equation to represent the blur


percentage in regard to a specific lens power.

The following graph was obtained with R² = 0.9774

978-1-5386-5689-1/18/$31.00 ©2018 IEEE 207


The 2018 International Conference on Signals and Systems (ICSigSys)

Fig 11. -20 Power image


Fig 10. -20 Power image after thresholding

As it can be seen, in the positive (+) class, the lens image has
zoomed in, and in the negative (-) class, the lens has zoomed
out. Table 4 shows the results
All the above results represent the positive (+) lens power, TABLE 4: THRESHOLDING RESULTS
which are the black lens shown in Figure 4. For the negative (-)
Image Reference +20 Power -20 Power
results, they should ideally be the exact same as the positive
results, since the blur in both is the same, except that the Number of 655796 833864 400790
positive (+) lens zooms in the image, and the negative (-) lens Black Pixels pixels pixels pixels
zooms out the image.
From table 4, we can easily determine whether the image is
However, to determine if these results are from the positive (+) from a (+) or (-) class. If the image captured resulted in
or the negative lens (-) class, we will perform image 833864 black pixels, which means it is from a positive power
thresholding, and then measure how bigger or how smaller the lens. If the image captures resulted in 400790 black pixels,
image has resulted from the reference image. The measurement which means it is from a negative power lens.
is done by counting how many black pixels are in the reference
image, and how many in the captured image, and then
comparing them. If the number of black pixels in the captured V. CONCLUSION
image is bigger than the number of black pixels in the reference
image, that means the source is from positive (+) lens. If the As a conclusion, this study has managed to measure the lens
number of black pixels in the captured image is smaller than power using image processing, and thus avoided the use of
the number of black pixels in the reference image that means other devices used to perform that, like the lensometer, which
the source is from negative (-) lens. We will illustrate this with requires a complex process for human. This study may be
a captured image of +20 Power and -20 Power. implemented as a device, and it can successfully be utilized in
places where optics is dealt with.
Figure 6 shows the reference image. Figure 7 shows the image
after thresholding it. Figure 8 shows the captured image from
(+20) lens power. Figure 9 shows the image of (+20) lens REFERENCES
power after thresholding. . Figure 10 shows the captured
image from (-20) lens power. Figure 11 shows the image of (-
[1] Rasool baghbani and Masoomeh Ashoorirad, A New Method for
20) lens power after thresholding. Measurment Power of Lens using Image Processing Techniques, 2009
[2] Troy Sannini, O.D and Eheodrer fvenor ,O.D, "Clinical Optics ",
Baterworth Heine Mann, 1996
[3] Kungslake, "Optical System Design", Newyork Academic,1983.
[4] Gonzales,R.C. and Woods, R.E., "Digital Image Processing", Prentice
Hall,2nd Edition,2002.K. Elissa
[5] Mark Nixon & Alberto Aguada,"Feature Extraction and Image
processing",second edition, 2008.
[6] C. Solomon, T. Breckon, Fundamentals of Digital Image Processing. A
Fig 7. Reference image after Practical Approach with Examples in Matlab, Wiley-Blackwell
Fig 6. Reference Image thresholding [7] Anil K Jain, Fundamentals of Digital Image Processing

Fig 8. +20 Power image Fig 9. +20 Power image


after thresholding

978-1-5386-5689-1/18/$31.00 ©2018 IEEE 208

View publication stats

You might also like