**Name**

**flstb_dualchain** Find chain of dual pixels adjacent to a shape in bilinear interpolated image

**Command Synopsis**

**flstb_dualchain** *tree* *shape* *boundary*

tree: The tree of shapes

shape: The shape whose boundary is to be computed

boundary: The chain of adjacent dual pixels (output flist)

**Function Summary**

void flstb_dualchain (pTree , pShape , pBoundary , ctabtabSaddleValues )

Shapes pTree ;

Shape pShape ;

Flist pBoundary ;

char *ctabtabSaddleValues ;

**Description**

This module returns the chain of dual pixels adjacent to a shape in a bilinear
interpolated image (see `flst_bilinear`).

Dual pixels are unit squares centered at integral coordinates in the rectangle
[0, *W*]×[0, *H*] (thus some of them are only partially included in the
rectangle). A dual pixel *D* is said adjacent to a shape *S* if
*D* *S* *D* *S*.

Dual edgels are unit segments, horizontal or vertical, whose one extremal
point is a center of pixel. A dual edgel *E* is said adjacent to a shape *S*
if
*E* *S* *E* *S*, i.e., one of its extremal points
belongs to the shape and the other not.

The dual pixels adjacent to a shape *S* are ordered in such a manner that two
successive ones share a common dual edgel as a face, this dual edgel being
adjacent to *S*. Therefore, coding the chain of adjacent dual pixels or of
adjacent dual edgels is equivalent. We prefer the former, as we do not have to
distinguish between horizontal and vertical.

The orientation of the chain is counterclockwise, so that the shape is at the left.

This is a 4-connected chain of dual pixels. As usual, dual pixels are coded by the coordinates of their top left corner.

Each dual pixel is coded by its center, which has integral coordinates.

The interest of such a coding is that the level line boundary of *S* crosses
all the dual edgels adjacent to *S*, so as any level line corresponding to a
shape containing *S* but strictly contained in its parent in the tree returned
by `flst_bilinear`
(i.e., the closest containing shape passing through a
pixel center or a saddle point).

This chain is used by `flstb_boundary`
to compute the level line associated to a shape.

The parameter `ctabtabSaddleValues`, which cannot be furnished by a
command line call to the module, is of true type `float**` and is a two
dimensional array accessing the saddle values of the bilinear interpolated
image, see module `fsaddles`. If this array is `NULL`, it is
computed inside the module; the interest is that if this module is called for
each shape and the parameter furnished, it saves computation time.

**See Also**

`flst_pixels`, `flst_reconstruct`, `fsaddles`.

**Version 1.0**

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

**Author**

Pascal Monasse