$extrastylesheet
Namespaces | |
namespace | internal |
Functions | |
template<typename I , typename L > | |
mln::util::array< int > | align_lines_horizontaly (const Image< I > &input, const component_set< L > &lines, component_set< L > &aligned_lines, unsigned max_alignment_diff) |
template<typename I > | |
mln::util::array< int > | align_lines_verticaly (const Image< I > &input, mln::util::array< box< typename I::site > > &line_bboxes, unsigned max_alignment_diff) |
template<typename I > | |
void | connect_horizontal_lines (const mln::util::array< int > &aligned_cols, mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > &tablebboxes, const Image< I > &input, unsigned max_distance) |
template<typename I > | |
void | connect_vertical_lines (const mln::util::array< int > &aligned_rows, mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > &tablebboxes, const Image< I > &input, unsigned max_distance) |
template<typename I , typename L > | |
mln::trait::concrete< I >::ret | erase (const Image< I > &input, const component_set< L > &hlines, const component_set< L > &vlines) |
template<typename I , typename V > | |
mln::util::couple< typename mln::trait::ch_value< I, V > ::ret, mln::util::couple < mln::util::array< box < typename I::site > >, mln::util::array< box < typename I::site > > > > | extract (const Image< I > &input_, V &ncells) |
template<typename I , typename L > | |
mln::util::couple< L, mln::util::couple < component_set< L > , component_set< L > > > | rebuild (const Image< I > &input, const component_set< L > &vlines, const component_set< L > &hlines, unsigned max_dist_lines, typename L::value &ncells) |
template<typename I > | |
void | repair_horizontal_lines (const Image< I > &input, mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > &tablebboxes, unsigned max_discontinuity) |
template<typename I > | |
void | repair_vertical_lines (const Image< I > &input, mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > &tablebboxes, unsigned max_discontinuity) |
Namespace of routines working on tables.
mln::util::array<int> scribo::table::align_lines_horizontaly | ( | const Image< I > & | input, |
const component_set< L > & | lines, | ||
component_set< L > & | aligned_lines, | ||
unsigned | max_alignment_diff | ||
) |
Align line bounding boxes horizontaly.
[in] | input | Image from which the line bboxes are extracted from. |
[in] | lines | Component set corresponding to table lines. |
[in,out] | aligned_lines | Component set where aligned table lines are stored. |
[in] | max_alignment_diff | max space between two lines to consider they are potentialy on the same line. |
mln::util::array<int> scribo::table::align_lines_verticaly | ( | const Image< I > & | input, |
mln::util::array< box< typename I::site > > & | line_bboxes, | ||
unsigned | max_alignment_diff | ||
) |
Align line bounding boxes verticaly.
[in] | input | Image from which the line bboxes are extracted from. |
[in,out] | line_bboxes | vertical lines bounding boxes. |
[in] | max_alignment_diff | max space between two lines to consider they are potentialy on the same line. |
void scribo::table::connect_horizontal_lines | ( | const mln::util::array< int > & | aligned_cols, |
mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > & | tablebboxes, | ||
const Image< I > & | input, | ||
unsigned | max_distance | ||
) |
Connect horizontal lines with the new aligned columns.
[in] | aligned_cols | a list of new aligned cols. |
[in,out] | tablebboxes | the vertical and horizontal lines bounding boxes. |
[in] | input | The image from where the lines are extracted. |
[in] | max_distance | max distance allowed between a vertical and horizontal lines. |
void scribo::table::connect_vertical_lines | ( | const mln::util::array< int > & | aligned_rows, |
mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > & | tablebboxes, | ||
const Image< I > & | input, | ||
unsigned | max_distance | ||
) |
Connect vertical lines with the new aligned rows.
[in] | aligned_rows | a list of new aligned rows. |
[in,out] | tablebboxes | the vertical and horizontal lines bounding boxes. |
[in] | input | The image from where the lines are extracted. |
[in] | max_distance | max distance allowed between a vertical and horizontal lines. |
mln::trait::concrete< I >::ret scribo::table::erase | ( | const Image< I > & | input, |
const component_set< L > & | hlines, | ||
const component_set< L > & | vlines | ||
) |
Erase vertical and horizontal lines from an image.
[in] | input | A binary image from which the table lines are extracted. |
[in] | hlines | A component set with horizontal lines. |
[in] | vlines | A component set with vertical lines. |
in
where the table lines are removed. mln::util::couple<typename mln::trait::ch_value< I , V >::ret, mln::util::couple<mln::util::array<box<typename I ::site> >, mln::util::array<box<typename I ::site> > > > scribo::table::extract | ( | const Image< I > & | input_, |
V & | ncells | ||
) |
Extract tables from a binary image.
Use arbitrary criterions.
mln::util::couple<L, mln::util::couple<component_set<L>, component_set<L> > > scribo::table::rebuild | ( | const Image< I > & | input, |
const component_set< L > & | vlines, | ||
const component_set< L > & | hlines, | ||
unsigned | max_dist_lines, | ||
typename L::value & | ncells | ||
) |
Rebuild a table from its line bounding boxes.
[in] | input | A binary image. |
[in] | vlines | Component set corresponding to vertical lines. |
[in] | hlines | Component set corresponding to horizontal lines. |
[in] | max_dist_lines | The maximum distance allowed between vertical and horizontal lines to connect them eachother. |
[out] | ncells | Store the number of cells found in the rebuilt tables. |
void scribo::table::repair_horizontal_lines | ( | const Image< I > & | input, |
mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > & | tablebboxes, | ||
unsigned | max_discontinuity | ||
) |
Repair horizontal lines which have small discontinuities.
-— -— ==> -------—
[in] | input | Image from which the table bounding boxes are extracted. |
[in,out] | tablebboxes | Table line bounding boxes. |
[in] | max_discontinuity | Repair discontinuity which are smaller than this value. |
void scribo::table::repair_vertical_lines | ( | const Image< I > & | input, |
mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > & | tablebboxes, | ||
unsigned | max_discontinuity | ||
) |
Repair vertical lines which have small discontinuities.
| |
| |
==> |
| |
| |
[in] | input | Image from which the table bounding boxes are extracted. |
[in,out] | tablebboxes | Table line bounding boxes. |
[in] | max_discontinuity | Repair discontinuity which are smaller than this value. |