**Name**

**align_mdl** Detect MDL-maximal meaningful segments

**Command Synopsis**

**align_mdl** [-d *d*] [-l *nd*] [-n *nl*] [-g *g*] [-m] [-e *eps*] [-c *crv*] *u* *out*

-dd: minimal precision in gradient orientation (default: 8 orientations)

-lnd: number of dyadic gradient precision levels, default 3

-nnl: number of line directions to scan, default 256

-gg: noise level used to threshold gradient, default 1.

-m : if set, do NOT use MDL

-eeps: -log10(max. number of false alarms), default 0.

-ccrv: store segments as curves (output, Flists)

u: input Fimage

out: result 6xN Fimage (x1 y1 x2 y2 -log10(nfa) precision_level)

**Function Summary**

Fimage align_mdl (u , d , nd , no_mdl , nl , eps , g , crv )

Fimage u ;

int *d , *nd , *nl , *no_mdl ;

double *eps ;

float *g ;

Flists crv ;

**Description**

This module introduces a few modifications to `align`

with the aim of producing meaningful alignments which are best suited for
vanishing point detection with the `vpoint`

module.
(See [ADV03], [Alm02]).

The main limitation of `align`

that we try to overcome here,
is that a single edge often produces several meaningful alignments
because of either *(i)* sets of parallel lines that are aligned with a diagonal segment up to a coarse orientation precision *p*; or *(ii)* a blurred image.
Such multiple responses may increase the localization error of vanishing points, decrease their detectability or even lead to accidental vanishing points.
Therefore we avoid them by directly applying the exclusion principle or MDL (-m 1 option): each pixel *x* in the image is constrained to count as aligned to at most a single segment, namely the most meaningful segment *A* such that *x* belongs to the 1-dilate of *A*.

Furthermore the orientation precision *p* is substituted by a range of dyadic precisions
2^{-d},..., 2^{-d-nd+1} as specified by the -d *d* and -l *nd* options. By default 1/*p* takes the values 8, 16, 32.

Finally points where the gradient is too small are considered as not aligned to any segment, in order to avoid problems associated with orientation quantization as described in [DLMM02]. The actual threshold on gradient magnitude depends on orientation precision according to
| *Du*|
where *g* is the (quantization) noise level of the input image.

**Version 1.01**

Last Modification date : Fri Apr 16 09:27:28 2004

**Author**

Lionel Moisan, Andres Almansa