boost::gil::morphological_gradient

Calculates the difference between image views generated after applying dilation dilation and erosion on an image . The resultant image will look like the outline of the object(s) present in the image.

Synopsis

template<
    typename SrcView,
    typename DstView,
    typename Kernel>
void
morphological_gradient(
    SrcView const& src_view,
    DstView const& dst_view,
    Kernel const& ker_mat);

Template Parameters

Name

Description

SrcView

type of source image, models gil::ImageViewConcept.

DstView

type of output image, models gil::MutableImageViewConcept.

Kernel

type of structuring element.

Parameters

Name

Description

src_view

‐ Source/input image view.

dst_view

‐ Destination view which will store the final result of morphological gradient operation.

ker_mat

‐ Kernel matrix/structuring element containing 0's and 1's which will be used for applying the morphological gradient operation.

Created with MrDocs