[][src]Function opencv::cudafilters::create_morphology_filter

pub fn create_morphology_filter(
    op: i32,
    src_type: i32,
    kernel: &dyn ToInputArray,
    anchor: Point,
    iterations: i32
) -> Result<Ptr<dyn Filter>>

Creates a 2D morphological filter.

Parameters

  • op: Type of morphological operation. The following types are possible:
  • MORPH_ERODE erode
  • MORPH_DILATE dilate
  • MORPH_OPEN opening
  • MORPH_CLOSE closing
  • MORPH_GRADIENT morphological gradient
  • MORPH_TOPHAT "top hat"
  • MORPH_BLACKHAT "black hat"
  • srcType: Input/output image type. Only CV_8UC1, CV_8UC4, CV_32FC1 and CV_32FC4 are supported.
  • kernel: 2D 8-bit structuring element for the morphological operation.
  • anchor: Anchor position within the structuring element. Negative values mean that the anchor is at the center.
  • iterations: Number of times erosion and dilation to be applied.

See also

morphologyEx

C++ default parameters

  • anchor: Point(-1,-1)
  • iterations: 1