enum cv::MorphTypes

Overview

type of morphological operation More…

#include <imgproc.hpp>

enum MorphTypes
{
    MORPH_ERODE    = 0,
    MORPH_DILATE   = 1,
    MORPH_OPEN     = 2,
    MORPH_CLOSE    = 3,
    MORPH_GRADIENT = 4,
    MORPH_TOPHAT   = 5,
    MORPH_BLACKHAT = 6,
    MORPH_HITMISS  = 7,
};

Detailed Documentation

type of morphological operation

Enum Values

MORPH_ERODE

see cv::erode

MORPH_DILATE

see cv::dilate

MORPH_OPEN

an opening operation

\[\texttt{dst} = \mathrm{open} ( \texttt{src} , \texttt{element} )= \mathrm{dilate} ( \mathrm{erode} ( \texttt{src} , \texttt{element} ))\]
MORPH_CLOSE

a closing operation

\[\texttt{dst} = \mathrm{close} ( \texttt{src} , \texttt{element} )= \mathrm{erode} ( \mathrm{dilate} ( \texttt{src} , \texttt{element} ))\]
MORPH_GRADIENT

a morphological gradient

\[\texttt{dst} = \mathrm{morph\_grad} ( \texttt{src} , \texttt{element} )= \mathrm{dilate} ( \texttt{src} , \texttt{element} )- \mathrm{erode} ( \texttt{src} , \texttt{element} )\]
MORPH_TOPHAT

“top hat”

\[\texttt{dst} = \mathrm{tophat} ( \texttt{src} , \texttt{element} )= \texttt{src} - \mathrm{open} ( \texttt{src} , \texttt{element} )\]
MORPH_BLACKHAT

“black hat”

\[\texttt{dst} = \mathrm{blackhat} ( \texttt{src} , \texttt{element} )= \mathrm{close} ( \texttt{src} , \texttt{element} )- \texttt{src}\]
MORPH_HITMISS

“hit or miss” .- Only supported for CV_8UC1 binary images. A tutorial can be found in the documentation