next up previous contents index
Next: Options Up: Reference Previous: infsup   Contents   Index

Mathematical description

Given a set of real values $ \cal {M}$, we define the median filter of level r, for a r $ \in$ [0, 1], by

medr($\displaystyle \cal {M}$) = inf$\displaystyle \big\{$$\displaystyle \lambda$ $\displaystyle \in$ $\displaystyle \cal {M}$, suchthat#{$\displaystyle \mu$ $\displaystyle \in$ $\displaystyle \cal {M}$,$\displaystyle \mu$ $\displaystyle \leq$ $\displaystyle \lambda$} = r#$\displaystyle \cal {M}$$\displaystyle \big\}$

where # is the cardinal operator. Note that for r = 0, the median of level r coresponds to the inf operator, and for r = 1, it coresponds to the sup operator.

Now, consider a set $ \cal {B}$ of shapes, for example the set of the ellipses of same area, and an original image u0. This program will compute the sequences of images ui defined by

ui+1(x) = meddeginf$\displaystyle \big($meddegsup{ui(y + x), y $\displaystyle \in$ B}, B $\displaystyle \in$ $\displaystyle \cal {B}$$\displaystyle \big)$,

or, when using the -a option,
ui+1(x) =   $\displaystyle \big($meddeginf$\displaystyle \big($meddegsup{ui(y + x), y $\displaystyle \in$ B}, B $\displaystyle \in$ $\displaystyle \cal {B}$$\displaystyle \big)$ +  
    meddegsup$\displaystyle \big($meddeginf{ui(y + x), y $\displaystyle \in$ B}, B $\displaystyle \in$ $\displaystyle \cal {B}$$\displaystyle \big)$$\displaystyle \big)$/2.  

In a mathematical viewpoint, when the area of the elements of $ \cal {B}$ tends to zero, this scheme (with option -a set) computes a discretisation of an equation of type

$\displaystyle {\frac{{\partial u}}{{\partial t}}}$ = | Du| G(Du/| Du|, curv(u)), qquadu(t = 0) = u0

For example, it has been proved that when $ \cal {B}$ is the set of segments with same lenght (file seg_mask), and centered into 0, we have G(Du/| Du|, curv(u)) = curv(u).

And, in the same way, when $ \cal {B}$ is the sets of the ellipses, or rectangles with same areas, also centered into 0, G(Du/| Du|, curv(u)) = curv(u)$\scriptstyle {\frac{}{}}$13.

At last, notice that when $ \cal {B}$ contains only one element then with deginf = degsup = 0 we have the erosion, with deginf = degsup = 1 we have the dilation, and with deginf = degsup = 0.5 we have the median filter.


next up previous contents index
Next: Options Up: Reference Previous: infsup   Contents   Index
mw 2004-05-05