$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
scribo::table::internal Namespace Reference

Functions

template<typename L >
mln::util::array< intalign_lines (unsigned nsites, int min_coord, int max_coord, const component_set< L > &lines, component_set< L > &aligned_lines, unsigned dim, unsigned max_alignment_diff)
template<typename P >
void connect_lines (const mln::util::array< int > &aligned_lines, mln::util::array< box< P > > &boxes, unsigned dim, unsigned dim_size, unsigned max_distance)
template<unsigned axis, typename I >
void repair_lines (const Image< I > &input, mln::util::array< box< typename I::site > > &tableboxes, unsigned max_discontinuity)

Detailed Description

Namespace of internal routines working on tables.

Function Documentation

template<typename L >
mln::util::array<int> scribo::table::internal::align_lines ( unsigned  nsites,
int  min_coord,
int  max_coord,
const component_set< L > &  lines,
component_set< L > &  aligned_lines,
unsigned  dim,
unsigned  max_alignment_diff 
)

Align table lines bboxes according to a given dimension.

Parameters
[in]nsitesNumber of sites in the given dimension dim.
[in]min_coordThe minimal coordinate in the dimension dim.
[in]max_coordThe maximal coordinate in the dimension dim.
[in]linesThe line components.
[out]aligned_linesThe components of the aligned lines.
[in]dimThe dimension according which the lines are aligned.
[in]max_alignment_diffMaximum alignment difference.
Returns
A list of the resulting aligned cols. Each integer is actually a col number.
template<typename P >
void scribo::table::internal::connect_lines ( const mln::util::array< int > &  aligned_lines,
mln::util::array< box< P > > &  boxes,
unsigned  dim,
unsigned  dim_size,
unsigned  max_distance 
)

Connect vertical and horizontal lines if they are close to each other.


—> | | | | |

FIXME: doc arguments.

template<unsigned axis, typename I >
void scribo::table::internal::repair_lines ( const Image< I > &  input,
mln::util::array< box< typename I::site > > &  tableboxes,
unsigned  max_discontinuity 
)

Repair lines which have small discontinuities.

FIXME: buggy. Sometimes few lines move or shrink!

Parameters
[in]inputA binary image.
[in,out]tableboxesVertical or horizontal lines.
[in]max_discontinuityThe maximum discontinuity length which can be repaired.