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

Functions

template<typename L >
object_groups< L > scribo::filter::object_groups_mean_width (const object_groups< L > &groups, float width)
template<typename L >
object_groups< L > scribo::filter::object_groups_size_ratio (const object_groups< L > &groups, float max_size_ratio, float max_invalid_ratio_per_group)
template<typename L >
object_groups< L > scribo::filter::object_groups_small (const object_groups< L > &groups, unsigned n_links)
template<typename L >
object_groups< L > scribo::filter::object_groups_with_holes (const object_groups< L > &components, unsigned min_size)

Detailed Description

Component groups filtering routines.

Function Documentation

template<typename L >
object_groups<L> scribo::filter::object_groups_mean_width ( const object_groups< L > &  groups,
float  width 
)

Filter groups having their object mean width too low.

Parameters
[in]groupsObject group information.
[in]widthObject group mean width must be greater or equal to this value.
Returns
Filtered object group information.
template<typename L >
object_groups<L> scribo::filter::object_groups_size_ratio ( const object_groups< L > &  groups,
float  max_size_ratio,
float  max_invalid_ratio_per_group 
)

Invalidates groups with too much thin and high components.

For each components in the group, it computes the height/width ratio. If it is higher or equal to max_size_ratio, the component is counted as invalid.

If there are max_invalid_ratio_per_group invalid components, the group is invalidated.

Returns
An object_group structure potentially with invalided groups.
template<typename L >
object_groups<L> scribo::filter::object_groups_small ( const object_groups< L > &  groups,
unsigned  n_links 
)

Invalidate groups with few components.

Parameters
[in]groupsInformation about object groups.
[in]n_linksThe minimum number of links per group.
Returns
A copy of object group in which small groups have been invalidated.
template<typename L >
object_groups<L> scribo::filter::object_groups_with_holes ( const object_groups< L > &  components,
unsigned  min_size 
)
inline

Remove groups not having at least two background components of min_size pixels.

In order to verify the property of "having two background components", a component group must have at least one component with a hole.

Example: the letter 'o' has two background components: outside and inside the letter.