$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::topo::skeleton Namespace Reference

Classes

struct  is_simple_point

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)
template<typename I , typename N , typename F , typename G >
mln::trait::concrete< I >::ret breadth_first_thinning (const Image< I > &input, const Neighborhood< N > &nbh, Function_v2b< F > &is_simple, G &detach)
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, unsigned psi_threshold)
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)
template<typename I , typename N , typename F , typename G , typename J , typename H >
mln::trait::concrete< I >::ret priority_driven_thinning (const Image< I > &input, const Neighborhood< N > &nbh, Function_v2b< F > &is_simple, G &detach, const Image< J > &priority, const Function_v2b< H > &constraint)
template<typename I , typename N , typename F , typename G , typename J >
mln::trait::concrete< I >::ret priority_driven_thinning (const Image< I > &input, const Neighborhood< N > &nbh, Function_v2b< F > &is_simple, G &detach, const Image< J > &priority)

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,
G &  detach,
const Function_v2b< H > &  constraint 
)

Skeleton by Breadth-First Thinning.

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

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

Keywords: skeletons, simple points.

template<typename I , typename N , typename F , typename G >
mln::trait::concrete< I >::ret mln::topo::skeleton::breadth_first_thinning ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
Function_v2b< F > &  is_simple,
G &  detach 
)

Skeleton by Breadth-First Thinning with no constraint.

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

Parameters
inputThe input image.
nbhThe adjacency relation between triangles.
is_simpleThe predicate on the simplicity of points (sites). This functor must provide a method void set_image(const Image<I>&).
detachA function used to detach a cell from input. This functor must provide a method void set_image(const Image<I>&).

Keywords: skeletons, simple points.

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,
unsigned  psi_threshold 
)

Compute skeletization constraints.

Parameters
[in]inputA binary image.
[in]dist_mapA distance map of input. Contains the inner object distance map.
[in]nbhA neighborhood.
[in]psi_thresholdKeep sites having a Point Superiority Index greated or equal to psi_threshold.
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 psi_threshold (6 by default).

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

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 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.psi_threshold is set to 6.

template<typename I , typename N , typename F , typename G , typename J , typename H >
mln::trait::concrete< I >::ret mln::topo::skeleton::priority_driven_thinning ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
Function_v2b< F > &  is_simple,
G &  detach,
const Image< J > &  priority,
const Function_v2b< H > &  constraint 
)

Skeleton by Priority-Driven Thinning.

A generic implementation of the computation of a skeleton using a priority-driven thinning on a binary image.

Parameters
inputThe input image.
nbhThe adjacency relation between triangles.
is_simpleThe predicate on the simplicity of points (sites). This functor must provide a method void set_image(const Image<I>&).
detachA function used to detach a cell from input. This functor must provide a method void set_image(const Image<I>&).
priorityA priority function expressed as an image.
constraintA constraint on point (site); if it returns false for a point, this point will not be removed.

Keywords: skeletons, simple points.

template<typename I , typename N , typename F , typename G , typename J >
mln::trait::concrete< I >::ret mln::topo::skeleton::priority_driven_thinning ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
Function_v2b< F > &  is_simple,
G &  detach,
const Image< J > &  priority 
)

Skeleton by Priority-Driven Thinning with no constraint.

A generic implementation of the computation of a skeleton using a priority-driven thinning on a binary image.

Parameters
inputThe input image.
nbhThe adjacency relation between triangles.
is_simpleThe predicate on the simplicity of points (sites). This functor must provide a method void set_image(const Image<I>&).
detachA function used to detach a cell from input. This functor must provide a method void set_image(const Image<I>&).
priorityA priority function expressed as an image.

Keywords: skeletons, simple points.