next up previous contents index
Next: ml_draw Up: Reference Previous: llview   Contents   Index

ml_decompose

$ \bigcirc$Name


ml_decompose Compute all morpho_lines of an image




$ \bigcirc$Command Synopsis


ml_decompose [-c m_image_in] [-o ml_opt] [-m] image_in m_image



-c m_image_in : original image in Mimage structure

-o ml_opt : type of level lines: 0=upper (default), 1=lower, 2=iso

-m : optimize memory occupation (allows no free(points))

image_in : original image

m_image : mimage with all morpho_lines




$ \bigcirc$Function Summary


Mimage ml_decompose (m_image_in , ml_opt , m_flag , image_in )

Mimage m_image_in ;

int *ml_opt ;

char *m_flag ;

Fimage image_in ;




$ \bigcirc$Description


This module computes a decomposition of image_in into morpho_lines. The algorithm is based on the MW2 modules fvalues and ml_extract, it is recommended to read first the description of these modules.


Let the set of pixel values in image_in be {v0,..., vN}, with vi < vi+1. Using option -o we have the following possibilities for the decomposition:

0
decompose into level lines such that vi $ \leq$ g(i, j) (default)
1
decompose into level lines such that g(i, j) $ \leq$ vi
2
decompose into isolines, g(i, j) = vi.

The -m flag allows to optimize memory occupation during the decomposition. This is interesting if you use ml_decompose on the UNIX command line. Using this flag in an internal call of the module ml_decompose() and trying to delete points separately in the sequel of your program will corrupt the data structure.

The module will set the dimensions of m_image, to those of image_in, the minvalue of m_image is set to v0 and the maxvalue to vN. At last, the morpho_lines are created.
If the option -c is used, this information is set in the mimage m_image_in, else a new mimage is created. This option is useful if you have, for example, already an mimage with its morpho_sets and you want to add the morpho_lines into this structure (instead of creating a new mimage structure).


Let us discuss in more detail the different decompositions.

0
image_in is decomposed into level sets Li = {(i, j) / g(i, j) $ \geq$ vi}, for i = 1,..., N. Notice that L0=image_in. The list of morpho_lines is in increasing order: first all the morpho_lines for v1, those then for v2, and so on, up to vN.

1
image_in is decomposed into level sets Li = {(i, j) / g(i, j) $ \leq$ vi}, for i = 0,..., N - 1. Notice here that LN=image_in. The list of morpho_lines is in decreasing order: first all the morpho_lines for vN-1, than those for vN-2, and so on, down to v0.

2
image_in is decomposed into isosets Ii = {(i, j) / g(i, j) = vi}, for i = 0,..., N. In this case the list of morpho_lines is in increasing order, from v0 up to vN.

In case 0 and 1 the order in which the morpho_lines are listed is essential to obtain a correct reconstruction by ml_reconstruct. For isosets the order doesn't matter in the reconstruction.


This module is useful to compute a topographic map  of a gray levels image [CCM96][CCM99]. However, since the Fast Level Sets Transform [MG00] has been implemented, you would get faster computation by using flst-based modules such as flst.




$ \bigcirc$See Also


fvalues, ml_extract.

llremove.


$ \bigcirc$Version 6.9


Last Modification date : Fri Jan 25 13:17:23 2002


$ \bigcirc$Author


Georges Koepfler






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