Morphological edge detector
#include "dip_morphology.h"
dip_Error dip_Lee ( in, out, se, boundary, filterParam, shape, edgeType, flags )
integer, float
Implements a morphological edge detector based on the minimum of two complementary morphological operations. These can be chosen through the edgeType parameter.
The rectangular, elliptic and diamond structuring elements are "flat", i.e. these structuring elements have a constant value. For these structuring elements, filterParam determines the sizes of the structuring elements. When shape is set to DIP_FLT_SHAPE_PARABOLIC, filterParams specifies the curvature of the parabola. When shape is set to DIP_FLT_SHAPE_STRUCTURING_ELEMENT, se is used as structuring element. It can be either a binary or a grey-value image, but be careful: it is converted to the same data type as the input image, and might therefore be clipped or loose precision. It is required (in the current implementation) that the structuring element be odd in size. Its origin is the center.
If shape is not equal to DIP_FLT_SHAPE_STRUCTURING_ELEMENT, se is allowed to be set to zero. When shape is set to DIP_FLT_SHAPE_STRUCTURING_ELEMENT, filterParam is ignored, (and can be set to zero).
Data type | Name | Description |
dip_Image | in | Input |
dip_Image | out | Output |
dip_Image | se | Structuring element |
dip_BoundaryArray | boundary | Boundary conditions |
dip_FloatArray | filterParam | Filter parameters |
dip_FilterShape | shape | Filter shape |
dip_MphEdgeType | edgeType | Edge type |
dipf_LeeSign | flags | Lee sign flag |
The enumerator dip_FilterShape contains the following constants:
Name | Description |
DIP_FLT_SHAPE_DEFAULT | default structuring element, same as DIP_FLT_SHAPE_RECTANGULAR |
DIP_FLT_SHAPE_RECTANGULAR | rectangular structuring element |
DIP_FLT_SHAPE_ELLIPTIC | elliptic structuring element |
DIP_FLT_SHAPE_DIAMOND | diamond shaped structuring element |
DIP_FLT_SHAPE_PARABOLIC | parabolic structuring element |
DIP_FLT_SHAPE_STRUCTURING_ELEMENT | use se as structuring element |
The enumerator dip_MphEdgeType contains the following constants:
Name | Description |
DIP_MPH_TEXTURE | Response is limited to edges in texture |
DIP_MPH_OBJECT | Response is limited to object edges |
DIP_MPH_BOTH | All edges produce equal response |
The enumerator dipf_LeeSign contains the following constants:
Name | Description |
DIP_LEE_UNSIGNED | Absolute edge strength |
DIP_LEE_SIGNED | Signed edge strength |
MorphologicalGradientMagnitude, MorphologicalRange, MultiScaleMorphologicalGradient, Tophat
DIPlib on-line documentation | Function reference | Global function index