$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Component Filtering

Functions

template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::components_large (const Image< I > &input_, const Neighborhood< N > &nbh_, const V &label_type, unsigned max_size)
template<typename L >
component_set< L > scribo::filter::components_large (const component_set< L > &components, unsigned max_size)
template<typename L >
component_set< L > scribo::filter::components_on_border (const component_set< L > &components)
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::components_small (const Image< I > &input, const Neighborhood< N > &nbh, V &nlabels, unsigned min_size)
template<typename L >
component_set< L > scribo::filter::components_small (const component_set< L > &components, unsigned min_size)
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::components_thin (const Image< I > &input_, const Neighborhood< N > &nbh_, const V &label_type, unsigned min_thickness)
template<typename L >
component_set< L > scribo::filter::components_thin (const component_set< L > &components, unsigned min_thickness)
template<typename L >
component_set< L > scribo::filter::components_v_thin (const component_set< L > &comps, unsigned min_thinness)
template<typename L >
component_set< L > scribo::filter::components_with_two_holes (const component_set< L > &components, unsigned min_size)
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_h_thick (const Image< I > &input_, const Neighborhood< N > &nbh_, const V &label_type, unsigned max_thickness)
template<typename L >
component_set< L > scribo::filter::objects_h_thick (const component_set< L > &comps, unsigned max_thickness)
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_h_thin (const Image< I > &input_, const Neighborhood< N > &nbh_, const V &label_type, unsigned min_thinness)
template<typename L >
component_set< L > scribo::filter::objects_h_thin (const component_set< L > &comps, unsigned min_thinness)
template<typename L >
component_set< L > scribo::filter::objects_size_ratio (const component_set< L > &comps, float min_size_ratio)
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_thick (const Image< I > &input_, const Neighborhood< N > &nbh_, const V &label_type, unsigned max_thickness)
template<typename L >
component_set< L > scribo::filter::objects_thick (const component_set< L > &components, unsigned max_thickness)
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_v_thick (const Image< I > &input_, const Neighborhood< N > &nbh_, const V &label_type, unsigned max_thickness)
template<typename L >
component_set< L > scribo::filter::objects_v_thick (const component_set< L > &comps, unsigned max_thickness)
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_v_thin (const Image< I > &input, const Neighborhood< N > &nbh, const V &label_type, unsigned min_thinness)
template<typename L >
component_set< L > scribo::filter::objects_with_holes (const component_set< L > &components, unsigned min_holes_count, unsigned min_size)

Detailed Description

Component filtering routines.

Function Documentation

template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::components_large ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
const V &  label_type,
unsigned  max_size 
)

Remove large objects in a binary image.

Set to 'false' all the removed objects.

Parameters
[in]input_A binary image.
[in]nbh_A neighborhood used for labeling input_.
[in]label_typeThe label type used for labeling.
[in]max_sizeThe minimum cardinality of an object.
Returns
A binary image without large objects.
template<typename L >
component_set<L> scribo::filter::components_large ( const component_set< L > &  components,
unsigned  max_size 
)
inline

Remove too large components.

Parameters
[in]componentsAn object image.
[in]max_sizeThe maximum cardinality of an object.
Returns
A component set with large components set to component::Ignored.
template<typename L >
component_set<L> scribo::filter::components_on_border ( const component_set< L > &  components)
inline

Remove components located on image borders.

Parameters
[in]componentsAn object image.
Returns
A component set with large components set to component::Ignored.
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::components_small ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
V &  nlabels,
unsigned  min_size 
)

Remove small components in a binary image.

Set to 'false' all the removed components.

Parameters
[in]inputA binary image.
[in]nbhA neighborhood used for labeling input_.
[out]nlabelsReturn the number of components. Defines also the type used for labeling.
[in]min_sizeThe minimum cardinality of an object.
Returns
A binary image without small components.
template<typename L >
component_set<L> scribo::filter::components_small ( const component_set< L > &  components,
unsigned  min_size 
)

Remove too small components.

Parameters
[in]componentsAn object image.
[in]min_sizeThe minimum cardinality of an object.
Returns
A component set with small components set to component::Ignored.
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::components_thin ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
const V &  label_type,
unsigned  min_thickness 
)
inline

Remove components thinner or equal to min_thickness.

Parameters
[in]input_a binary image.
[in]nbh_a neighborhood used in labeling algorithms.
[in]label_typethe label type used for labeling.
[in]min_thicknessthe minimum thickness value.
Returns
A binary image without thin components.
template<typename L >
component_set<L> scribo::filter::components_thin ( const component_set< L > &  components,
unsigned  min_thickness 
)
inline

Remove lines of text thinner or equal to min_thickness.

Parameters
[in]componentsAn object image.
[in]min_thicknessthe minimum thickness value.
Returns
An object image without too thin components.
template<typename L >
component_set<L> scribo::filter::components_v_thin ( const component_set< L > &  comps,
unsigned  min_thinness 
)
inline

Remove lines of text thinner or equal to min_thinness.

Parameters
[in]compsA component set.
[in]min_thinnessthe minimum thinness value.
Returns
An object image without too thin vertical components.
template<typename L >
component_set<L> scribo::filter::components_with_two_holes ( const component_set< L > &  components,
unsigned  min_size 
)
inline

Remove components having at least two holes.

This is a fastest version since it is optimized for 2 holes detection.

Parameters
[in]componentsA component set.
[in]min_sizeThe minimum hole area to take a hole into account.
Returns
A component where the component having at least two holes are invalidated.
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_h_thick ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
const V &  label_type,
unsigned  max_thickness 
)
inline

Remove objects horizontaly thicker or equal to max_thickness.

Parameters
[in]input_A binary image.
[in]nbh_A neighborhood used in labeling algorithms.
[in]label_typeThe label type used for labeling.
[in]max_thicknessThe maximum thickness value.
Returns
A binary image without thick objects.
template<typename L >
component_set<L> scribo::filter::objects_h_thick ( const component_set< L > &  comps,
unsigned  max_thickness 
)
inline

Remove objects horizontaly thicker or equal to max_thickness.

Parameters
[in]compsComponent data.
[in]max_thicknessThe minimum thickness value.
Returns
A component data set without too thick components.
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_h_thin ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
const V &  label_type,
unsigned  min_thinness 
)
inline

Remove components thinner or equal to min_thinness.

Parameters
[in]input_a binary image.
[in]nbh_a neighborhood used in labeling algorithms.
[in]label_typethe label type used for labeling.
[in]min_thinnessthe minimum thinness value.
Returns
A binary image without h_thin components.
template<typename L >
component_set<L> scribo::filter::objects_h_thin ( const component_set< L > &  comps,
unsigned  min_thinness 
)
inline

Remove lines of text thinner or equal to min_thinness.

Parameters
[in]compsA component set.
[in]min_thinnessthe minimum thinness value.
Returns
An object image without too thin vertical components.
template<typename L >
component_set<L> scribo::filter::objects_size_ratio ( const component_set< L > &  comps,
float  min_size_ratio 
)

Invalidate components with a height/width ratio too low.

Compute the ratio height/width from the component bounding boxes and compare it to size_ratio.

If the height/width ratio is lower than min_size_ratio then the component is invalidated.

template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_thick ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
const V &  label_type,
unsigned  max_thickness 
)
inline

Remove components thicker or equal to max_thickness.

Parameters
[in]input_A binary image.
[in]nbh_A neighborhood used in labeling algorithms.
[in]label_typeThe label type used for labeling.
[in]max_thicknessThe maximum thickness value.
Returns
A binary image without thick components.
template<typename L >
component_set<L> scribo::filter::objects_thick ( const component_set< L > &  components,
unsigned  max_thickness 
)
inline

Remove components thicker or equal to max_thickness.

Parameters
[in]componentsAn object image.
[in]max_thicknessThe maximum thickness value.
Returns
An object image without too thick components.
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_v_thick ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
const V &  label_type,
unsigned  max_thickness 
)
inline

Remove components verticaly thicker or equal to max_thickness.

Parameters
[in]input_A binary image.
[in]nbh_A neighborhood used in labeling algorithms.
[in]label_typeThe label type used for labeling.
[in]max_thicknessThe maximum thickness value.
Returns
A binary image without thick components.
template<typename L >
component_set<L> scribo::filter::objects_v_thick ( const component_set< L > &  comps,
unsigned  max_thickness 
)
inline

Remove components verticaly thicker or equal to max_thickness.

Parameters
[in]compsA component set.
[in]max_thicknessThe maximum thickness value.
Returns
An object image without too thick components.
template<typename I , typename N , typename V >
mln::trait::concrete< I >::ret scribo::filter::objects_v_thin ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
const V &  label_type,
unsigned  min_thinness 
)
inline

Remove components thinner or equal to min_thinness.

Parameters
[in]inputa binary image.
[in]nbha neighborhood used in labeling algorithms.
[in]label_typethe label type used for labeling.
[in]min_thinnessthe minimum thinness value.
Returns
A binary image without v_thin components.
template<typename L >
component_set<L> scribo::filter::objects_with_holes ( const component_set< L > &  components,
unsigned  min_holes_count,
unsigned  min_size 
)

Remove components having a minimum number of holes.

Parameters
[in]componentsA component set.
[in]min_holes_countIf a component have at least min_holes_count holes it is invalidated.
[in]min_sizeThe minimum hole area to take a hole into account.
Returns
A component where the component having too much holes are invalidated.