Вы находитесь на странице: 1из 14

Design of Illumination Source Used for Vision Measurement

Haomin Zeng
Illumination Source Support Design
In computer vision, there are two types of illumination system, one is front illumination and
the back illumination (Fig.1). The first one is usually used for illuminate surface of object to
detect defects, scratches, and detailed features of surface. The later one is used for projecting
the shadow of a opaque objects, or to observing the inside of transparent objects and
obtaining high-contrast images.

There two kinds of front illumination, one is High-angle illumination(above 75 ) and one
is Low-angle illumination(below 25 ). The difference is that the size of angles between the
light emitted by light source and the object surface to be measured.
In order to meet the needs of a variety of measurement, to provide front lighting and back
illumination, I designed the support as Fig 2.

The basement is constituted by part 4 and part 5. And part 4 is used for object stage while
part 5 is used for placing back illumination source. Part 3, which can achieve circular motion
by the intersection point, is used to adjust the angle of front illumination. Part 1 is used to
place front illumination source. Hence, the support have two degrees of freedom(Fig 3

The real support made by wood is as in Fig 4.

LED Source Modeling


The LED model built by Tracepro.(Fig 5)

And the Optical path simulation map of the LED is as Fig 6,

When the optical simulation software simulates the light distribution of the receiving surface,
in general receiving surface is divided into a number of equal-sized areas, according to the
number of light incident on of each region, which is the difference light flux, to determine the
size of the light intensity. After smoothing by computer we can obtain the desired light
distribution.

After smoothing, the light intensity distribution on receiving surface is:

Esmooth ( x, y) E ( x ', y ') K ( x x ', y y ')dx ' dy '

1
K ( x, y )
e
2

x2 y 2
2 2

is the waist radius of Gaussian function , whose value determines the degree of smoothing
of illumination map.
Along the direction of LED light, establishing a 100mm 100mm rectangular receiving
surface with a working distance of 150mm, the receiving surface analysis illumination map
is as Fig 7.

Uniform Light Design


I used Tracepro to simulate the light distribution in different condition with different spacing
a of the 22 LED array.

22 LED Array

(a)a=20mm

(b)a=25mm

(c)a=30mm

(d)a=35mm

(e)a=40mm
After analysis, when a=35mm, there is trough value on the curve while there is no trough
value when a<30mm. However when a=25mm, the second derivative of the top area of the
curve is very small which means the LED has not been fully utilized and the illunimated area
is small.
Then let a=30mm, and adjust the distance z between source and receiving surface.

az=50mm

bz=100mm

cz=150mm

dz=200mm

ez=250mm
After analysis the results of simulation, when z>150mm, there will not be trough value on the
curve. As z becoming lager and lager, the illuminated area becomes smaller and smaller. At
last we set a as 30mm, and z as150mm, and in this condition the area of illuminated area is
100mm100mm.
Considering the power, illuminated area , brightness all together, and to meet need of uniform
illumination, we set line spacing to 30mm, column spacing to 20mm, and the distance
between source and receiving surface is 150mm.

Color Selection of Illumination Source


To find out the impact on picture quality when illuminating objects by different color of
source, using the following experiment. Choose different colors caps shooting images in
different colors of light, and the captured images are as follow.

(a)read objects

(b)under white light

(c)under red light

(d)under green light

When red cap under green light we can get the best image quality, while under red light we
got worst image quality. Therefore, the color of source indeed has impact on image quality.
In order to enhance the applicability of illumination source, and to implement some special
purpose measurement when the objects are of clear color-coded, we choose three kinds of
color, that is white, red and green.

Source Implement
To satisfy the color selection and spacing of LED array at the same time, the LEDs of same
color spaced in LED array and parallel connected with each other. Hence there are three
different circuit branches in the whole LED array system, and each of them used for one
particular color of LEDs.

Illumination Control System


There are four circuit branches in all, one is for white front illumination, one is for red front
illumination, one is for green front illumination, and the other is for white back illumination.
Each branch need to implement the controlling of source on-off selection, branch selection,
source brightness adjustment. Thus the illumination control system has two parts, one is
brightness control, and another is branch selection.
Circuit Design
The control system uses 51 microcontroller as the core controller, and using computer to
control 51 microcontroller, and then the microcontroller control the LED array to has
appropriate response.

Connection and transferring data between computers and 51 microcontroller is via the serial
port. According to inputs of computer, 51 microcontroller setting the input of D/A, and then
the output of D/A which is current, would be converted and amplified to be voltage signal
which is uniquely associated with the input of computer. In order to improve the load
capacity of the system, we built an emitter follower based on NPN dynatron, and the output
voltage signal can be used to control the brightness of LED. Meanwhile, the analog switch
receive signal from 51 microcontroller and strobes corresponding optical path.
In the hardware build process, it is also particularly important to select the appropriate chips.
By contrast, the choice of some important chips is described below.
Chip Model

Brief Description

DAC0832

Using CMOS technology, with the ability to distinguish the eight D/A
converter, having three ways of working. Used the work mode
without buffering in this design.

UA741

An amplifier is most commonly used

SS8050

Using it as an emitter follower (emitter output), increasing load


capacity of circuits.

CD4051

Single 8-channel digitally controlled analog electronic switch

LM336-5

5V regulator, used to provide a stable and accurate reference voltage


value for the D/A.

By experiment, the voltage range is set to 3V to 12V with an adjustable gradient 1V.
Therefore, the positive and negative op-amp power supply should be set to 15V, while the
other chip requires a 5V power supply, so the power section needs 15V, 5V three voltage
values.
Hardware Program
Hardware program is divided into three parts: the serial data receiver, D/A inputs control,
analog switch strobe. The hardware algorithm flowchart is as follow.

Interface of Control System


In order to achieve control more easily, and simplify the control method of the light source,
we used Matlab 's GUI designed the interface.

Image Quality Assessment

Factors Affecting the Measurement Accuracy and Evaluation


As the final integral amount of charge of imaging system is proportional to the light intensity
and illumination angle of the light source, for a fixed camera system, if the illumination is too
large, the camera system is saturated, if the illumination is too low, the noise in the captured
images would be oblivion. Therefore, the change of brightness will affect the quality of
capture images.
In the vision measurement system, the measurement is performed mainly by extracting edge
information, which means that the edge extraction accuracy is directly related to the quality
of the measurement. And the quality of edge detection is directly related to the contrast of
both sides of edges, so the contrast is an important factor affecting measurement accuracy. At
the same time the noise level and the average brightness are factors affecting the
measurement accuracy.
Here Weber Contrast is used to compute the contrast C:

L
L

where L is the increment or decrement in the target luminance from the uniform background
luminance L.
Noise evaluation is based on the method proposed in document [1]. Firstly, the image is
divided into several blocks, and then computing the standard deviation of each image block,
and using the standard deviation to build Gaussian function. After filtering the image block
with the Gaussian function, compute the difference between the filtered block and the
original image block which is the estimated standard deviation noise.
In error theory, measurement accuracy can be evaluated by the reproducibility. Here, the
reproducibility can be defined as the result of processing a plurality of sets of images
captured under the same illumination:
n

( x x)

i 1

n 1

where n is the number of images captured under the same illumination, xi stands for the ith
_

image captured under the same illumination, x is the average result of images captured
under same illumination, and is the standard deviation of result. When is smaller, the
reproducibility is better, and the measurement is more accurate.
Image Character Extraction
Evaluation of image quality is based on the measured standard deviation of image feature.
Therefore, how to extract the image features and reasonable type of feature selection is
particularly important. In image processing, feature extraction mostly base on edge extraction.
According to the objects used in experiment, the basic steps of feature extraction are as
follows: median filtering, binarization, edge detection, labeling, extraction feature.
Image Quality Assessment Model
To establish the assessment model, we need to collect experimental images. Under the two
different illumination in this design, increase the illumination from 1 to 10 by one gradual
respectively, and collect 20 images under every brightness level. Extracting the image feature,

and calculate the standard deviation under different lighting method and different brightness
respectively.
Back Illumination
Under back illumination, capture 20 images on every brightness level of 10 respectively.

When the brightness reaches a certain level, the image contrast will be large, while at
lower brightness, the image contrast is lowered, and noise increases.
Through the correlation detection of noise and contrast, it shows that the noise and
contrast appear in negative correlation , that is , when the contrast is very small , noise is
big and has great impact on the accuracy of the following image processing. Due to
noise and contrast have a strong correlation, image quality assessment uses only contrast
as a measure of evaluation.
The relationship between contrast C and measured standard deviation getting by
Logistic curve fitting is as below.

Through analysing the curve, when C is small is comparatively large, the image is of
bad quality, and measurement accuracy is not good. As C gets larger and larger,
becomes smaller and smaller. And when C reaches a certain threshold point, gradually
approaches 0, the measurement accuracy significantly increases. Here the threshold
value of C is 0.65 which is used for feed-back information of brightness adjustment.
And the brightness level corresponding to 0.65 is the best brightness level under the
current condition. When we get this value, the information will automatically transfer to
51 microcontroller via serial bus.
Front Illumination

Under front illumination, changes of contrast are not obvious for human eye. When
plotted the curve of contrast C as the light intensity increasing, it shows that this curve is
not monotonic. Further contrast is also affected by changes in the measured surface
texture. The main role of front illuminate is to illuminate the surface of object, for
detecting surface defects. So the contrast is not the only indicator for evaluating image
quality. According to reference [2], the low frequency component of image represents
smooth portion of the image, while the high frequency component represents noise and
edges of the image. Thus low frequency component ratio of image can be used to
assessing image quality.
According to the frequency domain image filtering theory, edges and other sharp
variations, such as noise, are in the high frequency portion of the Fourier transform.
Therefore, to obtain the low frequency component ratio of an image, firstly image
should be Fourier transformed, and then should be filtered by an ideal low- pass filter to
filter out high frequency components. The low frequency component of image is defined
as below:
fr

fr

P( f , f
u

fu 0 f v 0

PT
fr

where, PT represents the total power of an image,

fr

P( f , f )
fu 0 fv 0

represent the

power of low frequency component with cutoff frequency f r , fu and fv represent


two-dimensional image frequency.
The relationship between measured standard deviation and low frequency component
ratio getting by Logistic curve fitting is as below.

When low frequency component ratio reaches a threshold point, measured standard
deviation gradually approaches 0. Here 0.88 is threshold value under this condition used
to feed-back to control the brightness.
Whether under front illumination or back illumination, ultimately we using Logistic
model fit out a curve, whose horizontal axis is the parameter relevant to brightness, and
the vertical axis is the measured standard deviation. With the increase of the values of
horizontal axis, standard deviation reduces, and when it reaches a certain value
(threshold), the standard deviation approaches to zero. According to the fitted curve,
setting a appropriate standard deviation ( typically in the vicinity of the threshold point
where the standard deviation close to 0, while the corresponding brightness is
comparatively low), and the luminance value corresponding to the abscissa value on the
curve which corresponds to the setting value is the luminance information used for
feed-back control. With this information one can better control the light source, and then
each time getting feed-back information the serial bus will transfer it to microcontroller
achieving the adaptive illumination.

Algorithm Description
The quality assessment program is implemented by Matlab. The ultimate purpose of the
algorithm is to obtain two fitting curves, and get the feed-back brightness information
through the curves.

The flow charts of subprogram to compute and C are as follow.

Вам также может понравиться