Name
amss Affine Morphological Scale Space (or Mean Curvature Motion) - by anisotropic diffusion
Command Synopsis
amss [-i] [-p] [-S Step] [-m MinGrad] [-s outputStep] [-f firstScale] [-l lastScale] [-n] [-d cimageD] [-g cimageG] [-c cimageC] [-D cmovieD] [-G cmovieG] [-C cmovieC] image
-i : flag to cancel isotropic diffusion in smooth area
-p : flag to compute AMSS model (power 1/3) instead of MCM (power 1)
-S Step : scale step for each iteration (default 0.1)
-m MinGrad : Minimum of the gradient norm to compute the curvature (default 0.5)
-s outputStep : scale interval between two images (for movie outputs) (default 0.1)
-f firstScale : first scale of diffusion (default 0.0)
-l lastScale : last scale of diffusion (default 2.0)
-n : flag to prevent curvature normalization
-d cimageD : output fimage of the last diffusion
-g cimageG : output fimage of the last gradient
-c cimageC : output fimage of the last curvature
-D cmovieD : output cmovie of successive diffusions
-G cmovieG : output cmovie of successive gradients
-C cmovieC : output cmovie of successive curvatures
image : original picture (input fimage)
Function Summary
void amss (isotrop , power , Step , MinGrad , outputStep , firstScale , lastScale , image , imageD , imageG , imageC , cmovieD , cmovieG , cmovieC , no_norm )
char *isotrop ;
char *power ;
float *Step ;
float *MinGrad ;
float *outputStep ;
float *firstScale ;
float *lastScale ;
Fimage image ;
Fimage *imageD ;
Fimage *imageG ;
Fimage *imageC ;
Cmovie cmovieD ;
Cmovie cmovieG ;
Cmovie cmovieC ;
char *no_norm ;
Description
Multiscale Analysis of image.
The fundamental equation of image processing
|
AMSS |
(1) |
Another useful, less invariant (not affine invariant), but more easy for a numerical viewpoint, is the same equation without the power 1/3 : ``the mean curvature motion".
|
MCM |
(2) |
The function amss will process the model AMSS or the mean curvature motion, from t = tbegin to t = tend.
INPUTS of amss.
By default, the module process the mean curvature motion (MCM). By selecting this option, the module process the AMSS model.
The normalised scale is defined such that a circle of radius LS in the original image, disapears when the normalised scale = LS. Then the rescaling depends of the power of the curvature :
If MCM (equation(2)), then tend = LS2/2.
If AMSS (equation(1)), then tend = LS
43×3/4.
If this option is not used LS= 2.0.
As for LS, FS is a normalized scale.
If this option is not used, FS is 0.
OutPutStep is the scale interval between two diffusions (default is 0.1):
the module will process the image at each normalised scale :
k × OutPutScale + FS, until LS (k
IN).
For AMSS model Step must be lower than 0.1, for the mean curvature motion Step must be lower than 0.5. Then,
If MCM, then Step must be
0.1.
If AMSS, then Step must be
0.5.
The number of iterations needed by amss is calculated as following : If MCM
If AMSS
By default, the module will process an isotropic diffusion when the estimated gradient is less than MinGrad. This can be useful to avoid a problem of our discretization : suppose the image is a black point on white background, then our estimated gradient by centered finite differences is equal to zero at this point. Then, it never disappears.
The -i flag cancels this isotropic diffusion :
nothing will be done at points with gradient norm less than MinGrad.
OUTPUTS of amss.
Several outputs can be selected among diffusion image, gradient and curvature,
in the Fimage type (for last scale) or Cmovie type
(for all intermediate scales). Notice that for Cmovie type, precision
may be lost since a conversion from floating point values to char
values is necessary. For the curvature, a normalization
k
100k + 128
is performed, but it can be cancelled using the -n option.
Numerical scheme.
Equations (1) and (2) verify the following properties
The scheme is based on a diffusive interpretation of the equations.
Indeed, if
is a unit vector, such that
u.
= 0,
and
u![]()
the second derivative of u in the direction
,
we have :
Equation (1) can be rewritten as
= (
u)
(u![]()
)
,
where
(
u)
is understood as the speed of the diffusion.
The schemes which we wish to discuss compute
u![]()
by a quasilinear formula in the sense defined above.
In order to have consistency, we must find
,
,
,
,
, such that :
[Consistency] implies
We deduce the others
's:
Then our estimation of
u![]()
, is exact for all the linear combinations of the polynom
ials
of degree 0,1,2 and 3, plus the polynomial :
(x2 + y2)(x sin
- y cos
)2.
Of course, the calculus can be false for the other polynomials.
algorithm.
Our algorithm is following:
| (2): un+1(x) = un(x) + |
| (1): un+1(x) = un(x) + |
In the case of (2) i.e. mean curvature motion, we must choose
t
0.5(
x)2
in order to have some stability.
Whereas for (1) i.e. AMSS model , the maximum value of
t cannot be imposed
theoretically.
This scheme verifies [Consistency] , because it is exact at order 2. All the geometrical properties ([Isom. invariance] , [Scale invariance] , ...) are true for all the polynomials mentionned above. For other functions, we have these properties only for the affine transforms which leave the grid invariant.
But, the scheme is not morphological. And, it does not satisfy [Order Preserving] . However, it is experimentally quite stable. In fact, we do not expect to have [Order Preserving] and [Consistency] in such a quasilinear scheme with a fixed stencil. If you impose both, as noticed in [ALM] and proved by [CrLi], you do not limit the size of the stencil.
See Also
Version 1.5
Last Modification date : Thu Nov 29 20:23:56 2001
Author
Jacques Froment, Frederic Guichard, Lionel Moisan