**Name**

**flst_bilinear** Fast Level Sets Transform of a bilinear interpolated image

**Command Synopsis**

**flst_bilinear** [-a *min_area*] *image* *tree*

-amin_area: argument of the grain filter

image: Input fimage

tree: The tree of shapes

**Function Summary**

void flst_bilinear (pMinArea , pImageInput , pTree )

int *pMinArea ;

Fimage pImageInput ;

Shapes pTree ;

**Description**

This module computes the FLST (see module `flst`) of a bilinear
interpolated image. As the image is considered as a continuous function, the
number of level lines is actually infinite. This module makes the following
choice: It computes the shapes associated to level lines passing through data
points and those passing through saddle points.

We call data points the centers of pixels, where image values are
given. Pixels are considered as squares, whose corners have integral
coordinates. Therefore data points are at half-integral coordinates.
A dual pixel is a square of corner the data points
(*X* - 0.5, *Y* - 0.5), (*X* + 0.5, *Y*), (*X*, *Y* + 0.5) and
(*X* + 0.5, *Y* + 0.5). Its coordinates
are by convention the ones of its center, (*X*, *Y*). A dual edgel is a face of
a dual pixel. The image is interpreted as a continuous function taking the
given values at the data points and being affine when restricted to any dual
edgel. More precisely, the image values inside the dual pixel are given by the
formula

max(0, 1 - | *x*|)max(0, 1 - | *y*|).

The image is thus considered as continuous, defined on the rectangle
The isolevel sets are the sets *u* = *c*, *c* being a constant. The connected
components of isolevel sets are disjoint. If *I* is such a set, we define the
exterior of *I* as:

- the connected component of
*R**I*containing the border of the image if*I*does not meet this border; - the connected component of
*R**I*meeting the border of the image and of area larger than , provided it exists, otherwise.

The saturation of *I* is the complement of the exterior of *I*, and called the
shape associated to *I*. A shape is thus closed, connected and has a connected
complement. The boundary of the saturation of *I* is called a level line. It
is a part of *I*, so a connected part of an isolevel set of the image.
If *I* meets the border, the line is open, otherwise it is closed.

The shapes have a tree structure induced by the inclusion. *S* is an ancestor
of *T* if and only if
*T* *S*. If *S* and *T* are two shapes such that
none is an ancestor of the other,
*S* *T* = .

With our interpolation model, the number of isolevel sets at a given level are
finite. Thus in a sufficiently small neighborhood *U* of a level line at level
`value`, the image takes values that are all strictly larger or all
strictly lower than `value` on the intersection of *U* and the exterior
of the level line. In the first case, the field `inferior_type` is set
to true (1), while in the second case it is set to false (0).
The other fields of `Shape` and `Shapes` have the same meaning
as for the module `flst`, except `area`, as explained above, and
`pixels` which stores the data points inside the shape, not pixels.

This field is not filled by this module, but can be done by
`flst_pixels` if needed. In the same manner, the field
`boundary` is not filled by this module, but by
`flstb_boundary`.

The shapes included in the tree are the ones whose associated level line
contains at least one data point or saddle point. Therefore, all
the shapes whose boundary contains a critical point are in the tree, but no
other shape (except the root). If other shapes are desired, see module
`flstb_quantize`. The module `flst_reconstruct` permits to
reconstruct the image from the tree, as for the tree extracted by
`flst`.

The `min_area` parameter, if used, is the minimum number of data points
for a shape to be included in the tree. If it is used, the reconstructed image
is different from the original image.

NB: The input image is lost after a call to this function

**See Also**

`ll_boundaries2`, `ll_boundaries`, `ll_edges`, `ll_extract`.

**Version 1.1**

Last Modification date : Thu Nov 29 20:23:56 2001

**Author**

Pascal Monasse