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

Functions

template<typename L >
object_links< L > scribo::filter::object_links_aligned (const object_links< L > &links, float max_alpha, anchor::Type anchor)
template<typename L >
object_links< L > scribo::filter::object_links_bbox_h_ratio (const object_links< L > &links, float max_h_ratio)
template<typename L >
object_links< L > scribo::filter::object_links_bbox_overlap (const object_links< L > &links, float max_overlap_ratio)
template<typename L >
object_links< L > scribo::filter::object_links_bbox_ratio (const object_links< L > &links, unsigned dim, float max_ratio)
template<typename L >
object_links< L > scribo::filter::object_links_bbox_w_ratio (const object_links< L > &links, float max_w_ratio)
template<typename L >
object_links< L > scribo::filter::object_links_bottom_aligned (const object_links< L > &links, float max_alpha)
template<typename L >
object_links< L > scribo::filter::object_links_center_aligned (const object_links< L > &links, float max_alpha)
template<typename L >
object_links< L > scribo::filter::object_links_left_aligned (const object_links< L > &links, float max_alpha)
template<typename L >
object_links< L > scribo::filter::object_links_non_aligned_simple (const object_links< L > &links, anchor::Type anchor, float max_alpha)
template<typename L >
object_links< L > scribo::filter::object_links_right_aligned (const object_links< L > &links, float max_alpha)
template<typename L >
object_links< L > scribo::filter::object_links_top_aligned (const object_links< L > &links, float max_alpha)

Detailed Description

Component links filtering routines.

Function Documentation

template<typename L >
object_links<L> scribo::filter::object_links_aligned ( const object_links< L > &  links,
float  max_alpha,
anchor::Type  anchor 
)

Invalidate links between two components according to a specific anchor.

Parameters
[in]linksObject links information.
[in]max_alphaMaximum angle value (degrees).
[in]anchorAnchor used to compute angles.
                      ------
                      |    |
         ------       |    |
         |    |       |    |
         | x------------x  |
         |    |       |    |
         ------~ ~ ~ ~| ~ ~| ~ ~
        object1  ~    |    |   ^
                   ~  |    |   |
              ~------   |
                     object2   | Alpha
                       ~       |
                  ~     |
                    ~   |
                      ~ v
                        ~

Example with an anchor set to the bottom right : The angle between the two bottoms must be lower than max_alpha.

template<typename L >
object_links<L> scribo::filter::object_links_bbox_h_ratio ( const object_links< L > &  links,
float  max_h_ratio 
)

Invalidate links between two components with too different height.

Parameters
[in]linksLink objects information.
[in]max_h_ratioThe maximum height ratio of two linked bounding boxes.
Returns
A filtered object link information.
template<typename L >
object_links<L> scribo::filter::object_links_bbox_overlap ( const object_links< L > &  links,
float  max_overlap_ratio 
)

Invalidate links between two components having their bounding box overlapping too much.

Parameters
[in]linksLink components information.
[in]max_overlap_ratioThe maximum ratio of the overlapping areas.
Returns
A filtered object link information.
template<typename L >
object_links<L> scribo::filter::object_links_bbox_ratio ( const object_links< L > &  links,
unsigned  dim,
float  max_ratio 
)

Invalidate links between two components with too different height or width.

Parameters
[in]linksLink components information.
[in]dimThe dimension to use to compare bbox length.
[in]max_ratioThe maximum length ratio of two linked bounding boxes.
Returns
A filtered object link information.
template<typename L >
object_links<L> scribo::filter::object_links_bbox_w_ratio ( const object_links< L > &  links,
float  max_w_ratio 
)

Invalidate links between two objects with too different width.

Parameters
[in]linksLink objects information.
[in]max_w_ratioThe minimum width ratio of two linked bounding boxes.
Returns
A filtered object link information.
template<typename L >
object_links<L> scribo::filter::object_links_bottom_aligned ( const object_links< L > &  links,
float  max_alpha 
)

Invalidate links between two components if their bottom are not aligned.

Parameters
[in]linksObject links information.
[in]max_alphaMaximum angle value (degrees).
                      ------
                      |    |
         ------       |    |
         |    |       |    |
         | x------------x  |
         |    |       |    |
         ------~ ~ ~ ~| ~ ~| ~ ~
        object1  ~    |    |   ^
                   ~  |    |   |
              ~------   |
                     object2   | Alpha
                       ~       |
                  ~     |
                    ~   |
                      ~ v
                        ~

The angle between the two bottoms must be lower than max_alpha.

template<typename L >
object_links<L> scribo::filter::object_links_center_aligned ( const object_links< L > &  links,
float  max_alpha 
)

Invalidate links between two objects if their center are not aligned.

Parameters
[in]linksObject links information.
[in]max_alphaMaximum angle value (degrees).
Returns
New link data.
         ------       ------
         |    |       |    |  v
         | x ~| ~ ~ ~ | ~ ~|~ ~
         |   ~| ~     |    |  | => Alpha
         |    |   ~ ~ | x ~|~ ~
         ------       |    |  ^
         object1      |    |
               ------
                     object2

The angle between the two bottoms must be lower than max_alpha.

template<typename L >
object_links<L> scribo::filter::object_links_left_aligned ( const object_links< L > &  links,
float  max_alpha 
)

Invalidate links between two objects if their left are not aligned.

Parameters
[in]linksObject links information.
[in]max_alphaMaximum angle value (degrees).
                           ~ ^
                        ~    |
                     ~------ | Alpha
                 ~    |    | |
              ~       |    | |
           ~          |    | v
         ~----- ~ ~ ~ | ~ ~| ~
         |    |       |    |
         | x------------x  |
         |    |       |    |
         ------       |    |
        object1       |    |
               ------
                     object2

The angle between the two lefts must be lower than max_alpha.

template<typename L >
object_links<L> scribo::filter::object_links_non_aligned_simple ( const object_links< L > &  links,
anchor::Type  anchor,
float  max_alpha 
)

Invalidate links between two non aligned components. Alignment is based on a given anchor of object bounding boxes.

Parameters
[in]linksObject links information.
[in]anchorAnchor from where the links are made.
[in]max_alphaMaximum angle value (degrees).

Exemple with anchor == 1 (bottom horizontal filter):

                      ------
                      |    |
         ------       |    |
         |    |       |    |
         | x------------x  |
         |    |       |    |
         ------~ ~ ~ ~| ~ ~| ~ ~
        object1  ~    |    |   ^
                   ~  |    |   |
              ~------   |
                     object2   | Alpha
                       ~       |
                  ~     |
                    ~   |
                      ~ v
                        ~

The angle between the two bottoms must be lower than alpha.

template<typename L >
object_links<L> scribo::filter::object_links_right_aligned ( const object_links< L > &  links,
float  max_alpha 
)

Invalidate links between two objects if their right are not aligned.

Parameters
[in]linksObject links information.
[in]max_alphaMaximum angle value (degrees).
                             ~
                      -----~ ^
                      |  ~ | | Alpha
                     ~|    | |
                  ~   |    | v
         ------ ~ ~ ~ | ~ ~| ~ ~
         |    |       |    |
         | x------------x  |
         |    |       |    |
         ------       |    |
        object1       |    |
               ------
                     object2

The angle between the two rights must be lower than max_alpha.

template<typename L >
object_links<L> scribo::filter::object_links_top_aligned ( const object_links< L > &  links,
float  max_alpha 
)

Invalidate links between two objects if their top are not aligned.

Parameters
[in]linksObject links information.
[in]max_alphaMaximum angle value (degrees).
                             ~
                           ~ ^
                         ~   |
                       ~     |
                     ~------ | Alpha
                   ~  |    | |
                 ~    |    | |
               ~      |    | v
         ------ ~ ~ ~ | ~ ~| ~
         |    |       |    |
         | x------------x  |
         |    |       |    |
         ------       |    |
        object1       |    |
               ------
                     object2

The angle between the two tops must be lower than max_alpha.