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

# AreaOpening

Morphological filter

## SYNOPSIS

`#include "dip_morphology.h"`

dip_Error dip_AreaOpening ( grey, mask, out, filtersize, connectivity, closing )

## DATA TYPES

integer, float

## FUNCTION

The image `grey` will be filtered to remove local maxima (`closing` is `DIP_FALSE`) or local minima (`closing` is `DIP_TRUE`) with an area smaller than `filtersize` (in pixels).

Theoretically, the area opening can be written as the supremum of all the openings with each of the possible compact structuring elements of `filtersize` pixels. The `connectivity` parameter indicates which shapes are considered compact (i.e. all pixels are connected). See The connectivity parameter for more information.

## ARGUMENTS

Data type | Name | Description
`dip_Image` | `grey` | Grey-value input image
`dip_Image` | `mask` | Mask image for ROI processing
`dip_Image` | `out` | Output image
`dip_int` | `filtersize` | Size of structuring element
`dip_int` | `connectivity` | Connectivity
`dip_Boolean` | `closing` | `DIP_FALSE` for area opening, `DIP_TRUE` for area closing.

## SEE ALSO

`Opening`, `Closing`, `MorphologicalReconstruction`

DIPlib on-line documentation | Function reference | Global function index