-
MIL8.0GUIDE
Inclu
ding
Active
MIL
Overview
MatroxIm
agingLibrary(MIL)isamodularprogramminglibrarywithc
ommandsforimagecapture,imageprocessing,
pattern
recognition,blobanal
ysis,edgeextractionandanalysis,measurement,charact
errecognition,1Dand2Dcode
r
e<
/p>
ading,
calibration,graphics,
imagecompression,ed
withMILisActiveMIL,acollectionof ActiveX
controls
(OCXs)
formanagingi
mage capture,processing, analysis,displayand
ar
chiving.
Thisguidehasbeendesignedtocomplementthe
MatroxImagingLibrary(MIL)brochurebyprovidingalisto
f benchmarks
ondifferentplatformsandaco
mprehensiveoverviewof theMILandActiveMIL
APIs.
Includedwiththecommandandparame-
terdescriptionsof MILare
real
cludedarebriefdescriptionsof someof the
controlmethods,itionalinformationonMILc
ommandsandparamet
er
s,
as
wellasActiveMILcontrolmethods,ev
ents,andproperties,
refer
toth
eMILandActiveMILCommandReference
r
espectiv
el
y
.
Software
Architecture
p>
Application
Control
Blob
Analysis
Edge
Finder
Geometric
ModelFinder
Graphics
Matrox
Im
aging
Library(MIL)
andActiveMI
L
BufferControl
Calibration
Code
Reader
DigitizerControl
Display
ImageProcessing
Measurement
OCR
PatternMatching
String
Reader
Mat
roxCr
onos
Plus
Board-
LevelDriver
s
Matrox
Meteor-II
fami
l
y
Matrox
Orion
family
Future
MatroxHardware
Matrox
Corona-II
IEEE
1394*
IIDC
Driver
MatroxMorphis
family
Matrox
Solios
family
MatroxHelios
family
Matrox
Odysse
y
fami
l
y
**<
/p>
MIL/ActiveMILhasacommonAPIacross
MatroxImaging'sentirehardwareline.
* MatroxMeteor-II/1394,4Sight-
IIorthird-party adapter
.
**Matrox
Odyssey
famil
ysupportedthroughMatrox
Odyssey
SDK.
2
Table
of
Contents
Overview
MIL/ActiveMILBenchmarks
MIL
CommandListin
g
andDescription
1Dand2D
Code
Reader
modul
e
1Dand2Dcodesymbologies
Compositecodesymbologies
p>
ApplicationandSystemmodul
es
Blobanalysismodul<
/p>
e
Blob
f
eatur
es
BufferandDatagenerationm
odul
es
Calibrationmodul
e
Digitizermodul
e
Displaymodul
e
Edge
Findermodul<
/p>
e
Edge
f
eatur
es
Function
De
v
e
l
oper's
T
oolkit
GeometricModelFindermodul
p>
e
Graphicsmodul
e
Imageprocessingmodul
e
Measurementmodul
e
OCR
modul
< br>e
Patternmatc
hingmodul
e
StringReadermodul
e
Threadmodul
e
Programming
Examp
les
Blobanalysis
Calibration
Cameraauto-focus
Captureanddisplayavideosequence
Code
Reader
Digiti
zerallocationand
c
ontr
o
l
DisplayingaMILbufferunderWindows
Edge
Finder
GeometricModelFinder
Imageprocessing(convolution)
Measurement
Multi-buffered
imagecaptureandprocessing
OCR
Patternmatching
StringReader
W
a
t
e
p>
r
shed
segmentation <
/p>
ActiveMILControlListing
andDes
cription
ApplicationandSystem
c
ontr
o
l
BlobAnalysis
c
on
tr
o
l
B
lobfeaturesand
results
Calibration
c
ontr
o
l
CharacterR
ecognition
c
ontr
o<
/p>
l
Code
c
ontr
o
l
Digitizer
c
ontr
o
l
Displa
y
c
ontr
o
l
EdgeFinder
c
ontr
o
l
p>
EdgeFinderfeaturesand
results
p>
GraphicsContextc
on
tr
o
l
I
mage
c
ontr
o
l
ImageProcessing
c
ontr
o
l
Measurement
c
ontr
o
l
ModelFinder
c
ontr
o
l
PatternMatchi
ng
c
ontr
o
l
StringReader
c
ontrol*
Threading
c
ontr
o
l
*Available
asofProcessing
Pack
1.
3
1
4
7
7
8
9
10
11
12
14
15
15
16
16
18
19
20
21
23
24
25
26
27
28
29
31
33
34
35
36
37
39
41
42
44
47
49
51
54
55
56
57
58
59
60
62
64
65
66
67
68
69
72
74
76
77
79
MIL/ActiveMILBenchmarks
Thefollowing
benc
hmarksprovide
a
performance
overview
forarangeof imaging
o
perations
runningondifferent
p
latforms.
Abrief
description
p>
of all
functions,parameters
andimages
atthe
bench
marksassume
full
processor
and
memor
ybandwidth(i.
e.,noother
system
activity),
and includecommandoverheads.
Note:
Operationsexecuted
on512x512images
1
.
ImageProcessing
Point-to-point
Addtwo8-bit
p>
images
and
storeresul
ts
inan8-bit
destination
image.
0.58ms
1.4ms
0.08ms
0.74ms
0.08ms
0.51ms
0.05ms
0.74ms
0.23ms
2
0.17ms
2
Edge
Detection
(
s
ob
e
l
)<
/p>
Perform
anedgedete
ction
(sobel)
onan8-bit
source
imageand
storeresul
ts
inan8-bit
destination
image.
Convolution
(3x3
)
Perf
orm
ageneral3x3
convolution
with arbitrary
coefficients
onan8-bit
source
imagean
d
store
results inan8-
< br>bit
destination
image.
Results
aresaturated.
1.8ms
1.1ms
0.63ms
0.54ms
0.15ms
2
Convolution
(5x5
)
Same
as
aboveexce
pt
with a5x5kernel.
4.6ms
2.9ms
1.6ms
1.5ms
0.21ms
2
0.96ms
2
Convolution
(11x11
)
< br>
Same
as
aboveex
cept
with a11x11kernel.
19.8ms
12.7ms
7.1ms
5.8ms
E
r
o
s
i
on/D
il
a
t
i
on
(3x3,
pr
edefined,
binary)
Perform
abinary
erosion/dilation
ona1-bit
source
imageusinga<
/p>
predefined
3x3
struc
turing
elementand
storeresult
s
ina1-bit
destination
< br>image.
0.08ms
0.05ms
0.04ms
0.04ms
0.09ms
2
E
r
o
s
i
on/D
il
a
t
i
on
(3x3,
predefined,
g
r
a
y
s
c
a
l
e
)
p>
Same
as
aboveexcept
p>
performa
grayscale
op
eration.
3.5ms
0.17ms
0.13ms
0.16ms
0.16ms
2
E
r
o
s
i
on/D
il
a
t
i
on
(3x3,
u
s
e
r
< br>-d
e
f
i
n
e
d
,binary)
Perform
abinary
erosio
n/dilation
ona1-bit
source
imageusinganarbitrary3x3
structur
ing
elementand
storeresults
p>
ina1-bit
destination
image.
0.34ms
0.22ms
0.15ms
0.14ms
0.10ms
2
E
r
o
s
i
on/D
il
a
t
i
on
(3x3,
u
s
e
r
< br>-d
e
f
i
n
e
d
,
g
r
a
y
s<
/p>
c
a
l
e
)
Same
as<
/p>
aboveexcept
performa
grayscaleerosion/dilation
operation.
0.92ms
0.51ms
0.39ms
0.51ms
0.16ms
2
E
r
o
s
i
on/D
il
a
t
i
on
(5x5,
u
s
e
r
< br>-d
e
f
i
n
e
d
,binary)
Perform
abinary
erosio
n/dilation
ona1-bit
source
imageusinganarbitrary
5x5
structuring
elementand
sto
reresults
ina1-bit
destination
image.
1.4ms
0.88ms
0.58ms
0.55ms
0.09ms
2
E
r
o
s
i
on/D
il
a
t
i
on
(5x5,
u
s
e
r
< br>-d
e
f
i
n
e
d
,
g
r
a
y
s<
/p>
c
a
l
e
)
Same
as<
/p>
aboveexcept
performa
grayscale
erosion/dilation.
1.8ms
1.1ms
0.75ms
1.1ms
0.22ms
2
LUTmap
Perform
apoint-to-point
LUTmapping operationforan8-bit
source
imageand
storeresults
inan8-bit
destination
image.
0.59ms
0.33ms
0.54ms
0.24ms
0.28ms
2
Hi
s
t
og
r
a
m
Calculate
p>
thehistogramofan8-bit
source
imageand
storeresult
i
na32-bitbuffer.
0.58ms
0.38ms
0.28ms
0.31ms
0.31ms
LossyJPEGCompression
(monochrome)
Performlossy
JPEGcompression
onan8-bit
sou
rce
imageand
storeresults
inan8-bit
destination
im
age.
2.5ms
1.6ms
1.2ms
1.5ms
1.5ms
MIL/ActiveMIL
Ben
chmarks
(cont.)
Image
Processing<
/p>
(cont.)
LosslessJPEGCompression
(monochrome)
PerformlosslessJPEGcompression
< br>onan8-bit
source
imageand
p>
storeresults
inan8-bit
destination
image.
2.9ms
1.2ms
1.9ms
0.64ms
2.2ms
0.90ms
2.3ms
0.69ms
2.3ms
0.69ms
Rotate
(
30
°
)
Rotateby
30
°
an8-bit
so
urce
imageand
storeresults
in8-bit
destination
ima
ge.
WarpPolynomial
Warpingusinga
first-
order
polynomialmapping with
nearest
neighborinterpolationonan8-bit
p>
source
imageand
stor
eresults
inan8-bit
destination
image.
1.2ms
0.64ms
0.90ms
0.69ms
0.69ms
< br>Geometric
Model
Finder
3,
4
FindaMo
del(1model,1
occurrence, very
high
speed,
limited
s
c
a
li
ng)
Finda
single
p>
leimageis
searched
fo
ramodelrotatedwithin0-360°
a
nd
scaled
within90-110%usingth
e
highestspeed(lowestrobustness
and
accuracy)
setting.
6.2ms
3.7ms
2.8ms
3.4ms
3.4ms
FindaModel(1model,1
occurrence,
medium
speed,
limited
s
c
a
li
ng)
Finda
sin
gle
leimageis
searched
< br>foramodelrotatedwithin0-360°
and
scaled
within90-110%us
ingmedium
speed
setting.
15.6ms
10.2ms
6.5ms
8.1ms
8.1ms
FindaModel(1model,1
occurrence,
p>
medium
speed,
max.
s
c
a
li
ng)
Finda
s
ingle
leimageis
searched
foramodelrotatedwithin0-360°
and
scaled
within50-200%
usingmedium
speed
setting.
16.2ms
10.7ms
7.1ms
8.5ms
8.5ms
FindM
od
e
l<
/p>
s
(1model,4
occurren
ces,
medium
speed,
l
imited
s
c
a
< br>li
ng)
Same
as
aboveexcept
findfour
occurrences
ofa
sin
gle
128x128model.
21.6ms
25.6ms
13.5ms
15.7ms
9.3ms
11.1ms
11.8ms
14.2ms
11.8ms
14.2ms
FindM
od
e
l
s
(4m
od
e
l
s
,4
occurrences,
medium<
/p>
speed,
limited
s
c
a
li
ng)
Same
as
ab
oveexcept
finda
singleoccurren
ce
offour 128x128models.
Patt
ernMatching
(
Normalized
Grayscale
Correlation
)
p>
3,
4
FindaModel(128x128,non-rotated)
Finda128x128modelinan8-bit
grayscale
leimageis
searched
foramodelthatisnotrotated.
0.42ms
0.19ms
0.16ms
0.19ms
0.19ms
FindaMode
l
(128x128,-5°
to
+<
/p>
5
°
)
Finda128x128modellocatedat
0°
inan8-bit
grayscale
le
imageis
searched
foraamodel
p>
rotatedwithin
+/-5
°<
/p>
.
1.7ms
0.89ms
0.70ms
0.89ms
0.89ms
FindaModel(32x32,non-
rotated)
As
aboveexcept
performapatternmatchofa32x32model.
2.1ms
3.4ms
1.0ms
1.8ms
0.71ms
1.2ms
0.83ms
1.4ms
0.83ms
1.4ms
FindaModel
(32x32,
-5°
to
+
5
°
)
As
aboveexcept
performapa
tternmatchofa32x32model.
p>
MIL/ActiveMIL
Benchmarks
(cont.)
EdgeFinder
(4000
edgeelementsoredgels)
< br>4
Extract
c
on
t
ou
r
s
Extract
t
hinline
cr
e
s
t
s
15.4ms
68.3ms
9.0ms
24.3ms
6.2ms
19.5ms
8.0ms
24.8ms
8.0ms
24.0ms
BlobAnalysis
(100
blob
s
that
occupy
25%of<
/p>
area)
4
Calculate
Area
Cal
culate
Areaand
BinaryCenter
ofGravity
Calculate
A
reaand
GrayscaleCenter
ofGravi
ty
0.24ms
0.28ms
0.86ms
0.15ms
0.18ms
0.56ms
0.15ms
0.17ms
0.43ms
0.12ms
0.15ms
0.45ms
0.12ms
0.15ms
0.45ms
Measurement
Finda
n
E
dg
e
Locate
anedgeina16x4
measurement
regionofan8-bitimage.
0.06ms
0.17ms
0.02ms
0.08ms
0.03ms
0.08ms
0.07ms
0.09ms
0.08ms
0.15ms
FindMultiple
S
t
r
i
p
e
s
Lo
cate
24
stripes
ina1
28x16
measurement
regionofan8-
bitimage.
StringReader
String
Reading
Rea
d
a6
character
strin
gusinga28
character
fontwithin
a512x512imageregion.
42.7ms
26.4ms
20.3ms
25.0ms
25.0ms
OCR
OCR
Reading
Read
p>
anunknownstringof
twelve
33x21
characters
(nogramma
r
rules)
withina404x54imagereg
ion.
10.6ms
6.6ms
4.9ms
5.8ms
5.8ms
Verification
Verify
thataknownstringof12
SEMI
fo
nt
characters
(33x21)withina40
4x54imageregioncanberead properly.
4.0ms
0.83ms
0.59ms
0.84ms
0.84ms
BarandMatrix
Code
Recognition
Bar
Code
Reading
p>
Read
aEAN13barcode(norotation).
0.28ms
3.7ms
0.18ms
1.6ms
0.15ms
2.1ms
0.18ms
2.2ms
0.27ms
2.3ms
DataMatrixReading
Read
aDataMatrixcode.
arks forlargerimagesdonot
p>
necessarily
scalelinearlyduetoC
PUcacheeffects.
medusingPA.
search
speeds
canbeobtainedbyr
educingaccuracy.
speeds
willvarywithimagecontent.
MIL
指令简介
MIL
CommandListing
andDescri
ption
Thissectionprovidesanoverviewof
eachMILmoduleandabriefdescriptionof
mpletedescription of
thesyntaxanduseof
eachcommand,
refer
totheMILCom
mandReferencemanual.
1
维和
2
维条形码识别模块
1Dand2D
Code
Reader
module
用于读写各种
1
p>
维和
2
维条形码及编码机制
Usedto
r
ead
p>
(andwrite)various1Dand2Dcodesymbologies.<
/p>
指令
Commands
McodeAlloc()
p>
形参
Commandparamet
er<
/p>
s
SystemId,
CodeType,
ControlFlag
,
CodeIdPtr
功能
Description
分配一个条形码对象
Allocate a code object.
控制一个条形码对象
Control
a code object.
释放一个条形码对象
Free a code object.
从读写操作中获得一个结果
Get
a result from a read or write operation.
查询条形码的参数设置
Inquire about a code object parameter
setting.
从图中读取特定类型的条形码
Read a specific type of code in an
image.
从磁盘文件中恢复从前保存的条形码对象
Restore a code object previously saved
to a file.
将特定的条形码对象保存到磁盘文件中
Save the specified code object in a
file.
从(到)文件或内存中加载、恢复或者保存条形码对象
Load, restore, or save a code object
from/to a file or
memory.
从源图像中计算不同质量等级的条形码
Compute the different quality-grades of
the code in the
specified source image.
以
ASCII
码的格式进行编码
Encode an ASCII string.
McodeControl()
C
odeId,ControlType,
ControlValue
Mc
odeF
r
ee()
McodeGetResult()
CodeId
CodeId,ResultType,
ResultPtr
McodeInquire()
CodeId,InquireType,UserV
arPt
r
McodeRead()
CodeId,
ImageBufI
d,ControlFlag
Mc
odeRes
t
o
r
< br>e
()
FileName,
SystemId,
ControlFlag,
CodeIdPtr
McodeSave()
FileName,
CodeId,
ControlFlag
McodeStream()
MemPtrOrFileName,SystemId
Op
eration,
StreamType,
V
< br>e
r
sion
Control
Flag,CodeIdPtr,SizeByteVarP
tr
McodeVerify()
CodeId,
ImageBufI
d,String,ControlFlag
McodeWrite()
Cod
eId,
ImageBufId,String
,
ControlFlag
1
维和
2<
/p>
维条形码编码机制
1Dand2Dcodesymbologies
对于指令<
/p>
McodeAlloc()
,
编码的方式
包括以下几种类型:
Forthe
M
codeAlloc()
command,thecode
ty
pe(s)
thatcanbe
r
ea
d
orwritteninclude(s):
编码类型
Code
Type
编码方式
Encoding
Typ
e
标准编码方式
Standardencodingtype
标准编码方式
Standardencodingtype
ASCII
编码,标准编码
ASCII encoding,Standardencodingtype
ASCII
编码
ASCII encoding
ASCII
编码
ASCII encoding
纠错
ErrorCorrection
无纠错
Noerror
correction
无纠错
Noerror correction
无纠错;检验位错误
Noerror
correction;check-digiterror
correction
检验位纠错
Check-
digiterror correction
检验位纠错
Check-digiterror correction
BC412
Codabar
Code39
Code93
Code128
(UCC/EAN128)
Continued...
7
1Dand2Dcode
symbologies
(cont.)
Forthe
McodeAlloc
()
command,thecode
type(s)
thatcanbe
r
ead
< br>orwritteninclude(s):
编码类型
Code
Type
< br>编码方式
Encoding
Type
Numericencoding,Alphaencoding,
AlphaNumericPuncencoding,
AlphaNumericencoding,
ASCII<
/p>
encoding,
IS08
encod
ing
EAN8
EAN13
纠错
ErrorCorrection
Dat
aMatrix
10,40,50,60,70,
8
0,90,100,110,120,
130,
140
or
200
error
c
orr
ection
Check-digiterror
c
orr
ection
Check-
digiterror
c
orr
ect
ion
Numericencoding
Numericencoding
Numericencoding
Encoding
mode2,3,4,5,6
Standardencodingtype
Standardencodingtype
Numericencoding
Numericencoding
Numericencoding
QR
codeModel1,2encoding
RSS
14,
RSS
14
Stacked,
RSS
14StackedOmni, <
/p>
RSS
14Truncated,
RSS
Expanded
RSSExpanded
Stacked,
RSS
Limitedencoding.
Numericencoding
Numericencoding
Interleaved2/5
Maxicode
MicroPDF417
PDF417
Pharma
Planet
Po<
/p>
s
tnet
QR
RSS
Noerrorcorrection;check-digiterror
c
orr
ecion
<
/p>
Reed
Solomonerror
c<
/p>
orr
ection
Reed
Solomonerror
c
orr
ection
Reed
Solomon1
-
8error
c
o
rr
ection
Noerror
c
orr
ection
Check-d
igiterror
c
orr
ecti
on
Check-digiterror
c
< br>orr
ection
Lowest-level
QR,
Low-levelQR,
High-
level
QR,
Highest-levelQR
Check-digiterror
c
orr
ection
UPC-A
UPC-E
Check-digi
terror
c
orr
ection
Check-digiterror
c
orr
ection
复合编码机制
Composite
codesymbologies
这是一种
1
维和
2<
/p>
维的复合编码类型
Thiscodetypeisacompositeof a1D
(RSS,UPC-A,UPC-E,
EAN-8,
EAN
-13,
or
UCC/EAN128)
anda2Dcodetype
(PDF417
or
MicroPDF417).
8
应用和系统模块
Applicati
onand
System
modules
分别用于初始化和控制
MIL
应用环境和系统(帧捕获器板
块,视觉处理板块或者主系统)。应用(
Application
)模块包括集成调试
功能,系统资源补偿,命令线程和相关活动和定时器功能的控制。
Usedtoinitializeandcontrolt
heMILapplicationenvironmentandsystem(framegrabberb
oards,visionprocessorboards,
or
< br>hostsystem)
r
espectiv
el
y
.
TheAppl
icationmoduleincludescontrolof integrateddebugging
features,systemresource
c
ompe
n-
sation,commandthreadsandrelated
events,aswellasatimerfunction.
指令
Commands
形参
Commandparamet
er
s
功能
Description
MappAlloc()
InitFlag,ApplicationIdPtr
分配
一个
MIL
应用
Allocate a MIL application.
MappAllocDefault()
nitFlag,ApplicationIdPtr,SystemIdPtr, <
/p>
分配
MIL
默认应用
DisplayIdPtr, DigIdPtr,
ImageBufIdPtr
Allocate MIL application
defaults.
MappControl()
ControlType, ControlFlag
控制应用环境的设置
Control
an application environment setting.
ApplicationId
释放
M
IL
应用
MappFree()
Free a MIL application.
MappFreeDefault()
ApplicationId, SystemId, DisplayId,
释放
MIL
默认应用
DigId
Free MIL application
defaults.
MappGetError()
ErrorType,ErrorPtr
得到错误代码和相关信息
Get
error codes and related information.
MappGetHookInfo()
EventId,
InfoType, UserVarPtr
得到回调事件的信息
Get
information about a hooked event.
MappHookFunction()
HookType,
HookHandlerPtr,
给一个事件创建回调函数(指向函数的指针)
Hook a function to an event.
MappInquire()
InquireType,
UserVarPtr
查询应用的参数设置
Inquire about the application parameter
setting.
MappTimer()
ControlValue,TimePtr
控制
MIL
定时器
Control the MIL timer.
MsysAlloc()
SystemTypePtr,
SystemNum, InitFlag,
分配一个硬件系统
Allocate
a hardware system.
MsysControl()
SystemId, ControlType, ControlFlag
控制系统的行为
Control
system behavior.
MsysF
r
ee()
SystemId
释放系统
Free a
system.
MsysHookFuntion()
SystemId, HookType,
给一个系统时间创建回调函数
HookHandlerPtr,UserDataPtr
Hook a function to a system event.
MsysInquire()
SystemId, ParamToInquire,
查询系统参数设置
UserVarPtr
Inquire about a
system parameter setting.
9
Blob
分析模块
Blobanalysis
module
用于鉴定和测量图像中的连通域(
blobs
)
Usedtoidentifyandmeasureconnecte
dcomponents(blobs)inanimage.
指令
Commands
形参<
/p>
Commandparamet
er
s<
/p>
SystemId,
F
eatur
eLis
tIdPtr
SystemId,
Bl
obR
esIdPtr
BlobIdentImageId,GrayImageId,
FeatureListId,BlobResId
Blob
ResId,Procmode,
V
alue
MblobAll
ocF
eatur
< br>eLis
t()
MblobAllocResult()
MblobCalculate()
MblobContr
ol()
功能
Description
分配一个
blob
分析特征列表
Allocate a blob analysis feature
list.
分配一个
blob
分析结
果指针
Allocate a blob analysis
result buffer.
执行
blob
分析计算
Perform blob
analysis calculations.
控制
blo
b
分析处理方式的设置
Control a blob analysis processing mode
setting.
在图像指针上绘制特定的
blob
结果特征
Draw features of
specified blob results in an
image
buffer.
绘制满足特定标准的斑点(
blobs
),比如移除不
想要的连通域或高亮显示想要的斑点(
blobs
)
Draw
blobs that meet a specified fill criterion.
释放
blob
分析结果指针或特征列表
Free the blob analysis result
buffer or the feature
list.
在指定的位置获得
blob
编号
Get the label value of a blob at a
specific position.
获得现在包括的斑点(
blobs
)的个数
Get
the number of currently included blobs.
读取包括的连通域的特征值
Read
feature values of the included blobs.
获得单一连通域的特征值
Read
the feature value of a single blob.
获得<
/p>
blob
行程编码信息
Get the blob run-length encoding
information.
查询
blob
分析的处理方式
Inquire about a
blob analysis processing mode.
绘制带有标签的图像
Draw a
labeled image.
复制满足特定条件的斑点(
b
lobs
)到新图像内存
Reconstruct blobs (or blob holes) in an
image
buffer.
为计算和结果恢复选择斑点(<
/p>
blobs
)
Select blobs for calculations and
result retrieval.
选择需要计算的特征,特征值见下页
Select feature(s) to be calculated. See
complete
feature list on the following
page.
向特征列表中添加包络角
Add Feret angle to the feature list.
向特征列表中添加特定矩计算
Add
specified moment calculations to the feature
list.
MblobDraw()
MblobFill()
GraphContId,
ResultId,DestImageId,
Operation,Label,ControlFlag
BlobResId,DestImageBufId,
Crit
eria,
V
alue
Mbl<
/p>
obF
r
ee()
MblobGetLabel()
MblobGetNumber()
MblobGetResult()
MblobGetResultSingle()
MblobGetRuns()
MblobInquir
e()
Bl
obId
BlobResId,
XPos,YPos,
LabelV<
/p>
arPtr
BlobResId,CountVarPtr
BlobRe
sId,Feature,
T
a
r
p>
getArr
ayPtr
BlobRes
Id,LabelVal,
F
eatur
e,
T
a
r
getArr
ayPtr
BlobResId,LabelVal,ArrayType,
RunXPtr,
RunYPtr,
RunLengthPtr
BlobResId,
InquireType,
UserV
arPtr
BlobResId,DestImageBufId,Mode
SrcImageBufId,SeedImageBufId,
DestImageBufId,
Operation,
P
rocMode
MblobLabel()
MblobReconstruct()
MblobSelect()
MblobSelectFeature()
MblobSelectFeret()
MblobSelectMoment()
BlobResI
d,Operation,
F
eatur
e,
Condition,
CondLow,
CondHigh
FeatureListId,
F
eatur
e
FeatureListId,Angle
FeatureL
istId,
MomType,
XMomOrder,
YMomOrder
10
Blob
特征
Blob
features
对于
p>
MblobSelectFeature()
指令,以下特征可以被
计算:
FortheMblobSelectFeature
()command,thefeature(s)thatcanbe
c
a
l
culat
ed
include(s):
M_AREA,
the number of foreground pixels in a blob.
在一个
blob
(斑点)块中的前景像素个数
M_BOX_X_MIN, M_BOX_Y_MIN,
M_BOX_X_MAX, M_BOX_Y_MAX, the coordinates of the
extreme left, top, right and bottom
pixels, respectively, of a blob.
分别计算在一个
blob
块中最左、上、右和下方的像素
M_BREADTH, a measure of the true
breadth of an object.
物体的宽度
M_CHAIN_INDEX, this is the index which
differentiates chains in a blob.
不同链的索引
M_CHAIN_Y,
M_CHAIN_X, these are the x and y coordinates of
each chained pixel.
每个链索引的<
/p>
X
和
Y
坐标
p>
M_COMPACTNESS, a minimum for
a circle (1.0) and is derived from the perimeter
and area.
2
紧密度等
于
p
/
(
4<
/p>
π
A
)
p
为周长
A
为面积
M_CONVEX_PERIMETER, an approximation of
the perimeter of the convex hull of a blob.
一个
blob
凸包的周长近似值
M_ELONGATION,
equal to M_LENGTH over M_BREADTH.
伸长率等于长度与宽度的比值
M_EULER_NUMBER, the number of blobs
minus the number of holes.
欧拉数
blob
的数量减去空洞的数量
M_FERET_X, M_FERET_Y, the dimensions of
the minimum bounding box of a blob in the
horizontal and vertical directions
(respec-tively).
在水平和垂直方向上,一个
blob
的最小边界框的规模
p>
M_FERET_MIN_DIAMETER, the
smallest Feret diameter found after checking a
certain number of angles.
在特定方向上最小包络直径
M_FERET_MIN_ANGLE, the angle at which
the minimum Feret diameter is found.
找到最小包络直径的角度
M_FERET_MAX_DIAMETER, the largest Feret
diameter found after checking a certain number of
angles.
在特定方向上最大包络直径
M_FERET_MAX_ANGLE, the angle at which
the maximum Feret diameter is found.
找到最大包络直径的角度
M_FERET_MEAN_DIAMETER, the average
Feret diameter at all the angles checked.
在所有方向上平均包络直径
M_FERET_ELONGATION, a measure of the
shape of a blob.
一个
< br>Blob
伸长率
M_FIRST_POINT_X, M_FIRST_POINT_Y, a
unique point for each object, which is always on
the perimeter of the object.
最左上角的
X
和
Y
坐标
M_INTERCEPT _0, _45,
_90, _135, the number of times that a transition
from background to foreground occurs at the
given angle for the entire blob.
在整个
blob
上,在特定的倾角上,从背景到前景的过多次数
M_LABEL_VALUE, the label value for each
blob in an image.
每幅图片中,为每
个
blob
标号
M_LENGTH, a measure of the true length
of an object.
测量物体的真实长度
M_NUMBER_OF_CHAINED_PIXELS, this is the
number of chained pixels for all blobs or a
specified blob.
特定的
blob
或所有
blob
的链像素的数量
M_NUMBER_OF_HOLES, the number of
holes in a blob.
Blob
中孔洞的数量
M_NUMBER_OF_RUNS, the total number of
horizontal strings of consecutive foreground
pixels in a blob.
在
1
个
blob
中的水平方向上
,所有前景像素的总数量
M_PERIMETER, the
total length of edges in a blob (including the
edges of any holes).
1
个
blob
中边缘的总长度(包括孔洞的边缘)<
/p>
M_ROUGHNESS, a measure of
how rough a blob is.
1
个
blob
的粗糙程度
M_X_MIN_AT_Y_MIN, M_X_MAX_AT_Y_MAX,
M_Y_MIN_AT_X_MAX, M_Y_MAX_AT_X_MIN, these values,
together with
the four box coordinates,
give four contact points on the convex perimeter
of the object.
结合
box
(框)的
4
个坐标,给出了凸
面体的
4
个接触点
11
对于灰度图像:
For a
grayscale image:
M_MEAN_PIXEL, the mean
pixel value in a blob.
1
p>
个
blob
中的平均像素值
M_MIN_PIXEL, the minimum pixel
value found in a blob.
1
p>
个
blob
中最小的像素值
M_MAX_PIXEL, the maximum pixel
value found in a blob.
1
个
blob
中最大的像素值
< br>
M_SIGMA_PIXEL, the standard
deviation of pixel values in a blob.
<
/p>
1
个
blob
中
像素值的标准差
M_SUM_PIXEL, the sum
of all pixel values in a blob.
1
个
blob
中所有像素值之
和
M_SUM_PIXEL_SQUARED, the
sum of the squares of each pixel value in a blob.
1
个
blo
b
中所有像素值平方和
以下特征有两种不同定义:二值化(所有像素被认为是相等的
);灰度级(在灰度图中,像素的权重为它们的灰度阶)
The following features have two
different definitions: a binary one, where all
pixels are considered equal; and a grayscale one,
where pixels are weighted by their
value in the gray scale image.
M_CENTER_OF_GRAVITY_X, the x position
of the center of gravity of a blob.
p>
1
个
blob
质心
的
X
坐标
M_CENTER_OF_GRAVITY_Y, the y position
of the center of gravity of a blob.
1
p>
个
blob
质心的
Y
坐标
M_MOMENT_Xn_Ym and
M_MOMENT_CENTRAL_Xn_Ym for central moments;
coordinates are relative to each blob?s center
of gravity; ordinary moments use
coordinates relative to the image origin.
中心矩和二阶矩
M_AXIS_PRINCIPAL_ANGLE, the angle at
which a blob has the least moment of inertia.
主轴线
1
个
blob
具有最小惯性矩的角度
M_AXIS_SECONDARY_ANGLE, the angle
perpendicular to M_AXIS_PRINCIPAL_ANGLE.
次轴线垂直于主轴的轴线
以下预先设定的值,在一次调用中,用户可以选择所有特征:
The following predefined values let the
user select groups of features in a single call:
M_BOX, adds all 4 box features plus x
and y Ferets.
添加
4
个
box
特征加上
< br>X
和
Y
包络(??)
M_CONTACT_POINTS, adds first
point and other contact features.
添加第
1
点和其它接触特征
< br>
M_CENTER_OF_GRAVITY, adds both x
and y coordinates of the center of gravity.
添加质心
X
和
Y
坐标
M_ALL_FEATURES, adds all features
(except general Feret and general moment).
添加所有特征(除了一般包络和一般矩)
M_NO_FEATURES, removes all features
(except label value).
移除所有特征(除了标记值)
M_CHAINS, adds all 4 chain features.
添加所有
4
个链的特征
针对某个特征,用户可
以设置以下排序方式,从而在结果检索时指定
1
个排序关键字:
You can add the following
sorting options to a feature to specify it as a
sorting key during result retrieval:
M_SORTn_DOWN, specifies the feature as
the nth sorting key (in a descending order) where
n is an integer between 1 and
3.
指定特征为第
n
(
1~3<
/p>
)排序关键字(降序)
M_SORTn_UP, specifies the feature as the nth
sorting key (in an ascending order) where n is an
integer between 1 and 3.
指定特征为第
< br>n
(
1~3
)排序关键字(升序
)
M_NO_SORT, removes the
specified sorting key.
移除特定排序关键字
12
缓存与数据生成模块
BufferandDatagenerationmodules
< br>用于分配和控制一个数据缓存区,产生查找表或扭曲函数的数据。缓存区模块包括控制子缓存区、缓存压缩 与解压,
定制核(用于卷积函数)或者结构元素(用于形态学函数),缓存存档和恢复。
Usedtoallocateandcontrolada
tabuffer,fermoduleincludes controlof
ac
hildbuffer
(ROI),
buffercompre
ssionanddecompression,customkernelorstructuring
element,and
buffer
archivinga
nd
r
etrie
ving.
命令
Commands
MbufAlloc1d()
MbufAlloc2d()
MbufAllocColor()
MbufBayer()
形参
Command parameters
SystemId, SizeX, Type, Attribute,
BufIdPtr
SystemId, SizeX,
SizeY, Type,Attribute,
BufIdPtr
SystemId, SizeBand, SizeX, SizeY,Type,
Attribute, BufIdPtr
SrcImageBufId, DestImageBufId,
WhiteBalanceCoefficientsID,
ControlFlag
ParentBufId,
OffX, SizeX, BufIdPtr
MbufChild1d()
MbufChild2d()
ParentBufId,
OffX, OffY, SizeX,
SizeY,BufIdPtr
ParentBufId, Band, BufIdPtr
MbufChildColor()
MbufChildColor2d()
ParentBufId, Band, OffX, OffY,
SizeX,SizeY, BufIdPtr
BufferID, OffsetX, OffsetY,SizeX,
SizeYControlFlag
DestImageBufId, Color
BufId, ControlType, ControlValue
MbufChildMove()
MbufClear()
MbufControl()
MbufControlNeighborhoo
Bufld,
OperationFlag, OperationValue
d()
MbufControlRegion()
MbufCopy()
BufId, OffsetX,
OffsetY, SizeX, SizeY,
SrcBufId,
DestBufId
MbufCopyClip()
SrcBufId, DestBufId, DestOffX,
13
描述
Description
分配一个一维缓存区
Allocate a 1D data buffer.
分配一个二维缓存区
Allocate a 2D data buffer.
分配色彩数据缓存区
Allocate a color data buffer.
从单通道解码色彩信息,拜耳彩色编码图
像,可进行白平衡校正和伽玛校正
。
Decode the color
information of a single-
band, Bayer
color-encoded image.
分配一个一维子缓存区,为父缓存区的一
部分,不是开辟新的缓存区,对子缓存区
的修改将影响到父缓存
区,反之亦然。
Allocate a 1D child
data buffer.
分配一个二维子缓存区
Allocate a child buffer from a specific
region
ofthe parent buffer.
从父颜色通道里选择一个通道作为子颜色
数据
Allocate a color-band child data buffer
within a color parent buffer.
从父颜色通道里分配子数据
Allocate a child data buffer within a
colorparent buffer.
移动和调整子缓存区的大小
Move
and resize a child buffer within the
parentbuffer
清除缓冲区到指定颜色
Clears
a buffer to a specified color.
控制指定缓存特征
Control
specified buffer features.
改变核或者结构元素缓存的
操作类型。当
使用核或结构元素时,该操作设置如何执
行邻域操
作。
Change an operation
control type setting of
a kernel buffer
or structuring element buffer
控制缓存区的一片区域
Control a specified region of a buffer.
从一个缓存区拷贝数据到另一个缓存区
(可以进行随意的压缩和
格式转换)
Copy data from one
buffer to another
(optionally with
compression or format
conversion).
拷贝指定区域的数据
DestOffY
MbufCopyColor()
SrcBufId, DestBufId, Band
MbufCopyColor2d()
SrcBufId,
DestBufId, ScrBand, ScrOffX,
MbufCopyCond()
SrcBufId,
DestBufId, CondBufId,
MbufCopyMask()
MbufCreateColor()
SrcBufId,
DestBufId, MaskValue
MbufCreate2d()
MbufDiskInquire()
MbufExport()
MbufExportSequence()
MbufFree()
MbufGet1d()
SystemId, SizeBand, SizeX, SizeY,
Type,ControlFlag, Pitch,
ArrayOfDataPtrBufIdPtr
SystemId, SizeX, SizeY, Type,
Attribute,
创建一个二维数据缓存区
Create a two-dimensional data buffer.
FileName, ParamToInquire,
查询一个文件中的缓存数据
UserVarPtr
Inquire about the
buffer data in a file.
FileName,
FileFormat, SrcBufId
导出图像数据到文件
Export
a data buffer to a file.
FileName,
FileFormatId, BufArrayPtr,
将一系列图像导出成
AVI
视频
Export a sequence of image buffers to
an AVI
file.
BufId
释放分配的缓存区
Free a
data buffer.
SrcBufId, OffX, SizeX,
UserArrayPtr
从一维区域内获取数据,然后放到用户指
< br>定数组
Get data from a 1D
area of a buffer and
place it in a
user-supplied array.
SrcBufId, OffX, OffY, SizeX,
SizeY, UserArrayPtr
SrcBufId, UserArrayPtr
从二维区域
内获取数据,然后放到用户指定
数组
Get data from a 2D area of a buffer and
place it in a user-supplied array.
Copy buffer, clipping data outside
destination buffer.
复制一幅图像的颜
色的一个通道或多个通
道
Copy
one or all bands of an image buffer.
复
制一个通道或多个通道的二维区域,用
来从色彩缓存里插入和提取色彩元素
Copy a 2D region of one or all
bandsof an
image buffer to another
buffer.
复制满足条件的像素到指定缓存区
Copy conditionally the source buffer to
thedestination buffer.
复制带有模板的缓存区
Copy
buffer with mask.
创建一个颜色缓存
Create a color data buffer.
MbufGet2d()
MbufGet()
MbufGetArc()
MbufGetColor()
MbufGetColor2d()
从缓存区里获得数据,然
后放到用户指定数
组
Get
data from a buffer and place it in a user-
supplied array.
ImageBufId,
XCenter, YCenter, XRad
YRad,
StartAngle, EndAngle, NbPixelsPtr,
读取指定
圆弧内的数据,并存储到用户指定
UserArrayPtr
数组
Read the
pixels along a specified arc and store
their values in a user-defined array.
SrcBufId, DataFormat, Band,
从缓存区里读取一个或多个通道数据,并存
UserArrayPtr
储到用户指定数组
Get data
from one or all bands of a buffer and
place it in a user-supplied array.
SrcBufId, DataFormat, Band, OffX, OffY,
从缓存区里读取一个或多个通道数据,并存
SizeX,
SizeY, UserArrayPtr
储到用户指定数组
Get data from a region of one or all
bands of a
buffer and place it in a
user-supplied array.
14
MbufGetHookInfo()
MbufHookFunction()
MbufGetLine()
EventId,
InfoType, UserVarPtr
BufferId,
HookType, HookHandlerPtr,
UserDataPtr
获得一个回调事件的信息
Get
information about a hook event.
回调函数接口
Hook a
function to a buffer event.
ImageBufId,
StartX, StartY, EndX, EndY,
读取理论直线上的像素,计数,并存储到用
Mode,
NumPixelsPtr, UserArrayPtr
户指定数组
Read the
pixels of a theoretical line between
specified coordinates, count them, and
store
them in a user-defined array.
FileName, FileFormat, Operation,
SystemId, BufIdPtr
从文件中导入数据到缓存区
Import data from a file into a data
buffer.
MbufImport()
MbufImportSequence()
FileName,
FileFormatId,
Operation,
将
AVI
p>
视频导出成一系列的图片
SystemId,
BufArrayPtr,
StartImage,
Import a
sequence of images from an AVI file
NumberOfImages, ControlFlag
into separate image buffers.
BufId, ParamToInquire, UserVarPtr
FileName, BufId
DestBufId,
UserArrayPtr
查询指定缓存区设置信息
Inquire about a data buffer parameter
setting.
从文件中加载数据到指定缓存区
Load data from a file into a data
buffer.
MbufInquire()
MbufLoad()
MbufPut()
MbufPutColor()
MbufPutColor2d()
MbufPutLine()
MbufPut1d()
p>
将用户自定义图像数组拷贝到特定的
MIL
缓
存区
Put data from
a user-supplied array into a data
buffer.
DestBufId,
DataFormat, Band,
将用户自定义图像数组拷贝到特定的
MIL
单
UserArrayPtr
通道或多通道缓存区
Put
data from a user-supplied array into one or
all bands of a data buffer.
DestBufId, DataFormat, Band, OffX,
OffY,
将用户自定义图像数组拷贝到特定的
MIL
单
SizeX, SizeY, UserArrayPtr
通道或多通道缓存区
Put
data from a user-supplied array into a
region of one or all bands of a data
buffer.
ImageBufId, StartX, StartY,
EndX, EndY,
从用户自定义数组中读取数据,并将其写成
Mode,
NumbPixelsPtr, UserArrayPtr
一连串像素值
Write a
specified series of pixels within
specified coordinates, along a
theoretical line.
DestBufId, OffX,
SizeX, UserArrayPtr
将用户自定义数组转换成
< br>MIL
指定的一维缓
存
Put data from a user-supplied array
into a 1D
area of a buffer.
DestBufId, OffX, OffY, SizeX, SizeY,
UserArrayPtr
将用户自定义数组转换成
MIL
指定的二维缓
存
Put data from a user-supplied array
into a 2D
area of a buffer.
从文件里恢复数据,然后赋值给自动分配的
缓存
Restore data from a file into an
automatically
allocated data buffer.
MbufPut2d()
MbufRestore()
FileName, SystemId, BufIdPtr
15
MbufSave()
FileName, BufId <
/p>
使用
MIL
特定的格式,将缓存的数据存
入文
件
Save a data
buffer in a file, using the MIL
output
file format.
MbufTransfer()
SrcBufId, DestBufId, SrcOffX, SrcOffY
SrcBand, DestOffX, DestOffY, DestSizeX
将带有一个通道或多个通道的源数据,通过
DestSizeY
DestBand, TransferFunction
转换函数或者转换格式,复制到目标缓存区
TransferType, OperationFlag
Copy a 2D region of one or all bands
from the
ExtraParameter
source buffer into a 2D region of one
or all
bands in the destination buffer,
using a
specified transfer function and
transfer type
file format.
LutBufId, Func, a, b, c, StartIndex,
StartXValue, EndIndex
使用特定的函数生成查找表缓存
Generate data into a LUT buffer using a
specified standard mathematical
function.
MgenLutFunction()
MgenLutRamp()
MgenWrapParameters()
LutId,
StartIndex, StartValue, EndIndex,
为查找表缓存生成一个斜坡数据
EndValue
Generate ramp data
into a LUT buffer.
InWarpParameter,
OutXLutOrCoef,
为扭曲函数
MimWarp(
)
生成系数或查找表
OutYLut, OperationMode,
Generate coefficients or LUTs for use
with
Transform,
MimWarp().
Val1, Val2
16
标定模块
Calibrationmodule
将坐标值和测量值从像
素单位转换成真实单位(毫米),同时具有去除图像畸变的功能
Usedtoconvert coordinatesormeasurements
frompixelto
real-world
units,
aswellastocorrectdistortionsinanimage.
指令
Commands
形参<
/p>
Commandparamet
er
s<
/p>
Mode,
ModeFlag,Cal
ibrationIdPtr
功能
Description
分配
1
个标定对象
Allocate a calibration object.
McalAlloc()
McalAssociate()
t
o/fr
om
CalibrationId,ImageOrDigitizerId,
给图像或相机关联
/
分离一个标定对象
Associate/disassociate a
calibration object
ControlFlag an image
or digitizer.
McalControl()
Mc
alF
r
ee()
CalibrationId,ControlType,
ControlValue
CalibrationId
控制标定对象的设置
Control
a calibration object parameter setting.
释放标定对象
Free a
calibration object.
McalGrid()
CalibrationId,SrcImageBufId,
GridOffsetX,
GridOffsetY,
GridOffsetZ,
RowNumber,
ColumnNumber,RowSpacing,
ColumnSpacing,Mode,
ModeFlag
CalibrationOrMilId,InquireType,
UserV
arPtr
使用标定板对图像进行标定
Calibrate your imaging setup using a
grid.
Mc
alInquir
e
()
查询标定对象设置或者与相机和图像关联的对象
Inquire about a calibration object
setting or about
the calibration object
associated to an image or
digitizer.
使用一系列的坐标对图像进行标定
Calibrate your imaging setup using a
list of
coordinates.
改变坐标系的原点和方向
Change the origin and/or orientation of
a relative
coordinate system.
从标定文件中恢复标定对象
Restore a calibration object from a
file.
保存标定文件
Save
a calibration object to a file.
Mc
alLis
t()
CalibrationId,XPixArray,
YPixArray,
XWorldArray,
YWorldArray,
ZWorld,NumPoint,
Mode,
ModeFlag
Cal
ibrationId,
XOffset,
Y
< br>Offset,
ZOffset,
AngularOffset,ControlFlag
McalRelativeOrigin()
McalRes
t
o
r
e
p>
()
FileName,
ControlFlag,
CalibrationIdPtr
FileName, CalibrationId,
ControlFlag
MemPtrOrFileName,SystemId,
O
peration,
StreamType,
V
e
r
sion,
ControlFlag,CalibrationIdPtr
SizeByteVarPtr
CalibrationOr
MilId,
T
r
ansformT<
/p>
ype,
X,
Y,ResXPtr,
ResYPtr
McalSave()
McalStream()
从
/
p>
向文件或内存中加载、恢复或保存
标定对象
Load, restore, or save a calibration
object from/to a file or a memory.
在真实值(毫米数)与像素值之间转换
Convert coordinates between world and
pixel values.
将一系列的坐标值在真实值(毫
米数)与像
素值之间转换
Convert a list of coordinates between
their
world and pixel values.
通过物理上变换去除图像畸变
Physically transform an image to remove
any distortions.
McalT
r
ansformCoordinat
e()
McalT
r
an
sformCoordinateLis
t()
CalibrationOrMilId,
T
r
p>
ansfr
omT
ype,
NumPoints,SrcXPtr,SrcYPtr,
ResXPtr,
ResYPtr
SrcImageBufId,DestImageBufId,
CalibrationId,
Int
erpolationMode,
OperationType,
ControlFlag
p>
McalT
r
ansformImage(
)
14
McalT
r
ansformResult()
CalibrationOrMilId,
T
r
p>
ansformT
ype,
ResultType,
Result,ResResult
将结果在世界和像素坐标系之间转换
Convert a result between world and
pixel
value.
15
Digitizermodule
U
sedtoinitializeandcontroladigitizer(imagecapture
p>
device).
Thismoduleincludescont
rolof capturemode
(trigger,
frame/field,blocking/non-blocking),imag
escalingandcropping,inputchannel,input
L
UT,
analogsettings(references,hue,
saturation,andbrightness)aswellaseventsforca llbackfunctions.
Commands
Commandparamet<
/p>
er
s
Description
Allocateadigitize
r
.
p>
Selecttheactiveinputchannelof
adigitize
r
.
Controlthespecifieddigitize
r
.
Adjust acamera
?
s
l
ens
motortoapositionwhich
p
r
ov
i
des
optimumfocus.
MdigAlloc()
MdigChannel()
MdigControl()
MdigFocus()
SystemId,
DigNum,
Dat
aF
o
rmat,
InitFlag,DigIdPtr
DigId,Channel
DigId,
< br>ControlType,
V
alue
DigId,DestImageBufId,
FocusI
mageRegionBufId,
FocusHookPtr,
UserDataPtr, MinPosition,
St<
/p>
artP
osition,
MaxPosition,MaxPositionVariation,
ProcMode,ResultPtr
DigId
ScrDigId,DestImageBufId
DigId,DestImageBufId
DigId,Flag
DigId
DigId,
HookType,
HookHandl
erPtr,
UserDat
aPtr
DigId,
InquireType,
UserV
arPtr
DigId,LutBufId
DigId,DestImageArrayPtr,ImageCount
Operation,OperationFlag,
Hoo
kHandlerPtr,
UserDat
aPtr
DigId,
ReferenceType,<
/p>
ReferenceLevel
MdigF
r
ee()
MdigGrab()
MdigGrabContinuous()
MdigGrabWait()
MdigHalt()
MdigHookFunction()
MdigInquire()
MdigLut()
MdigProcess()
F
r<
/p>
ee
adigitize
r
.
Grabdatafromaninput
p>
device
intoa
buff
e
r
.
Grabdatacontinuouslyfromaninputdevice.
Waitfortheendof thegrabin
pr<
/p>
ogr
ess.
Haltacontinuousgrabfromaninputdevice.
Hookafunctiontoadigitizerevent.
Inquireaboutadigitizerparametersetting.
Copy
aLUTbuffertoadigitizerLU
T.
Grabsasequenceof
imagesandprocessthem
withauser-
definedfunctionastheyaregrabbed.
Selectdigitizationreference
l
e
v
el.
MdigReference()
Display
module
Usedtoinitializ
eand
c
ontr
o
l
duleincludes
c
ontr
o
l
of imagedi
splaywindows,graphicsoverlay,outpu
t
LUT,
imagepan,scroll,andzoom.
Commands
MdispAlloc()
MdispControl()
MdispF
r
ee()
MdispHookFunction()
MdispInquir
e()
MdispLut()
MdispPan()
MdispSelect()
MdispSelectWindow()
MdispZoom()
Comm
andparamet
er
s
Description
Allocateadisplay.
ControltheMILdisplay.
F
r
ee
adisplay.
Hookafunctiontoadisplayevent.
Inquireaboutadisplayparametersetting. <
/p>
Copy
aLUTbuffertoadisplayoutpu
tLUT.
Panandscrolladisplay.
Selectanimagebuffertodisplay.
Selectanimagebuffertodisplayina
user-
definedwindow.
Zoomadisplay.
SystemId,
DispNum,
DispF
ormat,
InitFlag,DisplayIdPtr
Displa
yId,
ControlType,
ControlValue
DisplayId
DisplayId,
< br>HookType,
HookHandl
erPtr,
UserDat
aPtr
DisplayId,
InquireType,
UserV
arPtr
DisplayId,LutBufId
DisplayId
,
XOffset,
Y
Offset<
/p>
DisplayId,ImageBufId
DisplayId,ImageBufId,
ClientWindowHandle
DisplayId,XFactor,YFactor
15
EdgeFinder
module
Usedtoextractan
danalyzeobjectcontoursorthincurvilinear
f
eatur
es.
Commands
MedgeAlloc()
MedgeAllocResult()
MedgeCalculate()
Commandparameters
SystemId,E
dgeFinderType,
ControlFlag,
C
ont
e
xtIdPtr
Description
A
ll
o
c
a
t
e
an
Edge
Finder
c
ont
e
xt.
SystemId,
Co
ntrolFlag,EdgeResultIdPtr, Allocatean
E
dge
Finder
result
bu
ff
e
r
.
ContextId,SourceImageId,
Per
formedgeextractionand
f
eatur<
/p>
e
SourceDeriv1Id,<
/p>
SourceDeriv2Id,
c
a
l
culations.
SourceDeriv3Id,EdgeResultId,
Contr
o
lFlag
ContextOrResultId,ControlType,
ControlValue
Controlan
Edge
Findercontextoran
Ed
ge
Finder
result
p>
buff
e
r
.<
/p>
MedgeControl()
MedgeDraw()
Medg
eF
r
ee()
MedgeGetNeighbors()
GraphCon
tId,EdgeResultId,
DestImageId,Drawspecif
icedgefeaturesinthedestination
Operation,
IndexOrLabel,
ControlFlag
image
buff
e
r
.
ObjectId
F
r
ee
an
Edge
Fi
ndercontextoran
Edge
Finder
p>
result
buff
e
< br>r
.
EdgeResultId,SizeOfArray,
p>
SrcArrayXPtr
Get
edg
elsfroman
Edge
Finder
result
buffer
SrcArrayYPtr,SrcArrayAnglePtr,
thataretheclosestneighborstoalistof
DstArrayXPtr,DstArrayYPtr,
user-specifiedpoint
c
< br>oordinat
es.
DstArrayIndex
Ptr,
Ds
tArr
ayLabel
Ptr,
ControlFlag
EdgeResultId,
EdgeIndexOrLabelValue,
Get
results
of
theincludededgesfromanEdge
ResultType,<
/p>
FirstResultArrayPtr,
Finder
p>
result
buff
e
< br>r
.
SecondResultArrayPtr
ContextOrResultId,InquireType,
UserVarPtr
ContextId,MaskImageId,ControlFlag
Filename,
SystemId,
ControlFlag,
Cont
e
xtIdPtr
FileName, ContextOrResultId,
ControlFlag
Inquireaboutan
p>
Edge
FindercontextoranEdge
Finder
result
buff
e
r
.
Mask
r
egions
of
theimage.
MedgeRes
t
o
r
e
()
Res
t
o
r
e
an
Edge
< br>Findercontextfromdisk.
Save
an
Edge
Findercontexttoafile
,orsave
edgechainsand/oredgeapproximati
onsfroman
Edge
Finder
< br>result
buffertoa
CAD
(Comput
er-
Ai
dedDesign)
fil
e.
<
/p>
Selectedgesfor
c
a
p>
l
culationsand
result
r
etrie
v
al.
Load,restore,or
save
an
Edge
Finder
c
ont
e
xt
from/toafileormemory,or
save
c
a
l
cul
at
ed
edgesfroman
Edge
Finder
result
b
uffertoa
fileormemoryin
DXF<
/p>
f
ormat.
MedgeGetResult()
MedgeInquire()
MedgeMask()
MedgeSave()
MedgeSelect()
MedgeStream()
EdgeResultId,
Operation,Feature,
Condition
,
Pa
r
am1,
Pa
r
am2
MemPtrOrFileName,SystemId,
O
peration,
StreamType,
V
e
r
sion,
ControlFlag,ContextOrResultIdPtr,
SizeByteVarPtr
Edge
features
Forthe
MedgeGetResults()
command,thefeature(s)thatcanbe
c<
/p>
a
l
culat
ed
include(s):
M_AVERAGE_STRE
NGTH,
returns
the
av
erage
strength
valueof
eachedge.
M_BOX_X_MAX,
return
s
theX-coordinateof eachedge'sright-most
edgel.
M_BOX_X_MIN,
returns
p>
theX-coordinateof
eachedge's
left-most
edgel. <
/p>
M_BOX_Y_MAX,
returns
theY-coordinateof eachedge'sbottom-mostedgel.
M_BOX_Y_MIN,
returns
t
heY-coordinateof eachedge'stop-mostedgel.
< br>M_BULGES,
returns
thebulgev
aluesbetweenvertices.
M_CENTER_OF_GRAVI
TY,
returns
thecoordinatesof
eachedge'scenterof
gravity.
M
_CENTER_OF_GRA
VITY_X,
returns
theX-coordinateof eachedge'scenterof
p>
gravity.
M_CENTER_OF_GRAVITY_Y,
returns
the
Y-c
oordinat
e
ofeachedge's
centerof
gravity.
M_CIRCLE_FI
T_CENTER_X,
returns
theX-
coordinateof thecenterof the
cir
< br>cl
e
thatisthebest
< br>fitforeachedge.
M_CIRCLE_FIT_CENTER_Y
,
returns
theY-coordinateof
thecenterof the
cir
cl
< br>e
thatisthebest
ued...
16
Edge
features
(continued)
M_CIRCLE_
FIT_COVERAGE,
returns
the
c
o
v
e
r
age
of
thecirclethatisthebest fitforeachedge.
M_CIRCLE_FIT_ERROR,
returns
th
efiterrorof thecirclethatisthebest fitforeachedge.
M_CIRCLE_FIT_RADIUS,
returns<
/p>
theradius of thecirclethatisthebest
fitforeachedge.
M_CHAIN,
retu
rns
thecoordinatesof
the
edge(s)'s
edgels.
M_CHAIN_ANGLE,
returns
the
directionof the
edge(s)'s
edgels.
M_CHAIN_CODE,
returns
the
edge(s)'s
chaincode.
M_CHAIN_INDEX,
returns
theindexof
the
edge(s)'s
edgels.
M_CHAIN_MAGNITUDE
+
M_CHAI
N_ANGLE,
returns
themagnitudev
aluesandtheanglevaluesof the
edge(s)'s
edgels.
M_CHAIN_MAGNITUDE,
p>
returns
themagnitudevaluesof
the
edge(s)'s
edgels.
M_CHAIN_X, Y,
returns
< br>the
X
orY-coordinatesof
the
edge(s)'s
edgels.
M_CLOSURE,
Returnstheclosureof
eachedge.
M_CONVEX_PERIMETER,
returns
the
convex
elongationof eachedge.
M_ELLIPSE_FIT_AN
GLE
,
returns
theang
leof theellipsethatisthebest fitforeachedge.
M_ELLIPSE_FIT_CENTER_X, Y,
re
turns
the
X
orY-
coordinateof thecenterof theellipsethatisthebest
fitforeachedge.
M_ELLIPSE_FIT_COVERAGE,
returns
the
c
o
v
e
r
< br>age
of theellipsethatisthebest
fitforeachedge.
M_ELLIPSE_FIT_ERROR,
returns
thefiterrorof
theellipsethatisthebest fitforeachedge.
M_ELLIPSE_MAJOR_AXIS,
returns
themajoraxisof
theellipsethatisthebest
fitforeachedge.
M_ELLIPSE_MI
NOR_AXIS,
returns
theminoraxis
of
theellipsethatisthebest
M
_FAST_LENGTH,
returns
thefast<
/p>
l
engthof eachedge.
M_FERET_BOX,
returns
theX-
andY-Feretvaluesof eachedge.
fitforeachedge.
M_FERET_ELON
GATION,
returns
theFeretelonga
tionof eachedge.
M_FERET_MAX_ANGLE,
returns
themaximumFeretangleof
eachchain,indegrees.
M_FERET_MAX_DIAMET
ER,
returns
themaximumFeretdia
meterof eachedge.
M_FERET_MEAN_DIAMETER
,
returns
the
averag
e
Feretdiameteratalltheangles checked. <
/p>
M_FERET_MIN_ANGLE,
returns
theminimumFeretangleof eachchain.
M_FERET_MIN_DIAMETER,
returns
theminimumFeretdiameterof eachedge.
M_FERET_X, Y,
returns
< br>the
X
orY-Feretvalueof
eachedge.
M_FIRST_POINT,
returns
thecoordinatesof
ea
chedge'sfirstpoint.
M_FIRST_POINT_X, Y,<
/p>
returns
the
X
orY-coordinateof
eachedge'sfirstpoi
nt.
M_GENERAL_FERET,
returns
p>
thegeneralFeretof
eachedge.
M_LABEL_VALUE,
returns
thelabelvalueof eachedgeinanimage.
M_L
ENGTH,
returns
the
l
engthof eachedge.
M_LINE_FIT
_A
,_B,
_C,
returns<
/p>
theA,BorCvariableof thelinethatisthebest
fitforeachedge.
M_LINE_FIT_ERROR,
returns
thefiterrorof
thelinethatisthebest fitforeachedge.
M_
MOMENT_ELONGATION,
returns
the
momentelongationof eachedge.
M_MOMENT_E
LONGATION_ANGLE,
returns
thean
gleof theprincipleaxisalong
eachedge'smoment
el
ongation.
M_NUMBER_OF_CHAINED_EDGELS,
r
eturns
thetotalnumberof
edgelsintheedge(s).
M_NUMBER_OF_CHAINS,
returns
thenumberof
includededges.
M_NUMBER_OF_VERTICES,
returns
the
t
o
t
a
l
numberof chainapproximationverticesintheedge(s). <
/p>
M_POSITION,
returns
theX-andY-positionof eachedge.
M_POSITION_X, Y,
returns
the
X
orY-positionof
eachedge.
M_SIZE,
returns
thenumberof edgelsineachedge.
M_
STRENGTH,
returns
the
strength
valueof eachedge.
M_TORTUOSITY,
returns
thetort
uositymeasureof eachedge.
M_VERTICES,
p>
returns
thecoordinatesof thecha
inapproximation'svertices.
M_VERTICES_X,
Y,
r
eturns
< br>the
X
orY-coordinatesof
thechainapproximation'svertices.
M_X_MAX_AT_Y_MAX,
returnsthe
maximumX-
coordinateatthemaximumY-
coordinateof eachedge.
M_X_MIN_AT_Y_MIN,
returnsthe
minimumX-
coordinateattheminimumY-coordinateof eachedge. p>
M_Y_MAX_AT_X_MIN,
returnsthe
maximumY-
coordinateattheminimum
X-coordinateof eachedge.
M_Y_MIN_AT_X_MA
X,
returnsthe
minimumY-
coordinateatthemaximumX-coordinateof eachedge.
17
Fu
nctionDeveloper
’
s
T
oolkit
TheMILFun
ction
De
v
e
< br>l
oper'sToolkitallowsprogrammerstodef
inefunctionstoextendMIL'his
t
oolkit,
youcanimplementfunctionsandinte
gratethemdirectlyintotheMILlibrary,wherethey
behave
likestandardMILfunctions
(e.g.,
respectingerrorhandlingan
d
tr
acing).
Commands
Commandparamet<
/p>
er
s
Description
AllocateaMILfunctioncontextforyour
user-
definedfunction.
MfuncAlloc()
FunctionName,
p>
Pa
r
ameterNumber,
SlaveFunctionPtr,Reserved1,
Reserved2,
SlaveFunctionOpcode,
< br>InitFlag,
F
uncIdPtr
FunctionId,
ObjectType,
ObjectPtr
F
unctionId
MfuncAllocId()
MfuncCall()
MfuncErrorReport()
AssociateaMILidentifierwithauser-
defined
object.
Executetheslavefunction.
FunctionId, ErrorCode,
Err
orMes
sage,
Reportanerrormessage.
ErrorS
ubMessage1,
ErrorSubMessage2,
ErrorSubMessage3
F
unctionId
FunctionId, ObjectId
ObjectId, InquireType,
UserV<
/p>
arPtr
F
unctionId
FunctionId,
Pa
r
p>
a
mInde
x,Pa
r
amV
alue
FunctionId,
Pa
r
p>
a
mInde
x,Pa
r
amV
alue
Pa
r
a
mIs,Requir
edAttribut
e
FunctionId,
Pa
r
p>
a
mInde
x,Pa
r
amV
alue,
Pa
r
amIs,
Pa
r
amAttribut
e
FunctionId,
Pa
r
p>
a
mInde
x,Pa
r
amV
alue
FunctionId,
Pa
r
p>
a
mInde
x,Pa
r
amV
alue
Size,<
/p>
Attribut
e
FunctionId,
Pa
r
p>
a
mInde
x,Pa
r
amV
alue
Size,<
/p>
Attribut
e
< br>F
r
ee
aMILfuncti
on
c
ont
e
xt.
F
r
ee
< br>theMILidentifierassociatedwitha
user-
definedMILobject.
Retrieveinformationonauser-definedMIL
object.
Verify
whe
therparametercheckingis
r
equi
r
ed.
Register
aparameterof typedouble.
Register aMIL_
IDparamet
e
r
.
Register
aMIL_IDpointerparamet
er
Register aparameterof
type
l
ong.
Register apointerparamet
e
r
.
Register a
null-terminated
stringparamet
e
r
.
MfuncF
r
p>
ee()
MfuncF
< br>r
eeId()
MfuncInquir
e()
MfuncParamCheck()
MfuncParamDouble()
MfuncParamId()
MfuncP
ar
amIdP
oint
er
()
MfuncParamLong()
< br>MfuncP
ar
amP
oin
t
er()
MfuncP
ar
amString()
MfuncParamValue()
FunctionId,
Pa
r
p>
a
mInde
x,Pa
r
amV
aluePtr
Read
thevalueof
thespecifiedMILfunction
paramet
< br>e
r
.
18
Ge
ometric
Model
Finder
module
Usegeometricfeatures
(i.e.,contours)duleincludesfunctionstodefinemodels
,
c
ontr
o
l
searchstrategy,and
save
andrestoremodels.
Commands
Commandparamet
er
s
Description
Alloc
ateamodelfinder
c
ont
e
xt.
Allocateamodelfinder<
/p>
result
buff
e
r
.
Controlamodelfindercontextsetting.
Addamodelto,ordeletemodelfrom,amodel
p>
finder
c
ont
e
xt.
Definesamodelfromafileandaddsittoa
ModelFinder
c
ont
e
xt.
MmodAlloc()
MmodAllocResult()
MmodControl()
MmodDefine() <
/p>
MmodDefineF
r
omFil<
/p>
e()
SystemId,ModelFinderType,
Co
ntrolFlag,
Cont
e
xt
IdPtr
SystemId,
Co
ntrolFlag,ModResultIdPtr
ContextId,Index,ControlType,
ControlValue
ContextId,
ModelType,Pa
r
am1,
Pa
r
am2,
Pa<
/p>
r
am3,
Pa
r
am4,
Pa
r
am5
ContextId,
F
ileType,
Fil
ename,
ControlFlag
MmodDraw()
Graph
ContId,
ContextOrResultId,
DestImageId,Operation,
Index,
ControlFlag
ContextId,
T
a
r
getImageI
d,
ModResultId
ObjectId
ResultId,ResultIndex,ResultType,
ResultArrayPtr
ImageBufId,ModelId,FindResultId,
ResultRange
ContextId,Index,MaskBufferId,
MaskType,
ControlFlag
ContextId,ControlFlag
FileName,
SystemId,
ControlFlag,
Cont
e
xtIdPtr
FileName, ContextId,ControlFlag
MemPtrOrFileName,SystemId,
O
peration,
StreamType,
V
e
r
sion
Contro
lFlag,
Cont
e
xtIdPt
r,
SizeByteVarPtr
Drawfeaturesof
specificmodelsor
r
esult
occurrencesinanimage
buff
e
r
.
S
ea
r
c
h
for
themodel(s)ofthespecified
Model
Findercontext
ina
target
imagebufferorinan
Edge
Finder
result
buff
e
r
.
F
r
ee
ameasurementcontext,marker,or
r
< br>esult
buff
e
r
p>
.
Get
the
modelfinder
result
values.
Inquireinformationfromaspecifiedmodel <
/p>
finder
c
ont
< br>e
xt.
Mask
r
egions
of amodel
result
buff
e
r
.
Preprocessamodelfinder
c
ont
e
xt. <
/p>
Res
t
o
r<
/p>
e
amodelfindercontextfromdisk.
Save
amodelfindercontexttoa
p>
fil
e.
Lo
ad,restore,or
save
aModelFinde
r
c
ont
e
xt
from/toafileoramemory
.
MmodFind()
MmodF
r
ee()
MmodGetResult()
MmodInquir
e()
MmodMask()
MmodPreprocess()
MmodRes
t
o
< br>r
e
()
MmodSave()
MmodStream()
19
Graphics
module
duleprovidesasetof
graphicsprimitives(arc,circle,line,
andrectangle), controlof
c
p>
o
l
or
(for
eground,background,fill),andtext(font,
c
o
l
or,
s
ize).
Commands
Commandparamet<
/p>
er
s
Description
Alloc
ateagraphics
c
ont
e
xt.
Drawan
ar
c.
MgraAlloc()
MgraArc()
SystemId,
GraphContIdPtr
GraphContId,
DestImageBufId,
XCenter,
Y
Cent
er,
XRad,
YRad,
StartAngle,EndAngle
GraphContId,
DestImageBufId,
XCenter,
Y
Cent
er,
XRad,
YRad,
StartAngle,EndAngle
GraphCon
tId,
Back
gr
oundCol
or
GraphContId,
DestImageBufId <
/p>
GraphContId,Fo
r
egr
oundCol
or
GraphContId,ControlType,
Contr
ol
GraphContId,
< br>DestImageBufId,XPos,
YPos
GraphContId,
DestImageBufId,
NumberOfDots,
XPosArray,
YPosArray,
ControlFlag
GraphContId,
DestImageBufId,
XStart,YStart
GraphContId,
FontName
GraphContId,XFontScale,
YFontScale
GraphContId
GraphContId,
InquireType,
UserV
arPtr
GraphContId,
DestImageBufId,XStart,
YStart,XEnd,
YEnd
GraphContId,
DestImageBufId,
NumberOfLines,XStartArray,
Y
StartArray,
XEndArray,
YEndArr
ay
ControlFlag
GraphContId,<
/p>
DestImageBufId,XStart,
YStart,XEnd,
YEnd
GraphContId,
DestImageBufId,XStart,
YStart,XEnd,
YEnd
GraphContId,
DestImageBufId,XStart,
YStart,
String
MgraArcFill()
Drawafilledell
iptic
ar
c.
MgraBackColor()
MgraClear()
MgraColor()
MgraContr
ol()
MgraDot()
MgraDots()
Setsthebackground
c
o
l
or
of agraphic
s
c
ont
e
xt.
Clearanimagebuffertoaspecified
foreground
c
o
l
o
r
.
Setstheforeground
c
o
l
or
ofagraphics
c
ont
e
x
t.
Controlthespecifiedgraphics
c
ont
e
xt.
Drawadot.
Drawoneormoredots
MgraFill()
MgraFont()
MgraFontScale()
Mgr
aF
r
ee()
MgraInquir
e()
MgraLine()
MgraLines()
Performaboundary-
typeseed
fill.
Ass
ociateatextfontwithagraphics
c
ont
e
xt.
Setthefontscaleof agraphics
c
ont
e
xt.
F
r
ee
agraphics
p>
c
ont
e
xt.
Inquireaboutthegraphicsparamet
er
s.
Drawa
line.
Drawoneormorelines.
MgraRect()
MgraRectFill()
MgraText()
Drawa
r
ectangl
e.
Drawafilled
r
ectangl
e.
Write
t
p>
e
xt.
20
图像处理模块
Image
processing
module
用来执行以
下图像处理:滤波、形态学操作、点到点操作、图像分割和统计学操作。该模块还包括几何学变换、色彩空
间变换和域变换
Usedtoperfor
mfiltering,morphological,point-to-point,
segmentation,duleals
o
includesgeometric,
c
o
l
o
r
space,
anddomaintransforms,aswellasotherimageprocessing
p>
primitiv
es.
指令
Commands
形参
Commandparamet
er
s
SystemId, NbEntries, ResultType,
ImResultIdPtr
Src1ImageBufId, Src2ImageBufId,
DestImageBufId, Operation
Src1ImageBufId, Src2ImageBufId,
Src3ImageBufId, Src4ImageBufId,
Src5ImageBufId, DestImageBufId,
Operation, OperationFlag
SrcImageBufId, DestImageBufId,
Condition, CondLow, CondHigh
SrcImageBufId, DestImageBufId,
Condition, CondLow, CondHigh,
WriteLow, WriteHigh
SrcImageBufId, DestImageBufId,
NbIteration, ProcMode
功能
Description
分配图像处理内存
Allocate
animageprocessing
result
buff<
/p>
e
r
.
点到点的算术操作
Performapoint-to-point
arithmeticoperation.
多幅图片点到点的操作
Performapoint-to-point
arithmeticoperation
usingmultiplesourceimages.
点到点的二值阈值变换
Performapoint-to-point
binary
thr
esholding
operation.
点到点的裁剪变换
Performapoint-to-point
clippingoperation.
二值或灰度图像的闭操作
Perfo
rmabinaryorgrayscale
cl
osing-
type
morphologicaloperation.
3*3
的二值连通性映射
Performa3by3binaryconnectivitymapping.
色彩变换
Performa
c
o
l
or
conversion.
一般卷积变换
Performageneralconvolutionoperation.
计算两幅图像不同像素点的个数
Countthenumberofpixelsthatdifferineach
image.
产生一系列的交错图像队列从非交错相机采集到
的
一系列图像
Produceasequenceof
deinterlacedimages
fr
om
asequenceof
imagesacquiredfr
oman
int
erlac
ed
c
amer
a.
二值或灰度图的膨胀操作
Performabinaryorgrayscaledilation-type
morphologicaloperation.
最短距离变换
Performadi
stance
transformation.
执行特定边缘检测,产生梯度或梯度角
Perform a specific edge detection
operation
and produce a gradient
intensity and/or gradient
angle image.
图像腐蚀
Performanerosion-
typemorphologicaloperation.
寻找图像中最小或最大像素值
Fin
danimagebuffer
?
sextremes(min
imumand/or
maximumpixelvalues)
MimAll
ocResult()
MimArith()
MimArithMultipl
p>
e()
MimBinarize()
MimClip()
MimClose()
MimConnectMap()
MimConvert()
MimConvolve()
MimCountDifference()
SrcImageBufId, DestImageBufId,
LutBufld
SrcImageId,
DestImageId,
ConversionType
SrcImageBufId, DestImageBufId,
KernelBufId
Src1ImageBufId,
Src2ImageBufId,
ImResultId
ContextId, SrcImageArrayPtr,
DstImageArrayPtr, SrcImageCount,
DstImageCount, ControlFlag
M
imDeint
erlac
e()*
MimDilat
e()
SrcImageBufId, DestImageBufId,
NbIteration, ProcMode
MimDistance()
MimEdgeDetect()
ScrImageBufld, DestImageBufld,
DistanceTransform
SrcImageBufId,
DestIntensityImageBufId,
DestAngleImageBufId, KernelId,
ControlFlag, Threshold
SrcImageBufId, DestImageBufId,
NbIteration, ProcMode
SrcImageBufId, ExtremeImResultld,
ExtremeType
MimErode()
MimFindExtreme()
21
MimFlip()
ScrImageId, DestImageId,
Operation, OpFlag
水平或垂直翻转
Perform a
horizontal or vertical image-flipping
rotation.
释放图像处理结果指针
Free
an image processing result buffer.
MimF
r
ee()
ImResultId
MimGetResult()
ImResultId, ResultType,
UserArrayPtr
ImResultId,
OffEntry, NbEntries,
ResultType,
UserArrayPtr
从图像处理指针中获得值
Get values from an image processing
result buffer.
将图像处理结果放入一位数组
Get values from a 1D region of an image
processing
result buffer.
生成灰度直方图
Generate
the intensity histogram of an image buffer.
MimGetResult1d()
MimHis
t
ogr
am()
SrcImageBufId,
HistImResultId
*
未完待续
22
<
/p>
Image
processing
mod
ule
(continued)
Commands
Commandparamet
er
s
Description
直方图均衡化
Performahistogramequalizationof
animage.
查询图像处理结果指针的参数设置
Inquireaboutanimageprocessing
re
sult
buffer
parametersetting.
MimHis
t
ogr
amEqualize()
MimInquir
e()
SrcImageBufId,DestImageBufId,
Method,Alpha,Min,Max
BufId,
InquireType,
UserV
arPtr
MimLabel()
SrcImageBufId,DestImageBufId,
ProcMode
SrcImageBufId,EventImResultId,
< br>Condition,
CondLow,
CondHig
h
标记图像中的对象(比如标记
blob
)
Labelobjectsinanimage
buff
e
r
.
p>
寻找满足特定条件的像素坐标和值
p>
Findpixelcoordinatesorvaluesthatsatisfies
a
specified
c
ondit
ion.
执行点到点的查找表遍历操作
Performapoint-to-point
LUTmappingoperation.
使用用户自定义核,执行形态学转换包括
膨胀、
腐蚀、加粗、变细或击中或击不中
Performamorphologicaltransformationusing
auser-
defined
k
ernel.
执行二值或灰度开操作
Performabinaryorgrayscaleopening-type
morphologicaloperation.
角度展开成矩形平面矩形转换成角度
Performa
polar-to-rectangular
or
r
ect
angular-
to-
polar
tr
ansforms.
Projecta2Dimageinto1D.
Perfo
rma
rank
filteronthepixelsinan
image.
Resize
animage.
MimLocateEvent()
MimLutMap()
SrcImageBufId,DestImageBufId,
LutBufId
SrcImageBufId,
Des
tImageBufld,
StructElemBufId,Operation,
NBIteration,ProcMode
MimMorphic()
MimOpen()
SrcImageBufId,DestImageBufId,
NbIteration,ProcMode
SrcImageBufId,DestImageBufId,
CenterPosX,CenterPosY,
StartRadius,
p>
EndRadius,
StartAngle,EndAngle,
OperationMode,
Int
erpolationMode,
DestSizeXPtr,
DestSizeYPtr
p>
SrcImageBufId,
Pr
ojI
mResultId,
Pr
ojAngl
e
S
r
cImageBufId,
DestImageBufId,
StructElemBufId,Rank,ProcMode
SrcImageBufId,DestImageBufId,
ScaleFactorX,
ScaleFactorY,
Int
erpolationMode
S
r
cImageBufId,
De
stImageBufId,
Angle,
SrcCenX,
SrcCenY,
DstCenX,
DstCenY,
Int
erpolationMode
SrcImageBufId,DestImageBufId,
BitsToShift
SrcImageId,StatResultId,StatType,
Condition,
CondLow,
Cond
High,
SrcImageBufId,DestImageBufId
NbIteration,ProcMode
S
r
cImageBufId,
DestImageB
ufId
NbIteration,ProcMode
Sr
cImageRBufId,
SrcImageIBufId,
DestImageRBufId,
DestImageIBufId
T
r
ansformT
yp
e,
ControlFlag
SrcImageBufId,DestImageBufId,
XDisplacement,YDisplacement,
Int
erpolationMode
S
r
cImageId,
DestI
mageId,
WarpParam1Id,WarpParam2Id,
OperationMode,
Int
erpo
lationT
ype
MimPol
arT
r
ansform()
MimPr
oject()
MimRank()
MimResize()
MimRotate()
Rotateanimage.
MimShift()
MimStat()
MimThick()
MimThin()
MimT
r
ansform()
Performapoint-to-point
bit
shift.
Calculateavarietyof
statisticsonthesour
c
e
image.
Performabinaryorgrays
cale
thick
ening
operationonanimage.
Performabinaryorgrayscalethinning
operationonanimage.
Performa
FastFouriertransform
(FFT)
ora
Discrete
Cosine
tra
nsform(DCT).
Translateanimagein
< br>X
and/or
Y
displa
c
e
ment.
MimT
r
anslat
e()
MimWarp()
Performawarping.
22
MimWatershed
SrcImageId,MarkerImageId,
DestImageId,MinimumVariation,
ControlFlag
S
r
cImageBufld,
Des
tImag
eBufld,
OperationFlag
Performawatershed
transformation.
p>
MimZoneOfInfluence()
Performa
zone
of
influencedetection.
23
Measurementmodule
Usedto
l
o
c
a
t
e
edtotakeme
asurementsbetweenpoints,
edges,
or
duleincludesfunctionsto
save
or
restore
mark
ers(i.e.,points,
edges,
or
s
tripes).
Commands
MmeasAllocContext()
MmeasAllocMarker()
MmeasAllocResult()
MmeasCalculate()
MmeasControl()
MmeasDraw()
MmeasFindMarker()
MmeasF
r
ee()
MmeasGetResult()
MmeasGetResultSingle()
MmeasInquire()
M
measRes
t
o
r
e
Mark
er()
MmeasSaveMarker()
Commandparameters
Description
Systemld,ControlFlag,ContextldPtr
Allocateameasurement
c
o
nt
e
xt.
Systemld,MarkerType,ControlFlag,
Allocateameasurement
mark
e
r
.
Mark
erldPtr
Systemld,
ResultType,
MeasResultldPtr
Allocateameasuremen
t
result
buff
e
r
.
Contextld,Marker1ld,Marker2ld,
< br>Calculatemeasurementsbetweentwo
marke
r
s.
MeasResultld,
MeasurementLis
t
C
ontextld,
ControlType,Value
Controlameasurementparametersetting.
p>
GraphContId,
MarkerOrResultId,
D
r
aw
fe
aturesof specificmarkersor
r
e
sult
DestImageId,Operation,
Index,
occurrencesinanimage
buff
e
r
.
ControlFlag
Contextld,ImageBufld,Markerld,
Findamarkerinanimageandtakethespecified
MeasurementList
m
ea
s
u
r
e
ments.
Measld
F
r<
/p>
ee
ameasurementcontext,marker,
or
r
esult
buff
e
r
.
MarkerOrMeasResultld,ResultType,
Get
the
results
of measurements
t
a
k
en.
F
irstResultArrayPtr,SecondResultArrayPtr
MarkerOrMeasResultId,ResultType,
Get
asingle
result
fromamultiplemarkeror
its
FirstResultArrayPtr,
result<
/p>
buff
e
r
.
SecondResultArrayPtr,ResultIndex
Measld,lnquireType,
Fir
s
t
V
aluePtr,
Inquireaboutameasurementcontext,
ma
rker,
SecondValuePtr
or
result
buff
e
r
.
FileName,
Systemld,ControlFlag,
Res
t
p>
o
r
e
amark
erfromdisk.
Mark
erldPtr
FileName, Markerld,ControlFlag
Save
amarkertodisk. MmeasSetM
arker()
Markerld,CharacteristicToSet,
p>
Setamarkercharacteristicparamet
e
r
.
F
ir
s
t
V
a
lue,SecondValue
23
-
-
-
-
-
-
-
-
-
上一篇:户口本翻译模板(对照版)
下一篇:SU 菜单中英对照