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

# UpperEnvelope

Upper envelope transform (a flooding and an algebraic closing)

## SYNOPSIS

`#include "dip_morphology.h"`

dip_Error dip_UpperEnvelope ( in, out, bottom, labels, connectivity, max_depth, max_size )

## DATA TYPES

integer, float

## FUNCTION

The Upper envelope transform produces a flooding of the input image (which is an algebraic closing). See any article by F. Meyer for further explanations.

The Upper envelope is based on the watershed transform, each region being filled up to the level where it meets a neighbouring region. See `Watershed` for information on the parameters.

The `bottom` image is a second output image that contains the whole watershed region painted with the lowest value in it. It is useful for stretching the input image: ( `out` - `in` ) / ( `in` - `bottom` ) . `labels` returns the label image used during region growing.

## ARGUMENTS

Data type | Name | Description
`dip_Image` | `in` | Input
`dip_Image` | `out` | Output
`dip_Image` | `bottom` | Optional output
`dip_Image` | `labels` | Optional output
`dip_int` | `connectivity` | Connectivity
`dip_float` | `max_depth` | Maximum depth of a region that can be merged
`dip_int` | `max_size` | Maximum size of a region that can be merged

## SEE ALSO

`Watershed`, `LocalMinima`