VI User Manual - 第186页

Tools library 7 - 24 Vision 2007 4.10 User Manual Re v 01 7.5.2 Histogram tab 1. Use Realign this processing ( A ) section if you want to realign the po- sition of the tool with another one (not available for window 1). …

100%1 / 412
Tools library
Vision 2007 4.10 User Manual Rev 01 7 - 23
7.5 Histogram
The Histogram tool enables measurement of the brightness in a pre-
defined window (average gray level of the pixel population). It is mainly
used for the presence / absence of the component body, the weld
seam and for component polarity.
7.5.1 Model description tab
1. On the Model description tab, in the Edit a model window, choose the treatment operation:
a new Histogram tab appears behind the Model description tab.
2. Click on Edit area button to place the model encompassing area exactly on the image.
This histogram sends back no position values in X, Y or angle.
Application examples
To confirm the component presence, you can use the average of the histogram.
Present component
Average value of the histogram in gray levels: 20
Missing component
Average value of the histogram in gray levels: 200
Execution
When running an histogram outside of the picture the result will be not OK (= 0)
When running an histogram half on the picture and half outside the picture, the result is:
Cognex histogram: the value is calculated only on pixels which are on the picture.
ViTECHNOLOGY histogram: the value is calculated by considering the pixels outside the picture
to have a gray level at 0.
Component
Panel
Treatment
area
Missing
component
Panel
Treatment
area
Tools library
7 - 24 Vision 2007 4.10 User Manual Rev 01
7.5.2 Histogram tab
1.
Use
Realign this processing
(
A
)
section if you want to realign the po-
sition of the tool with another one
(not available for window 1).
2. In Position & Size model window
(mm) (B) section, enter the size
and the position of the histogram
area. Histograms areas can be
defined at any time.
Press Area button and use the
mouse to rotate the area directly
on the picture in the camera
window, using the magenta arrow.
You can also enter the angle
directly in the field Angle.
3. In Light level (C) section, select the light level you want to use.
4. In Parameters (D) section, enter the Histogram tool parameters (see below § 7.5.2.1 Histo-
gram parameters).
5. Click Test (E) button to test the Histogram tool and display the results (see below § 7.5.2.3
Histogram test).
If you need a special
equation to realign, you
can do so using the
Equations
button.
The histogram analyses all the pixels parts contained in the defined area.
B
C
A
D
E
Histogram
Tools library
Vision 2007 4.10 User Manual Rev 01 7 - 25
7.5.2.1 Histogram parameters
Score Selection Value
Average arithmetic average
of all the pixel values.
Median: the pixel value un-
der which half the pixels lie.
Mode: the most frequently
occuring pixel value.
Deviation: standard devia-
tion of pixel values.
Validity score range
The selected value (Average, Median, Mode or Deviation) must be between Lower &
Upper bound values for the result to be considered valid.
7.5.2.2 Histogram
Display of the histogram of the area.
7.5.2.3 Histogram test
Click on Test (A) button to
apply all the inspection pa-
rameters to this tool.
Score (B): score of the test-
ed tool (rate of detection suc-
cess).
Average (C): arithmetic average of all the pixel values.
Median (D): pixel value under which half the pixels lie.
Mode (E): most frequently occuring pixel value.
Deviation (F): standard deviation of pixel values.
T (ms) (G): inspection time.
Minimum threshold:
the minimum value of
gray level accepted
for the test result.
Maximum threshold:
the maximum value
of gray level accept-
ed for the test result.
0 255
Gray level
Minimum
threshold
Maximum
threshold
P
i
x
e
l
p
o
p
u
l
a
t
i
o
n
W
h
i
t
e
B
l
a
c
k
Histogram
result
(average value)
A
B C D E F G
Histogram