DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

BinaryOpening

Binary morphological opening operation

SYNOPSIS

#include "dip_binary.h"

dip_Error dip_BinaryOpening ( in, out, connectivity, iterations, edge )

DATA TYPES

binary

FUNCTION

The connectivity parameter defines the metric, that is, the shape of the structuring element. 1 indicates city-block metric, or a diamond-shaped structuring element. 2 indicates chessboard metric, or a square structuring element. -1 and -2 indicate alternating connectivity and produce an octagonal structuring element. See The connectivity parameter for more information. The edge parameter specifies whether the border of the image should be treated as object (DIP_TRUE) or as background (DIP_FALSE). Additionally, you can set it to -1 for special handling: DIP_TRUE for the erosion, DIP_FALSE for the dilation; this avoids the border effect you can get in the corners of the image in some cases.

See section 9.6, "Morphology-based operations", in Fundamentals of Image Processing for a description of binary mathematical morphology operations.

ARGUMENTS

Data typeNameDescription
dip_ImageinInput
dip_ImageoutOutput
dip_intconnectivityConnectivity
dip_intiterationsIterations
dip_intedgeEdge condition

KNOWN BUGS

This function is only implemented for images with a dimension up to three.

SEE ALSO

BinaryDilation, BinaryErosion, BinaryClosing, BinaryPropagation