Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2009
- 11 participants
- 312 discussions
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix missing updates about debug colorize.
* scribo/debug/save_label_image.hh,
* scribo/src/extract_text_single_link.cc,
* scribo/src/extract_text_graph.cc,
* scribo/src/morpho.cc,
* scribo/src/table_rebuild_rank.cc,
* scribo/src/extract_text_several_left_links.cc,
* scribo/src/table_rebuild_opening.cc,
* scribo/src/extract_text_several_graph.cc,
* scribo/src/dmap.cc,
* scribo/src/table_extract.cc,
* scribo/src/extract_text_double_link.cc,
* scribo/src/extract_text_double_several_links.cc,
* scribo/src/photo_basic.cc,
* scribo/table/internal/repair_lines.hh,
* scribo/demat.hh,
* icdar/2009/dibco/quasi.cc,
* icdar/2009/dibco/svg.1.binarization.cc,
* icdar/2009/dibco/svg.2.binarization.cc,
* icdar/2009/dibco/svg.3.binarization.cc,
* icdar/2009/dibco/binarization.cc,
* icdar/2009/hsc/icdar2ppm.hh,
* icdar/2009/hsc/input_to_words_dat.cc,
* icdar/2009/hsc/dummy_input_to_words_dat.cc,
* icdar/2009/hsc/input_to_lines_dat.cc,
* icdar/2009/hsc/input_to_ws.hh,
* icdar/2009/hsc/first_attempts/boxes.cc,
* icdar/2009/hsc/first_attempts/exec/iz_lines.cc,
* icdar/2009/hsc/first_attempts/exec/relabel_lines.cc,
* icdar/2009/hsc/first_attempts/main.cc,
* icdar/2009/hsc/input_to_wsl.cc,
* icdar/2009/hsc/old_input_to_lines.cc,
* icdar/2009/hsc/ws_to_wsl.hh,
* fabien/igr/seg_fixed.cc,
* fabien/igr/graph.cc,
* fabien/igr/nbasins_finder.cc,
* fabien/bin/dumpl32_to_colorize.cc,
* inim/2010/boxes/boxes.cc,
* theo/color/filter_blen_rgb_edges.cc,
* lazzara/igr/igr-biggest-comp.cc,
* lazzara/igr/igr.cc,
* lazzara/igr/igr-cloud.cc,
* edwin/inim/inim.cc:
Fix missing updates about debug colorize.
edwin/inim/inim.cc | 4 ++--
fabien/bin/dumpl32_to_colorize.cc | 6 +++---
fabien/igr/graph.cc | 6 +++---
fabien/igr/nbasins_finder.cc | 4 ++--
fabien/igr/seg_fixed.cc | 4 ++--
icdar/2009/dibco/binarization.cc | 8 ++++----
icdar/2009/dibco/quasi.cc | 2 +-
icdar/2009/dibco/svg.1.binarization.cc | 4 ++--
icdar/2009/dibco/svg.2.binarization.cc | 8 ++++----
icdar/2009/dibco/svg.3.binarization.cc | 8 ++++----
icdar/2009/hsc/dummy_input_to_words_dat.cc | 4 ++--
icdar/2009/hsc/first_attempts/boxes.cc | 2 +-
icdar/2009/hsc/first_attempts/exec/iz_lines.cc | 4 ++--
icdar/2009/hsc/first_attempts/exec/relabel_lines.cc | 4 ++--
icdar/2009/hsc/first_attempts/main.cc | 6 +++---
icdar/2009/hsc/icdar2ppm.hh | 4 ++--
icdar/2009/hsc/input_to_lines_dat.cc | 4 ++--
icdar/2009/hsc/input_to_words_dat.cc | 4 ++--
icdar/2009/hsc/input_to_ws.hh | 4 ++--
icdar/2009/hsc/input_to_wsl.cc | 4 ++--
icdar/2009/hsc/old_input_to_lines.cc | 4 ++--
icdar/2009/hsc/ws_to_wsl.hh | 4 ++--
inim/2010/boxes/boxes.cc | 2 +-
lazzara/igr/igr-biggest-comp.cc | 2 +-
lazzara/igr/igr-cloud.cc | 2 +-
lazzara/igr/igr.cc | 2 +-
scribo/debug/save_label_image.hh | 2 +-
scribo/demat.hh | 8 ++++----
scribo/src/dmap.cc | 2 +-
scribo/src/extract_text_double_link.cc | 6 +++---
scribo/src/extract_text_double_several_links.cc | 4 ++--
scribo/src/extract_text_graph.cc | 4 ++--
scribo/src/extract_text_several_graph.cc | 2 +-
scribo/src/extract_text_several_left_links.cc | 2 +-
scribo/src/extract_text_single_link.cc | 8 ++++----
scribo/src/morpho.cc | 2 +-
scribo/src/photo_basic.cc | 4 ++--
scribo/src/table_extract.cc | 2 +-
scribo/src/table_rebuild_opening.cc | 2 +-
scribo/src/table_rebuild_rank.cc | 2 +-
scribo/table/internal/repair_lines.hh | 2 +-
theo/color/filter_blen_rgb_edges.cc | 6 +++---
42 files changed, 84 insertions(+), 84 deletions(-)
Index: scribo/debug/save_label_image.hh
--- scribo/debug/save_label_image.hh (revision 3777)
+++ scribo/debug/save_label_image.hh (working copy)
@@ -59,7 +59,7 @@
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
mln_precondition(exact(lbl).is_valid());
- io::ppm::save(debug::colorize(rgb8(), lbl, nlabels), filename);
+ io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels), filename);
trace::exiting("scribo::debug::save_label_image");
}
Index: scribo/src/extract_text_single_link.cc
--- scribo/src/extract_text_single_link.cc (revision 3777)
+++ scribo/src/extract_text_single_link.cc (working copy)
@@ -71,7 +71,7 @@
text, left_link,
literal::red, literal::cyan,
scribo::make::debug_filename("left_links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -80,7 +80,7 @@
= text::grouping::group_from_single_link(text, left_link);
std::cout << "AFTER - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("left_label_color.ppm"));
@@ -99,7 +99,7 @@
text, right_link,
literal::red, literal::cyan,
scribo::make::debug_filename("right_links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -107,7 +107,7 @@
scribo::util::text<image2d<value::label_16> > grouped_text
= text::grouping::group_from_single_link(text, right_link);
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("right_label_color.ppm"));
Index: scribo/src/extract_text_graph.cc
--- scribo/src/extract_text_graph.cc (revision 3777)
+++ scribo/src/extract_text_graph.cc (working copy)
@@ -67,7 +67,7 @@
text, g,
literal::red, literal::cyan,
scribo::make::debug_filename("left_linked.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -80,7 +80,7 @@
scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
literal::red,
scribo::make::debug_filename("grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
Index: scribo/src/morpho.cc
--- scribo/src/morpho.cc (revision 3777)
+++ scribo/src/morpho.cc (working copy)
@@ -28,7 +28,7 @@
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(), mln_max(unsigned)));
io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()), "dmap.pgm");
- io::ppm::save(debug::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
image2d<unsigned>& dmap = res.first();
{
Index: scribo/src/table_rebuild_rank.cc
--- scribo/src/table_rebuild_rank.cc (revision 3777)
+++ scribo/src/table_rebuild_rank.cc (working copy)
@@ -73,7 +73,7 @@
std::cout << "ncells (including background) = " << ncells << std::endl;
- image2d<value::rgb8> table_color = mln::debug::colorize(value::rgb8(), tables, ncells);
+ image2d<value::rgb8> table_color = mln::labeling::colorize(value::rgb8(), tables, ncells);
value::label_8 bg = level::compute(accu::maj_h<value::label_8>(), tables);
Index: scribo/src/extract_text_several_left_links.cc
--- scribo/src/extract_text_several_left_links.cc (revision 3777)
+++ scribo/src/extract_text_several_left_links.cc (working copy)
@@ -75,7 +75,7 @@
= text::grouping::group_from_single_link(text, left_link);
std::cout << "AFTER - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("left_label_color.ppm"));
Index: scribo/src/table_rebuild_opening.cc
--- scribo/src/table_rebuild_opening.cc (revision 3777)
+++ scribo/src/table_rebuild_opening.cc (working copy)
@@ -71,7 +71,7 @@
std::cout << "ncells (including background) = " << ncells << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(), tables, ncells),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), tables, ncells),
scribo::make::debug_filename("table_cells.ppm"));
io::pgm::save(tables, scribo::make::debug_filename("table_cells.pgm"));
Index: scribo/src/extract_text_several_graph.cc
--- scribo/src/extract_text_several_graph.cc (revision 3777)
+++ scribo/src/extract_text_several_graph.cc (working copy)
@@ -76,7 +76,7 @@
scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
literal::red,
scribo::make::debug_filename("grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
Index: scribo/src/dmap.cc
--- scribo/src/dmap.cc (revision 3777)
+++ scribo/src/dmap.cc (working copy)
@@ -21,6 +21,6 @@
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(), mln_max(unsigned)));
io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()), "dmap.pgm");
- io::ppm::save(debug::colorize(value::rgb8(), res.second(), nlabels), "iz.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), res.second(), nlabels), "iz.ppm");
}
Index: scribo/src/table_extract.cc
--- scribo/src/table_extract.cc (revision 3777)
+++ scribo/src/table_extract.cc (working copy)
@@ -60,7 +60,7 @@
image2d<value::label_16> tables = scribo::table::extract(input, ncells).first();
std::cout << "ncells (including background) = " << ncells << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(), tables, ncells),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), tables, ncells),
scribo::make::debug_filename("table_cells.ppm"));
io::dump::save(tables, scribo::make::debug_filename("table_cells.dump"));
Index: scribo/src/extract_text_double_link.cc
--- scribo/src/extract_text_double_link.cc (revision 3777)
+++ scribo/src/extract_text_double_link.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
@@ -89,7 +89,7 @@
literal::green,
scribo::make::debug_filename("links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -98,7 +98,7 @@
scribo::util::text<image2d<value::label_16> > grouped_text
= text::grouping::group_from_double_link(text, left_link, right_link);
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
Index: scribo/src/extract_text_double_several_links.cc
--- scribo/src/extract_text_double_several_links.cc (revision 3777)
+++ scribo/src/extract_text_double_several_links.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/util/timer.hh>
#include <scribo/text/extract_bboxes.hh>
@@ -110,7 +110,7 @@
std::cout << "Full process: " << t2 << std::endl;
std::cout << "Cleanup and grouping process: " << t3 << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
Index: scribo/src/photo_basic.cc
--- scribo/src/photo_basic.cc (revision 3777)
+++ scribo/src/photo_basic.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <scribo/text/extract_bboxes.hh>
#include <scribo/text/grouping/group_with_single_left_link.hh>
@@ -101,7 +101,7 @@
literal::red,
scribo::make::debug_filename("test_graph_grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
scribo::make::debug_filename("grouped_text_comps.ppm"));
}
Index: scribo/table/internal/repair_lines.hh
--- scribo/table/internal/repair_lines.hh (revision 3777)
+++ scribo/table/internal/repair_lines.hh (working copy)
@@ -45,7 +45,7 @@
# include <mln/win/line.hh>
# include <mln/pw/all.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/value/rgb8.hh>
# include <mln/value/label_16.hh>
# include <scribo/make/debug_filename.hh>
Index: scribo/demat.hh
--- scribo/demat.hh (revision 3777)
+++ scribo/demat.hh (working copy)
@@ -182,7 +182,7 @@
void save_lbl_image(const image2d<V>& lbl, unsigned nlabels,
const char *filename)
{
- image2d<rgb8> output = debug::colorize(rgb8(), lbl, nlabels);
+ image2d<rgb8> output = labeling::colorize(rgb8(), lbl, nlabels);
io::ppm::save(output, output_file(filename));
}
@@ -1375,7 +1375,7 @@
std::cout << "map text to cells" << std::endl;
label_16 nlabels;
image2d<label_16> tblelbl = labeling::background(table, c8(), nlabels);
- image2d<rgb8> color = debug::colorize(rgb8(), tblelbl, nlabels);
+ image2d<rgb8> color = labeling::colorize(rgb8(), tblelbl, nlabels);
# ifndef NOUT
io::ppm::save(color, output_file("cells-labels.ppm"));
@@ -1395,7 +1395,7 @@
{
std::cout << "Merging aligned text boxes" << std::endl;
- io::ppm::save(debug::colorize(rgb8(), lbl, nlabels),
+ io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels),
output_file("tboxes-lbl.ppm"));
typedef util::couple<image2d<unsigned>, image2d<label_16> > cpl_t;
@@ -1406,7 +1406,7 @@
#ifndef NOUT
io::pgm::save(level::transform(diz.first(), fun::l2l::wrap<label_8>()),
output_file("tboxes-dmap.pgm"));
- io::ppm::save(debug::colorize(rgb8(), diz.second(), nlabels),
+ io::ppm::save(labeling::colorize(rgb8(), diz.second(), nlabels),
output_file("tboxes-iz.ppm"));
#endif
Index: icdar/2009/dibco/quasi.cc
--- icdar/2009/dibco/quasi.cc (revision 3777)
+++ icdar/2009/dibco/quasi.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/regional_minima.hh>
Index: icdar/2009/dibco/svg.1.binarization.cc
--- icdar/2009/dibco/svg.1.binarization.cc (revision 3777)
+++ icdar/2009/dibco/svg.1.binarization.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -335,7 +335,7 @@
label_16 nbasins;
image2d<label_16> wst = morpho::watershed::flooding(clo_vol, c4(), nbasins);
-// io::ppm::save(debug::colorize(rgb8(), wst, nbasins), "binarization_wst.ppm");
+// io::ppm::save(labeling::colorize(rgb8(), wst, nbasins), "binarization_wst.ppm");
util::couple<util::graph, image2d<label_16> >
Index: icdar/2009/dibco/svg.2.binarization.cc
--- icdar/2009/dibco/svg.2.binarization.cc (revision 3777)
+++ icdar/2009/dibco/svg.2.binarization.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -554,7 +554,7 @@
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -580,7 +580,7 @@
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -607,7 +607,7 @@
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
Index: icdar/2009/dibco/svg.3.binarization.cc
--- icdar/2009/dibco/svg.3.binarization.cc (revision 3777)
+++ icdar/2009/dibco/svg.3.binarization.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -657,7 +657,7 @@
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -683,7 +683,7 @@
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -710,7 +710,7 @@
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
Index: icdar/2009/dibco/binarization.cc
--- icdar/2009/dibco/binarization.cc (revision 3777)
+++ icdar/2009/dibco/binarization.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -636,7 +636,7 @@
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -662,7 +662,7 @@
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -689,7 +689,7 @@
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
Index: icdar/2009/hsc/icdar2ppm.hh
--- icdar/2009/hsc/icdar2ppm.hh (revision 3777)
+++ icdar/2009/hsc/icdar2ppm.hh (working copy)
@@ -6,7 +6,7 @@
# include <mln/value/rgb8.hh>
# include <mln/level/compute.hh>
# include <mln/accu/count_labels.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/load.hh>
@@ -27,7 +27,7 @@
value::label_8 nlines = level::compute(accu::meta::count_labels(), ima);
- io::ppm::save(debug::colorize(value::rgb8(), ima, nlines), ppmfile);
+ io::ppm::save(labeling::colorize(value::rgb8(), ima, nlines), ppmfile);
}
}
Index: icdar/2009/hsc/input_to_words_dat.cc
--- icdar/2009/hsc/input_to_words_dat.cc (revision 3777)
+++ icdar/2009/hsc/input_to_words_dat.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/estim/min_max.hh>
#include <sandbox/icdar/2009/hsc/input_to_lines.hh>
@@ -101,7 +101,7 @@
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_words),
argv[3]);
Index: icdar/2009/hsc/dummy_input_to_words_dat.cc
--- icdar/2009/hsc/dummy_input_to_words_dat.cc (revision 3777)
+++ icdar/2009/hsc/dummy_input_to_words_dat.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <sandbox/icdar/2009/hsc/clean_input.hh>
#include <sandbox/icdar/2009/hsc/line_to_words.hh>
@@ -49,7 +49,7 @@
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_words),
argv[3]);
Index: icdar/2009/hsc/input_to_lines_dat.cc
--- icdar/2009/hsc/input_to_lines_dat.cc (revision 3777)
+++ icdar/2009/hsc/input_to_lines_dat.cc (working copy)
@@ -2,7 +2,7 @@
#include <sandbox/icdar/2009/hsc/io/icdar/save.hh>
#include <mln/value/rgb8.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -43,7 +43,7 @@
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_lines),
argv[3]);
Index: icdar/2009/hsc/input_to_ws.hh
--- icdar/2009/hsc/input_to_ws.hh (revision 3777)
+++ icdar/2009/hsc/input_to_ws.hh (working copy)
@@ -16,7 +16,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/io/ppm/save.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/level/convert.hh>
#include <mln/labeling/wrap.hh>
#include <mln/pw/all.hh>
@@ -92,7 +92,7 @@
}
{
// Watershed basins colorize the small image.
- image2d<value::rgb8> cool = debug::colorize(value::rgb8(), ws, n_lines);
+ image2d<value::rgb8> cool = labeling::colorize(value::rgb8(), ws, n_lines);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
mln_piter(box2d) p(small.domain());
Index: icdar/2009/hsc/first_attempts/boxes.cc
--- icdar/2009/hsc/first_attempts/boxes.cc (revision 3777)
+++ icdar/2009/hsc/first_attempts/boxes.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
Index: icdar/2009/hsc/first_attempts/exec/iz_lines.cc
--- icdar/2009/hsc/first_attempts/exec/iz_lines.cc (revision 3777)
+++ icdar/2009/hsc/first_attempts/exec/iz_lines.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/data/paste.hh>
#include <mln/pw/all.hh>
-// #include <mln/debug/colorize.hh>
+// #include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
@@ -99,7 +99,7 @@
io::pgm::save(out, argv[3]);
-// io::ppm::save(debug::colorize(value::rgb8(), out, 254),
+// io::ppm::save(labeling::colorize(value::rgb8(), out, 254),
// argv[3]);
trace::exiting("main");
Index: icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
--- icdar/2009/hsc/first_attempts/exec/relabel_lines.cc (revision 3777)
+++ icdar/2009/hsc/first_attempts/exec/relabel_lines.cc (working copy)
@@ -13,7 +13,7 @@
#include <mln/accu/maj_h.hh>
#include <mln/morpho/elementary/dilation.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
#include <mln/level/transform.hh>
@@ -289,7 +289,7 @@
image2d<L> out = doit_cut(ws_txt, ws_spc);
- io::ppm::save(debug::colorize(value::rgb8(), out, 254),
+ io::ppm::save(labeling::colorize(value::rgb8(), out, 254),
argv[3]);
trace::exiting("main");
Index: icdar/2009/hsc/first_attempts/main.cc
--- icdar/2009/hsc/first_attempts/main.cc (revision 3777)
+++ icdar/2009/hsc/first_attempts/main.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -345,7 +345,7 @@
# ifdef LOG
{
- io::ppm::save(debug::colorize(rgb8(), spc, n_basins),
+ io::ppm::save(labeling::colorize(rgb8(), spc, n_basins),
"tmp_spc.ppm");
io::pgm::save(ws, "tmp_ws.pgm");
@@ -363,7 +363,7 @@
image2d<int_u8> output(input.domain());
image2d<rgb8>
- cool = debug::colorize(rgb8(), spc, n_basins),
+ cool = labeling::colorize(rgb8(), spc, n_basins),
lab(input.domain());
mln_piter_(box2d) p(input.domain());
Index: icdar/2009/hsc/input_to_wsl.cc
--- icdar/2009/hsc/input_to_wsl.cc (revision 3777)
+++ icdar/2009/hsc/input_to_wsl.cc (working copy)
@@ -5,7 +5,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -57,7 +57,7 @@
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
wsl,
n_lines),
argv[3]);
Index: icdar/2009/hsc/old_input_to_lines.cc
--- icdar/2009/hsc/old_input_to_lines.cc (revision 3777)
+++ icdar/2009/hsc/old_input_to_lines.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -348,7 +348,7 @@
# ifdef LOG
{
- io::ppm::save(debug::colorize(rgb8(), spc, n_basins),
+ io::ppm::save(labeling::colorize(rgb8(), spc, n_basins),
"tmp_spc.ppm");
io::pgm::save(ws, "tmp_ws.pgm");
Index: icdar/2009/hsc/ws_to_wsl.hh
--- icdar/2009/hsc/ws_to_wsl.hh (revision 3777)
+++ icdar/2009/hsc/ws_to_wsl.hh (working copy)
@@ -37,7 +37,7 @@
#include <mln/fun/i2v/array.hh>
#include <mln/level/transform.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -407,7 +407,7 @@
f_relab(l) = parent[l];
image2d<L> ws_ = level::transform(ws, f_relab);
- image2d<rgb8> cool = debug::colorize(rgb8(), ws_, n_basins);
+ image2d<rgb8> cool = labeling::colorize(rgb8(), ws_, n_basins);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
mln_piter(box2d) p(small.domain());
Index: fabien/igr/seg_fixed.cc
--- fabien/igr/seg_fixed.cc (revision 3777)
+++ fabien/igr/seg_fixed.cc (working copy)
@@ -43,7 +43,7 @@
#include <mln/world/inter_pixel/neighb2d.hh>
#include <mln/world/inter_pixel/is_pixel.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
@@ -284,7 +284,7 @@
mln_VAR(w, wst.unmorph_());
data::fill((w | (!world::inter_pixel::is_separator())).rw(), nbasins.next());
- io::ppm::save(debug::colorize(value::rgb8(), w, nbasins.next()), "result.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), w, nbasins.next()), "result.ppm");
Index: fabien/igr/graph.cc
--- fabien/igr/graph.cc (revision 3777)
+++ fabien/igr/graph.cc (working copy)
@@ -55,7 +55,7 @@
#include <mln/extract/all.hh>
#include <mln/make/region_adjacency_graph.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -324,8 +324,8 @@
mln_VAR(mean, level::stretch(int_u8(), labeling::mean_values(dcm, wsd2, nbasins2)));
io::pgm::save(original, "wsd_original.pgm");
io::pgm::save(mean, "wsd_mean_colors.pgm");
- io::ppm::save(debug::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
- io::ppm::save(debug::colorize(rgb8(), wsd2, nbasins2), "wsd_colorize_02.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), wsd2, nbasins2), "wsd_colorize_02.ppm");
}
else
{
Index: fabien/igr/nbasins_finder.cc
--- fabien/igr/nbasins_finder.cc (revision 3777)
+++ fabien/igr/nbasins_finder.cc (working copy)
@@ -27,7 +27,7 @@
#include <mln/fun/l2l/wrap.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -74,7 +74,7 @@
std::cout << " nbasins = " << nbasins << std::endl;
//io::dump::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "result_nbasins.dump");
//io::dump::save(level::stretch(int_u8(), wshed), "result_nbasins.dump");
- io::dump::save(debug::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
+ io::dump::save(labeling::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
return 0;
}
Index: fabien/bin/dumpl32_to_colorize.cc
--- fabien/bin/dumpl32_to_colorize.cc (revision 3777)
+++ fabien/bin/dumpl32_to_colorize.cc (working copy)
@@ -1,7 +1,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/make/image3d.hh>
#include <mln/debug/slices_2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/int_u12.hh>
@@ -44,14 +44,14 @@
{
image2d<label_32> ima2d;
io::dump::load(ima2d, argv[1]);
- image2d<rgb8> ima_rgb = debug::colorize(rgb8(), ima2d, nbasins);
+ image2d<rgb8> ima_rgb = labeling::colorize(rgb8(), ima2d, nbasins);
io::ppm::save(ima_rgb, argv[4]);
}
else
{
image3d<label_32> ima3d;
io::dump::load(ima3d, argv[1]);
- image3d<rgb8> ima_rgb = debug::colorize(rgb8(), ima3d, nbasins);
+ image3d<rgb8> ima_rgb = labeling::colorize(rgb8(), ima3d, nbasins);
image2d<rgb8> ima_result = debug::slices_2d(ima_rgb, 1.f, literal::black);
io::ppm::save(ima_result, argv[4]);
Index: inim/2010/boxes/boxes.cc
--- inim/2010/boxes/boxes.cc (revision 3777)
+++ inim/2010/boxes/boxes.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
Index: theo/color/filter_blen_rgb_edges.cc
--- theo/color/filter_blen_rgb_edges.cc (revision 3777)
+++ theo/color/filter_blen_rgb_edges.cc (working copy)
@@ -18,7 +18,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/morpho/dilation.hh>
#include <mln/morpho/erosion.hh>
@@ -333,7 +333,7 @@
w_all);
- io::ppm::save(debug::colorize(rgb8(),
+ io::ppm::save(labeling::colorize(rgb8(),
w_all,
nbasins),
"temp_w_all.ppm");
@@ -344,7 +344,7 @@
image2d<L> out_w = full2image(w_all);
-// io::ppm::save(debug::colorize(rgb8(),
+// io::ppm::save(labeling::colorize(rgb8(),
// out_w,
// nbasins),
// argv[4]);
Index: lazzara/igr/igr-biggest-comp.cc
--- lazzara/igr/igr-biggest-comp.cc (revision 3777)
+++ lazzara/igr/igr-biggest-comp.cc (working copy)
@@ -5,7 +5,7 @@
#include <mln/labeling/flat_zones.hh>
#include <mln/labeling/background.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/essential/3d.hh>
Index: lazzara/igr/igr.cc
--- lazzara/igr/igr.cc (revision 3777)
+++ lazzara/igr/igr.cc (working copy)
@@ -4,7 +4,7 @@
#include <mln/binarization/binarization.hh>
#include <mln/labeling/background.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
//#include <mln/registration/registration.hh>
//#include <mln/registration/multiscale.hh>
Index: lazzara/igr/igr-cloud.cc
--- lazzara/igr/igr-cloud.cc (revision 3777)
+++ lazzara/igr/igr-cloud.cc (working copy)
@@ -20,7 +20,7 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/literal/black.hh>
# include <mln/literal/white.hh>
Index: edwin/inim/inim.cc
--- edwin/inim/inim.cc (revision 3777)
+++ edwin/inim/inim.cc (working copy)
@@ -43,7 +43,7 @@
#include <mln/level/stretch.hh>
#include <mln/value/label_8.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
/* Draw debug */
#include <mln/draw/box.hh>
@@ -241,7 +241,7 @@
typedef mln_ch_value_(I, value::rgb<8>) O;
value::label_8 nlabel;
L label = labeling::blobs(mask, c4(), nlabel);
- O output = debug::colorize(value::rgb8(), label, nlabel);
+ O output = labeling::colorize(value::rgb8(), label, nlabel);
io::ppm::save(output, "label.pgm");
/* Now store output image image */
1
0
* scribo/debug/save_label_image.hh,
* scribo/src/extract_text_single_link.cc,
* scribo/src/extract_text_graph.cc,
* scribo/src/morpho.cc,
* scribo/src/table_rebuild_rank.cc,
* scribo/src/extract_text_several_left_links.cc,
* scribo/src/table_rebuild_opening.cc,
* scribo/src/extract_text_several_graph.cc,
* scribo/src/dmap.cc,
* scribo/src/table_extract.cc,
* scribo/src/extract_text_double_link.cc,
* scribo/src/extract_text_double_several_links.cc,
* scribo/src/photo_basic.cc,
* scribo/table/internal/repair_lines.hh,
* scribo/demat.hh,
* icdar/2009/dibco/quasi.cc,
* icdar/2009/dibco/svg.1.binarization.cc,
* icdar/2009/dibco/svg.2.binarization.cc,
* icdar/2009/dibco/svg.3.binarization.cc,
* icdar/2009/dibco/binarization.cc,
* icdar/2009/hsc/icdar2ppm.hh,
* icdar/2009/hsc/input_to_words_dat.cc,
* icdar/2009/hsc/dummy_input_to_words_dat.cc,
* icdar/2009/hsc/input_to_lines_dat.cc,
* icdar/2009/hsc/input_to_ws.hh,
* icdar/2009/hsc/first_attempts/boxes.cc,
* icdar/2009/hsc/first_attempts/exec/iz_lines.cc,
* icdar/2009/hsc/first_attempts/exec/relabel_lines.cc,
* icdar/2009/hsc/first_attempts/main.cc,
* icdar/2009/hsc/input_to_wsl.cc,
* icdar/2009/hsc/old_input_to_lines.cc,
* icdar/2009/hsc/ws_to_wsl.hh,
* fabien/igr/seg_fixed.cc,
* fabien/igr/graph.cc,
* fabien/igr/nbasins_finder.cc,
* fabien/bin/dumpl32_to_colorize.cc,
* inim/2010/boxes/boxes.cc,
* theo/color/filter_blen_rgb_edges.cc,
* lazzara/igr/igr-biggest-comp.cc,
* lazzara/igr/igr.cc,
* lazzara/igr/igr-cloud.cc,
* edwin/inim/inim.cc:
Fix missing updates about debug colorize.
---
milena/sandbox/ChangeLog | 48 ++++++++++++++++++++
milena/sandbox/edwin/inim/inim.cc | 4 +-
milena/sandbox/fabien/bin/dumpl32_to_colorize.cc | 6 +-
milena/sandbox/fabien/igr/graph.cc | 6 +-
milena/sandbox/fabien/igr/nbasins_finder.cc | 4 +-
milena/sandbox/fabien/igr/seg_fixed.cc | 4 +-
milena/sandbox/icdar/2009/dibco/binarization.cc | 8 ++--
milena/sandbox/icdar/2009/dibco/quasi.cc | 2 +-
.../sandbox/icdar/2009/dibco/svg.1.binarization.cc | 4 +-
.../sandbox/icdar/2009/dibco/svg.2.binarization.cc | 8 ++--
.../sandbox/icdar/2009/dibco/svg.3.binarization.cc | 8 ++--
.../icdar/2009/hsc/dummy_input_to_words_dat.cc | 4 +-
.../sandbox/icdar/2009/hsc/first_attempts/boxes.cc | 2 +-
.../icdar/2009/hsc/first_attempts/exec/iz_lines.cc | 4 +-
.../2009/hsc/first_attempts/exec/relabel_lines.cc | 4 +-
.../sandbox/icdar/2009/hsc/first_attempts/main.cc | 6 +-
milena/sandbox/icdar/2009/hsc/icdar2ppm.hh | 4 +-
.../sandbox/icdar/2009/hsc/input_to_lines_dat.cc | 4 +-
.../sandbox/icdar/2009/hsc/input_to_words_dat.cc | 4 +-
milena/sandbox/icdar/2009/hsc/input_to_ws.hh | 4 +-
milena/sandbox/icdar/2009/hsc/input_to_wsl.cc | 4 +-
.../sandbox/icdar/2009/hsc/old_input_to_lines.cc | 4 +-
milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh | 4 +-
milena/sandbox/inim/2010/boxes/boxes.cc | 2 +-
milena/sandbox/lazzara/igr/igr-biggest-comp.cc | 2 +-
milena/sandbox/lazzara/igr/igr-cloud.cc | 2 +-
milena/sandbox/lazzara/igr/igr.cc | 2 +-
milena/sandbox/scribo/debug/save_label_image.hh | 2 +-
milena/sandbox/scribo/demat.hh | 8 ++--
milena/sandbox/scribo/src/dmap.cc | 2 +-
.../sandbox/scribo/src/extract_text_double_link.cc | 6 +-
.../src/extract_text_double_several_links.cc | 4 +-
milena/sandbox/scribo/src/extract_text_graph.cc | 4 +-
.../scribo/src/extract_text_several_graph.cc | 2 +-
.../scribo/src/extract_text_several_left_links.cc | 2 +-
.../sandbox/scribo/src/extract_text_single_link.cc | 8 ++--
milena/sandbox/scribo/src/morpho.cc | 2 +-
milena/sandbox/scribo/src/photo_basic.cc | 4 +-
milena/sandbox/scribo/src/table_extract.cc | 2 +-
milena/sandbox/scribo/src/table_rebuild_opening.cc | 2 +-
milena/sandbox/scribo/src/table_rebuild_rank.cc | 2 +-
.../sandbox/scribo/table/internal/repair_lines.hh | 2 +-
milena/sandbox/theo/color/filter_blen_rgb_edges.cc | 6 +-
43 files changed, 132 insertions(+), 84 deletions(-)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index d86c05e..be85cde 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,51 @@
+2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Fix missing updates about debug colorize.
+
+ * scribo/debug/save_label_image.hh,
+ * scribo/src/extract_text_single_link.cc,
+ * scribo/src/extract_text_graph.cc,
+ * scribo/src/morpho.cc,
+ * scribo/src/table_rebuild_rank.cc,
+ * scribo/src/extract_text_several_left_links.cc,
+ * scribo/src/table_rebuild_opening.cc,
+ * scribo/src/extract_text_several_graph.cc,
+ * scribo/src/dmap.cc,
+ * scribo/src/table_extract.cc,
+ * scribo/src/extract_text_double_link.cc,
+ * scribo/src/extract_text_double_several_links.cc,
+ * scribo/src/photo_basic.cc,
+ * scribo/table/internal/repair_lines.hh,
+ * scribo/demat.hh,
+ * icdar/2009/dibco/quasi.cc,
+ * icdar/2009/dibco/svg.1.binarization.cc,
+ * icdar/2009/dibco/svg.2.binarization.cc,
+ * icdar/2009/dibco/svg.3.binarization.cc,
+ * icdar/2009/dibco/binarization.cc,
+ * icdar/2009/hsc/icdar2ppm.hh,
+ * icdar/2009/hsc/input_to_words_dat.cc,
+ * icdar/2009/hsc/dummy_input_to_words_dat.cc,
+ * icdar/2009/hsc/input_to_lines_dat.cc,
+ * icdar/2009/hsc/input_to_ws.hh,
+ * icdar/2009/hsc/first_attempts/boxes.cc,
+ * icdar/2009/hsc/first_attempts/exec/iz_lines.cc,
+ * icdar/2009/hsc/first_attempts/exec/relabel_lines.cc,
+ * icdar/2009/hsc/first_attempts/main.cc,
+ * icdar/2009/hsc/input_to_wsl.cc,
+ * icdar/2009/hsc/old_input_to_lines.cc,
+ * icdar/2009/hsc/ws_to_wsl.hh,
+ * fabien/igr/seg_fixed.cc,
+ * fabien/igr/graph.cc,
+ * fabien/igr/nbasins_finder.cc,
+ * fabien/bin/dumpl32_to_colorize.cc,
+ * inim/2010/boxes/boxes.cc,
+ * theo/color/filter_blen_rgb_edges.cc,
+ * lazzara/igr/igr-biggest-comp.cc,
+ * lazzara/igr/igr.cc,
+ * lazzara/igr/igr-cloud.cc,
+ * edwin/inim/inim.cc:
+ Fix missing updates about debug colorize.
+
2009-05-07 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Fixed watershed, now works on edges.
diff --git a/milena/sandbox/edwin/inim/inim.cc b/milena/sandbox/edwin/inim/inim.cc
index 9c6f38e..5dca4bd 100644
--- a/milena/sandbox/edwin/inim/inim.cc
+++ b/milena/sandbox/edwin/inim/inim.cc
@@ -43,7 +43,7 @@
#include <mln/level/stretch.hh>
#include <mln/value/label_8.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
/* Draw debug */
#include <mln/draw/box.hh>
@@ -241,7 +241,7 @@ int main(int argc, char* argv[])
typedef mln_ch_value_(I, value::rgb<8>) O;
value::label_8 nlabel;
L label = labeling::blobs(mask, c4(), nlabel);
- O output = debug::colorize(value::rgb8(), label, nlabel);
+ O output = labeling::colorize(value::rgb8(), label, nlabel);
io::ppm::save(output, "label.pgm");
/* Now store output image image */
diff --git a/milena/sandbox/fabien/bin/dumpl32_to_colorize.cc b/milena/sandbox/fabien/bin/dumpl32_to_colorize.cc
index 7f42c29..dba50ec 100644
--- a/milena/sandbox/fabien/bin/dumpl32_to_colorize.cc
+++ b/milena/sandbox/fabien/bin/dumpl32_to_colorize.cc
@@ -1,7 +1,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/make/image3d.hh>
#include <mln/debug/slices_2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/int_u12.hh>
@@ -44,14 +44,14 @@ int main(int argc, char* argv[])
{
image2d<label_32> ima2d;
io::dump::load(ima2d, argv[1]);
- image2d<rgb8> ima_rgb = debug::colorize(rgb8(), ima2d, nbasins);
+ image2d<rgb8> ima_rgb = labeling::colorize(rgb8(), ima2d, nbasins);
io::ppm::save(ima_rgb, argv[4]);
}
else
{
image3d<label_32> ima3d;
io::dump::load(ima3d, argv[1]);
- image3d<rgb8> ima_rgb = debug::colorize(rgb8(), ima3d, nbasins);
+ image3d<rgb8> ima_rgb = labeling::colorize(rgb8(), ima3d, nbasins);
image2d<rgb8> ima_result = debug::slices_2d(ima_rgb, 1.f, literal::black);
io::ppm::save(ima_result, argv[4]);
diff --git a/milena/sandbox/fabien/igr/graph.cc b/milena/sandbox/fabien/igr/graph.cc
index bfed8e7..7402f23 100644
--- a/milena/sandbox/fabien/igr/graph.cc
+++ b/milena/sandbox/fabien/igr/graph.cc
@@ -55,7 +55,7 @@
#include <mln/extract/all.hh>
#include <mln/make/region_adjacency_graph.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -324,8 +324,8 @@ int main(int argc, char *argv[])
mln_VAR(mean, level::stretch(int_u8(), labeling::mean_values(dcm, wsd2, nbasins2)));
io::pgm::save(original, "wsd_original.pgm");
io::pgm::save(mean, "wsd_mean_colors.pgm");
- io::ppm::save(debug::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
- io::ppm::save(debug::colorize(rgb8(), wsd2, nbasins2), "wsd_colorize_02.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), wsd2, nbasins2), "wsd_colorize_02.ppm");
}
else
{
diff --git a/milena/sandbox/fabien/igr/nbasins_finder.cc b/milena/sandbox/fabien/igr/nbasins_finder.cc
index cbb3caf..aecfbfa 100644
--- a/milena/sandbox/fabien/igr/nbasins_finder.cc
+++ b/milena/sandbox/fabien/igr/nbasins_finder.cc
@@ -27,7 +27,7 @@
#include <mln/fun/l2l/wrap.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
std::cout << " nbasins = " << nbasins << std::endl;
//io::dump::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "result_nbasins.dump");
//io::dump::save(level::stretch(int_u8(), wshed), "result_nbasins.dump");
- io::dump::save(debug::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
+ io::dump::save(labeling::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
return 0;
}
diff --git a/milena/sandbox/fabien/igr/seg_fixed.cc b/milena/sandbox/fabien/igr/seg_fixed.cc
index d0b759f..2f2acbe 100644
--- a/milena/sandbox/fabien/igr/seg_fixed.cc
+++ b/milena/sandbox/fabien/igr/seg_fixed.cc
@@ -43,7 +43,7 @@
#include <mln/world/inter_pixel/neighb2d.hh>
#include <mln/world/inter_pixel/is_pixel.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
@@ -284,7 +284,7 @@ int main(int argc, char* argv[])
mln_VAR(w, wst.unmorph_());
data::fill((w | (!world::inter_pixel::is_separator())).rw(), nbasins.next());
- io::ppm::save(debug::colorize(value::rgb8(), w, nbasins.next()), "result.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), w, nbasins.next()), "result.ppm");
diff --git a/milena/sandbox/icdar/2009/dibco/binarization.cc b/milena/sandbox/icdar/2009/dibco/binarization.cc
index 14f4495..786df7a 100644
--- a/milena/sandbox/icdar/2009/dibco/binarization.cc
+++ b/milena/sandbox/icdar/2009/dibco/binarization.cc
@@ -41,7 +41,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -636,7 +636,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -662,7 +662,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -689,7 +689,7 @@ int main(int argc, char *argv[])
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
diff --git a/milena/sandbox/icdar/2009/dibco/quasi.cc b/milena/sandbox/icdar/2009/dibco/quasi.cc
index 08baf05..6ad69fc 100644
--- a/milena/sandbox/icdar/2009/dibco/quasi.cc
+++ b/milena/sandbox/icdar/2009/dibco/quasi.cc
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/regional_minima.hh>
diff --git a/milena/sandbox/icdar/2009/dibco/svg.1.binarization.cc b/milena/sandbox/icdar/2009/dibco/svg.1.binarization.cc
index 119c64b..f6824ea 100644
--- a/milena/sandbox/icdar/2009/dibco/svg.1.binarization.cc
+++ b/milena/sandbox/icdar/2009/dibco/svg.1.binarization.cc
@@ -33,7 +33,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -335,7 +335,7 @@ int main(int argc, char *argv[])
label_16 nbasins;
image2d<label_16> wst = morpho::watershed::flooding(clo_vol, c4(), nbasins);
-// io::ppm::save(debug::colorize(rgb8(), wst, nbasins), "binarization_wst.ppm");
+// io::ppm::save(labeling::colorize(rgb8(), wst, nbasins), "binarization_wst.ppm");
util::couple<util::graph, image2d<label_16> >
diff --git a/milena/sandbox/icdar/2009/dibco/svg.2.binarization.cc b/milena/sandbox/icdar/2009/dibco/svg.2.binarization.cc
index 20a0505..daebc17 100644
--- a/milena/sandbox/icdar/2009/dibco/svg.2.binarization.cc
+++ b/milena/sandbox/icdar/2009/dibco/svg.2.binarization.cc
@@ -39,7 +39,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -554,7 +554,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -580,7 +580,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -607,7 +607,7 @@ int main(int argc, char *argv[])
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
diff --git a/milena/sandbox/icdar/2009/dibco/svg.3.binarization.cc b/milena/sandbox/icdar/2009/dibco/svg.3.binarization.cc
index 86214c6..1fa40d7 100644
--- a/milena/sandbox/icdar/2009/dibco/svg.3.binarization.cc
+++ b/milena/sandbox/icdar/2009/dibco/svg.3.binarization.cc
@@ -41,7 +41,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -657,7 +657,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -683,7 +683,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -710,7 +710,7 @@ int main(int argc, char *argv[])
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
diff --git a/milena/sandbox/icdar/2009/hsc/dummy_input_to_words_dat.cc b/milena/sandbox/icdar/2009/hsc/dummy_input_to_words_dat.cc
index 23bad06..353fb00 100644
--- a/milena/sandbox/icdar/2009/hsc/dummy_input_to_words_dat.cc
+++ b/milena/sandbox/icdar/2009/hsc/dummy_input_to_words_dat.cc
@@ -3,7 +3,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <sandbox/icdar/2009/hsc/clean_input.hh>
#include <sandbox/icdar/2009/hsc/line_to_words.hh>
@@ -49,7 +49,7 @@ int main(int argc, char* argv[])
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_words),
argv[3]);
diff --git a/milena/sandbox/icdar/2009/hsc/first_attempts/boxes.cc b/milena/sandbox/icdar/2009/hsc/first_attempts/boxes.cc
index 9742c1f..18792ea 100644
--- a/milena/sandbox/icdar/2009/hsc/first_attempts/boxes.cc
+++ b/milena/sandbox/icdar/2009/hsc/first_attempts/boxes.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
diff --git a/milena/sandbox/icdar/2009/hsc/first_attempts/exec/iz_lines.cc b/milena/sandbox/icdar/2009/hsc/first_attempts/exec/iz_lines.cc
index 471657d..7df51ef 100644
--- a/milena/sandbox/icdar/2009/hsc/first_attempts/exec/iz_lines.cc
+++ b/milena/sandbox/icdar/2009/hsc/first_attempts/exec/iz_lines.cc
@@ -9,7 +9,7 @@
#include <mln/data/paste.hh>
#include <mln/pw/all.hh>
-// #include <mln/debug/colorize.hh>
+// #include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
io::pgm::save(out, argv[3]);
-// io::ppm::save(debug::colorize(value::rgb8(), out, 254),
+// io::ppm::save(labeling::colorize(value::rgb8(), out, 254),
// argv[3]);
trace::exiting("main");
diff --git a/milena/sandbox/icdar/2009/hsc/first_attempts/exec/relabel_lines.cc b/milena/sandbox/icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
index f7c9008..6f86fbe 100644
--- a/milena/sandbox/icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
+++ b/milena/sandbox/icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
@@ -13,7 +13,7 @@
#include <mln/accu/maj_h.hh>
#include <mln/morpho/elementary/dilation.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
#include <mln/level/transform.hh>
@@ -289,7 +289,7 @@ int main(int argc, char* argv[])
image2d<L> out = doit_cut(ws_txt, ws_spc);
- io::ppm::save(debug::colorize(value::rgb8(), out, 254),
+ io::ppm::save(labeling::colorize(value::rgb8(), out, 254),
argv[3]);
trace::exiting("main");
diff --git a/milena/sandbox/icdar/2009/hsc/first_attempts/main.cc b/milena/sandbox/icdar/2009/hsc/first_attempts/main.cc
index 84892ea..8c4b331 100644
--- a/milena/sandbox/icdar/2009/hsc/first_attempts/main.cc
+++ b/milena/sandbox/icdar/2009/hsc/first_attempts/main.cc
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -345,7 +345,7 @@ int main(int argc, char* argv[])
# ifdef LOG
{
- io::ppm::save(debug::colorize(rgb8(), spc, n_basins),
+ io::ppm::save(labeling::colorize(rgb8(), spc, n_basins),
"tmp_spc.ppm");
io::pgm::save(ws, "tmp_ws.pgm");
@@ -363,7 +363,7 @@ int main(int argc, char* argv[])
image2d<int_u8> output(input.domain());
image2d<rgb8>
- cool = debug::colorize(rgb8(), spc, n_basins),
+ cool = labeling::colorize(rgb8(), spc, n_basins),
lab(input.domain());
mln_piter_(box2d) p(input.domain());
diff --git a/milena/sandbox/icdar/2009/hsc/icdar2ppm.hh b/milena/sandbox/icdar/2009/hsc/icdar2ppm.hh
index eca8c84..31913f7 100644
--- a/milena/sandbox/icdar/2009/hsc/icdar2ppm.hh
+++ b/milena/sandbox/icdar/2009/hsc/icdar2ppm.hh
@@ -6,7 +6,7 @@
# include <mln/value/rgb8.hh>
# include <mln/level/compute.hh>
# include <mln/accu/count_labels.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/load.hh>
@@ -27,7 +27,7 @@ namespace mln
value::label_8 nlines = level::compute(accu::meta::count_labels(), ima);
- io::ppm::save(debug::colorize(value::rgb8(), ima, nlines), ppmfile);
+ io::ppm::save(labeling::colorize(value::rgb8(), ima, nlines), ppmfile);
}
}
diff --git a/milena/sandbox/icdar/2009/hsc/input_to_lines_dat.cc b/milena/sandbox/icdar/2009/hsc/input_to_lines_dat.cc
index 7dd3021..ba7f668 100644
--- a/milena/sandbox/icdar/2009/hsc/input_to_lines_dat.cc
+++ b/milena/sandbox/icdar/2009/hsc/input_to_lines_dat.cc
@@ -2,7 +2,7 @@
#include <sandbox/icdar/2009/hsc/io/icdar/save.hh>
#include <mln/value/rgb8.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -43,7 +43,7 @@ int main(int argc, char* argv[])
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_lines),
argv[3]);
diff --git a/milena/sandbox/icdar/2009/hsc/input_to_words_dat.cc b/milena/sandbox/icdar/2009/hsc/input_to_words_dat.cc
index ac989f3..e6b01ca 100644
--- a/milena/sandbox/icdar/2009/hsc/input_to_words_dat.cc
+++ b/milena/sandbox/icdar/2009/hsc/input_to_words_dat.cc
@@ -3,7 +3,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/estim/min_max.hh>
#include <sandbox/icdar/2009/hsc/input_to_lines.hh>
@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_words),
argv[3]);
diff --git a/milena/sandbox/icdar/2009/hsc/input_to_ws.hh b/milena/sandbox/icdar/2009/hsc/input_to_ws.hh
index e2289f6..a1ea537 100644
--- a/milena/sandbox/icdar/2009/hsc/input_to_ws.hh
+++ b/milena/sandbox/icdar/2009/hsc/input_to_ws.hh
@@ -16,7 +16,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/io/ppm/save.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/level/convert.hh>
#include <mln/labeling/wrap.hh>
#include <mln/pw/all.hh>
@@ -92,7 +92,7 @@ namespace mln
}
{
// Watershed basins colorize the small image.
- image2d<value::rgb8> cool = debug::colorize(value::rgb8(), ws, n_lines);
+ image2d<value::rgb8> cool = labeling::colorize(value::rgb8(), ws, n_lines);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
mln_piter(box2d) p(small.domain());
diff --git a/milena/sandbox/icdar/2009/hsc/input_to_wsl.cc b/milena/sandbox/icdar/2009/hsc/input_to_wsl.cc
index b3a71d0..819f353 100644
--- a/milena/sandbox/icdar/2009/hsc/input_to_wsl.cc
+++ b/milena/sandbox/icdar/2009/hsc/input_to_wsl.cc
@@ -5,7 +5,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
wsl,
n_lines),
argv[3]);
diff --git a/milena/sandbox/icdar/2009/hsc/old_input_to_lines.cc b/milena/sandbox/icdar/2009/hsc/old_input_to_lines.cc
index e56e166..212b077 100644
--- a/milena/sandbox/icdar/2009/hsc/old_input_to_lines.cc
+++ b/milena/sandbox/icdar/2009/hsc/old_input_to_lines.cc
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -348,7 +348,7 @@ int main(int argc, char* argv[])
# ifdef LOG
{
- io::ppm::save(debug::colorize(rgb8(), spc, n_basins),
+ io::ppm::save(labeling::colorize(rgb8(), spc, n_basins),
"tmp_spc.ppm");
io::pgm::save(ws, "tmp_ws.pgm");
diff --git a/milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh b/milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh
index 200461d..1f27525 100644
--- a/milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh
+++ b/milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh
@@ -37,7 +37,7 @@
#include <mln/fun/i2v/array.hh>
#include <mln/level/transform.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -407,7 +407,7 @@ namespace mln
f_relab(l) = parent[l];
image2d<L> ws_ = level::transform(ws, f_relab);
- image2d<rgb8> cool = debug::colorize(rgb8(), ws_, n_basins);
+ image2d<rgb8> cool = labeling::colorize(rgb8(), ws_, n_basins);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
mln_piter(box2d) p(small.domain());
diff --git a/milena/sandbox/inim/2010/boxes/boxes.cc b/milena/sandbox/inim/2010/boxes/boxes.cc
index 8944974..3790ec5 100644
--- a/milena/sandbox/inim/2010/boxes/boxes.cc
+++ b/milena/sandbox/inim/2010/boxes/boxes.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
diff --git a/milena/sandbox/lazzara/igr/igr-biggest-comp.cc b/milena/sandbox/lazzara/igr/igr-biggest-comp.cc
index ecfc7a1..a59176f 100644
--- a/milena/sandbox/lazzara/igr/igr-biggest-comp.cc
+++ b/milena/sandbox/lazzara/igr/igr-biggest-comp.cc
@@ -5,7 +5,7 @@
#include <mln/labeling/flat_zones.hh>
#include <mln/labeling/background.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/essential/3d.hh>
diff --git a/milena/sandbox/lazzara/igr/igr-cloud.cc b/milena/sandbox/lazzara/igr/igr-cloud.cc
index 18d976f..df4b7c8 100644
--- a/milena/sandbox/lazzara/igr/igr-cloud.cc
+++ b/milena/sandbox/lazzara/igr/igr-cloud.cc
@@ -20,7 +20,7 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/literal/black.hh>
# include <mln/literal/white.hh>
diff --git a/milena/sandbox/lazzara/igr/igr.cc b/milena/sandbox/lazzara/igr/igr.cc
index 98e1ce4..fffd88f 100644
--- a/milena/sandbox/lazzara/igr/igr.cc
+++ b/milena/sandbox/lazzara/igr/igr.cc
@@ -4,7 +4,7 @@
#include <mln/binarization/binarization.hh>
#include <mln/labeling/background.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
//#include <mln/registration/registration.hh>
//#include <mln/registration/multiscale.hh>
diff --git a/milena/sandbox/scribo/debug/save_label_image.hh b/milena/sandbox/scribo/debug/save_label_image.hh
index e9b01f1..1a8036c 100644
--- a/milena/sandbox/scribo/debug/save_label_image.hh
+++ b/milena/sandbox/scribo/debug/save_label_image.hh
@@ -59,7 +59,7 @@ namespace scribo
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
mln_precondition(exact(lbl).is_valid());
- io::ppm::save(debug::colorize(rgb8(), lbl, nlabels), filename);
+ io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels), filename);
trace::exiting("scribo::debug::save_label_image");
}
diff --git a/milena/sandbox/scribo/demat.hh b/milena/sandbox/scribo/demat.hh
index 06e22da..e8c0e7b 100644
--- a/milena/sandbox/scribo/demat.hh
+++ b/milena/sandbox/scribo/demat.hh
@@ -182,7 +182,7 @@ namespace scribo
void save_lbl_image(const image2d<V>& lbl, unsigned nlabels,
const char *filename)
{
- image2d<rgb8> output = debug::colorize(rgb8(), lbl, nlabels);
+ image2d<rgb8> output = labeling::colorize(rgb8(), lbl, nlabels);
io::ppm::save(output, output_file(filename));
}
@@ -1375,7 +1375,7 @@ namespace scribo
std::cout << "map text to cells" << std::endl;
label_16 nlabels;
image2d<label_16> tblelbl = labeling::background(table, c8(), nlabels);
- image2d<rgb8> color = debug::colorize(rgb8(), tblelbl, nlabels);
+ image2d<rgb8> color = labeling::colorize(rgb8(), tblelbl, nlabels);
# ifndef NOUT
io::ppm::save(color, output_file("cells-labels.ppm"));
@@ -1395,7 +1395,7 @@ namespace scribo
{
std::cout << "Merging aligned text boxes" << std::endl;
- io::ppm::save(debug::colorize(rgb8(), lbl, nlabels),
+ io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels),
output_file("tboxes-lbl.ppm"));
typedef util::couple<image2d<unsigned>, image2d<label_16> > cpl_t;
@@ -1406,7 +1406,7 @@ namespace scribo
#ifndef NOUT
io::pgm::save(level::transform(diz.first(), fun::l2l::wrap<label_8>()),
output_file("tboxes-dmap.pgm"));
- io::ppm::save(debug::colorize(rgb8(), diz.second(), nlabels),
+ io::ppm::save(labeling::colorize(rgb8(), diz.second(), nlabels),
output_file("tboxes-iz.ppm"));
#endif
diff --git a/milena/sandbox/scribo/src/dmap.cc b/milena/sandbox/scribo/src/dmap.cc
index dac40ba..0375691 100644
--- a/milena/sandbox/scribo/src/dmap.cc
+++ b/milena/sandbox/scribo/src/dmap.cc
@@ -21,6 +21,6 @@ int main(int, char *argv[])
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(), mln_max(unsigned)));
io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()), "dmap.pgm");
- io::ppm::save(debug::colorize(value::rgb8(), res.second(), nlabels), "iz.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), res.second(), nlabels), "iz.ppm");
}
diff --git a/milena/sandbox/scribo/src/extract_text_double_link.cc b/milena/sandbox/scribo/src/extract_text_double_link.cc
index d7de94b..88f8247 100644
--- a/milena/sandbox/scribo/src/extract_text_double_link.cc
+++ b/milena/sandbox/scribo/src/extract_text_double_link.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
@@ -89,7 +89,7 @@ int main(int argc, char* argv[])
literal::green,
scribo::make::debug_filename("links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -98,7 +98,7 @@ int main(int argc, char* argv[])
scribo::util::text<image2d<value::label_16> > grouped_text
= text::grouping::group_from_double_link(text, left_link, right_link);
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_double_several_links.cc b/milena/sandbox/scribo/src/extract_text_double_several_links.cc
index 1fead0a..59dad73 100644
--- a/milena/sandbox/scribo/src/extract_text_double_several_links.cc
+++ b/milena/sandbox/scribo/src/extract_text_double_several_links.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/util/timer.hh>
#include <scribo/text/extract_bboxes.hh>
@@ -110,7 +110,7 @@ int main(int argc, char* argv[])
std::cout << "Full process: " << t2 << std::endl;
std::cout << "Cleanup and grouping process: " << t3 << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_graph.cc b/milena/sandbox/scribo/src/extract_text_graph.cc
index fdcf54b..99f9a18 100644
--- a/milena/sandbox/scribo/src/extract_text_graph.cc
+++ b/milena/sandbox/scribo/src/extract_text_graph.cc
@@ -67,7 +67,7 @@ int main(int argc, char* argv[])
text, g,
literal::red, literal::cyan,
scribo::make::debug_filename("left_linked.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -80,7 +80,7 @@ int main(int argc, char* argv[])
scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
literal::red,
scribo::make::debug_filename("grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_several_graph.cc b/milena/sandbox/scribo/src/extract_text_several_graph.cc
index 8c84bc9..17816a0 100644
--- a/milena/sandbox/scribo/src/extract_text_several_graph.cc
+++ b/milena/sandbox/scribo/src/extract_text_several_graph.cc
@@ -76,7 +76,7 @@ int main(int argc, char* argv[])
scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
literal::red,
scribo::make::debug_filename("grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_several_left_links.cc b/milena/sandbox/scribo/src/extract_text_several_left_links.cc
index a050ff3..2ad6ef3 100644
--- a/milena/sandbox/scribo/src/extract_text_several_left_links.cc
+++ b/milena/sandbox/scribo/src/extract_text_several_left_links.cc
@@ -75,7 +75,7 @@ int main(int argc, char* argv[])
= text::grouping::group_from_single_link(text, left_link);
std::cout << "AFTER - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("left_label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_single_link.cc b/milena/sandbox/scribo/src/extract_text_single_link.cc
index 640f9f2..55e5068 100644
--- a/milena/sandbox/scribo/src/extract_text_single_link.cc
+++ b/milena/sandbox/scribo/src/extract_text_single_link.cc
@@ -71,7 +71,7 @@ int main(int argc, char* argv[])
text, left_link,
literal::red, literal::cyan,
scribo::make::debug_filename("left_links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -80,7 +80,7 @@ int main(int argc, char* argv[])
= text::grouping::group_from_single_link(text, left_link);
std::cout << "AFTER - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("left_label_color.ppm"));
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
text, right_link,
literal::red, literal::cyan,
scribo::make::debug_filename("right_links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -107,7 +107,7 @@ int main(int argc, char* argv[])
scribo::util::text<image2d<value::label_16> > grouped_text
= text::grouping::group_from_single_link(text, right_link);
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("right_label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/morpho.cc b/milena/sandbox/scribo/src/morpho.cc
index 27b9f98..2195fcf 100644
--- a/milena/sandbox/scribo/src/morpho.cc
+++ b/milena/sandbox/scribo/src/morpho.cc
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(), mln_max(unsigned)));
io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()), "dmap.pgm");
- io::ppm::save(debug::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
image2d<unsigned>& dmap = res.first();
{
diff --git a/milena/sandbox/scribo/src/photo_basic.cc b/milena/sandbox/scribo/src/photo_basic.cc
index 871da36..9b2767a 100644
--- a/milena/sandbox/scribo/src/photo_basic.cc
+++ b/milena/sandbox/scribo/src/photo_basic.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <scribo/text/extract_bboxes.hh>
#include <scribo/text/grouping/group_with_single_left_link.hh>
@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
literal::red,
scribo::make::debug_filename("test_graph_grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
scribo::make::debug_filename("grouped_text_comps.ppm"));
}
diff --git a/milena/sandbox/scribo/src/table_extract.cc b/milena/sandbox/scribo/src/table_extract.cc
index 273bd5d..b184e53 100644
--- a/milena/sandbox/scribo/src/table_extract.cc
+++ b/milena/sandbox/scribo/src/table_extract.cc
@@ -60,7 +60,7 @@ int main(int argc, char* argv[])
image2d<value::label_16> tables = scribo::table::extract(input, ncells).first();
std::cout << "ncells (including background) = " << ncells << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(), tables, ncells),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), tables, ncells),
scribo::make::debug_filename("table_cells.ppm"));
io::dump::save(tables, scribo::make::debug_filename("table_cells.dump"));
diff --git a/milena/sandbox/scribo/src/table_rebuild_opening.cc b/milena/sandbox/scribo/src/table_rebuild_opening.cc
index 0add582..92865c1 100644
--- a/milena/sandbox/scribo/src/table_rebuild_opening.cc
+++ b/milena/sandbox/scribo/src/table_rebuild_opening.cc
@@ -71,7 +71,7 @@ int main(int argc, char* argv[])
std::cout << "ncells (including background) = " << ncells << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(), tables, ncells),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), tables, ncells),
scribo::make::debug_filename("table_cells.ppm"));
io::pgm::save(tables, scribo::make::debug_filename("table_cells.pgm"));
diff --git a/milena/sandbox/scribo/src/table_rebuild_rank.cc b/milena/sandbox/scribo/src/table_rebuild_rank.cc
index 1ed8ddd..53a4718 100644
--- a/milena/sandbox/scribo/src/table_rebuild_rank.cc
+++ b/milena/sandbox/scribo/src/table_rebuild_rank.cc
@@ -73,7 +73,7 @@ int main(int argc, char* argv[])
std::cout << "ncells (including background) = " << ncells << std::endl;
- image2d<value::rgb8> table_color = mln::debug::colorize(value::rgb8(), tables, ncells);
+ image2d<value::rgb8> table_color = mln::labeling::colorize(value::rgb8(), tables, ncells);
value::label_8 bg = level::compute(accu::maj_h<value::label_8>(), tables);
diff --git a/milena/sandbox/scribo/table/internal/repair_lines.hh b/milena/sandbox/scribo/table/internal/repair_lines.hh
index cf21564..017737c 100644
--- a/milena/sandbox/scribo/table/internal/repair_lines.hh
+++ b/milena/sandbox/scribo/table/internal/repair_lines.hh
@@ -45,7 +45,7 @@
# include <mln/win/line.hh>
# include <mln/pw/all.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/value/rgb8.hh>
# include <mln/value/label_16.hh>
# include <scribo/make/debug_filename.hh>
diff --git a/milena/sandbox/theo/color/filter_blen_rgb_edges.cc b/milena/sandbox/theo/color/filter_blen_rgb_edges.cc
index d66bd9d..3d91a0a 100644
--- a/milena/sandbox/theo/color/filter_blen_rgb_edges.cc
+++ b/milena/sandbox/theo/color/filter_blen_rgb_edges.cc
@@ -18,7 +18,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/morpho/dilation.hh>
#include <mln/morpho/erosion.hh>
@@ -333,7 +333,7 @@ int main(int argc, char* argv[])
w_all);
- io::ppm::save(debug::colorize(rgb8(),
+ io::ppm::save(labeling::colorize(rgb8(),
w_all,
nbasins),
"temp_w_all.ppm");
@@ -344,7 +344,7 @@ int main(int argc, char* argv[])
image2d<L> out_w = full2image(w_all);
-// io::ppm::save(debug::colorize(rgb8(),
+// io::ppm::save(labeling::colorize(rgb8(),
// out_w,
// nbasins),
// argv[4]);
--
1.6.1.2
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix missing updates about debug colorize.
* mln/debug/all.hh,
* tests/morpho/meyer_wst_long.cc:
Fix missing updates about debug colorize.
* mln/registration/icp.hh: Likewise; unused so remove.
mln/debug/all.hh | 8 ++++----
mln/registration/icp.hh | 1 -
tests/morpho/meyer_wst_long.cc | 7 ++++---
3 files changed, 8 insertions(+), 8 deletions(-)
Index: mln/debug/all.hh
--- mln/debug/all.hh (revision 3776)
+++ mln/debug/all.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -40,14 +40,14 @@
/// Namespace of routines that help to debug.
namespace debug
{
+
/// Implementation namespace of debug namespace.
namespace impl {}
- }
}
+}
-# include <mln/debug/colorize.hh>
# include <mln/debug/format.hh>
# include <mln/debug/draw_graph.hh>
# include <mln/debug/histo.hh>
Index: mln/registration/icp.hh
--- mln/registration/icp.hh (revision 3776)
+++ mln/registration/icp.hh (working copy)
@@ -62,7 +62,6 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
-# include <mln/debug/colorize.hh>
# include <mln/debug/histo.hh>
# include <mln/accu/histo.hh>
Index: tests/morpho/meyer_wst_long.cc
--- tests/morpho/meyer_wst_long.cc (revision 3776)
+++ tests/morpho/meyer_wst_long.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -50,7 +51,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include "tests/data.hh"
@@ -73,5 +74,5 @@
image2d<L> ws = morpho::meyer_wst(clo, c4(), nbasins);
// Save the image in color.
- io::ppm::save(debug::colorize(value::rgb8(), ws, nbasins), "out.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), ws, nbasins), "out.ppm");
}
1
0
* mln/debug/all.hh,
* tests/morpho/meyer_wst_long.cc:
Fix missing updates about debug colorize.
* mln/registration/icp.hh: Likewise; unused so remove.
---
milena/ChangeLog | 9 +++++++++
milena/mln/debug/all.hh | 8 ++++----
milena/mln/registration/icp.hh | 1 -
milena/tests/morpho/meyer_wst_long.cc | 7 ++++---
4 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index a68e195..f9eea0c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,14 @@
2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+ Fix missing updates about debug colorize.
+
+ * mln/debug/all.hh,
+ * tests/morpho/meyer_wst_long.cc:
+ Fix missing updates about debug colorize.
+ * mln/registration/icp.hh: Likewise; unused so remove.
+
+2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
Mix missing updates in mln::set.
* mln/set/all.hh: Update.
diff --git a/milena/mln/debug/all.hh b/milena/mln/debug/all.hh
index dd1fda8..814c95b 100644
--- a/milena/mln/debug/all.hh
+++ b/milena/mln/debug/all.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -40,14 +40,14 @@ namespace mln
/// Namespace of routines that help to debug.
namespace debug
{
+
/// Implementation namespace of debug namespace.
namespace impl {}
- }
+ }
}
-# include <mln/debug/colorize.hh>
# include <mln/debug/format.hh>
# include <mln/debug/draw_graph.hh>
# include <mln/debug/histo.hh>
diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh
index 057242f..540efba 100644
--- a/milena/mln/registration/icp.hh
+++ b/milena/mln/registration/icp.hh
@@ -62,7 +62,6 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
-# include <mln/debug/colorize.hh>
# include <mln/debug/histo.hh>
# include <mln/accu/histo.hh>
diff --git a/milena/tests/morpho/meyer_wst_long.cc b/milena/tests/morpho/meyer_wst_long.cc
index ecfe614..ba76290 100644
--- a/milena/tests/morpho/meyer_wst_long.cc
+++ b/milena/tests/morpho/meyer_wst_long.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -50,7 +51,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include "tests/data.hh"
@@ -73,5 +74,5 @@ int main()
image2d<L> ws = morpho::meyer_wst(clo, c4(), nbasins);
// Save the image in color.
- io::ppm::save(debug::colorize(value::rgb8(), ws, nbasins), "out.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), ws, nbasins), "out.ppm");
}
--
1.6.1.2
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Mix missing updates in mln::set.
* mln/set/all.hh: Update.
(todo): Remove; geom::nsites on site sets is set::card.
* tests/set/Makefile.am: Update.
mln/set/all.hh | 7 +++----
tests/set/Makefile.am | 2 ++
2 files changed, 5 insertions(+), 4 deletions(-)
Index: mln/set/all.hh
--- mln/set/all.hh (revision 3775)
+++ mln/set/all.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -32,8 +32,6 @@
/// \file mln/set/all.hh
///
/// File that includes all set-related routines.
-///
-/// \todo Move geom::sites here (set::nsites).
namespace mln
{
@@ -46,6 +44,7 @@
# include <mln/set/card.hh>
# include <mln/set/compute.hh>
+# include <mln/set/compute_with_weights.hh>
# include <mln/set/diff.hh>
# include <mln/set/inter.hh>
# include <mln/set/get.hh>
Index: tests/set/Makefile.am
--- tests/set/Makefile.am (revision 3775)
+++ tests/set/Makefile.am (working copy)
@@ -5,6 +5,7 @@
check_PROGRAMS = \
card \
compute \
+ compute_with_weights \
diff \
inter \
sym_diff \
@@ -13,6 +14,7 @@
card_SOURCES = card.cc
compute_SOURCES = compute.cc
+compute_with_weights_SOURCES = compute_with_weights.cc
diff_SOURCES = diff.cc
inter_SOURCES = inter.cc
sym_diff_SOURCES = sym_diff.cc
1
0
* mln/set/all.hh: Update.
(todo): Remove; geom::nsites on site sets is set::card.
* tests/set/Makefile.am: Update.
---
milena/ChangeLog | 8 ++++++++
milena/mln/set/all.hh | 7 +++----
milena/tests/set/Makefile.am | 2 ++
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index d717702..a68e195 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,13 @@
2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+ Mix missing updates in mln::set.
+
+ * mln/set/all.hh: Update.
+ (todo): Remove; geom::nsites on site sets is set::card.
+ * tests/set/Makefile.am: Update.
+
+2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
Add 'set compute accumulator with weights'.
* mln/core/internal/site_iterator_base.hh
diff --git a/milena/mln/set/all.hh b/milena/mln/set/all.hh
index 9745e25..d0598a2 100644
--- a/milena/mln/set/all.hh
+++ b/milena/mln/set/all.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -32,8 +32,6 @@
/// \file mln/set/all.hh
///
/// File that includes all set-related routines.
-///
-/// \todo Move geom::sites here (set::nsites).
namespace mln
{
@@ -46,6 +44,7 @@ namespace mln
# include <mln/set/card.hh>
# include <mln/set/compute.hh>
+# include <mln/set/compute_with_weights.hh>
# include <mln/set/diff.hh>
# include <mln/set/inter.hh>
# include <mln/set/get.hh>
diff --git a/milena/tests/set/Makefile.am b/milena/tests/set/Makefile.am
index 5be3d5e..fc936de 100644
--- a/milena/tests/set/Makefile.am
+++ b/milena/tests/set/Makefile.am
@@ -5,6 +5,7 @@ include $(top_srcdir)/milena/tests/tests.mk
check_PROGRAMS = \
card \
compute \
+ compute_with_weights \
diff \
inter \
sym_diff \
@@ -13,6 +14,7 @@ check_PROGRAMS = \
card_SOURCES = card.cc
compute_SOURCES = compute.cc
+compute_with_weights_SOURCES = compute_with_weights.cc
diff_SOURCES = diff.cc
inter_SOURCES = inter.cc
sym_diff_SOURCES = sym_diff.cc
--
1.6.1.2
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Add 'set compute accumulator with weights'.
* mln/core/internal/site_iterator_base.hh
(operator): Remove conversion; already present (inherited).
Add a commentary about that.
* mln/set/compute.hh: Copy to...
* mln/set/compute_with_weights.hh: ...this new file.
Modify.
* mln/labeling/compute.hh: .
* tests/set/compute.cc: Fix copyright.
* tests/set/compute_with_weights.cc: New.
mln/core/internal/site_iterator_base.hh | 24 +--
mln/labeling/compute.hh | 34 ++---
mln/set/compute.hh | 69 ++++++++--
mln/set/compute_with_weights.hh | 206 ++++++++++++++++++++++++++------
tests/set/compute.cc | 3
tests/set/compute_with_weights.cc | 51 ++++++-
6 files changed, 297 insertions(+), 90 deletions(-)
Index: mln/core/internal/site_iterator_base.hh
--- mln/core/internal/site_iterator_base.hh (revision 3774)
+++ mln/core/internal/site_iterator_base.hh (working copy)
@@ -68,14 +68,15 @@
/// Return the site it points to (as a Site_Proxy).
const mln_site(S)& to_site() const;
- /// Conversion towards the site it designates (as a Site_Proxy).
- ///
- /// \warning This is a final method; iterator classes should not
- /// re-defined this method.
- ///
- /// \pre The iterator is valid.
- ///
- operator mln_site(S)() const;
+
+ // Technical note:
+ //
+ // A conversion operator towards the site it designates is
+ // not required since it is inherited from 'proxy_impl'.
+ // Defining '::operator mln_site(S)() const' here can lead to
+ // ambiguities in very special cases since we inherit a couple
+ // of conversions (const and non-const)
+
/// Give the subject (required by the Proxy interface).
const mln_psite(S)& subj_();
@@ -107,13 +108,6 @@
template <typename S, typename E>
inline
- site_iterator_base<S, E>::operator mln_site(S)() const
- {
- return this->to_site();
- }
-
- template <typename S, typename E>
- inline
const mln_site(S)&
site_iterator_base<S, E>::to_site() const
{
Index: mln/set/compute_with_weights.hh
--- mln/set/compute_with_weights.hh (revision 3772)
+++ mln/set/compute_with_weights.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,18 +26,20 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_SET_COMPUTE_HH
-# define MLN_SET_COMPUTE_HH
+#ifndef MLN_SET_COMPUTE_WITH_WEIGHTS_HH
+# define MLN_SET_COMPUTE_WITH_WEIGHTS_HH
-/// \file mln/set/compute.hh
+/// \file mln/set/compute_with_weights.hh
///
-/// Compute an accumulator on a site set or a binary image.
+/// Compute an accumulator on a site set described by an image.
///
-/// \todo Add a version with a binary image as input.
+/// \todo Add a meta version for the labeling variation.
# include <mln/core/concept/meta_accumulator.hh>
# include <mln/core/concept/image.hh>
# include <mln/core/concept/site_set.hh>
+# include <mln/util/array.hh>
+# include <mln/convert/from_to.hh>
namespace mln
@@ -45,64 +48,201 @@
namespace set
{
- /// Compute an accumulator onto the sites of a site set.
+ /// Compute an accumulator on a site set described by an image.
///
/// \param[in] a An accumulator.
- /// \param[in] s A site set.
+ /// \param[in] w An image of weights (a site -> a weight).
/// \return The accumulator result.
- ///
- template <typename A, typename S>
+ //
+ template <typename A, typename I>
mln_result(A)
- compute(const Accumulator<A>& a, const Site_Set<S>& s);
+ compute_with_weights(const Accumulator<A>& a, const Image<I>& w);
+
+ template <typename A, typename I, typename L>
+ util::array<mln_result(A)>
+ compute_with_weights(const Accumulator<A>& a,
+ const Image<I>& w,
+ const Image<L>& label,
+ const mln_value(L)& nlabels);
- /// Compute an accumulator onto the sites of a site set.
+
+ /// Compute an accumulator on a site set described by an image.
///
/// \param[in] a A meta-accumulator.
/// \param[in] s A site set.
// \return The accumulator result.
///
- template <typename A, typename S>
- mln_accu_with(A, mln_site(S))::result
- compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s);
+ template <typename A, typename I>
+ mln_accu_with(A, mln_site(I))::result
+ compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w);
# ifndef MLN_INCLUDE_ONLY
- template <typename A, typename S>
+
+ // Tests.
+
+
+ namespace internal
+ {
+
+ template <typename A, typename I, typename L>
+ void
+ compute_with_weights_tests(const Accumulator<A>& a_,
+ const Image<I>& w_,
+ const Image<L>& label_)
+ {
+ const A& a = exact(a_);
+ const I& w = exact(w_);
+ const L& label = exact(label_);
+
+ mln_precondition(w.is_valid());
+ mln_precondition(label.is_valid());
+ mln_precondition(w.domain() <= label.domain());
+
+ (void) a_;
+ (void) w_;
+ (void) label_;
+ }
+
+ } // end of namespace mln::internal
+
+
+
+ // Implementations.
+
+
+ namespace impl
+ {
+
+ namespace generic
+ {
+
+ template <typename A, typename I>
inline
mln_result(A)
- compute(const Accumulator<A>& a_, const Site_Set<S>& s_)
+ compute_with_weights(const Accumulator<A>& a_, const Image<I>& w_)
{
- trace::entering("set::compute");
+ trace::entering("set::impl::generic::compute_with_weights");
+
+ mlc_converts_to(mln_site(I), mln_argument(A))::check();
+ mlc_converts_to(mln_value(I), unsigned)::check();
A a = exact(a_);
- const S& s = exact(s_);
+ const I& w = exact(w_);
- mln_piter(S) p(s);
+ a.init();
+ mln_piter(I) p(w.domain());
for_all(p)
- a.take(p);
+ a.take_n_times(w(p), p);
- trace::exiting("set::compute");
+ trace::exiting("set::impl::generic::compute_with_weights");
return a.to_result();
}
- template <typename A, typename S>
- mln_accu_with(A, mln_site(S))::result
- compute(const Meta_Accumulator<A>& a_, const Site_Set<S>& s_)
+ template <typename A, typename I, typename L>
+ util::array<mln_result(A)>
+ compute_with_weights(const Accumulator<A>& a_,
+ const Image<I>& w_,
+ const Image<L>& label_,
+ const mln_value(L)& nlabels)
{
- trace::entering("set::compute");
+ trace::entering("set::impl::generic::compute_with_weights");
- mln_accu_with(A, mln_site(S)) a = accu::unmeta(exact(a_), mln_site(S)());
- const S& s = exact(s_);
+ mlc_equal(mln_site(I), mln_site(L))::check();
+ mlc_converts_to(mln_site(I), mln_argument(A))::check();
+ mlc_converts_to(mln_value(I), unsigned)::check();
- mln_piter(S) p(s);
+ A a = exact(a_);
+ const I& w = exact(w_);
+ const L& label = exact(label_);
+
+ internal::compute_with_weights_tests(a, w, label);
+
+ util::array<A> accus(static_cast<unsigned>(nlabels) + 1, a);
+
+ mln_piter(I) p(w.domain());
for_all(p)
- a.take(p);
+ accus[label(p)].take_n_times(w(p), p);
- trace::exiting("set::compute");
- return a.to_result();
+ util::array<mln_result(A)> r;
+ convert::from_to(accus, r);
+
+ trace::exiting("set::impl::generic::compute_with_weights");
+ return r;
+ }
+
+ } // end of namespace mln::set::impl::generic
+
+ } // end of namespace mln::set::impl
+
+
+
+ // Facades.
+
+
+ template <typename A, typename I>
+ inline
+ mln_result(A)
+ compute_with_weights(const Accumulator<A>& a, const Image<I>& w)
+ {
+ trace::entering("set::compute_with_weights");
+
+ mlc_converts_to(mln_site(I), mln_argument(A))::check();
+ mlc_converts_to(mln_value(I), unsigned)::check();
+ mln_precondition(exact(w).is_valid());
+
+ mln_result(A) r = impl::generic::compute_with_weights(a, w);
+
+ trace::exiting("set::compute_with_weights");
+ return r;
+ }
+
+
+ template <typename A, typename I, typename L>
+ util::array<mln_result(A)>
+ compute_with_weights(const Accumulator<A>& a,
+ const Image<I>& w,
+ const Image<L>& label,
+ const mln_value(L)& nlabels)
+ {
+ trace::entering("set::compute_with_weights");
+
+ mlc_equal(mln_site(I), mln_site(L))::check();
+ mlc_converts_to(mln_site(I), mln_argument(A))::check();
+ mlc_converts_to(mln_value(I), unsigned)::check();
+
+ internal::compute_with_weights_tests(a, w, label);
+
+ util::array<mln_result(A)> r;
+ r = impl::generic::compute_with_weights(a, w, label, nlabels);
+
+ trace::exiting("set::compute_with_weights");
+ return r;
+ }
+
+
+ template <typename A, typename I>
+ inline
+ mln_accu_with(A, mln_site(I))::result
+ compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w)
+ {
+ trace::entering("set::compute_with_weights");
+
+ mlc_converts_to(mln_value(I), unsigned)::check();
+
+ mln_precondition(exact(w).is_valid());
+
+ typedef mln_site(I) P;
+ typedef mln_accu_with(A, P) A_;
+ A_ a_ = accu::unmeta(exact(a), P());
+
+ mln_result(A_) r = impl::generic::compute_with_weights(a_, w);
+
+ trace::exiting("set::compute_with_weights");
+ return r;
}
# endif // ! MLN_INCLUDE_ONLY
@@ -112,4 +252,4 @@
} // end of namespace mln
-#endif // ! MLN_SET_COMPUTE_HH
+#endif // ! MLN_SET_COMPUTE_WITH_WEIGHTS_HH
Property changes on: mln/set/compute_with_weights.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/set/compute.hh
--- mln/set/compute.hh (revision 3774)
+++ mln/set/compute.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -30,9 +31,7 @@
/// \file mln/set/compute.hh
///
-/// Compute an accumulator on a site set or a binary image.
-///
-/// \todo Add a version with a binary image as input.
+/// Compute an accumulator on a site set.
# include <mln/core/concept/meta_accumulator.hh>
# include <mln/core/concept/image.hh>
@@ -45,23 +44,23 @@
namespace set
{
- /// Compute an accumulator onto the sites of a site set.
+ /// Compute an accumulator onto a site set.
///
/// \param[in] a An accumulator.
/// \param[in] s A site set.
/// \return The accumulator result.
- ///
+ //
template <typename A, typename S>
mln_result(A)
compute(const Accumulator<A>& a, const Site_Set<S>& s);
- /// Compute an accumulator onto the sites of a site set.
+ /// Compute an accumulator onto a site set.
///
/// \param[in] a A meta-accumulator.
/// \param[in] s A site set.
// \return The accumulator result.
- ///
+ //
template <typename A, typename S>
mln_accu_with(A, mln_site(S))::result
compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s);
@@ -70,39 +69,75 @@
# ifndef MLN_INCLUDE_ONLY
+
+ // Implementation.
+
+
+ namespace impl
+ {
+
+ namespace generic
+ {
+
template <typename A, typename S>
inline
mln_result(A)
compute(const Accumulator<A>& a_, const Site_Set<S>& s_)
{
- trace::entering("set::compute");
+ trace::entering("set::impl::generic::compute");
+
+ mlc_converts_to(mln_site(S), mln_argument(A))::check();
A a = exact(a_);
const S& s = exact(s_);
+ a.init();
mln_piter(S) p(s);
for_all(p)
a.take(p);
- trace::exiting("set::compute");
+ trace::exiting("set::impl::generic::compute");
return a.to_result();
}
+ } // end of namespace mln::set::impl::generic
+
+ } // end of namespace mln::set::impl
+
+
+
+ // Facades.
+
+
+ template <typename A, typename S>
+ inline
+ mln_result(A)
+ compute(const Accumulator<A>& a, const Site_Set<S>& s)
+ {
+ trace::entering("set::compute");
+
+ mlc_converts_to(mln_site(S), mln_argument(A))::check();
+
+ mln_result(A) r = impl::generic::compute(a, s);
+
+ trace::exiting("set::compute");
+ return r;
+ }
+
+
template <typename A, typename S>
mln_accu_with(A, mln_site(S))::result
- compute(const Meta_Accumulator<A>& a_, const Site_Set<S>& s_)
+ compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s)
{
trace::entering("set::compute");
- mln_accu_with(A, mln_site(S)) a = accu::unmeta(exact(a_), mln_site(S)());
- const S& s = exact(s_);
+ typedef mln_accu_with(A, mln_site(S)) A_;
+ A_ a_ = accu::unmeta(exact(a), mln_site(S)());
- mln_piter(S) p(s);
- for_all(p)
- a.take(p);
+ mln_result(A_) r = impl::generic::compute(a_, s);
trace::exiting("set::compute");
- return a.to_result();
+ return r;
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/labeling/compute.hh
--- mln/labeling/compute.hh (revision 3774)
+++ mln/labeling/compute.hh (working copy)
@@ -35,6 +35,9 @@
/// of an image.
///
/// \todo write fastest version.
+///
+/// \todo Move versions without 'input' as arg into mln::set
+/// and change 'input' from Image to Site_Set!
# include <mln/core/concept/image.hh>
# include <mln/core/concept/accumulator.hh>
@@ -55,10 +58,9 @@
/// \param[in] a An accumulator.
/// \param[in] input The input image.
/// \param[in] label The labeled image.
- /// \param[in] input The number of component in \p label.
- /// \return A mln::p_array of accumulator result. One result per component in
- /// \p label.
- ///
+ /// \param[in] nlabels The number of labels in \p label.
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename I, typename L>
util::array<mln_result(A)>
compute(const Accumulator<A>& a,
@@ -66,16 +68,16 @@
const Image<L>& label,
const mln_value(L)& nlabels);
+
/// Compute an accumulator onto the pixel values of the image \p input.
/// for each component of the image \p label.
///
/// \param[in] a A meta-accumulator.
/// \param[in] input The input image.
/// \param[in] label The labeled image.
- /// \param[in] input The number of component in \p label.
- /// \return A mln::p_array of accumulator result. One result per component in
- /// \p label.
- ///
+ /// \param[in] nlabels The number of labels in \p label.
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename I, typename L>
util::array<mln_accu_with(A, mln_value(I))::result>
compute(const Meta_Accumulator<A>& a,
@@ -83,30 +85,30 @@
const Image<L>& label,
const mln_value(L)& nlabels);
+
/// Compute an accumulator onto the pixel sites of each component domain of
/// \p label.
///
/// \param[in] a An accumulator.
/// \param[in] label The labeled image.
- /// \param[in] input The number of component in \p label.
- /// \return A mln::p_array of accumulator result. One result per component in
- /// \p label.
- ///
+ /// \param[in] nlabels The number of labels in \p label.
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename L>
util::array<mln_result(A)>
compute(const Accumulator<A>& a,
const Image<L>& label,
const mln_value(L)& nlabels);
+
/// Compute an accumulator onto the pixel sites of each component domain of
/// \p label.
///
/// \param[in] a A meta-accumulator.
/// \param[in] label The labeled image.
- /// \param[in] input The number of component in \p label.
- /// \return A mln::p_array of accumulator result. One result per component in
- /// \p label.
- ///
+ /// \param[in] nlabels The number of labels in \p label.
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename L>
util::array<mln_accu_with(A, mln_psite(L))::result>
compute(const Meta_Accumulator<A>& a,
Index: tests/set/compute.cc
--- tests/set/compute.cc (revision 3774)
+++ tests/set/compute.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
Index: tests/set/compute_with_weights.cc
--- tests/set/compute_with_weights.cc (revision 3772)
+++ tests/set/compute_with_weights.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,20 +26,54 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/set/compute.cc
+/// \file tests/set/compute_with_weights.cc
///
-/// Tests on mln::set::compute.
+/// Tests on mln::set::compute_with_weights.
#include <mln/core/site_set/p_set.hh>
-#include <mln/core/alias/point2d.hh>
-#include <mln/accu/count.hh>
-#include <mln/set/compute.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/accu/center.hh>
+#include <mln/set/compute_with_weights.hh>
int main()
{
using namespace mln;
- p_set<point2d> s;
- mln_assertion(set::compute(accu::meta::count(), s) == 0);
+ {
+ bool vals[] = { 1, 1, 0,
+ 1, 1, 1,
+ 0, 1, 1 };
+ image2d<bool> msk = make::image2d(vals);
+ accu::center<point2d,point2d> a;
+ mln_assertion(set::compute_with_weights(a, msk) == point2d(1,1));
+ }
+
+ {
+ unsigned vals[] = { 3, 1, 0,
+ 1, 5, 1,
+ 0, 1, 3 };
+ image2d<unsigned> w = make::image2d(vals);
+ accu::center<point2d,point2d> a;
+ mln_assertion(set::compute_with_weights(a, w) == point2d(1,1));
+ }
+
+ {
+ unsigned ws[] = { 1, 5, 0,
+ 0, 5, 0,
+ 0, 5, 1 };
+ image2d<unsigned> w = make::image2d(ws);
+
+ unsigned ls[] = { 0, 1, 2,
+ 0, 1, 2,
+ 0, 1, 2 };
+ image2d<unsigned> l = make::image2d(ls);
+
+ accu::center<point2d,point2d> a;
+ util::array<point2d> p = set::compute_with_weights(a, w, l, 2);
+
+ for (unsigned l = 0; l <= 2; ++l)
+ mln_assertion(p[l] == point2d(l, l));
+ }
+
}
Property changes on: tests/set/compute_with_weights.cc
___________________________________________________________________
Added: svn:mergeinfo
1
0
* mln/core/internal/site_iterator_base.hh
(operator): Remove conversion; already present (inherited).
Add a commentary about that.
* mln/set/compute.hh: Copy to...
* mln/set/compute_with_weights.hh: ...this new file.
Modify.
* mln/labeling/compute.hh: .
* tests/set/compute.cc: Fix copyright.
* tests/set/compute_with_weights.cc: New.
---
milena/ChangeLog | 14 +
milena/mln/core/internal/site_iterator_base.hh | 24 +--
milena/mln/labeling/compute.hh | 34 ++--
milena/mln/set/compute.hh | 79 +++++--
milena/mln/set/compute_with_weights.hh | 255 ++++++++++++++++++++
milena/tests/set/compute.cc | 3 +-
.../set/{compute.cc => compute_with_weights.cc} | 51 ++++-
7 files changed, 398 insertions(+), 62 deletions(-)
create mode 100644 milena/mln/set/compute_with_weights.hh
copy milena/tests/set/{compute.cc => compute_with_weights.cc} (54%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index d8e82fc..d717702 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,17 @@
+2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Add 'set compute accumulator with weights'.
+
+ * mln/core/internal/site_iterator_base.hh
+ (operator): Remove conversion; already present (inherited).
+ Add a commentary about that.
+ * mln/set/compute.hh: Copy to...
+ * mln/set/compute_with_weights.hh: ...this new file.
+ Modify.
+ * mln/labeling/compute.hh: .
+ * tests/set/compute.cc: Fix copyright.
+ * tests/set/compute_with_weights.cc: New.
+
2009-05-07 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Fix display_edge() and float01_ constructors.
diff --git a/milena/mln/core/internal/site_iterator_base.hh b/milena/mln/core/internal/site_iterator_base.hh
index 893a9b2..15cb023 100644
--- a/milena/mln/core/internal/site_iterator_base.hh
+++ b/milena/mln/core/internal/site_iterator_base.hh
@@ -68,14 +68,15 @@ namespace mln
/// Return the site it points to (as a Site_Proxy).
const mln_site(S)& to_site() const;
- /// Conversion towards the site it designates (as a Site_Proxy).
- ///
- /// \warning This is a final method; iterator classes should not
- /// re-defined this method.
- ///
- /// \pre The iterator is valid.
- ///
- operator mln_site(S)() const;
+
+ // Technical note:
+ //
+ // A conversion operator towards the site it designates is
+ // not required since it is inherited from 'proxy_impl'.
+ // Defining '::operator mln_site(S)() const' here can lead to
+ // ambiguities in very special cases since we inherit a couple
+ // of conversions (const and non-const)
+
/// Give the subject (required by the Proxy interface).
const mln_psite(S)& subj_();
@@ -107,13 +108,6 @@ namespace mln
template <typename S, typename E>
inline
- site_iterator_base<S, E>::operator mln_site(S)() const
- {
- return this->to_site();
- }
-
- template <typename S, typename E>
- inline
const mln_site(S)&
site_iterator_base<S, E>::to_site() const
{
diff --git a/milena/mln/labeling/compute.hh b/milena/mln/labeling/compute.hh
index 3c07233..9b99c2f 100644
--- a/milena/mln/labeling/compute.hh
+++ b/milena/mln/labeling/compute.hh
@@ -35,6 +35,9 @@
/// of an image.
///
/// \todo write fastest version.
+///
+/// \todo Move versions without 'input' as arg into mln::set
+/// and change 'input' from Image to Site_Set!
# include <mln/core/concept/image.hh>
# include <mln/core/concept/accumulator.hh>
@@ -55,10 +58,9 @@ namespace mln
/// \param[in] a An accumulator.
/// \param[in] input The input image.
/// \param[in] label The labeled image.
- /// \param[in] input The number of component in \p label.
- /// \return A mln::p_array of accumulator result. One result per component in
- /// \p label.
- ///
+ /// \param[in] nlabels The number of labels in \p label.
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename I, typename L>
util::array<mln_result(A)>
compute(const Accumulator<A>& a,
@@ -66,16 +68,16 @@ namespace mln
const Image<L>& label,
const mln_value(L)& nlabels);
+
/// Compute an accumulator onto the pixel values of the image \p input.
/// for each component of the image \p label.
///
/// \param[in] a A meta-accumulator.
/// \param[in] input The input image.
/// \param[in] label The labeled image.
- /// \param[in] input The number of component in \p label.
- /// \return A mln::p_array of accumulator result. One result per component in
- /// \p label.
- ///
+ /// \param[in] nlabels The number of labels in \p label.
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename I, typename L>
util::array<mln_accu_with(A, mln_value(I))::result>
compute(const Meta_Accumulator<A>& a,
@@ -83,30 +85,30 @@ namespace mln
const Image<L>& label,
const mln_value(L)& nlabels);
+
/// Compute an accumulator onto the pixel sites of each component domain of
/// \p label.
///
/// \param[in] a An accumulator.
/// \param[in] label The labeled image.
- /// \param[in] input The number of component in \p label.
- /// \return A mln::p_array of accumulator result. One result per component in
- /// \p label.
- ///
+ /// \param[in] nlabels The number of labels in \p label.
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename L>
util::array<mln_result(A)>
compute(const Accumulator<A>& a,
const Image<L>& label,
const mln_value(L)& nlabels);
+
/// Compute an accumulator onto the pixel sites of each component domain of
/// \p label.
///
/// \param[in] a A meta-accumulator.
/// \param[in] label The labeled image.
- /// \param[in] input The number of component in \p label.
- /// \return A mln::p_array of accumulator result. One result per component in
- /// \p label.
- ///
+ /// \param[in] nlabels The number of labels in \p label.
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename L>
util::array<mln_accu_with(A, mln_psite(L))::result>
compute(const Meta_Accumulator<A>& a,
diff --git a/milena/mln/set/compute.hh b/milena/mln/set/compute.hh
index 0942a4f..6dbc9a1 100644
--- a/milena/mln/set/compute.hh
+++ b/milena/mln/set/compute.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -30,9 +31,7 @@
/// \file mln/set/compute.hh
///
-/// Compute an accumulator on a site set or a binary image.
-///
-/// \todo Add a version with a binary image as input.
+/// Compute an accumulator on a site set.
# include <mln/core/concept/meta_accumulator.hh>
# include <mln/core/concept/image.hh>
@@ -45,23 +44,23 @@ namespace mln
namespace set
{
- /// Compute an accumulator onto the sites of a site set.
+ /// Compute an accumulator onto a site set.
///
/// \param[in] a An accumulator.
/// \param[in] s A site set.
/// \return The accumulator result.
- ///
+ //
template <typename A, typename S>
mln_result(A)
compute(const Accumulator<A>& a, const Site_Set<S>& s);
- /// Compute an accumulator onto the sites of a site set.
+ /// Compute an accumulator onto a site set.
///
/// \param[in] a A meta-accumulator.
/// \param[in] s A site set.
// \return The accumulator result.
- ///
+ //
template <typename A, typename S>
mln_accu_with(A, mln_site(S))::result
compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s);
@@ -70,39 +69,75 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+
+ // Implementation.
+
+
+ namespace impl
+ {
+
+ namespace generic
+ {
+
+ template <typename A, typename S>
+ inline
+ mln_result(A)
+ compute(const Accumulator<A>& a_, const Site_Set<S>& s_)
+ {
+ trace::entering("set::impl::generic::compute");
+
+ mlc_converts_to(mln_site(S), mln_argument(A))::check();
+
+ A a = exact(a_);
+ const S& s = exact(s_);
+
+ a.init();
+ mln_piter(S) p(s);
+ for_all(p)
+ a.take(p);
+
+ trace::exiting("set::impl::generic::compute");
+ return a.to_result();
+ }
+
+ } // end of namespace mln::set::impl::generic
+
+ } // end of namespace mln::set::impl
+
+
+
+ // Facades.
+
+
template <typename A, typename S>
inline
mln_result(A)
- compute(const Accumulator<A>& a_, const Site_Set<S>& s_)
+ compute(const Accumulator<A>& a, const Site_Set<S>& s)
{
trace::entering("set::compute");
- A a = exact(a_);
- const S& s = exact(s_);
+ mlc_converts_to(mln_site(S), mln_argument(A))::check();
- mln_piter(S) p(s);
- for_all(p)
- a.take(p);
+ mln_result(A) r = impl::generic::compute(a, s);
trace::exiting("set::compute");
- return a.to_result();
+ return r;
}
+
template <typename A, typename S>
mln_accu_with(A, mln_site(S))::result
- compute(const Meta_Accumulator<A>& a_, const Site_Set<S>& s_)
+ compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s)
{
trace::entering("set::compute");
- mln_accu_with(A, mln_site(S)) a = accu::unmeta(exact(a_), mln_site(S)());
- const S& s = exact(s_);
+ typedef mln_accu_with(A, mln_site(S)) A_;
+ A_ a_ = accu::unmeta(exact(a), mln_site(S)());
- mln_piter(S) p(s);
- for_all(p)
- a.take(p);
+ mln_result(A_) r = impl::generic::compute(a_, s);
trace::exiting("set::compute");
- return a.to_result();
+ return r;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/set/compute_with_weights.hh b/milena/mln/set/compute_with_weights.hh
new file mode 100644
index 0000000..1a4107e
--- /dev/null
+++ b/milena/mln/set/compute_with_weights.hh
@@ -0,0 +1,255 @@
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_SET_COMPUTE_WITH_WEIGHTS_HH
+# define MLN_SET_COMPUTE_WITH_WEIGHTS_HH
+
+/// \file mln/set/compute_with_weights.hh
+///
+/// Compute an accumulator on a site set described by an image.
+///
+/// \todo Add a meta version for the labeling variation.
+
+# include <mln/core/concept/meta_accumulator.hh>
+# include <mln/core/concept/image.hh>
+# include <mln/core/concept/site_set.hh>
+# include <mln/util/array.hh>
+# include <mln/convert/from_to.hh>
+
+
+namespace mln
+{
+
+ namespace set
+ {
+
+ /// Compute an accumulator on a site set described by an image.
+ ///
+ /// \param[in] a An accumulator.
+ /// \param[in] w An image of weights (a site -> a weight).
+ /// \return The accumulator result.
+ //
+ template <typename A, typename I>
+ mln_result(A)
+ compute_with_weights(const Accumulator<A>& a, const Image<I>& w);
+
+
+ template <typename A, typename I, typename L>
+ util::array<mln_result(A)>
+ compute_with_weights(const Accumulator<A>& a,
+ const Image<I>& w,
+ const Image<L>& label,
+ const mln_value(L)& nlabels);
+
+
+ /// Compute an accumulator on a site set described by an image.
+ ///
+ /// \param[in] a A meta-accumulator.
+ /// \param[in] s A site set.
+ // \return The accumulator result.
+ ///
+ template <typename A, typename I>
+ mln_accu_with(A, mln_site(I))::result
+ compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w);
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ // Tests.
+
+
+ namespace internal
+ {
+
+ template <typename A, typename I, typename L>
+ void
+ compute_with_weights_tests(const Accumulator<A>& a_,
+ const Image<I>& w_,
+ const Image<L>& label_)
+ {
+ const A& a = exact(a_);
+ const I& w = exact(w_);
+ const L& label = exact(label_);
+
+ mln_precondition(w.is_valid());
+ mln_precondition(label.is_valid());
+ mln_precondition(w.domain() <= label.domain());
+
+ (void) a_;
+ (void) w_;
+ (void) label_;
+ }
+
+ } // end of namespace mln::internal
+
+
+
+ // Implementations.
+
+
+ namespace impl
+ {
+
+ namespace generic
+ {
+
+ template <typename A, typename I>
+ inline
+ mln_result(A)
+ compute_with_weights(const Accumulator<A>& a_, const Image<I>& w_)
+ {
+ trace::entering("set::impl::generic::compute_with_weights");
+
+ mlc_converts_to(mln_site(I), mln_argument(A))::check();
+ mlc_converts_to(mln_value(I), unsigned)::check();
+
+ A a = exact(a_);
+ const I& w = exact(w_);
+
+ a.init();
+ mln_piter(I) p(w.domain());
+ for_all(p)
+ a.take_n_times(w(p), p);
+
+ trace::exiting("set::impl::generic::compute_with_weights");
+ return a.to_result();
+ }
+
+ template <typename A, typename I, typename L>
+ util::array<mln_result(A)>
+ compute_with_weights(const Accumulator<A>& a_,
+ const Image<I>& w_,
+ const Image<L>& label_,
+ const mln_value(L)& nlabels)
+ {
+ trace::entering("set::impl::generic::compute_with_weights");
+
+ mlc_equal(mln_site(I), mln_site(L))::check();
+ mlc_converts_to(mln_site(I), mln_argument(A))::check();
+ mlc_converts_to(mln_value(I), unsigned)::check();
+
+ A a = exact(a_);
+ const I& w = exact(w_);
+ const L& label = exact(label_);
+
+ internal::compute_with_weights_tests(a, w, label);
+
+ util::array<A> accus(static_cast<unsigned>(nlabels) + 1, a);
+
+ mln_piter(I) p(w.domain());
+ for_all(p)
+ accus[label(p)].take_n_times(w(p), p);
+
+ util::array<mln_result(A)> r;
+ convert::from_to(accus, r);
+
+ trace::exiting("set::impl::generic::compute_with_weights");
+ return r;
+ }
+
+ } // end of namespace mln::set::impl::generic
+
+ } // end of namespace mln::set::impl
+
+
+
+ // Facades.
+
+
+ template <typename A, typename I>
+ inline
+ mln_result(A)
+ compute_with_weights(const Accumulator<A>& a, const Image<I>& w)
+ {
+ trace::entering("set::compute_with_weights");
+
+ mlc_converts_to(mln_site(I), mln_argument(A))::check();
+ mlc_converts_to(mln_value(I), unsigned)::check();
+ mln_precondition(exact(w).is_valid());
+
+ mln_result(A) r = impl::generic::compute_with_weights(a, w);
+
+ trace::exiting("set::compute_with_weights");
+ return r;
+ }
+
+
+ template <typename A, typename I, typename L>
+ util::array<mln_result(A)>
+ compute_with_weights(const Accumulator<A>& a,
+ const Image<I>& w,
+ const Image<L>& label,
+ const mln_value(L)& nlabels)
+ {
+ trace::entering("set::compute_with_weights");
+
+ mlc_equal(mln_site(I), mln_site(L))::check();
+ mlc_converts_to(mln_site(I), mln_argument(A))::check();
+ mlc_converts_to(mln_value(I), unsigned)::check();
+
+ internal::compute_with_weights_tests(a, w, label);
+
+ util::array<mln_result(A)> r;
+ r = impl::generic::compute_with_weights(a, w, label, nlabels);
+
+ trace::exiting("set::compute_with_weights");
+ return r;
+ }
+
+
+ template <typename A, typename I>
+ inline
+ mln_accu_with(A, mln_site(I))::result
+ compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w)
+ {
+ trace::entering("set::compute_with_weights");
+
+ mlc_converts_to(mln_value(I), unsigned)::check();
+
+ mln_precondition(exact(w).is_valid());
+
+ typedef mln_site(I) P;
+ typedef mln_accu_with(A, P) A_;
+ A_ a_ = accu::unmeta(exact(a), P());
+
+ mln_result(A_) r = impl::generic::compute_with_weights(a_, w);
+
+ trace::exiting("set::compute_with_weights");
+ return r;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::set
+
+} // end of namespace mln
+
+
+#endif // ! MLN_SET_COMPUTE_WITH_WEIGHTS_HH
diff --git a/milena/tests/set/compute.cc b/milena/tests/set/compute.cc
index 64497b1..fd426e8 100644
--- a/milena/tests/set/compute.cc
+++ b/milena/tests/set/compute.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
diff --git a/milena/tests/set/compute.cc b/milena/tests/set/compute_with_weights.cc
similarity index 54%
copy from milena/tests/set/compute.cc
copy to milena/tests/set/compute_with_weights.cc
index 64497b1..80548e9 100644
--- a/milena/tests/set/compute.cc
+++ b/milena/tests/set/compute_with_weights.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,20 +26,54 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/set/compute.cc
+/// \file tests/set/compute_with_weights.cc
///
-/// Tests on mln::set::compute.
+/// Tests on mln::set::compute_with_weights.
#include <mln/core/site_set/p_set.hh>
-#include <mln/core/alias/point2d.hh>
-#include <mln/accu/count.hh>
-#include <mln/set/compute.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/accu/center.hh>
+#include <mln/set/compute_with_weights.hh>
int main()
{
using namespace mln;
- p_set<point2d> s;
- mln_assertion(set::compute(accu::meta::count(), s) == 0);
+ {
+ bool vals[] = { 1, 1, 0,
+ 1, 1, 1,
+ 0, 1, 1 };
+ image2d<bool> msk = make::image2d(vals);
+ accu::center<point2d,point2d> a;
+ mln_assertion(set::compute_with_weights(a, msk) == point2d(1,1));
+ }
+
+ {
+ unsigned vals[] = { 3, 1, 0,
+ 1, 5, 1,
+ 0, 1, 3 };
+ image2d<unsigned> w = make::image2d(vals);
+ accu::center<point2d,point2d> a;
+ mln_assertion(set::compute_with_weights(a, w) == point2d(1,1));
+ }
+
+ {
+ unsigned ws[] = { 1, 5, 0,
+ 0, 5, 0,
+ 0, 5, 1 };
+ image2d<unsigned> w = make::image2d(ws);
+
+ unsigned ls[] = { 0, 1, 2,
+ 0, 1, 2,
+ 0, 1, 2 };
+ image2d<unsigned> l = make::image2d(ls);
+
+ accu::center<point2d,point2d> a;
+ util::array<point2d> p = set::compute_with_weights(a, w, l, 2);
+
+ for (unsigned l = 0; l <= 2; ++l)
+ mln_assertion(p[l] == point2d(l, l));
+ }
+
}
--
1.6.1.2
1
0
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-05-07 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Fix display_edge() and float01_ constructors.
* doc/ref_guide/ref_guide.tex: I/O update.
* mln/value/float01_.hh: Add constructors with literals.
* mln/world/inter_pixel/display_edge.hh: Fix image bbox.
* tests/world/inter_pixel/display_edge.cc: New test for display_edge().
---
doc/ref_guide/ref_guide.tex | 2
mln/value/float01_.hh | 39 +++++++++++
mln/world/inter_pixel/display_edge.hh | 5 -
tests/world/inter_pixel/display_edge.cc | 112 ++++++++++++++++++++++++++++++++
4 files changed, 155 insertions(+), 3 deletions(-)
Index: trunk/milena/tests/world/inter_pixel/display_edge.cc
===================================================================
--- trunk/milena/tests/world/inter_pixel/display_edge.cc (revision 0)
+++ trunk/milena/tests/world/inter_pixel/display_edge.cc (revision 3774)
@@ -0,0 +1,112 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/// \file tests/world/inter_pixel/display_edge.cc
+///
+/// Tests on mln::world::inter_pixel::display_edge.
+
+
+#include <mln/core/var.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/level/compare.hh>
+#include <mln/world/inter_pixel/immerse.hh>
+#include <mln/world/inter_pixel/compute.hh>
+#include <mln/world/inter_pixel/display_edge.hh>
+
+#include <mln/world/inter_pixel/neighb2d.hh>
+#include <mln/debug/println.hh>
+
+
+
+struct d_t : mln::Function_vv2v<d_t>
+{
+ typedef int result;
+
+ int operator()(int i1, int i2) const
+ {
+ return std::abs(i2 - i1);
+ }
+}
+ d;
+
+
+
+int main()
+{
+ using namespace mln;
+
+ {
+ int vals[] = { 1 } ;
+
+ typedef image2d<int> I;
+ I ima = make::image2d(vals);
+
+ using namespace world::inter_pixel;
+ typedef image_if<I, is_pixel> Ix;
+ Ix imax = immerse(ima);
+
+ mln_VAR(g, compute(imax, d));
+ std::cout << g.unmorph_().bbox() << std::endl;
+
+ mln_VAR(out1, display_edge(g.unmorph_(), 0, 1));
+ debug::println(out1);
+ mln_VAR(out2, display_edge(g.unmorph_(), 0, 2));
+ debug::println(out2);
+ mln_VAR(out3, display_edge(g.unmorph_(), 0, 3));
+ debug::println(out3);
+ mln_VAR(out4, display_edge(g.unmorph_(), 0, 4));
+ debug::println(out4);
+ mln_VAR(out5, display_edge(g.unmorph_(), 0, 5));
+ debug::println(out5);
+ }
+
+ {
+ int vals[] = { 1, 2,
+ 3, 4 } ;
+
+ typedef image2d<int> I;
+ I ima = make::image2d(vals);
+
+ using namespace world::inter_pixel;
+ typedef image_if<I, is_pixel> Ix;
+ Ix imax = immerse(ima);
+
+ mln_VAR(g, compute(imax, d));
+ std::cout << g.unmorph_().bbox() << std::endl;
+
+ mln_VAR(out1, display_edge(g.unmorph_(), 0, 1));
+ debug::println(out1);
+ mln_VAR(out2, display_edge(g.unmorph_(), 0, 2));
+ debug::println(out2);
+ mln_VAR(out3, display_edge(g.unmorph_(), 0, 3));
+ debug::println(out3);
+ mln_VAR(out4, display_edge(g.unmorph_(), 0, 4));
+ debug::println(out4);
+ mln_VAR(out5, display_edge(g.unmorph_(), 0, 5));
+ debug::println(out5);
+ }
+}
Index: trunk/milena/doc/ref_guide/ref_guide.tex
===================================================================
--- trunk/milena/doc/ref_guide/ref_guide.tex (revision 3773)
+++ trunk/milena/doc/ref_guide/ref_guide.tex (revision 3774)
@@ -1697,7 +1697,7 @@
`Magick++-config --cppflags --cxxflags --ldflags --libs`
\end{verbatim}
- \begin{verbatim}Magick++-config\end{verbatim} will automatically fill the dependencies depending of your
+ Magick++-config will automatically fill the dependencies depending of your
installation.
\doxysection{iodcm}{GDCM}
Index: trunk/milena/mln/world/inter_pixel/display_edge.hh
===================================================================
--- trunk/milena/mln/world/inter_pixel/display_edge.hh (revision 3773)
+++ trunk/milena/mln/world/inter_pixel/display_edge.hh (revision 3774)
@@ -52,8 +52,9 @@
I display_edge(const I& ima, mln_value(I) bg, unsigned zoom)
{
box2d b = ima.bbox();
- I output(make::box2d((b.pmin()[0] / 2) * (zoom + 1) + 1, (b.pmin()[1] / 2) * (zoom + 1) + 1,
- (b.pmax()[0] / 2) * (zoom + 1) - 1, (b.pmax()[1] / 2) * (zoom + 1) - 1));
+ // FIXME: Create a empty box of size 'zoom*zoom' is ima is null.
+ I output(make::box2d((b.pmin()[0] / 2) * (zoom + 1), (b.pmin()[1] / 2) * (zoom + 1),
+ (b.pmax()[0] / 2 + 1) * (zoom + 1) - 2, (b.pmax()[1] / 2 + 1) * (zoom + 1) - 2));
data::fill(output, bg);
typedef image_if<const I, dim2::is_edge> edge_t;
edge_t edge = ima | dim2::is_edge();
Index: trunk/milena/mln/value/float01_.hh
===================================================================
--- trunk/milena/mln/value/float01_.hh (revision 3773)
+++ trunk/milena/mln/value/float01_.hh (revision 3774)
@@ -105,6 +105,13 @@
/// Constructor from a float.
float01_(float val);
+ /// \{ Constructors/assignments with literals.
+ float01_(const mln::literal::zero_t&);
+ float01_& operator=(const mln::literal::zero_t&);
+ float01_(const mln::literal::one_t&);
+ float01_& operator=(const mln::literal::one_t&);
+ /// \}
+
/// Assigment from a float.
float01_<n>& operator=(float val);
@@ -193,6 +200,38 @@
template <unsigned n>
inline
+ float01_<n>::float01_(const mln::literal::zero_t&)
+ {
+ this->v_ = 0;
+ }
+
+ template <unsigned n>
+ inline
+ float01_<n>&
+ float01_<n>::operator=(const mln::literal::zero_t&)
+ {
+ this->v_ = 0;
+ return *this;
+ }
+
+ template <unsigned n>
+ inline
+ float01_<n>::float01_(const mln::literal::one_t&)
+ {
+ this->v_ = 1;
+ }
+
+ template <unsigned n>
+ inline
+ float01_<n>&
+ float01_<n>::operator=(const mln::literal::one_t&)
+ {
+ this->v_ = 1;
+ return *this;
+ }
+
+ template <unsigned n>
+ inline
float01_<n>&
float01_<n>::operator=(float val)
{
1
0
07 May '09
* doc/ref_guide/ref_guide.tex: I/O update.
* mln/value/float01_.hh: Add constructors with literals.
* mln/world/inter_pixel/display_edge.hh: Fix image bbox.
* tests/world/inter_pixel/display_edge.cc: New test for display_edge().
---
milena/ChangeLog | 8 ++
milena/doc/ref_guide/ref_guide.tex | 2 +-
milena/mln/value/float01_.hh | 39 ++++++++
milena/mln/world/inter_pixel/display_edge.hh | 5 +-
milena/tests/world/inter_pixel/display_edge.cc | 112 ++++++++++++++++++++++++
5 files changed, 163 insertions(+), 3 deletions(-)
create mode 100644 milena/tests/world/inter_pixel/display_edge.cc
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 702a0dc..d8e82fc 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-07 Fabien Freling <fabien.freling(a)lrde.epita.fr>
+
+ Fix display_edge() and float01_ constructors.
+ * doc/ref_guide/ref_guide.tex: I/O update.
+ * mln/value/float01_.hh: Add constructors with literals.
+ * mln/world/inter_pixel/display_edge.hh: Fix image bbox.
+ * tests/world/inter_pixel/display_edge.cc: New test for display_edge().
+
2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix fun stat mahalanobis.
diff --git a/milena/doc/ref_guide/ref_guide.tex b/milena/doc/ref_guide/ref_guide.tex
index 1464207..a0d6c6b 100644
--- a/milena/doc/ref_guide/ref_guide.tex
+++ b/milena/doc/ref_guide/ref_guide.tex
@@ -1697,7 +1697,7 @@ You can extend the range of supported files by installing third-parties librarie
`Magick++-config --cppflags --cxxflags --ldflags --libs`
\end{verbatim}
- \begin{verbatim}Magick++-config\end{verbatim} will automatically fill the dependencies depending of your
+ Magick++-config will automatically fill the dependencies depending of your
installation.
\doxysection{iodcm}{GDCM}
diff --git a/milena/mln/value/float01_.hh b/milena/mln/value/float01_.hh
index 4d9d34e..a466f40 100644
--- a/milena/mln/value/float01_.hh
+++ b/milena/mln/value/float01_.hh
@@ -105,6 +105,13 @@ namespace mln
/// Constructor from a float.
float01_(float val);
+ /// \{ Constructors/assignments with literals.
+ float01_(const mln::literal::zero_t&);
+ float01_& operator=(const mln::literal::zero_t&);
+ float01_(const mln::literal::one_t&);
+ float01_& operator=(const mln::literal::one_t&);
+ /// \}
+
/// Assigment from a float.
float01_<n>& operator=(float val);
@@ -193,6 +200,38 @@ namespace mln
template <unsigned n>
inline
+ float01_<n>::float01_(const mln::literal::zero_t&)
+ {
+ this->v_ = 0;
+ }
+
+ template <unsigned n>
+ inline
+ float01_<n>&
+ float01_<n>::operator=(const mln::literal::zero_t&)
+ {
+ this->v_ = 0;
+ return *this;
+ }
+
+ template <unsigned n>
+ inline
+ float01_<n>::float01_(const mln::literal::one_t&)
+ {
+ this->v_ = 1;
+ }
+
+ template <unsigned n>
+ inline
+ float01_<n>&
+ float01_<n>::operator=(const mln::literal::one_t&)
+ {
+ this->v_ = 1;
+ return *this;
+ }
+
+ template <unsigned n>
+ inline
float01_<n>&
float01_<n>::operator=(float val)
{
diff --git a/milena/mln/world/inter_pixel/display_edge.hh b/milena/mln/world/inter_pixel/display_edge.hh
index 9cfa046..b3c21f2 100644
--- a/milena/mln/world/inter_pixel/display_edge.hh
+++ b/milena/mln/world/inter_pixel/display_edge.hh
@@ -52,8 +52,9 @@ namespace mln
I display_edge(const I& ima, mln_value(I) bg, unsigned zoom)
{
box2d b = ima.bbox();
- I output(make::box2d((b.pmin()[0] / 2) * (zoom + 1) + 1, (b.pmin()[1] / 2) * (zoom + 1) + 1,
- (b.pmax()[0] / 2) * (zoom + 1) - 1, (b.pmax()[1] / 2) * (zoom + 1) - 1));
+ // FIXME: Create a empty box of size 'zoom*zoom' is ima is null.
+ I output(make::box2d((b.pmin()[0] / 2) * (zoom + 1), (b.pmin()[1] / 2) * (zoom + 1),
+ (b.pmax()[0] / 2 + 1) * (zoom + 1) - 2, (b.pmax()[1] / 2 + 1) * (zoom + 1) - 2));
data::fill(output, bg);
typedef image_if<const I, dim2::is_edge> edge_t;
edge_t edge = ima | dim2::is_edge();
diff --git a/milena/tests/world/inter_pixel/display_edge.cc b/milena/tests/world/inter_pixel/display_edge.cc
new file mode 100644
index 0000000..5e79805
--- /dev/null
+++ b/milena/tests/world/inter_pixel/display_edge.cc
@@ -0,0 +1,112 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/// \file tests/world/inter_pixel/display_edge.cc
+///
+/// Tests on mln::world::inter_pixel::display_edge.
+
+
+#include <mln/core/var.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/level/compare.hh>
+#include <mln/world/inter_pixel/immerse.hh>
+#include <mln/world/inter_pixel/compute.hh>
+#include <mln/world/inter_pixel/display_edge.hh>
+
+#include <mln/world/inter_pixel/neighb2d.hh>
+#include <mln/debug/println.hh>
+
+
+
+struct d_t : mln::Function_vv2v<d_t>
+{
+ typedef int result;
+
+ int operator()(int i1, int i2) const
+ {
+ return std::abs(i2 - i1);
+ }
+}
+ d;
+
+
+
+int main()
+{
+ using namespace mln;
+
+ {
+ int vals[] = { 1 } ;
+
+ typedef image2d<int> I;
+ I ima = make::image2d(vals);
+
+ using namespace world::inter_pixel;
+ typedef image_if<I, is_pixel> Ix;
+ Ix imax = immerse(ima);
+
+ mln_VAR(g, compute(imax, d));
+ std::cout << g.unmorph_().bbox() << std::endl;
+
+ mln_VAR(out1, display_edge(g.unmorph_(), 0, 1));
+ debug::println(out1);
+ mln_VAR(out2, display_edge(g.unmorph_(), 0, 2));
+ debug::println(out2);
+ mln_VAR(out3, display_edge(g.unmorph_(), 0, 3));
+ debug::println(out3);
+ mln_VAR(out4, display_edge(g.unmorph_(), 0, 4));
+ debug::println(out4);
+ mln_VAR(out5, display_edge(g.unmorph_(), 0, 5));
+ debug::println(out5);
+ }
+
+ {
+ int vals[] = { 1, 2,
+ 3, 4 } ;
+
+ typedef image2d<int> I;
+ I ima = make::image2d(vals);
+
+ using namespace world::inter_pixel;
+ typedef image_if<I, is_pixel> Ix;
+ Ix imax = immerse(ima);
+
+ mln_VAR(g, compute(imax, d));
+ std::cout << g.unmorph_().bbox() << std::endl;
+
+ mln_VAR(out1, display_edge(g.unmorph_(), 0, 1));
+ debug::println(out1);
+ mln_VAR(out2, display_edge(g.unmorph_(), 0, 2));
+ debug::println(out2);
+ mln_VAR(out3, display_edge(g.unmorph_(), 0, 3));
+ debug::println(out3);
+ mln_VAR(out4, display_edge(g.unmorph_(), 0, 4));
+ debug::println(out4);
+ mln_VAR(out5, display_edge(g.unmorph_(), 0, 5));
+ debug::println(out5);
+ }
+}
--
1.6.1.2
1
0