Morphological filter
#include "dip_morphology.h"
dip_Error dip_MorphologicalReconstruction ( marker, mask, out, connectivity )
integer, float
Dilation of the image marker, constrained by the image mask. out will be smaller or equal to mask. The image is grown according to the connectivity parameter. See The connectivity parameter for more information.
Data type | Name | Description |
dip_Image | marker | Marker input image |
dip_Image | mask | Mask input image |
dip_Image | out | Output image |
dip_int | connectivity | Connectivity |
The image marker is converted to the same data type as mask. If mask is an unsigned integer, and marker has negative values, then it is possible that these negative values will be turned into large positive values, yielding an unexpected output. The solution is to make sure that mask and marker are in compatible data types.
K. Robinson and P.F. Whelan, Efficient morphological reconstruction: a downhill filter, Pattern Recognition Letters 25(15):1759-1767, 2004.