* scribo/debug/alignment_decision_image.hh,
* scribo/debug/bboxes_enlarged_image.hh,
* scribo/debug/bboxes_image.hh,
* scribo/debug/char_space_image.hh,
* scribo/debug/decision_image.hh,
* scribo/debug/line_info_image.hh,
* scribo/debug/linked_bboxes_image.hh,
* scribo/debug/links_decision_image.hh,
* scribo/debug/links_image.hh,
* scribo/debug/looks_like_a_text_line_image.hh,
* scribo/debug/mean_and_base_lines_image.hh,
* scribo/debug/save_table_image.hh,
* scribo/primitive/extract/alignments.hh,
* scribo/primitive/extract/separators_nonvisible.hh,
* scribo/text/extract_paragraphs.hh,
* scribo/text/extract_paragraphs_hdoc.hh,
* scribo/toolchain/internal/text_in_doc_preprocess_functor.hh,
* scribo/toolchain/internal/text_in_picture_functor.hh,
* src/debug/show_lines_boldness.cc,
* src/debug/show_links_left_right_links_validation.cc,
* src/debug/show_links_several_right_overlap.cc,
* src/debug/show_links_single_down.cc,
* src/debug/show_links_single_left.cc,
* src/debug/show_links_single_left_dmax_ratio.cc,
* src/debug/show_links_single_right.cc,
* src/debug/show_links_single_right_dmax_ratio.cc,
* src/debug/show_links_single_up.cc,
* src/debug/show_objects_large.cc,
* src/debug/show_objects_small.cc,
* src/debug/show_objects_thick.cc,
* src/debug/show_objects_thin.cc,
* src/debug/show_text_lines.cc,
* src/debug/show_text_lines_wo_seps.cc,
* src/filter/objects_large.cc,
* src/filter/objects_small.cc,
* src/filter/objects_thick.cc,
* src/filter/objects_thin.cc,
* src/filter/objects_with_holes.cc,
* src/filter/objects_with_holes_pgm.cc,
* src/non_text_components.cc,
* src/preprocessing/preprocess.cc,
* src/primitive/extract/alignments.cc,
* src/primitive/extract/discontinued_hlines.cc,
* src/primitive/extract/discontinued_lines.cc,
* src/primitive/extract/discontinued_vlines.cc,
* src/primitive/extract/thick_hlines.cc,
* src/primitive/extract/thick_vlines.cc,
* src/primitive/group/group_from_rag.cc,
* src/table/rebuild_opening.cc,
* src/table/rebuild_rank.cc,
* src/util/component_precise_outline.cc,
* tests/primitive/extract/alignments.cc: Here.
---
scribo/ChangeLog | 57 ++++++++++++++++++++
scribo/scribo/debug/alignment_decision_image.hh | 2 +-
scribo/scribo/debug/bboxes_enlarged_image.hh | 2 +-
scribo/scribo/debug/bboxes_image.hh | 8 ++--
scribo/scribo/debug/char_space_image.hh | 6 +-
scribo/scribo/debug/decision_image.hh | 4 +-
scribo/scribo/debug/line_info_image.hh | 2 +-
scribo/scribo/debug/linked_bboxes_image.hh | 6 +-
scribo/scribo/debug/links_decision_image.hh | 2 +-
scribo/scribo/debug/links_image.hh | 2 +-
.../scribo/debug/looks_like_a_text_line_image.hh | 2 +-
scribo/scribo/debug/mean_and_base_lines_image.hh | 6 +-
scribo/scribo/debug/save_table_image.hh | 2 +-
scribo/scribo/primitive/extract/alignments.hh | 4 +-
.../primitive/extract/separators_nonvisible.hh | 10 ++--
scribo/scribo/text/extract_paragraphs.hh | 6 +-
scribo/scribo/text/extract_paragraphs_hdoc.hh | 4 +-
.../internal/text_in_doc_preprocess_functor.hh | 4 +-
.../toolchain/internal/text_in_picture_functor.hh | 13 +++--
scribo/src/debug/show_lines_boldness.cc | 6 +-
.../show_links_left_right_links_validation.cc | 6 +-
.../src/debug/show_links_several_right_overlap.cc | 4 +-
scribo/src/debug/show_links_single_down.cc | 4 +-
scribo/src/debug/show_links_single_left.cc | 4 +-
.../src/debug/show_links_single_left_dmax_ratio.cc | 4 +-
scribo/src/debug/show_links_single_right.cc | 4 +-
.../debug/show_links_single_right_dmax_ratio.cc | 4 +-
scribo/src/debug/show_links_single_up.cc | 4 +-
scribo/src/debug/show_objects_large.cc | 6 +-
scribo/src/debug/show_objects_small.cc | 6 +-
scribo/src/debug/show_objects_thick.cc | 6 +-
scribo/src/debug/show_objects_thin.cc | 6 +-
scribo/src/debug/show_text_lines.cc | 5 +-
scribo/src/debug/show_text_lines_wo_seps.cc | 5 +-
scribo/src/filter/objects_large.cc | 6 +-
scribo/src/filter/objects_small.cc | 6 +-
scribo/src/filter/objects_thick.cc | 6 +-
scribo/src/filter/objects_thin.cc | 6 +-
scribo/src/filter/objects_with_holes.cc | 6 +-
scribo/src/filter/objects_with_holes_pgm.cc | 6 +-
scribo/src/non_text_components.cc | 2 +-
scribo/src/preprocessing/preprocess.cc | 8 ++--
scribo/src/primitive/extract/alignments.cc | 5 +-
.../src/primitive/extract/discontinued_hlines.cc | 6 +-
scribo/src/primitive/extract/discontinued_lines.cc | 6 +-
.../src/primitive/extract/discontinued_vlines.cc | 6 +-
scribo/src/primitive/extract/thick_hlines.cc | 6 +-
scribo/src/primitive/extract/thick_vlines.cc | 6 +-
scribo/src/primitive/group/group_from_rag.cc | 7 ++-
scribo/src/table/rebuild_opening.cc | 5 +-
scribo/src/table/rebuild_rank.cc | 7 ++-
scribo/src/util/component_precise_outline.cc | 5 +-
scribo/tests/primitive/extract/alignments.cc | 5 +-
53 files changed, 196 insertions(+), 130 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 86b7802..0cf0bda 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,60 @@
+2013-04-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Swap arguments of data::convert in Scribo.
+
+ * scribo/debug/alignment_decision_image.hh,
+ * scribo/debug/bboxes_enlarged_image.hh,
+ * scribo/debug/bboxes_image.hh,
+ * scribo/debug/char_space_image.hh,
+ * scribo/debug/decision_image.hh,
+ * scribo/debug/line_info_image.hh,
+ * scribo/debug/linked_bboxes_image.hh,
+ * scribo/debug/links_decision_image.hh,
+ * scribo/debug/links_image.hh,
+ * scribo/debug/looks_like_a_text_line_image.hh,
+ * scribo/debug/mean_and_base_lines_image.hh,
+ * scribo/debug/save_table_image.hh,
+ * scribo/primitive/extract/alignments.hh,
+ * scribo/primitive/extract/separators_nonvisible.hh,
+ * scribo/text/extract_paragraphs.hh,
+ * scribo/text/extract_paragraphs_hdoc.hh,
+ * scribo/toolchain/internal/text_in_doc_preprocess_functor.hh,
+ * scribo/toolchain/internal/text_in_picture_functor.hh,
+ * src/debug/show_lines_boldness.cc,
+ * src/debug/show_links_left_right_links_validation.cc,
+ * src/debug/show_links_several_right_overlap.cc,
+ * src/debug/show_links_single_down.cc,
+ * src/debug/show_links_single_left.cc,
+ * src/debug/show_links_single_left_dmax_ratio.cc,
+ * src/debug/show_links_single_right.cc,
+ * src/debug/show_links_single_right_dmax_ratio.cc,
+ * src/debug/show_links_single_up.cc,
+ * src/debug/show_objects_large.cc,
+ * src/debug/show_objects_small.cc,
+ * src/debug/show_objects_thick.cc,
+ * src/debug/show_objects_thin.cc,
+ * src/debug/show_text_lines.cc,
+ * src/debug/show_text_lines_wo_seps.cc,
+ * src/filter/objects_large.cc,
+ * src/filter/objects_small.cc,
+ * src/filter/objects_thick.cc,
+ * src/filter/objects_thin.cc,
+ * src/filter/objects_with_holes.cc,
+ * src/filter/objects_with_holes_pgm.cc,
+ * src/non_text_components.cc,
+ * src/preprocessing/preprocess.cc,
+ * src/primitive/extract/alignments.cc,
+ * src/primitive/extract/discontinued_hlines.cc,
+ * src/primitive/extract/discontinued_lines.cc,
+ * src/primitive/extract/discontinued_vlines.cc,
+ * src/primitive/extract/thick_hlines.cc,
+ * src/primitive/extract/thick_vlines.cc,
+ * src/primitive/group/group_from_rag.cc,
+ * src/table/rebuild_opening.cc,
+ * src/table/rebuild_rank.cc,
+ * src/util/component_precise_outline.cc,
+ * tests/primitive/extract/alignments.cc: Here.
+
2013-04-26 Guillaume Lazzara <z(a)lrde.epita.fr>
* doc/Doxyfile.in: Disable QHP generation.
diff --git a/scribo/scribo/debug/alignment_decision_image.hh
b/scribo/scribo/debug/alignment_decision_image.hh
index 00ad931..aae37bb 100644
--- a/scribo/scribo/debug/alignment_decision_image.hh
+++ b/scribo/scribo/debug/alignment_decision_image.hh
@@ -95,7 +95,7 @@ namespace scribo
/// FIXME: Check that components has been computed from input.
mln_ch_value(I,value::rgb8)
- decision_image = data::convert(value::rgb8(), input);
+ decision_image = data::convert(input, value::rgb8());
for_all_comps(i, components)
mln::draw::box(decision_image, components(i).bbox(), literal::blue);
diff --git a/scribo/scribo/debug/bboxes_enlarged_image.hh
b/scribo/scribo/debug/bboxes_enlarged_image.hh
index 65f77fb..89d6f3c 100644
--- a/scribo/scribo/debug/bboxes_enlarged_image.hh
+++ b/scribo/scribo/debug/bboxes_enlarged_image.hh
@@ -106,7 +106,7 @@ namespace scribo
mln_trace("scribo::debug::bboxes_enlarged_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) output = data::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) output = data::convert(input, value::rgb8());
for_all_lines(l, lines)
if (! lines(l).is_hidden())
diff --git a/scribo/scribo/debug/bboxes_image.hh b/scribo/scribo/debug/bboxes_image.hh
index d18f471..a80e705 100644
--- a/scribo/scribo/debug/bboxes_image.hh
+++ b/scribo/scribo/debug/bboxes_image.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -105,7 +105,7 @@ namespace scribo
mln_trace("scribo::debug::bboxes_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(input, value::rgb8());
draw::bounding_boxes(tmp, bboxes, value);
return tmp;
@@ -123,7 +123,7 @@ namespace scribo
mln_precondition(exact(input).is_valid());
mln_ch_value(I, value::rgb8)
- output = data::convert(value::rgb8(), input);
+ output = data::convert(input, value::rgb8());
for_all_lines(l, lines)
if (! lines(l).is_hidden())
@@ -154,7 +154,7 @@ namespace scribo
mln_precondition(exact(input).is_valid());
mln_ch_value(I, value::rgb8)
- output = data::convert(value::rgb8(), input);
+ output = data::convert(input, value::rgb8());
for_all_comps(c, comps)
if (comps(c).is_valid())
diff --git a/scribo/scribo/debug/char_space_image.hh
b/scribo/scribo/debug/char_space_image.hh
index b08942c..24db867 100644
--- a/scribo/scribo/debug/char_space_image.hh
+++ b/scribo/scribo/debug/char_space_image.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2010, 2011 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2010, 2011, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -73,7 +73,7 @@ namespace scribo
{
mln_trace("scribo::debug::char_space_image");
- mln_ch_value(I,value::rgb8) output = data::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) output = data::convert(input, value::rgb8());
const component_set<L>& comps = line.components();
for_all_lines(l, line)
diff --git a/scribo/scribo/debug/decision_image.hh
b/scribo/scribo/debug/decision_image.hh
index c2310a3..497a7d7 100644
--- a/scribo/scribo/debug/decision_image.hh
+++ b/scribo/scribo/debug/decision_image.hh
@@ -118,7 +118,7 @@ namespace scribo
/// FIXME: Check that components has been computed from input.
mln_ch_value(I,value::rgb8)
- decision_image = data::convert(value::rgb8(), input);
+ decision_image = data::convert(input, value::rgb8());
for (unsigned i = 1; i < groups.size(); ++i)
if (groups(i) != filtered_groups(i))
@@ -150,7 +150,7 @@ namespace scribo
/// FIXME: Check that components has been computed from input.
mln_ch_value(I,value::rgb8)
- decision_image = data::convert(value::rgb8(), input);
+ decision_image = data::convert(input, value::rgb8());
for_all_comps(i, comps)
mln::draw::box(decision_image, comps(i).bbox(), literal::blue);
diff --git a/scribo/scribo/debug/line_info_image.hh
b/scribo/scribo/debug/line_info_image.hh
index fb54cc8..9cd311f 100644
--- a/scribo/scribo/debug/line_info_image.hh
+++ b/scribo/scribo/debug/line_info_image.hh
@@ -71,7 +71,7 @@ namespace scribo
{
mln_trace("scribo::debug::line_info_image");
- mln_ch_value(I,value::rgb8) output = data::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) output = data::convert(input, value::rgb8());
for_all_lines(l, line)
{
diff --git a/scribo/scribo/debug/linked_bboxes_image.hh
b/scribo/scribo/debug/linked_bboxes_image.hh
index 8a28ae1..570a52e 100644
--- a/scribo/scribo/debug/linked_bboxes_image.hh
+++ b/scribo/scribo/debug/linked_bboxes_image.hh
@@ -167,7 +167,7 @@ namespace scribo
mln_trace("scribo::debug::linked_bboxes_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(input, value::rgb8());
draw::bounding_boxes(tmp, links.components(), box_value);
draw::bounding_box_links(tmp, links, link_value, anchor);
@@ -225,7 +225,7 @@ namespace scribo
mln_trace("scribo::debug::linked_bboxes_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(input, value::rgb8());
draw::bounding_boxes(tmp, left_link.components(), box_value);
draw::bounding_box_links(tmp,
@@ -252,7 +252,7 @@ namespace scribo
mln_precondition(exact(g).is_valid());
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(input, value::rgb8());
draw::bounding_boxes(tmp, exact(g).components(), box_value);
draw::bounding_box_links(tmp, exact(g).components(), g, link_value,
diff --git a/scribo/scribo/debug/links_decision_image.hh
b/scribo/scribo/debug/links_decision_image.hh
index b6528b2..e7b31d4 100644
--- a/scribo/scribo/debug/links_decision_image.hh
+++ b/scribo/scribo/debug/links_decision_image.hh
@@ -81,7 +81,7 @@ namespace scribo
/// FIXME: Check that objects has been computed from input.
mln_ch_value(I,value::rgb8)
- links_decision_image = data::convert(value::rgb8(), input);
+ links_decision_image = data::convert(input, value::rgb8());
for_all_comps(i, comps)
mln::draw::box(links_decision_image, comps(i).bbox(), literal::blue);
diff --git a/scribo/scribo/debug/links_image.hh b/scribo/scribo/debug/links_image.hh
index 30fb071..bb78602 100644
--- a/scribo/scribo/debug/links_image.hh
+++ b/scribo/scribo/debug/links_image.hh
@@ -82,7 +82,7 @@ namespace scribo
const component_set<L>& comps = links.components();
mln_ch_value(I,value::rgb8)
- links_image = data::convert(value::rgb8(), input);
+ links_image = data::convert(input, value::rgb8());
if (draw_bboxes)
scribo::draw::bounding_boxes(links_image, comps, literal::blue);
diff --git a/scribo/scribo/debug/looks_like_a_text_line_image.hh
b/scribo/scribo/debug/looks_like_a_text_line_image.hh
index de1aad1..457608f 100644
--- a/scribo/scribo/debug/looks_like_a_text_line_image.hh
+++ b/scribo/scribo/debug/looks_like_a_text_line_image.hh
@@ -100,7 +100,7 @@ namespace scribo
mln_trace("scribo::debug::looks_like_a_text_line_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) output = data::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) output = data::convert(input, value::rgb8());
for_all_lines(l, lines)
if (! lines(l).is_hidden())
diff --git a/scribo/scribo/debug/mean_and_base_lines_image.hh
b/scribo/scribo/debug/mean_and_base_lines_image.hh
index d84668e..8f997c5 100644
--- a/scribo/scribo/debug/mean_and_base_lines_image.hh
+++ b/scribo/scribo/debug/mean_and_base_lines_image.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2010, 2011 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2010, 2011, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -104,7 +104,7 @@ namespace scribo
mln_precondition(exact(input).is_valid());
mln_ch_value(I, value::rgb8)
- output = data::convert(value::rgb8(), input);
+ output = data::convert(input, value::rgb8());
for_all_lines(l, lines)
{
diff --git a/scribo/scribo/debug/save_table_image.hh
b/scribo/scribo/debug/save_table_image.hh
index 420b7c7..2479b7a 100644
--- a/scribo/scribo/debug/save_table_image.hh
+++ b/scribo/scribo/debug/save_table_image.hh
@@ -97,7 +97,7 @@ namespace scribo
const I& input = exact(input_);
mln_precondition(input.is_valid());
- mln_ch_value(I, value::rgb8) out2 = data::convert(value::rgb8(), input);
+ mln_ch_value(I, value::rgb8) out2 = data::convert(input, value::rgb8());
draw::bounding_boxes(out2, tableboxes.first(), bbox_color);
draw::bounding_boxes(out2, tableboxes.second(), bbox_color);
io::ppm::save(out2, filename);
diff --git a/scribo/scribo/primitive/extract/alignments.hh
b/scribo/scribo/primitive/extract/alignments.hh
index 7bd9b94..fe2086c 100644
--- a/scribo/scribo/primitive/extract/alignments.hh
+++ b/scribo/scribo/primitive/extract/alignments.hh
@@ -255,7 +255,7 @@ namespace scribo
bbox_ima_(bbox_ima), delta_ws_lookup_(delta_ws_lookup)
{
# ifndef SCRIBO_NDEBUG
- debug_ = data::convert(value::rgb8(), data::convert(bool(), bbox_ima));
+ debug_ = data::convert(data::convert(bbox_ima, bool()), value::rgb8());
# endif // ! SCRIBO_NDEBUG
}
@@ -357,7 +357,7 @@ namespace scribo
bbox_ima_(bbox_ima), delta_ws_lookup_(delta_ws_lookup)
{
# ifndef SCRIBO_NDEBUG
- debug_ = data::convert(value::rgb8(), data::convert(bool(), bbox_ima));
+ debug_ = data::convert(data::convert(bbox_ima, bool()), value::rgb8());
# endif // ! SCRIBO_NDEBUG
}
diff --git a/scribo/scribo/primitive/extract/separators_nonvisible.hh
b/scribo/scribo/primitive/extract/separators_nonvisible.hh
index 85fc191..9781cad 100644
--- a/scribo/scribo/primitive/extract/separators_nonvisible.hh
+++ b/scribo/scribo/primitive/extract/separators_nonvisible.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2010, 2011, 2012 EPITA Research and Development
+// Copyright (C) 2010, 2011, 2012, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -165,8 +165,8 @@ namespace scribo
// Debug
logger().log_image(AuxiliaryResults,
- data::convert(value::int_u8(),
- components.labeled_image()),
+ data::convert(components.labeled_image(),
+ value::int_u8()),
"lbl");
unsigned dmax = 5;
@@ -330,7 +330,7 @@ namespace scribo
mln_concrete(I) input = scribo::preprocessing::rotate_90(in, false);
mln_ch_value(I, value::rgb8)
- wo_filtering = data::convert(value::rgb8(), input);
+ wo_filtering = data::convert(input, value::rgb8());
for_all_groups(d, top_groups)
if (top_groups(d).is_valid())
@@ -461,7 +461,7 @@ namespace scribo
// t_ = t;
// std::cout << "* relabel_inplace - " << t_ <<
std::endl;
- mln_concrete(I) output = data::convert(bool(), sep_lbl);
+ mln_concrete(I) output = data::convert(sep_lbl, bool());
if (_debug_)
{
diff --git a/scribo/scribo/text/extract_paragraphs.hh
b/scribo/scribo/text/extract_paragraphs.hh
index 5ea1b43..01a22f0 100644
--- a/scribo/scribo/text/extract_paragraphs.hh
+++ b/scribo/scribo/text/extract_paragraphs.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2010, 2011, 2012 EPITA Research and Development
+// Copyright (C) 2010, 2011, 2012, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -191,7 +191,7 @@ namespace scribo
// const unsigned nlines = lines.nelements();
- // image2d<value::rgb8> links = data::convert(value::rgb8(), input);
+ // image2d<value::rgb8> links = data::convert(input, value::rgb8());
// for (unsigned l = 0; l < nlines; ++l)
// {
// mln::draw::line(links, lines(l).bbox().pcenter(), lines(left(l)).bbox().pcenter(),
literal::red);
@@ -646,7 +646,7 @@ namespace scribo
// Only debug
// {
- // image2d<value::rgb8> debug = data::convert(value::rgb8(), input);
+ // image2d<value::rgb8> debug = data::convert(input, value::rgb8());
// for (unsigned i = 0; i < output.nelements(); ++i)
// output(i) = scribo::make::internal::find_root(output, i);
diff --git a/scribo/scribo/text/extract_paragraphs_hdoc.hh
b/scribo/scribo/text/extract_paragraphs_hdoc.hh
index cc379cb..e51a231 100644
--- a/scribo/scribo/text/extract_paragraphs_hdoc.hh
+++ b/scribo/scribo/text/extract_paragraphs_hdoc.hh
@@ -192,7 +192,7 @@ namespace scribo
// const unsigned nlines = lines.nelements();
- // image2d<value::rgb8> links = data::convert(value::rgb8(), input);
+ // image2d<value::rgb8> links = data::convert(input, value::rgb8());
// for (unsigned l = 0; l < nlines; ++l)
// {
// mln::draw::line(links, lines(l).bbox().pcenter(), lines(left(l)).bbox().pcenter(),
literal::red);
@@ -784,7 +784,7 @@ namespace scribo
// Only debug
// {
- // image2d<value::rgb8> debug = data::convert(value::rgb8(), input);
+ // image2d<value::rgb8> debug = data::convert(input, value::rgb8());
// mln::util::array<accu::shape::bbox<point2d> >
nbbox(output.nelements());
// for_all_lines(l, lines)
diff --git a/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
b/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
index beac5c4..9ce4e78 100644
--- a/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
+++ b/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2010, 2011, 2012 EPITA Research and Development
+// Copyright (C) 2010, 2011, 2012, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -278,7 +278,7 @@ namespace scribo
else // binarization_algo == Convert
{
on_new_progress_label("Binarization (Binary conversion)");
- output = mln::data::convert(bool(), intensity_ima);
+ output = mln::data::convert(intensity_ima, bool());
}
on_progress();
diff --git a/scribo/scribo/toolchain/internal/text_in_picture_functor.hh
b/scribo/scribo/toolchain/internal/text_in_picture_functor.hh
index 8d12612..77b6581 100644
--- a/scribo/scribo/toolchain/internal/text_in_picture_functor.hh
+++ b/scribo/scribo/toolchain/internal/text_in_picture_functor.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -427,7 +428,7 @@ namespace scribo
raw_group_image = group::apply(groups);
mln_ch_value(I,value::rgb8)
- decision_image = data::convert(value::rgb8(), input);
+ decision_image = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(decision_image,
filtered_components, literal::green);
@@ -438,7 +439,7 @@ namespace scribo
decision_image,
"group_and_object_image.ppm");
- decision_image = data::convert(value::rgb8(), input);
+ decision_image = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(decision_image,
raw_group_image, literal::blue);
@@ -459,7 +460,7 @@ namespace scribo
mln_ch_value(I,value::rgb8) decision_image;
if (scribo::debug::logger().is_enabled())
{
- decision_image = data::convert(value::rgb8(), input);
+ decision_image = data::convert(input, value::rgb8());
scribo::draw::groups_bboxes(decision_image, groups, literal::red);
scribo::draw::groups_bboxes(decision_image, filtered_small_groups,
@@ -484,7 +485,7 @@ namespace scribo
# ifndef SCRIBO_NDEBUG
if (scribo::debug::logger().is_enabled())
{
- decision_image = data::convert(value::rgb8(), input);
+ decision_image = data::convert(input, value::rgb8());
scribo::draw::groups_bboxes(decision_image, filtered_small_groups,
literal::red);
@@ -521,7 +522,7 @@ namespace scribo
# ifndef SCRIBO_NDEBUG
if (scribo::debug::logger().is_enabled())
{
- decision_image = data::convert(value::rgb8(), input);
+ decision_image = data::convert(input, value::rgb8());
scribo::draw::groups_bboxes(decision_image, filtered_thin_groups,
literal::red);
diff --git a/scribo/src/debug/show_lines_boldness.cc
b/scribo/src/debug/show_lines_boldness.cc
index 3e6a644..babcb61 100644
--- a/scribo/src/debug/show_lines_boldness.cc
+++ b/scribo/src/debug/show_lines_boldness.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2011, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2011, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -79,7 +79,7 @@ int main(int argc, char* argv[])
// Extract lines
line_set<L>
lines = text::extract_lines_with_features(
- data::convert(value::rgb8(), input), input, c8());
+ data::convert(input, value::rgb8()), input, c8());
const component_set<L>& comp_set = lines.components();
// Min boldness / line
diff --git a/scribo/src/debug/show_links_left_right_links_validation.cc
b/scribo/src/debug/show_links_left_right_links_validation.cc
index 450232a..7b9e0df 100644
--- a/scribo/src/debug/show_links_left_right_links_validation.cc
+++ b/scribo/src/debug/show_links_left_right_links_validation.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -94,7 +94,7 @@ int main(int argc, char *argv[])
// Saving result.
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> output = data::convert(input, value::rgb8());
scribo::draw::bounding_box_links(output,
links,
diff --git a/scribo/src/debug/show_links_several_right_overlap.cc
b/scribo/src/debug/show_links_several_right_overlap.cc
index 5559fec..7ecbd36 100644
--- a/scribo/src/debug/show_links_several_right_overlap.cc
+++ b/scribo/src/debug/show_links_several_right_overlap.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -74,7 +74,7 @@ namespace scribo
this->anchors_.append(anchor::Bottom);
this->anchors_.append(anchor::Center);
- output_ = data::convert(value::rgb8(), input);
+ output_ = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output_, comps, literal::blue);
mln_postcondition(output_.is_valid());
}
diff --git a/scribo/src/debug/show_links_single_down.cc
b/scribo/src/debug/show_links_single_down.cc
index 8ea3d6a..a96cce6 100644
--- a/scribo/src/debug/show_links_single_down.cc
+++ b/scribo/src/debug/show_links_single_down.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -69,7 +69,7 @@ namespace scribo
unsigned dmax)
: super_(comps, dmax, anchor::Vertical)
{
- output_ = data::convert(value::rgb8(), input);
+ output_ = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output_, comps, literal::blue);
mln_postcondition(output_.is_valid());
}
diff --git a/scribo/src/debug/show_links_single_left.cc
b/scribo/src/debug/show_links_single_left.cc
index dfcb07b..bb63575 100644
--- a/scribo/src/debug/show_links_single_left.cc
+++ b/scribo/src/debug/show_links_single_left.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -70,7 +70,7 @@ namespace scribo
unsigned dmax)
: super_(components, dmax, anchor::Horizontal)
{
- output_ = data::convert(value::rgb8(), input);
+ output_ = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output_, components, literal::blue);
mln_postcondition(output_.is_valid());
}
diff --git a/scribo/src/debug/show_links_single_left_dmax_ratio.cc
b/scribo/src/debug/show_links_single_left_dmax_ratio.cc
index c1d6b01..7d9f304 100644
--- a/scribo/src/debug/show_links_single_left_dmax_ratio.cc
+++ b/scribo/src/debug/show_links_single_left_dmax_ratio.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -74,7 +74,7 @@ namespace scribo
float dmax_ratio)
: super_(components, anchor::Horizontal, dmax_fun_t(dmax_ratio))
{
- output_ = data::convert(value::rgb8(), input);
+ output_ = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output_, components, literal::blue);
mln_postcondition(output_.is_valid());
}
diff --git a/scribo/src/debug/show_links_single_right.cc
b/scribo/src/debug/show_links_single_right.cc
index 9b37c44..6ad02da 100644
--- a/scribo/src/debug/show_links_single_right.cc
+++ b/scribo/src/debug/show_links_single_right.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -70,7 +70,7 @@ namespace scribo
unsigned dmax)
: super_(components, dmax, anchor::Horizontal)
{
- output_ = data::convert(value::rgb8(), input);
+ output_ = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output_, components, literal::blue);
mln_postcondition(output_.is_valid());
}
diff --git a/scribo/src/debug/show_links_single_right_dmax_ratio.cc
b/scribo/src/debug/show_links_single_right_dmax_ratio.cc
index 133fe82..e6fa8c8 100644
--- a/scribo/src/debug/show_links_single_right_dmax_ratio.cc
+++ b/scribo/src/debug/show_links_single_right_dmax_ratio.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -72,7 +72,7 @@ namespace scribo
float dmax_ratio)
: super_(components, anchor::Horizontal, dmax_fun_t(dmax_ratio))
{
- output_ = data::convert(value::rgb8(), input);
+ output_ = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output_, components, literal::blue);
mln_postcondition(output_.is_valid());
}
diff --git a/scribo/src/debug/show_links_single_up.cc
b/scribo/src/debug/show_links_single_up.cc
index 1933af1..83e4d55 100644
--- a/scribo/src/debug/show_links_single_up.cc
+++ b/scribo/src/debug/show_links_single_up.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -69,7 +69,7 @@ namespace scribo
unsigned dmax)
: super_(components, dmax, anchor::Vertical)
{
- output_ = data::convert(value::rgb8(), input);
+ output_ = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output_, components, literal::blue);
mln_postcondition(output_.is_valid());
}
diff --git a/scribo/src/debug/show_objects_large.cc
b/scribo/src/debug/show_objects_large.cc
index 3ccf5df..f10aef3 100644
--- a/scribo/src/debug/show_objects_large.cc
+++ b/scribo/src/debug/show_objects_large.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
= scribo::primitive::extract::components(input, c8(), nbboxes);
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> output = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output, comps, literal::red);
component_set<L> filtered_comps
diff --git a/scribo/src/debug/show_objects_small.cc
b/scribo/src/debug/show_objects_small.cc
index 1e9ae1f..da9f788 100644
--- a/scribo/src/debug/show_objects_small.cc
+++ b/scribo/src/debug/show_objects_small.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
= scribo::primitive::extract::components(input, c8(), nbboxes);
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> output = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output, comps, literal::red);
component_set<L> filtered_comps
diff --git a/scribo/src/debug/show_objects_thick.cc
b/scribo/src/debug/show_objects_thick.cc
index 1424708..8e27e0d 100644
--- a/scribo/src/debug/show_objects_thick.cc
+++ b/scribo/src/debug/show_objects_thick.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
= scribo::primitive::extract::components(input, c8(), nbboxes);
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> output = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output, comps, literal::red);
component_set<L> filtered_comps
diff --git a/scribo/src/debug/show_objects_thin.cc
b/scribo/src/debug/show_objects_thin.cc
index 9e02520..bc054cb 100644
--- a/scribo/src/debug/show_objects_thin.cc
+++ b/scribo/src/debug/show_objects_thin.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
= scribo::primitive::extract::components(input, c8(), nbboxes);
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> output = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(output, comps, literal::red);
component_set<L> filtered_comps
diff --git a/scribo/src/debug/show_text_lines.cc b/scribo/src/debug/show_text_lines.cc
index d4e1cad..736138d 100644
--- a/scribo/src/debug/show_text_lines.cc
+++ b/scribo/src/debug/show_text_lines.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -83,7 +84,7 @@ int main(int argc, char* argv[])
// Color image with line bboxes.
{
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> output = data::convert(input, value::rgb8());
for_all_lines(l, lines)
if (lines(l).is_textline())
mln::draw::box(output, lines(l).bbox(), literal::red);
diff --git a/scribo/src/debug/show_text_lines_wo_seps.cc
b/scribo/src/debug/show_text_lines_wo_seps.cc
index 0d8d488..a60b507 100644
--- a/scribo/src/debug/show_text_lines_wo_seps.cc
+++ b/scribo/src/debug/show_text_lines_wo_seps.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -74,7 +75,7 @@ int main(int argc, char* argv[])
// Color image with line bboxes.
{
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> output = data::convert(input, value::rgb8());
for_all_lines(l, lines)
if (lines(l).is_textline())
mln::draw::box(output, lines(l).bbox(), literal::red);
diff --git a/scribo/src/filter/objects_large.cc b/scribo/src/filter/objects_large.cc
index af4c84da..9f8c2a4 100644
--- a/scribo/src/filter/objects_large.cc
+++ b/scribo/src/filter/objects_large.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
component_set<L>
filtered = scribo::filter::components_large(comps, atoi(argv[2]));
- io::pbm::save(data::convert(bool(), filtered.labeled_image()), argv[3]);
+ io::pbm::save(data::convert(filtered.labeled_image(), bool()), argv[3]);
}
diff --git a/scribo/src/filter/objects_small.cc b/scribo/src/filter/objects_small.cc
index e240256..8384675 100644
--- a/scribo/src/filter/objects_small.cc
+++ b/scribo/src/filter/objects_small.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
component_set<L>
filtered = scribo::filter::components_small(comps, atoi(argv[2]));
- io::pbm::save(data::convert(bool(), filtered.labeled_image()), argv[3]);
+ io::pbm::save(data::convert(filtered.labeled_image(), bool()), argv[3]);
}
diff --git a/scribo/src/filter/objects_thick.cc b/scribo/src/filter/objects_thick.cc
index 8f0080b..176d619 100644
--- a/scribo/src/filter/objects_thick.cc
+++ b/scribo/src/filter/objects_thick.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
component_set<L>
filtered = scribo::filter::objects_thick(comps, atoi(argv[2]));
- io::pbm::save(data::convert(bool(), filtered.labeled_image()), argv[3]);
+ io::pbm::save(data::convert(filtered.labeled_image(), bool()), argv[3]);
}
diff --git a/scribo/src/filter/objects_thin.cc b/scribo/src/filter/objects_thin.cc
index 0edfc85..fe2d4e3 100644
--- a/scribo/src/filter/objects_thin.cc
+++ b/scribo/src/filter/objects_thin.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
component_set<L>
filtered = scribo::filter::components_thin(comps, atoi(argv[2]));
- io::pbm::save(data::convert(bool(), filtered.labeled_image()), argv[3]);
+ io::pbm::save(data::convert(filtered.labeled_image(), bool()), argv[3]);
}
diff --git a/scribo/src/filter/objects_with_holes.cc
b/scribo/src/filter/objects_with_holes.cc
index f339a5b..ae66162 100644
--- a/scribo/src/filter/objects_with_holes.cc
+++ b/scribo/src/filter/objects_with_holes.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
component_set<L>
filtered = scribo::filter::objects_with_holes(comps, atoi(argv[2]), 0);
- io::pbm::save(data::convert(bool(), filtered.valid_comps_image_()), argv[3]);
+ io::pbm::save(data::convert(filtered.valid_comps_image_(), bool()), argv[3]);
}
diff --git a/scribo/src/filter/objects_with_holes_pgm.cc
b/scribo/src/filter/objects_with_holes_pgm.cc
index 5cbb9d0..11817e6 100644
--- a/scribo/src/filter/objects_with_holes_pgm.cc
+++ b/scribo/src/filter/objects_with_holes_pgm.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
component_set<L>
filtered = scribo::filter::objects_with_holes(comps, atoi(argv[2]), 0);
- io::pbm::save(data::convert(bool(), filtered.valid_comps_image_()), argv[3]);
+ io::pbm::save(data::convert(filtered.valid_comps_image_(), bool()), argv[3]);
}
diff --git a/scribo/src/non_text_components.cc b/scribo/src/non_text_components.cc
index 16251e6..7cbfcf3 100644
--- a/scribo/src/non_text_components.cc
+++ b/scribo/src/non_text_components.cc
@@ -118,7 +118,7 @@ int main(int argc, char* argv[])
t.stop();
std::cout << t << std::endl;
- mln::io::pbm::save(data::convert(bool(), doc.elements().labeled_image()), argv[2]);
+ mln::io::pbm::save(data::convert(doc.elements().labeled_image(), bool()), argv[2]);
scribo::io::img::save(doc, out_img + "_debug_wo_image.png",
scribo::io::img::DebugWoImage);
scribo::io::img::save(doc, out_img + "_debug_with_image.png",
scribo::io::img::DebugWithImage);
diff --git a/scribo/src/preprocessing/preprocess.cc
b/scribo/src/preprocessing/preprocess.cc
index 96e6613..f46a5ab 100644
--- a/scribo/src/preprocessing/preprocess.cc
+++ b/scribo/src/preprocessing/preprocess.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -73,9 +73,9 @@ int main(int argc, char *argv[])
nlabels, 1);
image2d<value::int_u8>
- input_gl = data::convert(value::int_u8(), input_bw);
+ input_gl = data::convert(input_bw, value::int_u8());
input_gl = scribo::preprocessing::deskew(input_gl);
- input_bw = data::convert(bool(), input_gl);
+ input_bw = data::convert(input_gl, bool());
io::pbm::save(input_bw, argv[2]);
diff --git a/scribo/src/primitive/extract/alignments.cc
b/scribo/src/primitive/extract/alignments.cc
index 24e2259..19d2864 100644
--- a/scribo/src/primitive/extract/alignments.cc
+++ b/scribo/src/primitive/extract/alignments.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -67,7 +68,7 @@ int main(int argc, char *argv[])
doc.open();
// Vertical and horizontal separators
- image2d<bool> input = data::convert(bool(), doc.image());
+ image2d<bool> input = data::convert(doc.image(), bool());
image2d<bool> separators = primitive::extract::separators(input, 81);
input = primitive::remove::separators(input, separators);
input = preprocessing::denoise_fg(input, c8(), 3);
diff --git a/scribo/src/primitive/extract/discontinued_hlines.cc
b/scribo/src/primitive/extract/discontinued_hlines.cc
index ab8d0b0..deaaba7 100644
--- a/scribo/src/primitive/extract/discontinued_hlines.cc
+++ b/scribo/src/primitive/extract/discontinued_hlines.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013s EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -67,6 +67,6 @@ int main(int argc, char *argv[])
nlines,
atoi(argv[2]),
atoi(argv[3]));
- io::pbm::save(data::convert(bool(), lines.labeled_image()), argv[4]);
+ io::pbm::save(data::convert(lines.labeled_image(), bool()), argv[4]);
}
diff --git a/scribo/src/primitive/extract/discontinued_lines.cc
b/scribo/src/primitive/extract/discontinued_lines.cc
index 9a14799..5438bc6 100644
--- a/scribo/src/primitive/extract/discontinued_lines.cc
+++ b/scribo/src/primitive/extract/discontinued_lines.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
atoi(argv[3]));
L& hlines_ima = hlines.labeled_image_();
- image2d<bool> output = data::convert(bool(), hlines_ima);
+ image2d<bool> output = data::convert(hlines_ima, bool());
data::fill((output | (pw::value(vlines.labeled_image()) != 0u)).rw(), true);
io::pbm::save(output, argv[4]);
diff --git a/scribo/src/primitive/extract/discontinued_vlines.cc
b/scribo/src/primitive/extract/discontinued_vlines.cc
index e911752..2c8b720 100644
--- a/scribo/src/primitive/extract/discontinued_vlines.cc
+++ b/scribo/src/primitive/extract/discontinued_vlines.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -68,6 +68,6 @@ int main(int argc, char *argv[])
nlines,
atoi(argv[2]),
atoi(argv[3]));
- io::pbm::save(data::convert(bool(), vlines.labeled_image()), argv[4]);
+ io::pbm::save(data::convert(vlines.labeled_image(), bool()), argv[4]);
}
diff --git a/scribo/src/primitive/extract/thick_hlines.cc
b/scribo/src/primitive/extract/thick_hlines.cc
index 439ae5a..dd695f6 100644
--- a/scribo/src/primitive/extract/thick_hlines.cc
+++ b/scribo/src/primitive/extract/thick_hlines.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -66,6 +66,6 @@ int main(int argc, char *argv[])
c8(),
nlines,
atoi(argv[2]));
- io::pbm::save(data::convert(bool(), lines.labeled_image()), argv[3]);
+ io::pbm::save(data::convert(lines.labeled_image(), bool()), argv[3]);
}
diff --git a/scribo/src/primitive/extract/thick_vlines.cc
b/scribo/src/primitive/extract/thick_vlines.cc
index b58eff3..f310606 100644
--- a/scribo/src/primitive/extract/thick_vlines.cc
+++ b/scribo/src/primitive/extract/thick_vlines.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -66,6 +66,6 @@ int main(int argc, char *argv[])
c8(),
nlines,
atoi(argv[2]));
- io::pbm::save(data::convert(bool(), lines.labeled_image()), argv[3]);
+ io::pbm::save(data::convert(lines.labeled_image(), bool()), argv[3]);
}
diff --git a/scribo/src/primitive/group/group_from_rag.cc
b/scribo/src/primitive/group/group_from_rag.cc
index 23827a9..fb7bd5b 100644
--- a/scribo/src/primitive/group/group_from_rag.cc
+++ b/scribo/src/primitive/group/group_from_rag.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -199,7 +200,7 @@ int main(int argc, char* argv[])
//FOR DEBUGGING PURPOSE
{
image2d<value::rgb8>
- before_grouping = data::convert(value::rgb8(), input);
+ before_grouping = data::convert(input, value::rgb8());
scribo::draw::bounding_boxes(before_grouping,
filtered_objects.bboxes(),
@@ -223,7 +224,7 @@ int main(int argc, char* argv[])
//FOR DEBUGGING PURPOSE
// {
// image2d<value::rgb8>
-// after_grouping = data::convert(value::rgb8(), input);
+// after_grouping = data::convert(input, value::rgb8());
// scribo::draw::bounding_boxes(after_grouping,
diff --git a/scribo/src/table/rebuild_opening.cc b/scribo/src/table/rebuild_opening.cc
index 60d43e0..567fc0a 100644
--- a/scribo/src/table/rebuild_opening.cc
+++ b/scribo/src/table/rebuild_opening.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -87,7 +88,7 @@ int main(int argc, char* argv[])
scribo::make::debug_filename("table_cells.ppm"));
io::pgm::save(tables, scribo::make::debug_filename("table_cells.pgm"));
- image2d<value::rgb8> input_rgb = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> input_rgb = data::convert(input, value::rgb8());
data::fill((input_rgb | (pw::value(tables) == pw::cst(0u))).rw(), literal::red);
io::ppm::save(input_rgb,
scribo::make::debug_filename("table_superposed.ppm"));
diff --git a/scribo/src/table/rebuild_rank.cc b/scribo/src/table/rebuild_rank.cc
index b04dac9..de97dd3 100644
--- a/scribo/src/table/rebuild_rank.cc
+++ b/scribo/src/table/rebuild_rank.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -91,7 +92,7 @@ int main(int argc, char* argv[])
value::label_8 bg = data::compute(accu::maj_h<value::label_8>(), tables);
- image2d<value::rgb8> sup = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> sup = data::convert(input, value::rgb8());
data::paste((table_color | (pw::value(tables) != pw::cst(bg)))
| (pw::value(sup) == pw::cst(literal::black)), sup);
io::ppm::save(sup, scribo::make::debug_filename("table_color_sup.ppm"));
@@ -100,7 +101,7 @@ int main(int argc, char* argv[])
scribo::make::debug_filename("table_cells.ppm"));
io::pgm::save(tables, scribo::make::debug_filename("table_cells.pgm"));
- image2d<value::rgb8> input_rgb = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> input_rgb = data::convert(input, value::rgb8());
data::fill((input_rgb | (pw::value(tables) == pw::cst(0u))).rw(), literal::red);
io::ppm::save(input_rgb,
scribo::make::debug_filename("table_superposed.ppm"));
diff --git a/scribo/src/util/component_precise_outline.cc
b/scribo/src/util/component_precise_outline.cc
index 13e6058..fbb35c4 100644
--- a/scribo/src/util/component_precise_outline.cc
+++ b/scribo/src/util/component_precise_outline.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -75,7 +76,7 @@ int main(int argc, char *argv[])
`mln::unproxy_rec' here. */
std::cout << t.read() << std::endl;
- image2d<value::rgb8> input_rgb = data::convert(value::rgb8(), input);
+ image2d<value::rgb8> input_rgb = data::convert(input, value::rgb8());
point2d last_point = par[0];
mln_piter_(par_t) p(par);
diff --git a/scribo/tests/primitive/extract/alignments.cc
b/scribo/tests/primitive/extract/alignments.cc
index a069149..f767a8e 100644
--- a/scribo/tests/primitive/extract/alignments.cc
+++ b/scribo/tests/primitive/extract/alignments.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -51,7 +52,7 @@ int main()
document<L> doc(os.str().c_str());
doc.open();
- doc.set_binary_image(data::convert(bool(), doc.image()));
+ doc.set_binary_image(data::convert(doc.image(), bool()));
// Extract lines
line_set<L>
--
1.7.2.5