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

Functions

template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::alignment_decision_image (const Image< I > &input, const object_links< L > &links, const object_links< L > &filtered_links, const anchor::Type &anchor)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::bboxes_enlarged_image (const Image< I > &input, const line_set< L > &lines, const value::rgb8 &text_value, const value::rgb8 &non_text_value)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::bboxes_enlarged_image (const Image< I > &input, const line_set< L > &lines)
template<typename I >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::bboxes_image (const Image< I > &input, const mln::util::array< box< typename I::site > > &bboxes, const value::rgb8 &value)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::bboxes_image (const Image< I > &input, const line_set< L > &lines, const value::rgb8 &value)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::bboxes_image (const Image< I > &input, const line_set< L > &lines)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::bboxes_image (const Image< I > &input, const component_set< L > &comps, const value::rgb8 &value)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::char_space_image (const Image< I > &input, const line_set< L > &line, const value::rgb8 &v=literal::cyan)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::decision_image (const Image< I > &input, const object_groups< L > &groups, const object_groups< L > &filtered_groups, anchor::Type anchor)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::decision_image (const Image< I > &input, const object_links< L > &links, const object_links< L > &filtered_links, anchor::Type anchor)
template<typename I >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::highlight_text_area (const Image< I > &input, const mln::util::array< box< typename I::site > > &bbox)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::highlight_text_area (const Image< I > &input, const line_set< L > &lines)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::highlight_text_area (const Image< I > &input, const scribo::component_set< L > &components)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::line_info_image (const Image< I > &input, const line_set< L > &line)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::linked_bboxes_image (const Image< I > &input, const object_links< L > &array, const value::rgb8 &box_value, const value::rgb8 &link_value, anchor::Type anchor)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::linked_bboxes_image (const Image< I > &input, const object_links< L > &array, const value::rgb8 &box_value, const value::rgb8 &link_value)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::linked_bboxes_image (const Image< I > &input, const object_links< L > &left_link, const object_links< L > &right_link, const value::rgb8 &box_value, const value::rgb8 &link_value, anchor::Type anchor)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::linked_bboxes_image (const Image< I > &input, const object_links< L > &left_link, const object_links< L > &right_link, const value::rgb8 &box_value, const value::rgb8 &left_link_value, const value::rgb8 &right_link_value, const value::rgb8 &validated_link_value, anchor::Type anchor)
template<typename I , typename L , typename G >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::linked_bboxes_image (const Image< I > &input, const Graph< G > &g, const value::rgb8 &box_value, const value::rgb8 &link_value, anchor::Type anchor)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::links_decision_image (const Image< I > &input_, const object_links< L > &links, const object_links< L > &filtered_links)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::links_image (const Image< I > &input_, const object_links< L > &links, anchor::Type anchor, bool draw_bboxes=true)
scribo::debug::internal::logger_scribo::debug::logger ()
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::looks_like_a_text_line_image (const Image< I > &input, const line_set< L > &lines, const value::rgb8 &text_value, const value::rgb8 &non_text_value)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::looks_like_a_text_line_image (const Image< I > &input, const line_set< L > &lines)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::mean_and_base_lines_image (const Image< I > &input, const line_set< L > &lines, const value::rgb8 &bbox_value, const value::rgb8 &meanline_value, const value::rgb8 &baseline_value)
template<typename I , typename L >
mln::trait::ch_value< I,
value::rgb8 >::ret 
scribo::debug::mean_and_base_lines_image (const Image< I > &input, const line_set< L > &lines)
template<typename L , typename L2 >
void scribo::debug::save_comp_diff (const component_set< L > &comps_ref, const component_set< L2 > &comps_new, const std::string &filename)
template<typename I >
void scribo::debug::save_label_image (const Image< I > &lbl, const typename I::value &nlabels, const char *filename)
template<typename I >
void scribo::debug::save_table_image (const Image< I > &input_, mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > > tableboxes, const value::rgb8 &bbox_color, const std::string &filename)
template<typename S >
void scribo::debug::save_table_image (const Site_Set< S > &input_domain, mln::util::couple< mln::util::array< box< typename S::site > >, mln::util::array< box< typename S::site > > > tableboxes, const value::rgb8 &bg_color, const value::rgb8 &bbox_color, const std::string &filename)
template<typename I , typename L >
mln::trait::concrete< I >::ret scribo::debug::text_areas_image (const Image< I > &input_rgb, const scribo::component_set< L > &comps)
template<typename L >
image2d< value::rgb8 > scribo::debug::text_color_image (const document< L > &doc)

Detailed Description

Debug routines.

Function Documentation

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::alignment_decision_image ( const Image< I > &  input,
const object_links< L > &  links,
const object_links< L > &  filtered_links,
const anchor::Type &  anchor 
)

Save a color image showing the difference between to object links.

Parameters
[in]inputAn image. It's value type must be convertible towards rgb8.
[in]linksObject links information.
[in]filtered_linksA copy of links which have been filtered.
[in]anchorAnchor from where the links are drawn.
Returns
A color image. Non filtered links are drawn in green. Others are drawn in red.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::bboxes_enlarged_image ( const Image< I > &  input,
const line_set< L > &  lines,
const value::rgb8 &  text_value,
const value::rgb8 &  non_text_value 
)

Compute an image of enlarged component bounding boxes.

This check whether each line looks like a text line. If it is a text line, its extended bounding box is drawn, otherwise, it is normal bounding box.

This rountine uses scribo::internal::looks_like_a_text_line to check if a component looks like a text line.

Parameters
[in]inputAn image convertible towards a color image.
[in]linesA line set.
[in]text_valueThe color used to draw bounding boxes of components looking like a text line.
[in]non_text_valueThe color used to draw bounding boxes of components NOT looking like a text line.
Returns
A color image.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::bboxes_enlarged_image ( const Image< I > &  input,
const line_set< L > &  lines 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.text_value is set to literal::green.

non_text_value is set to literal::red.

template<typename I >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::bboxes_image ( const Image< I > &  input,
const mln::util::array< box< typename I::site > > &  bboxes,
const value::rgb8 &  value 
)

Draw a list of bounding boxes.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::bboxes_image ( const Image< I > &  input,
const line_set< L > &  lines,
const value::rgb8 &  value 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::bboxes_image ( const Image< I > &  input,
const line_set< L > &  lines 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.value is set to literal::red.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::bboxes_image ( const Image< I > &  input,
const component_set< L > &  comps,
const value::rgb8 &  value 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::char_space_image ( const Image< I > &  input,
const line_set< L > &  line,
const value::rgb8 &  v = literal::cyan 
)

Draw inter character space.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::decision_image ( const Image< I > &  input,
const object_groups< L > &  groups,
const object_groups< L > &  filtered_groups,
anchor::Type  anchor 
)

Save a color image showing the difference between to object groups.

Parameters
[in]inputAn image. It's value type must be convertible towards rgb8.
[in]groupsObject groups information.
[in]filtered_groupsA copy of groups which have been filtered.
[in]anchorAnchor from where the links are drawn.
Returns
A color image. Components part of a validated group are drawn in green with their bounding box. Otherwise, they are drawn in red.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::decision_image ( const Image< I > &  input,
const object_links< L > &  links,
const object_links< L > &  filtered_links,
anchor::Type  anchor 
)

Save a color image showing the difference between to object links.

Parameters
[in]inputAn image. It's value type must be convertible towards rgb8.
[in]linksObject links information.
[in]filtered_linksA copy of links which have been filtered.
[in]anchorAnchor from where the links are drawn.
Returns
A color image. Non filtered links are drawn in green. Others are drawn in red.
template<typename I >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::highlight_text_area ( const Image< I > &  input,
const mln::util::array< box< typename I::site > > &  bbox 
)

Darken an image and highlight valid lines.

Parameters
[in]inputAn image.
[in]bboxAn array of text area bounding boxes.
Returns
a color image with highlighted text areas.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::highlight_text_area ( const Image< I > &  input,
const line_set< L > &  lines 
)

Darken an image and highlight valid lines.

Parameters
[in]inputAn image.
[in]linesA line set.
Returns
a color image with highlighted text areas.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::highlight_text_area ( const Image< I > &  input,
const scribo::component_set< L > &  components 
)

Darken an image and highlight valid lines.

This overload is useful if you do know that all the components are text.

Parameters
[in]inputAn image.
[in]componentsA component set.
Returns
a color image with highlighted text areas.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::line_info_image ( const Image< I > &  input,
const line_set< L > &  line 
)

Draw typographic information from lines.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::linked_bboxes_image ( const Image< I > &  input,
const object_links< L > &  array,
const value::rgb8 &  box_value,
const value::rgb8 &  link_value,
anchor::Type  anchor 
)

Compute the line of components links image.

Parameters
[in,out]inputThe binary from where the components are extracted.
[in]arrayComponents links.
[in]box_valueValue used to draw line bounding boxes.
[in]link_valueValue used to draw line links.
[in]anchorAnchor from where the links are drawn.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::linked_bboxes_image ( const Image< I > &  input,
const object_links< L > &  array,
const value::rgb8 &  box_value,
const value::rgb8 &  link_value 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The default anchor type is set to anchor::Center.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::linked_bboxes_image ( const Image< I > &  input,
const object_links< L > &  left_link,
const object_links< L > &  right_link,
const value::rgb8 &  box_value,
const value::rgb8 &  link_value,
anchor::Type  anchor 
)

Compute the line of components left and right links image.

Parameters
[in,out]inputThe binary from where the components are extracted.
[in]left_linkComponents left links.
[in]right_linkComponents right links.
[in]box_valueValue used to draw line bounding boxes.
[in]link_valueValue used to draw line links.
[in]anchorAnchor from where the links are drawn.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::linked_bboxes_image ( const Image< I > &  input,
const object_links< L > &  left_link,
const object_links< L > &  right_link,
const value::rgb8 &  box_value,
const value::rgb8 &  left_link_value,
const value::rgb8 &  right_link_value,
const value::rgb8 &  validated_link_value,
anchor::Type  anchor 
)
inline

Compute the line of components left and right links image.

Draw also validated links.

Parameters
[in,out]inputThe binary from where the components are extracted.
[in]left_linkComponents left links.
[in]right_linkComponents right links.
[in]box_valueValue used to draw line bounding boxes.
[in]left_link_valueValue used to draw line left links.
[in]right_link_valueValue used to draw line left links.
[in]validated_link_valueValue used to draw line validated links.
[in]anchorAnchor from where the links are drawn.
template<typename I , typename L , typename G >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::linked_bboxes_image ( const Image< I > &  input,
const Graph< G > &  g,
const value::rgb8 &  box_value,
const value::rgb8 &  link_value,
anchor::Type  anchor 
)

Compute the line link graph image.

Parameters
[in,out]inputThe binary from where the components are extracted.
[in]gThe link graph.
[in]box_valueValue used to draw line bounding boxes.
[in]link_valueValue used to draw line links.
[in]anchorAnchor from where the links are drawn.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::links_decision_image ( const Image< I > &  input_,
const object_links< L > &  links,
const object_links< L > &  filtered_links 
)

Save a color image showing the difference between to object groups.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::links_image ( const Image< I > &  input_,
const object_links< L > &  links,
anchor::Type  anchor,
bool  draw_bboxes = true 
)

Save a color image showing components links.

scribo::debug::internal::logger_& scribo::debug::logger ( )

Return a reference to the logger.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::looks_like_a_text_line_image ( const Image< I > &  input,
const line_set< L > &  lines,
const value::rgb8 &  text_value,
const value::rgb8 &  non_text_value 
)

Compute an image where components are drawn differently whether they look like a line or not.

Parameters
[in]inputAn image convertible towards a color image.
[in]linesA line set.
[in]text_valueThe color used to draw bounding boxes of components looking like a text line.
[in]non_text_valueThe color used to draw bounding boxes of components NOT looking like a text line.
Returns
A color image.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::looks_like_a_text_line_image ( const Image< I > &  input,
const line_set< L > &  lines 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.text_value is set to literal::green.

non_text_value is set to literal::red.

template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::mean_and_base_lines_image ( const Image< I > &  input,
const line_set< L > &  lines,
const value::rgb8 &  bbox_value,
const value::rgb8 &  meanline_value,
const value::rgb8 &  baseline_value 
)

Compute a color image showing the mean and the base lines of the text lines.

The mean line is drawn with a dashed line. The base line is drawn with a plain line.

Parameters
[in]inputAn image convertible towards a color image.
[in]linesA line set.
[in]bbox_valueValue used to draw lines bounding boxes.
[in]meanline_valueValue used to draw mean lines.
[in]baseline_valueValue used to draw base lines.
Returns
A color image.
template<typename I , typename L >
mln::trait::ch_value< I , value::rgb8 >::ret scribo::debug::mean_and_base_lines_image ( const Image< I > &  input,
const line_set< L > &  lines 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.text_value is set to literal::green.

non_text_value is set to literal::red.

template<typename L , typename L2 >
void scribo::debug::save_comp_diff ( const component_set< L > &  comps_ref,
const component_set< L2 > &  comps_new,
const std::string &  filename 
)

Show the difference between two object images.

Parameters
[in]comps_refA component set.
[in]comps_newAnother component set.
[in]filenameThe output filename.
template<typename I >
void scribo::debug::save_label_image ( const Image< I > &  lbl,
const typename I::value nlabels,
const char *  filename 
)

Save a labeled image in a color image.

Parameters
[in]lblA label image.
[in]nlabelsThe number of labels.
[in]filenameThe output file name.
template<typename I >
void scribo::debug::save_table_image ( const Image< I > &  input_,
mln::util::couple< mln::util::array< box< typename I::site > >, mln::util::array< box< typename I::site > > >  tableboxes,
const value::rgb8 &  bbox_color,
const std::string &  filename 
)

Save lines bounding boxes in a copy of input_.

Bounding boxes are displayed with bbox_color.

template<typename S >
void scribo::debug::save_table_image ( const Site_Set< S > &  input_domain,
mln::util::couple< mln::util::array< box< typename S::site > >, mln::util::array< box< typename S::site > > >  tableboxes,
const value::rgb8 &  bg_color,
const value::rgb8 &  bbox_color,
const std::string &  filename 
)

Save lines bounding boxes in an image defined on input_domain filled with bg_color.

Bounding boxes are displayed with bbox_color.

template<typename I , typename L >
mln::trait::concrete< I >::ret scribo::debug::text_areas_image ( const Image< I > &  input_rgb,
const scribo::component_set< L > &  comps 
)

Compute an image including detected text areas only.

template<typename L >
image2d<value::rgb8> scribo::debug::text_color_image ( const document< L > &  doc)

Draw text components with their respective colors.