MIL 8.0 GUIDE
Including
Active
MIL
Edge
Finder
Overview
Matrox Imaging Library (MIL) is a modular programming library with commands for image capture, image processing,
pattern
recognition,
blob analysis, edge extraction and analysis, measurement, character
recognition,
1D and 2D code
r
e
ading,
calibration, graphics, image compression, image display and archiving. Included with MIL is ActiveMIL, a collection of
ActiveX controls
(OCXs)
for managing image capture, processing, analysis, display and
ar
chiving.
This guide has been designed to complement the Matrox Imaging Library (MIL) brochure by providing a list of
benchmarks
on different platforms and a comprehensive overview of the MIL and ActiveMIL
APIs.
Included with the command and
parame-
ter descriptions of MIL are
real
programming examples for each module. Also included are brief descriptions of some of
the
control methods, events and properties available in ActiveMIL. For additional information on MIL commands and
par
amet
er
s,
as
well as ActiveMIL control methods, events, and properties,
refer
to the MIL and ActiveMIL Command Reference
r
espectiv
el
y
.
Software
Architecture
Matrox
Imaging
Library (MIL)
and ActiveMIL
Application
Control
Blob
Analysis Buffer Control Calibration
Code
Reader Digitizer Control Display
Geometric
Model Finder
Graphics Image Processing Measurement OCR Pattern Matching
String
Reader
Board-Level
Driver
s
Matrox
Cr
onos
Plus
Matrox
Meteor-II
fami
l
y
Matrox
Orion
family
Matrox
Corona-II
Future
Matrox Hardware
IEEE
1394*
IIDC
Driver
Matrox Morphis
family
Matrox
Solios
family
Matrox Helios
family
Matrox
Odysse
y
fami
l
y
**
MIL/ActiveMIL has a common API across Matrox Imaging's entire hardware
line.
* Matrox Meteor-II/1394, 4Sight-II or third-party
adapter
.
** Matrox
Odyssey
family supported through Matrox
Odyssey
SDK.
Table
of
Overview
Contents
1
MIL/ActiveMIL Benchmarks
4
MIL
Command Listing
and Description
1D and 2D
Code
Reader
modul
e
7
1D and 2D code symbologies
7
Composite code symbologies
8
Application and System
modul
es
9
Blob analysis
modul
e
10
Blob
f
eatur
es
11
Buffer and Data generation
modul
es
12
Calibration
modul
e
14
Digitizer
modul
e
15
Display
modul
e
15
Edge
Finder
modul
e
16
Edge
f
eatur
es
16
Function
De
v
e
l
oper's
T
oolkit
18
Geometric Model Finder
modul
e
19
Graphics
modul
e
20
Image processing
modul
e
21
Measurement
modul
e
23
OCR
modul
e
24
Pattern matching
modul
e
25
String Reader
modul
e
26
Thread
modul
e
27
Programming
Examples
Blob analysis
28
Calibration
29
Camera auto-focus
31
Capture and display a video sequence
33
Code
Reader
34
Digitizer allocation and
c
ontr
o
l
35
Displaying a MIL buffer under Windows
36
Edge
Finder
37
Geometric Model Finder
39
Image processing (convolution)
41
Measurement
42
Multi-buffered image capture and processing
44
OCR
47
Pattern matching
49
String Reader
51
W
a
t
e
r
shed
segmentation
54
ActiveMIL Control Listing
and Description
Application and System
c
ontr
o
l
55
BlobAnalysis
c
ontr
o
l
56
Blob features and
results
57
Calibration
c
ontr
o
l
58
CharacterRecognition
c
ontr
o
l
59
Code
c
ontr
o
l
60
Digitizer
c
ontr
o
l
62
Display
c
ontr
o
l
64
EdgeFinder
c
ontr
o
l
65
EdgeFinder features and
results
66
GraphicsContext c
ontr
o
l
67
Image
c
ontr
o
l
68
ImageProcessing
c
ontr
o
l
69
Measurement
c
ontr
o
l
72
ModelFinder
c
ontr
o
l
74
PatternMatching
c
ontr
o
l
76
StringReader
control*
77
Threading
c
ontr
o
l
79
*Available
as of Processing Pack
1.
MIL/ActiveMIL Benchmarks
The following
benchmarks provide
a
performance overview
for a range of imaging
operations
running on different
platforms.
A brief
description
of all
functions, parameters
and images
used are included. Note that the
benchmarks assume
full
processor
and
memor
y bandwidth (i.e., no other
system activity),
and include command overheads.
Note:
Operations executed
on 512 x 512 images
1
.
Image Processing
Point-to-point
Add two 8-bit
images
and
store results
in an 8-bit
destination
image.
0.58 ms 0.08 ms 0.08 ms 0.05 ms
0.23 ms
2
Edge
Detection
(
s
o
b
e
l
)
Perform
an edge detection
(sobel)
on an 8-bit
source
image and
store results
in an 8-bit
destination
image.
1.4 ms 0.74 ms 0.51 ms 0.74 ms
0.17 ms
2
Convolution
(3 x
3
)
Perform
a general 3 x 3
convolution
with arbitrary
coefficients
on an 8-bit
source
image and
store
results in an 8-bit
destination
image.
Results
are saturated.
1.8 ms 1.1 ms 0.63 ms 0.54 ms
0.15 ms
2
Convolution
(5 x
5
)
Same
as
above except
with a 5 x 5 kernel.
4.6 ms 2.9 ms 1.6 ms 1.5 ms
0.21 ms
2
Convolution
(11 x
11
)
Same
as
above except
with a 11 x 11 kernel.
19.8 ms 12.7 ms 7.1 ms 5.8 ms
0.96 ms
2
E
r
o
s
i
o
n/D
il
a
t
i
o
n
(3 x 3,
predefined,
binary)
Perform
a binary
erosion/dilation
on a 1-bit
source
image using a
predefined
3 x 3
structuring
element and
store results
in a 1-bit
destination
image.
0.08 ms 0.05 ms 0.04 ms 0.04 ms
0.09 ms
2
E
r
o
s
i
o
n/D
il
a
t
i
o
n
(3 x 3,
predefined,
g
r
a
y
s
c
a
l
e
)
Same
as
above except
perform a
grayscale
operation.
3.5 ms 0.17 ms 0.13 ms 0.16 ms
0.16 ms
2
E
r
o
s
i
o
n/D
il
a
t
i
o
n
(3 x 3,
u
s
e
r
-
d
e
f
i
n
e
d
,
binary)
Perform
a binary
erosion/dilation
on a 1-bit
source
image using an arbitrary 3 x 3
structuring
element
and
store results
in a 1-bit
destination
image.
0.34 ms 0.22 ms 0.15 ms 0.14 ms
0.10 ms
2
E
r
o
s
i
o
n/D
il
a
t
i
o
n
(3 x 3,
u
s
e
r
-
d
e
f
i
n
e
d
,
g
r
a
y
s
c
a
l
e
)
Same
as
above except
perform a
grayscale erosion/dilation
operation.
0.92 ms 0.51 ms 0.39 ms 0.51 ms
0.16 ms
2
E
r
o
s
i
o
n/D
il
a
t
i
o
n
(5 x 5,
u
s
e
r
-
d
e
f
i
n
e
d
,
binary)
Perform
a binary
erosion/dilation
on a 1-bit
source
image using an arbitrary
5 x 5
structuring
element and
store results
in a 1-bit
destination
image.
1.4 ms 0.88 ms 0.58 ms 0.55 ms
0.09 ms
2
E
r
o
s
i
o
n/D
il
a
t
i
o
n
(5 x 5,
u
s
e
r
-
d
e
f
i
n
e
d
,
g
r
a
y
s
c
a
l
e
)
Same
as
above except
perform a
grayscale
erosion/dilation.
1.8 ms 1.1 ms 0.75 ms 1.1 ms
0.22 ms
2
LUT map
Perform
a point-to-point LUT mapping operation for an 8-bit
source
image and
store results
in an 8-bit
destination
image.
0.59 ms 0.33 ms 0.54 ms 0.24 ms
0.28 ms
2
Hi
s
t
o
g
r
a
m
Calculate
the histogram of an 8-bit
source
image and
store result
in a 32-bit buffer.
0.58 ms 0.38 ms 0.28 ms 0.31 ms 0.31 ms
Lossy JPEG Compression
(monochrome)
Perform lossy JPEG compression
on an 8-bit
source
image and
store results
in an 8-bit
destination
image.
2.5 ms 1.6 ms 1.2 ms 1.5 ms 1.5 ms
MIL/ActiveMIL
Benchmarks
(cont.)
Image
Processing
(cont.)
Lossless JPEG Compression
(monochrome)
Perform lossless JPEG compression
on an 8-bit
source
image and
store results
in an 8-bit
destination
image.
2.9 ms 1.9 ms 2.2 ms 2.3 ms 2.3 ms
Rotate
(
30
°
)
Rotate by
30
°
an 8-bit
source
image and
store results
in 8-bit
destination
image.
1.2 ms 0.64 ms 0.90 ms 0.69 ms 0.69 ms
Warp Polynomial
Warping using a
first-order
polynomial mapping with
nearest
neighbor interpolation on an 8-bit
source
image
and
store results
in an 8-bit
destination
image.
1.2 ms 0.64 ms 0.90 ms 0.69 ms 0.69 ms
Geometric
Model
Finder
3,
4
Find a Model (1 model, 1
occurrence, very
high
speed,
limited
s
c
a
li
n
g
)
Find a
single
128 x 128 model in an 8-bit image. The whole image is
searched
for a model rotated within 0-360°
and
scaled
within 90-110% using the
highest speed (lowest robustness
and
accuracy)
setting.
6.2 ms 3.7 ms 2.8 ms 3.4 ms 3.4 ms
Find a Model (1 model, 1
occurrence,
medium
speed,
limited
s
c
a
li
n
g
)
Find a
single
128 x 128 model in an 8-bit image. The whole image is
searched
for a model rotated within 0-360°
and
scaled
within 90-110% using medium
speed
setting.
15.6 ms 10.2 ms 6.5 ms 8.1 ms 8.1 ms
Find a Model (1 model, 1
occurrence,
medium
speed,
max.
s
c
a
li
n
g
)
Find a
single
128 x 128 model in an 8-bit image. The whole image is
searched
for a model rotated within 0-360°
and
scaled
within 50-200% using medium
speed
setting.
16.2 ms 10.7 ms 7.1 ms 8.5 ms 8.5 ms
Find
M
o
d
e
l
s
(1 model, 4
occurrences,
medium
speed,
limited
s
c
a
li
n
g
)
Same
as
above except
find four
occurrences
of a
single
128 x 128 model.
21.6 ms 13.5 ms 9.3 ms 11.8 ms 11.8 ms
Find
M
o
d
e
l
s
(4
m
o
d
e
l
s
,
4
occurrences,
medium
speed,
limited
s
c
a
li
n
g
)
Same
as
above except
find a
single occurrence
of four 128 x 128 models.
25.6 ms 15.7 ms 11.1 ms 14.2 ms 14.2 ms
Pattern Matching
(
Normalized
Grayscale
Correlation
)
3,
4
Find a Model (128 x 128, non-rotated)
Find a 128 x 128 model in an 8-bit
grayscale
image. The whole image is
searched
for a model that is not
rotated.
0.42 ms 0.19 ms 0.16 ms 0.19 ms 0.19 ms
Find a Model (128 x 128, -5° to
+
5
°
)
Find a 128 x 128 model located at
0°
in an 8-bit
grayscale
image. The whole image is
searched
for a a
model rotated within
+/-5
°
.
1.7 ms 0.89 ms 0.70 ms 0.89 ms 0.89 ms
Find a Model (32 x 32, non-rotated)
As
above except
perform a pattern match of a 32 x 32 model.
2.1 ms 1.0 ms 0.71 ms 0.83 ms 0.83 ms
Find a Model (32 x 32,
-5°
to
+
5
°
)
As
above except
perform a pattern match of a 32 x 32 model.
3.4 ms 1.8 ms 1.2 ms 1.4 ms 1.4 ms
评论30
最新资源