cv.morphologyEx - MATLAB File Help |
Performs advanced morphological transformations
dst = cv.morphologyEx(src, op)
dst = cv.morphologyEx(src, op, 'OptionName',optionValue, ...)
uint8
, uint16
, int16
, single
or double
.dst = open(src,element) = dilate(erode(src,element))
dst = close(src,element) = erode(dilate(src,element))
dst = morph_grad(src,element) = dilate(src,element) - erode(src,element)
dst = tophat(src,element) = src - open(src,element)
dst = blackhat(src,element) = close(src,element) - src
uint8
1-channel binary
images. A tutorial can be found in this
page.The function cv.morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.
In case of multi-channel images, each channel is processed independently.
Note: The number of iterations is the number of times erosion or dilatation
operation will be applied. For instance, an opening operation (Open
) with
two iterations is equivalent to apply successively:
erode -> erode -> dilate -> dilate
(and not erode -> dilate -> erode -> dilate
).