mln::topo::skeleton Namespace Reference


Namespaces

namespace  impl
namespace  internal

Functions

template<typename I, typename N, typename F, typename G, typename H>
mln::trait::concrete< I >::ret breadth_first_thinning (const Image< I > &input, const Neighborhood< N > &nbh, Function_v2b< F > &is_simple, G detach, const Function_v2b< H > &constraint=fun::p2b::tautology())
 Skeleton by Breadth-First Thinning.
template<typename I, typename D, typename N>
mln::trait::concrete< I >::ret crest (const Image< I > &input_, const Image< D > &dist_map_, const Neighborhood< N > &nbh_)
 Compute skeletization constraints.
template<typename I, typename N>
bool is_simple_point (const Image< I > &ima, const Neighborhood< N > &nbh, const typename I::site &p)


Function Documentation

template<typename I, typename N, typename F, typename G, typename H>
mln::trait::concrete< I >::ret mln::topo::skeleton::breadth_first_thinning ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
Function_v2b< F > &  is_simple,
detach,
const Function_v2b< H > &  constraint = fun::p2b::tautology() 
) [inline]

Skeleton by Breadth-First Thinning.

A generic implementation of the computation of a skeleton using a breadth-first thinning on a binary.

Parameters:
input The input image.
nbh The adjacency relation between triangles.
is_simple The predicate on the simplicity of points (sites). This functor must provide a method void set_image(const Image<I>&).
detach A function used to detach a cell from input.
constraint A constraint on point (site); if it returns false for a point, this point will not be removed.

Definition at line 82 of file breadth_first_thinning.hh.

References mln::topo::detach(), mln::duplicate(), and mln::exact().

template<typename I, typename D, typename N>
mln::trait::concrete< I >::ret mln::topo::skeleton::crest ( const Image< I > &  input_,
const Image< D > &  dist_map_,
const Neighborhood< N > &  nbh_ 
) [inline]

Compute skeletization constraints.

Parameters:
[in] input_ A binary image.
[in] dist_map_ A distance map of input. Contains the inner object distance map.
[in] nbh_ A neighborhood.
Returns:
A binary image.
This implementation is based on the following article: K. W. Kang, J. W. Suh, and J. H. Kim. Skeletonization of grayscale character images using pixel superiority index. In Proc. 3rd IAPR Workshop on Document Analysis Systems, pages 326-335, Nagano, Japan, 1998.

Abstract: "In this paper, we present pixel superiority index as a tool for designing a skeletonization algorithm which utilizes topographic features efficiently. We clarify a relationship between pixel superiority index and topographic features. Then, using the relationship, we transform a problem of skeletonization into a problem of skeleton growing. [...]"

In Milena, the Pixel Superiority index is defined as follow: Let v = p.val(), the Pixel superiority index of p is the number of neighbor pixels having their value/level inferior or equal to p.val().

This algorithm keeps sites having their pixel superiority index greater than 5.

For good results with 2D images, we advice you to use c8() as neighborhood.

Definition at line 98 of file crest.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::data::fill(), and mln::initialize().

template<typename I, typename N>
bool mln::topo::skeleton::is_simple_point ( const Image< I > &  ima,
const Neighborhood< N > &  nbh,
const typename I::site &  p 
) [inline]

Tell if a point is simple or not. A point of an object is simple if in its c8 neiborhood, there is exactly one connected component of the object, and only one connected component of the background Examples : ( | == object, - = background)


       - - |
       | P | Here p is simple in the c4 and c8 case.
       | | |

       - | -
       | P | Here p is never simple.
       | | |

       

Definition at line 262 of file is_simple_point.hh.

References mln::trace::entering(), mln::trace::exiting(), mln::topo::skeleton::internal::is_simple_point_dispatch(), and mln::topo::skeleton::internal::is_simple_point_tests().


Generated on Sun Apr 25 02:04:38 2010 for Milena (Olena) by  doxygen 1.5.6