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) |
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 = 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.
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().
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.
[in] | input_ | A binary image. |
[in] | dist_map_ | A distance map of input . Contains the inner object distance map. |
[in] | nbh_ | A neighborhood. |
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().
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().