flstb_dual Level lines passing through centers of dual pixels in bilinear image
flstb_dual bilinear_tree dual_tree
bilinear_tree : The bilinear tree of the image
dual_tree : The new tree
void flstb_dual (pTree , pDualTree )
Shapes pTree , pDualTree ;
This module extracts the tree of shapes associated to level lines passing
through centers of dual pixels, that is, corners of original pixels, in a
bilinear interpolated image (see module
flst_bilinear for exact
definitions of the terms shape and dual pixel). These points have integer
This tree is dual from the original bilinear tree, whose shapes are those associated to level lines passing through centers of pixels or saddle points. The advantage of this dual tree is that most of its level lines should avoid these singular points (though some level lines can be common to both trees).
The advantage, compared for example to
flstb_quantize, is that here
no information is lost: knowing values at corners of pixels is enough to
reconstruct the original image, though not by module
flst_reconstruct. A call to
flst_reconstruct would work but
would not yield the expected result, the original image: we would get the
result of the translation of the bilinear image by half a pixel in each
direction (by a complicated method, since for this it is enough to take the
average of values at each group of four adjacent pixels). The module
flst_pixels can be applied to the resulting tree without problem.
The source of this module can be modified so as to extract level lines passing through any set of predefined locations.
Caveat: when called from another module, the original tree and the new tree
are mixed (because new shapes are insertions in the original tree) in the same
structure. They are dissociated by the fact that shapes of the original tree
are marked as
removed. Nevertheless, the new shapes are of course
pDualTree->the_shapes. The consequences are twofold:
mw_get_next_sibling_shape, which take into account the field
removed, and not directly the pointers
flstb_dual, the original tree should not be used any more, unless the user knows exactly what he/she is doing.
Remark: when a shape must appear in both trees, a new one is created is
pDualTree as parent of the original one. These shapes are identical,
except that the original one is
removed. In particular, the root of
the new tree is parent of the root of original tree. Again, this has no
incidence when the module is called from command line.
Last Modification date : Mon May 3 01:07:16 2004