**Name**

**ll_remove** Remove small level lines in a mimage

**Command Synopsis**

**ll_remove** [-l *L*] *input* *output*

-lL: Minimal level lines length

input: Original mimage

output: Output mimage with missing level lines

**Function Summary**

Mimage ll_remove (mimage , L )

Mimage mimage ;

int *L ;

**Description**

This module copies the level lines recorded in the
input mimage to the output mimage, but the ones with length (number of pixels)
less than a given threshold.
The length threshold (10 by default) can be changed using the option
`-l`

.

The morpho line `first_ml`

field of the input mimage must contain a
chain of level lines only that is, the boundaries of the connex components
of the level sets
*K*_{i} = {(*x*, *y*) / *g*(*x*, *y*) *v*_{i}}, for
*i* = 1,..., *N*.
or of the level sets
*L*_{i} = {(*x*, *y*) / *g*(*x*, *y*) *v*_{i}},
*g* being the gray levels image, *N* the number of gray levels in *g*
and (*v*_{i})_{i} the sequence of gray levels sorted in increasing order.
Such mimage can be computed from a bit-mapped image using the module
`ll_decompose`

.

The operation of removing the smallest level lines can be interpreted, because
of the level lines inclusion principle, as a thresholding of extrema gray
levels values in small areas.
When the input mimage contains level lines associated to *K*_{i}, the extrema
gray levels are maxima; when the level lines are associated to *L*_{i}, they
are minima.

You may get some applications of this filter in [Fro00]
and [Fro99].
It is a good example of a very simple use of the modules `ml_decompose`

and
`ml_reconstruct`

. However, since the Fast Level Sets
Transform [MG00] (`flst`

) has been implemented,
you would get faster computation by using flst-based modules
(such as `fgrain`

, which considers the area instead of the length).

**See Also**

**Version 1.1**

Last Modification date : Thu Jan 24 18:41:08 2002

**Author**

Jacques Froment