# Function iaregmin

namespace: morph iaregmin

# Synopse

Regional Minimum (with generalized dynamics).

• y = iaregmin(f, Bc=iasecross(), option="binary")
• y: Image
• f: Image
• Bc: Structuring Element (connectivity).
• option: String Choose one of: BINARY: output a binary image; VALUE: output a grayscale image with points at the regional minimum with the pixel values of the input image; DYNAMICS: output a grayscale image with points at the regional minimum with its dynamics; AREA-DYN: int32 image with the area-dynamics; VOLUME-DYN: int32 image with the volume-dynamics.

# Description

iaregmin creates a binary image f by computing the regional minima of f, according to the connectivity defined by the structuring element Bc. A regional minimum is a flat zone not surrounded by flat zones of lower gray values. A flat zone is a maximal connected component of a gray-scale image with same pixel values. There are three output options: binary image; valued image; and generalized dynamics. The dynamics of a regional minima is the minimum height a pixel has to climb in a walk to reach another regional minima with a higher dynamics. The area-dyn is the minimum area a catchment basin has to raise to reach another regional minima with higher area-dynamics. The volume-dyn is the minimum volume a catchment basin has to raise to reach another regional minima with a higher volume dynamics.

# Examples

## Example 1

```01. from ia870 import iaregmin
02. from ia870 import iasecross
03.
04.
05. a = array([
06.     [10,  10,  10,  10,  10,  10,  10],
07.     [10,   9,   6,  18,   6,   5,  10],
08.     [10,   9,   6,  18,   6,   5,  10],
09.     [10,   9,   9,  15,   4,   9,  10],
10.     [10,   9,   9,  15,  12,  10,  10],
11.     [10,  10,  10,  10,  10,  10,  10]],uint8)
12.
13. print iaregmin(a) * 1
14. #print iaregmin(a,iasecross(),'value')
15. #print iaregmin(a,iasecross(),'dynamics')```
```[[0 0 0 0 0 0 0]
[0 0 1 0 0 1 0]
[0 0 1 0 0 1 0]
[0 0 0 0 1 0 0]
[0 0 0 0 0 0 0]
[0 0 0 0 0 0 0]]
```

## Example 2

```01. from ia870 import iasebox
02. from ia870 import iahmin
03. from ia870 import iagshow
04.
06. m1=iaregmin(f1,iasebox())
08. f2=iahmin(f1,70)
```1. from ia870 import iagradm