Namespaces | Classes | Functions

mln::topo::skeleton Namespace Reference

Namespaces

namespace  impl
namespace  internal

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=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)
 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 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)
 Compute skeletization constraints.

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 
)

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.

Definition at line 312 of file crest.hh.

References crest().

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] input A binary image.
[in] dist_map A distance map of input. Contains the inner object distance map.
[in] nbh A neighborhood.
[in] psi_threshold Keep 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.

Definition at line 291 of file crest.hh.

References mln::topo::skeleton::internal::crest_dispatch(), mln::trace::entering(), mln::exact(), and mln::trace::exiting().

Referenced by crest(), mln::topo::skeleton::internal::crest_dispatch(), and mln::topo::skeleton::internal::crest_dispatch_2d().