$extrastylesheet
Functions | |
template<typename L > | |
mln::util::array< int > | 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) |
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) |
Namespace of internal routines working on tables.
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.
[in] | nsites | Number of sites in the given dimension dim . |
[in] | min_coord | The minimal coordinate in the dimension dim . |
[in] | max_coord | The maximal coordinate in the dimension dim . |
[in] | lines | The line components. |
[out] | aligned_lines | The components of the aligned lines. |
[in] | dim | The dimension according which the lines are aligned. |
[in] | max_alignment_diff | Maximum alignment difference. |
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.
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!
[in] | input | A binary image. |
[in,out] | tableboxes | Vertical or horizontal lines. |
[in] | max_discontinuity | The maximum discontinuity length which can be repaired. |