Download AdeptVision Reference Guide, Rev A

Transcript
Program Instruction
VMORPH
Morphological operations may be used to eliminate small holes and gaps from the
image (by dilating and then eroding or vice versa), to thin edges, to isolate certain
features such as straight lines, etc. Multiple operations are often performed in
sequence.
Morphological operation types 1 and 2 are predefined to be erosion and dilation,
respectively. Types 3 through 7 are undefined, reserved for future built-in
operations. Types 8 through 16 are user-definable. (Type 9 is actually predefined
to be “Life”, a simulation of cellular organisms popularized years ago in
“Scientific American”, but it can be redefined by the user).
Binary morphological operations are applied to every 3x3 pixel neighborhood in
the binary image. Based on the binary pixel values in a neighborhood and the
operation to be performed, the center binary pixel value may be changed. See the
VDEF.MORPH instruction in this manual for details on how the operation is
performed.
The effect of a VMORPH operation is visible in VDISPLAY mode #2. It does not
affect the associated grayscale image.
The erosion operation clears binary pixels that have at least one neighboring pixel
with the value 0. The dilation operation does the opposite, setting all pixels that
have at least one neighboring pixel with the value 1.
The smaller the area of the image to be processed, the faster VMORPH executes.
Examples
VDEF.AOI 2000 = 1, 100, 100, 50, 50
VMORPH (, 2) = 2011;Dilate the binary image twice
VMORPH (, 2) = 2011
VMORPH (, 1) = 2011;Then erode the image twice
VMORPH (, 1) = 2011
Related Keywords
VDEF.AOI (program instruction)
VDEF.MORPH (program instruction)
AdeptVision Reference Guide, Rev A
181