---
milena/ChangeLog | 4 ++++
milena/doc/ref_guide/ref_guide.tex | 35 +++++++++++++++++++++++++++++++----
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 0e55663..351dd4c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * doc/ref_guide/ref_guide.tex: Add a new section about common compilation errors.
+
2009-10-01 Roland Levillain <roland(a)lrde.epita.fr>
Clean up a creation routine in graph-morpho.
diff --git a/milena/doc/ref_guide/ref_guide.tex b/milena/doc/ref_guide/ref_guide.tex
index d978d3e..76c0682 100644
--- a/milena/doc/ref_guide/ref_guide.tex
+++ b/milena/doc/ref_guide/ref_guide.tex
@@ -1985,12 +1985,39 @@ mln\_edge\_nbh\_edge\_iter(G) & G : graph type & Iterator on the edges adjacen
%====================================
%\newpage
%\clearpage
-%Ugly workaround to avoid missing chapter references in doxygen.
-%\begin{htmlonly}
-%\doxychapter{2}{}
-%\end{htmlonly}
%\doxychapter{debugtools}{Debugging tools}
%FIXME write it
+
+
+%====================================
+\newpage
+\clearpage
+\doxychapter{compilerrors}{Common Compilation Errors}
+
+In this section, the most common compilation errors are gathered and explained.
+
+\begin{itemize}
+ \item
+ \textbf{error: 'check' is not a member of 'mln::metal::not\_equal$<$bool, bool$>$} \\
+ \textbf{error: 'check' is not a member of 'mln::metal::converts\_to$<$mln::value::rgb$<$8u$>$, unsigned int$>$'} \\
+
+ The routine does not support a given image with such a value type
+ or an automatic conversion from the image value type to the
+ expected value type is not available.
+
+
+ \item
+ \textbf{error: using 'typename' outside of template} \\
+
+ Macros like \code{mln\_site} or \code{mln\_domain} can only be
+ used in templated functions. In order to use them in a
+ non-templated function, a `\_' must be appended to the macro
+ name. For instance : \code{mln\_site\_} and \code{mln\_domain\_}.
+
+\end{itemize}
+
+
+
\end{document}
--
1.5.6.5
* src/Makefile.am: Add debug as subdir.
* src/debug/Makefile.am,
* src/debug/show_left_right_links_validation.cc,
* src/debug/show_link_single_left.cc,
* src/debug/show_link_single_right.cc,
* src/debug/show_objects_large.cc,
* src/debug/show_objects_small.cc,
* src/debug/show_objects_thin.cc: New.
---
scribo/ChangeLog | 14 +++
scribo/src/Makefile.am | 1 +
scribo/src/debug/Makefile.am | 36 ++++++
.../src/debug/show_left_right_links_validation.cc | 122 ++++++++++++++++++++
scribo/src/debug/show_link_single_left.cc | 117 +++++++++++++++++++
scribo/src/debug/show_link_single_right.cc | 117 +++++++++++++++++++
scribo/src/debug/show_objects_large.cc | 84 ++++++++++++++
scribo/src/debug/show_objects_small.cc | 84 ++++++++++++++
8 files changed, 575 insertions(+), 0 deletions(-)
create mode 100644 scribo/src/debug/Makefile.am
create mode 100644 scribo/src/debug/show_left_right_links_validation.cc
create mode 100644 scribo/src/debug/show_link_single_left.cc
create mode 100644 scribo/src/debug/show_link_single_right.cc
create mode 100644 scribo/src/debug/show_objects_large.cc
create mode 100644 scribo/src/debug/show_objects_small.cc
create mode 100644 scribo/src/debug/show_objects_thin.cc
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 6a97f58..2668fd4 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,19 @@
2009-10-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+ New debugging tools for Scribo.
+
+ * src/Makefile.am: Add debug as subdir.
+
+ * src/debug/Makefile.am,
+ * src/debug/show_left_right_links_validation.cc,
+ * src/debug/show_link_single_left.cc,
+ * src/debug/show_link_single_right.cc,
+ * src/debug/show_objects_large.cc,
+ * src/debug/show_objects_small.cc,
+ * src/debug/show_objects_thin.cc: New.
+
+2009-10-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Few improvements in Scribo.
* debug/usage.hh: Improve output.
diff --git a/scribo/src/Makefile.am b/scribo/src/Makefile.am
index aa82499..6cc4229 100644
--- a/scribo/src/Makefile.am
+++ b/scribo/src/Makefile.am
@@ -21,6 +21,7 @@ include $(top_srcdir)/scribo/scribo.mk
SUBDIRS = \
binarization \
+ debug \
primitive \
filter \
misc \
diff --git a/scribo/src/debug/Makefile.am b/scribo/src/debug/Makefile.am
new file mode 100644
index 0000000..1d396a5
--- /dev/null
+++ b/scribo/src/debug/Makefile.am
@@ -0,0 +1,36 @@
+# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
+#
+# This file is part of Olena.
+#
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
+#
+# Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+#
+
+## Process this file through Automake to create Makefile.in.
+
+include $(top_srcdir)/scribo/scribo.mk
+
+bin_PROGRAMS = \
+ show_objects_large \
+ show_left_right_links_validation \
+ show_link_single_left \
+ show_link_single_right \
+ show_objects_small \
+ show_objects_thin
+
+
+show_objects_large_SOURCES = show_objects_large.cc
+show_left_right_links_validation_SOURCES = show_left_right_links_validation.cc
+show_link_single_left_SOURCES = show_link_single_left.cc
+show_link_single_right_SOURCES = show_link_single_right.cc
+show_objects_small_SOURCES = show_objects_small.cc
+show_objects_thin_SOURCES = show_objects_thin.cc
diff --git a/scribo/src/debug/show_left_right_links_validation.cc b/scribo/src/debug/show_left_right_links_validation.cc
new file mode 100644
index 0000000..bb23dd5
--- /dev/null
+++ b/scribo/src/debug/show_left_right_links_validation.cc
@@ -0,0 +1,122 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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.
+
+#include <iostream>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/labeling/colorize.hh>
+#include <mln/debug/println.hh>
+#include <mln/data/convert.hh>
+#include <mln/util/array.hh>
+#include <mln/literal/colors.hh>
+#include <mln/io/pbm/load.hh>
+#include <mln/io/ppm/save.hh>
+#include <mln/core/alias/neighb2d.hh>
+#include <mln/value/label_16.hh>
+
+#include <scribo/core/object_links.hh>
+#include <scribo/core/object_image.hh>
+
+#include <scribo/primitive/extract/objects.hh>
+
+#include <scribo/primitive/link/with_single_left_link.hh>
+#include <scribo/primitive/link/with_single_right_link.hh>
+#include <scribo/primitive/link/merge_double_link.hh>
+
+#include <scribo/draw/bounding_boxes.hh>
+#include <scribo/draw/bounding_box_links.hh>
+
+#include <scribo/debug/usage.hh>
+
+
+
+const char *args_desc[][2] =
+{
+ { "input.pbm", "A binary image. 'True' for objects, 'False'\
+for the background." },
+ { "hlmax", "Maximum distance between two grouped objects while browsing on the left." },
+ { "hrmax", "Maximum distance between two grouped objects while browsing on the right." },
+ {0, 0}
+};
+
+int main(int argc, char *argv[])
+{
+ using namespace scribo;
+ using namespace mln;
+
+ if (argc != 5)
+ return scribo::debug::usage(argv,
+ "Display double validated (left and right) links between objects",
+ "<input.pbm> <hlmax> <hrmax> <output.ppm>",
+ args_desc,
+ "A color image. Validated links are drawn in green.");
+
+ image2d<bool> input;
+ io::pbm::load(input, argv[1]);
+
+ // Finding objects.
+ value::label_16 nbboxes;
+ typedef image2d<value::label_16> L;
+ object_image(L) objects = primitive::extract::objects(input, c8(), nbboxes);
+
+ // Left links.
+ object_links<L> left_link
+ = primitive::link::with_single_left_link(objects, atoi(argv[2]));
+
+ // Right links.
+ object_links<L> right_link
+ = primitive::link::with_single_right_link(objects, atoi(argv[3]));
+
+ // Validation.
+ object_links<L>
+ links = primitive::link::merge_double_link(objects, left_link, right_link);
+
+
+ // Saving result.
+ image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+
+// scribo::draw::bounding_boxes(output, objects, literal::blue);
+ scribo::draw::bounding_box_links(output,
+ objects.bboxes(),
+ links,
+ literal::green);
+
+ util::array<bool> drawn(objects.nlabels(), 0);
+ for_all_components(i, objects.bboxes())
+ if (links[i] == i && ! drawn(i))
+ {
+ mln::draw::box(output, objects.bbox(i), literal::orange);
+ drawn[i] = true;
+ }
+ else
+ {
+ mln::draw::box(output, objects.bbox(i), literal::blue);
+ mln::draw::box(output, objects.bbox(links[i]), literal::blue);
+ drawn[i] = true;
+ drawn[links[i]] = true;
+ }
+
+ io::ppm::save(output, argv[4]);
+}
diff --git a/scribo/src/debug/show_link_single_left.cc b/scribo/src/debug/show_link_single_left.cc
new file mode 100644
index 0000000..a8b42f2
--- /dev/null
+++ b/scribo/src/debug/show_link_single_left.cc
@@ -0,0 +1,117 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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.
+
+#include <iostream>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/data/convert.hh>
+
+#include <mln/value/rgb8.hh>
+#include <mln/value/label_16.hh>
+#include <mln/literal/colors.hh>
+
+#include <mln/io/pbm/load.hh>
+#include <mln/io/ppm/save.hh>
+
+#include <scribo/primitive/extract/objects.hh>
+#include <scribo/primitive/link/with_single_left_link.hh>
+
+#include <scribo/draw/bounding_boxes.hh>
+
+#include <scribo/debug/save_linked_bboxes_image.hh>
+#include <scribo/debug/usage.hh>
+
+
+
+const char *args_desc[][2] =
+{
+ { "input.pbm", "A binary image. True for objects and False for the background." },
+ { "max_nbh_dist", " Maximum distance for neighborhood search. (common value : 30)" },
+ {0, 0}
+};
+
+
+int main(int argc, char* argv[])
+{
+ using namespace scribo;
+ using namespace scribo::primitive::internal;
+ using namespace mln;
+
+ if (argc != 4)
+ return scribo::debug::usage(argv,
+ "Show sucessful/unsuccessful left links between components.",
+ "input.pbm max_nbh_dist output.ppm",
+ args_desc,
+ "A color image. Valid links are drawn in green, invalid ones in red.");
+
+ image2d<bool> input;
+ io::pbm::load(input, argv[1]);
+
+ // Finding objects.
+ value::label_16 nbboxes;
+ typedef image2d<value::label_16> L;
+ object_image(L) objects
+ = scribo::primitive::extract::objects(input, c8(), nbboxes);
+
+ // Finding left links.
+ object_links<L> left_link
+ = primitive::link::with_single_left_link(objects, atoi(argv[2]));
+
+
+
+ // Preparing output image.
+ image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ scribo::draw::bounding_boxes(output, objects, literal::blue);
+
+
+ // Drawing links.
+ mln::util::array<mln_result_(accu::center<mln_psite_(L)>)>
+ mass_centers = labeling::compute(accu::meta::center(),
+ objects, objects.nlabels());
+
+ for_all_ncomponents(i, objects.nlabels())
+ {
+ unsigned midcol = (objects.bbox(i).pmax().col()
+ - objects.bbox(i).pmin().col()) / 2;
+ int dmax = midcol + atoi(argv[2]);
+ mln_site_(L) c = mass_centers(i);
+
+ mln_site_(L) p = c + mln::left;
+
+ while (is_invalid_link(objects, left_link, p, i, c, dmax))
+ {
+ if (left_link[i] != i)
+ output(p) = literal::green;
+ else
+ output(p) = literal::red;
+ --p.col();
+ }
+
+ }
+
+ io::ppm::save(output, argv[3]);
+}
diff --git a/scribo/src/debug/show_link_single_right.cc b/scribo/src/debug/show_link_single_right.cc
new file mode 100644
index 0000000..5f1001a
--- /dev/null
+++ b/scribo/src/debug/show_link_single_right.cc
@@ -0,0 +1,117 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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.
+
+#include <iostream>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/data/convert.hh>
+
+#include <mln/value/rgb8.hh>
+#include <mln/value/label_16.hh>
+#include <mln/literal/colors.hh>
+
+#include <mln/io/pbm/load.hh>
+#include <mln/io/ppm/save.hh>
+
+#include <scribo/primitive/extract/objects.hh>
+#include <scribo/primitive/link/with_single_right_link.hh>
+
+#include <scribo/draw/bounding_boxes.hh>
+
+#include <scribo/debug/save_linked_bboxes_image.hh>
+#include <scribo/debug/usage.hh>
+
+
+
+const char *args_desc[][2] =
+{
+ { "input.pbm", "A binary image. True for objects and False for the background." },
+ { "max_nbh_dist", " Maximum distance for neighborhood search. (common value : 30)" },
+ {0, 0}
+};
+
+
+int main(int argc, char* argv[])
+{
+ using namespace scribo;
+ using namespace scribo::primitive::internal;
+ using namespace mln;
+
+ if (argc != 4)
+ return scribo::debug::usage(argv,
+ "Show sucessful/unsuccessful right links between components.",
+ "input.pbm max_nbh_dist output.ppm",
+ args_desc,
+ "A color image. Valid links are drawn in green, invalid ones in red.");
+
+ image2d<bool> input;
+ io::pbm::load(input, argv[1]);
+
+ // Finding objects.
+ value::label_16 nbboxes;
+ typedef image2d<value::label_16> L;
+ object_image(L) objects
+ = scribo::primitive::extract::objects(input, c8(), nbboxes);
+
+ // Finding right links.
+ object_links<L> right_link
+ = primitive::link::with_single_right_link(objects, atoi(argv[2]));
+
+
+
+ // Preparing output image.
+ image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ scribo::draw::bounding_boxes(output, objects, literal::blue);
+
+
+ // Drawing links.
+ mln::util::array<mln_result_(accu::center<mln_psite_(L)>)>
+ mass_centers = labeling::compute(accu::meta::center(),
+ objects, objects.nlabels());
+
+ for_all_ncomponents(i, objects.nlabels())
+ {
+ unsigned midcol = (objects.bbox(i).pmax().col()
+ - objects.bbox(i).pmin().col()) / 2;
+ int dmax = midcol + atoi(argv[2]);
+ mln_site_(L) c = mass_centers(i);
+
+ mln_site_(L) p = c + mln::right;
+
+ while (is_invalid_link(objects, right_link, p, i, c, dmax))
+ {
+ if (right_link[i] != i)
+ output(p) = literal::green;
+ else
+ output(p) = literal::red;
+ ++p.col();
+ }
+
+ }
+
+ io::ppm::save(output, argv[3]);
+}
diff --git a/scribo/src/debug/show_objects_large.cc b/scribo/src/debug/show_objects_large.cc
new file mode 100644
index 0000000..aac7a9f
--- /dev/null
+++ b/scribo/src/debug/show_objects_large.cc
@@ -0,0 +1,84 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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.
+
+#include <iostream>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/data/convert.hh>
+
+#include <mln/value/label_16.hh>
+#include <mln/value/rgb8.hh>
+#include <mln/literal/colors.hh>
+
+#include <mln/io/pbm/load.hh>
+#include <mln/io/ppm/save.hh>
+
+#include <scribo/primitive/extract/objects.hh>
+#include <scribo/filter/objects_large.hh>
+#include <scribo/draw/bounding_boxes.hh>
+#include <scribo/debug/usage.hh>
+
+
+const char *args_desc[][2] =
+{
+ { "input.pbm", "A binary image. True for objects and False for the background." },
+ { "max_card", " Maximum cardinality in a component." },
+ {0, 0}
+};
+
+
+int main(int argc, char *argv[])
+{
+ using namespace mln;
+
+ if (argc != 4)
+ return scribo::debug::usage(argv,
+ "Show components having a too high cardinality.",
+ "input.pbm min_card output.ppm",
+ args_desc,
+ "A color image. Components with high cardinality have their bounding boxes drawn in red, others in green.");
+
+ trace::entering("main");
+
+ image2d<bool> input;
+ io::pbm::load(input, argv[1]);
+
+ value::label_16 nbboxes;
+ typedef image2d<value::label_16> L;
+ object_image(L) objects
+ = scribo::primitive::extract::objects(input, c8(), nbboxes);
+
+
+ image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ scribo::draw::bounding_boxes(output, objects, literal::red);
+
+ object_image(L) filtered_objects
+ = scribo::filter::objects_large(objects, atoi(argv[2]));
+ scribo::draw::bounding_boxes(output, filtered_objects, literal::green);
+
+ io::ppm::save(output, argv[3]);
+}
diff --git a/scribo/src/debug/show_objects_small.cc b/scribo/src/debug/show_objects_small.cc
new file mode 100644
index 0000000..a5afb26
--- /dev/null
+++ b/scribo/src/debug/show_objects_small.cc
@@ -0,0 +1,84 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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.
+
+#include <iostream>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/data/convert.hh>
+
+#include <mln/value/label_16.hh>
+#include <mln/value/rgb8.hh>
+#include <mln/literal/colors.hh>
+
+#include <mln/io/pbm/load.hh>
+#include <mln/io/ppm/save.hh>
+
+#include <scribo/primitive/extract/objects.hh>
+#include <scribo/filter/objects_small.hh>
+#include <scribo/draw/bounding_boxes.hh>
+#include <scribo/debug/usage.hh>
+
+
+const char *args_desc[][2] =
+{
+ { "input.pbm", "A binary image. True for objects and False for the background." },
+ { "min_card", " Minimum cardinality in a component.. (Common value : 6)" },
+ {0, 0}
+};
+
+
+int main(int argc, char *argv[])
+{
+ using namespace mln;
+
+ if (argc != 4)
+ return scribo::debug::usage(argv,
+ "Show components having a too low cardinality.",
+ "input.pbm min_card output.ppm",
+ args_desc,
+ "A color image. Components with low cardinality have their bounding boxes drawn in red, others in green.");
+
+ trace::entering("main");
+
+ image2d<bool> input;
+ io::pbm::load(input, argv[1]);
+
+ value::label_16 nbboxes;
+ typedef image2d<value::label_16> L;
+ object_image(L) objects
+ = scribo::primitive::extract::objects(input, c8(), nbboxes);
+
+
+ image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ scribo::draw::bounding_boxes(output, objects, literal::red);
+
+ object_image(L) filtered_objects
+ = scribo::filter::objects_small(objects, atoi(argv[2]));
+ scribo::draw::bounding_boxes(output, filtered_objects, literal::green);
+
+ io::ppm::save(output, argv[3]);
+}
diff --git a/scribo/src/debug/show_objects_thin.cc b/scribo/src/debug/show_objects_thin.cc
new file mode 100644
index 0000000..e69de29
--
1.5.6.5
* apps/graph-morpho/io.hh: Rename as...
* apps/graph-morpho/make.hh: ...this.
(build_regular_complex1d_image): Turn into...
(make::complex1d_image<V>): ...this.
* apps/graph-morpho/convert.hh: Adjust client.
* apps/graph-morpho/Makefile.am (noinst_HEADERS): s/io.hh/make.hh/.
---
milena/ChangeLog | 11 ++++
milena/apps/graph-morpho/Makefile.am | 2 +-
milena/apps/graph-morpho/convert.hh | 4 +-
milena/apps/graph-morpho/io.hh | 96 -------------------------------
milena/apps/graph-morpho/make.hh | 105 ++++++++++++++++++++++++++++++++++
5 files changed, 119 insertions(+), 99 deletions(-)
delete mode 100644 milena/apps/graph-morpho/io.hh
create mode 100644 milena/apps/graph-morpho/make.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 39bc7c2..0e55663 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2009-10-01 Roland Levillain <roland(a)lrde.epita.fr>
+ Clean up a creation routine in graph-morpho.
+
+ * apps/graph-morpho/io.hh: Rename as...
+ * apps/graph-morpho/make.hh: ...this.
+ (build_regular_complex1d_image): Turn into...
+ (make::complex1d_image<V>): ...this.
+ * apps/graph-morpho/convert.hh: Adjust client.
+ * apps/graph-morpho/Makefile.am (noinst_HEADERS): s/io.hh/make.hh/.
+
+2009-10-01 Roland Levillain <roland(a)lrde.epita.fr>
+
Clean up another conversion routine in graph-morpho.
* apps/graph-morpho/io.hh (make_regular_complex1d_image):
diff --git a/milena/apps/graph-morpho/Makefile.am b/milena/apps/graph-morpho/Makefile.am
index 76fb7d7..e4cbb6d 100644
--- a/milena/apps/graph-morpho/Makefile.am
+++ b/milena/apps/graph-morpho/Makefile.am
@@ -20,7 +20,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/milena -I$(top_builddir)/milena
APPS_CXXFLAGS = @APPS_CXXFLAGS@
AM_CXXFLAGS = $(APPS_CXXFLAGS)
-noinst_HEADERS = convert.hh debug.hh io.hh morpho.hh make_complex2d.hh
+noinst_HEADERS = convert.hh debug.hh make.hh morpho.hh make_complex2d.hh
noinst_PROGRAMS = samples-complex1d samples-image2d asf-complex1d asf-image2d
samples_complex1d_SOURCES = samples-complex1d.cc
diff --git a/milena/apps/graph-morpho/convert.hh b/milena/apps/graph-morpho/convert.hh
index 4328765..6e4ad55 100644
--- a/milena/apps/graph-morpho/convert.hh
+++ b/milena/apps/graph-morpho/convert.hh
@@ -34,7 +34,7 @@
# include <mln/math/abs.hh>
-# include "apps/graph-morpho/io.hh"
+# include "apps/graph-morpho/make.hh"
namespace convert
@@ -132,7 +132,7 @@ namespace convert
// consider only vertices (edges are set ``between'' vertices).
box2d output_box(input_box.nrows() / 2 + 1,
input_box.ncols() / 2 + 1);
- bin_1complex_image2d output = build_regular_complex1d_image(output_box);
+ bin_1complex_image2d output = ::make::complex1d_image<bool>(output_box);
const unsigned dim = 1;
typedef geom::complex_geometry<dim, point2d> geom_t;
diff --git a/milena/apps/graph-morpho/io.hh b/milena/apps/graph-morpho/io.hh
deleted file mode 100644
index 6dac2c4..0000000
--- a/milena/apps/graph-morpho/io.hh
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project 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 APPS_GRAPH_MORPHO_IO_HH
-# define APPS_GRAPH_MORPHO_IO_HH
-
-/// \file apps/graph-morpho/io.hh
-/// \brief I/O routines for graphs (1-complexes).
-
-# include <mln/core/alias/complex_image.hh>
-# include <mln/core/image/image2d.hh>
-
-inline
-mln::bin_1complex_image2d
-build_regular_complex1d_image(const mln::box2d& support)
-{
- using namespace mln;
-
- unsigned nrows = support.pmax().row() - support.pmin().row() + 1;
- unsigned ncols = support.pmax().col() - support.pmin().col() + 1;
-
- const unsigned dim = 1;
- typedef topo::n_face<0, dim> vertex_t;
-
- typedef topo::complex<dim> complex_t;
- complex_t c;
- typedef geom::complex_geometry<dim, point2d> geom_t;
- geom_t geom;
-
- // Vertices.
- for (unsigned row = 0; row < nrows; ++row)
- for (unsigned col = 0; col < ncols; ++col)
- {
- c.add_face();
- geom.add_location(point2d(row,col));
- }
-
- // Edges.
- for (unsigned row = 0; row < nrows; ++row)
- {
- // Horizontal edges.
- for (unsigned col = 1; col < ncols; ++col)
- {
- // First vertex.
- vertex_t v1(c, row * ncols + col - 1);
- // Second vertex.
- vertex_t v2(c, row * ncols + col);
- // Edge bewteen V1 and V2.
- c.add_face(v1 + v2);
- }
-
- // Vertical edges.
- if (row != 0)
- for (unsigned col = 0; col < ncols; ++col)
- {
- // First vertex.
- vertex_t v1(c, (row - 1) * ncols + col);
- // Second vertex.
- vertex_t v2(c, row * ncols + col);
- // Edge bewteen V1 and V2.
- c.add_face(v1 + v2);
- }
- }
-
- // Site set (domain) of the image.
- p_complex<dim, geom_t> pc(c, geom);
-
- // Image based on this site set.
- bin_1complex_image2d ima(pc);
- return ima;
-}
-
-
-#endif // ! APPS_GRAPH_MORPHO_IO_HH
diff --git a/milena/apps/graph-morpho/make.hh b/milena/apps/graph-morpho/make.hh
new file mode 100644
index 0000000..4ebd372
--- /dev/null
+++ b/milena/apps/graph-morpho/make.hh
@@ -0,0 +1,105 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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 APPS_GRAPH_MORPHO_MAKE_HH
+# define APPS_GRAPH_MORPHO_MAKE_HH
+
+/// \file
+/// \brief Creation routines for complex-based images.
+
+# include <mln/core/alias/complex_image.hh>
+# include <mln/core/alias/box2d.hh>
+
+namespace make
+{
+
+ /// Create a 1-complex images in the 2D plane of which domain is
+ /// based on an mln::box2d.
+ template <typename V>
+ inline
+ mln::complex_image<1, mln::discrete_plane_1complex_geometry, V>
+ complex1d_image(const mln::box2d& support)
+ {
+ using namespace mln;
+
+ unsigned nrows = support.pmax().row() - support.pmin().row() + 1;
+ unsigned ncols = support.pmax().col() - support.pmin().col() + 1;
+
+ const unsigned dim = 1;
+ typedef topo::n_face<0, dim> vertex_t;
+
+ typedef topo::complex<dim> complex_t;
+ complex_t c;
+ typedef geom::complex_geometry<dim, point2d> geom_t;
+ geom_t geom;
+
+ // Vertices.
+ for (unsigned row = 0; row < nrows; ++row)
+ for (unsigned col = 0; col < ncols; ++col)
+ {
+ c.add_face();
+ geom.add_location(point2d(row,col));
+ }
+
+ // Edges.
+ for (unsigned row = 0; row < nrows; ++row)
+ {
+ // Horizontal edges.
+ for (unsigned col = 1; col < ncols; ++col)
+ {
+ // First vertex.
+ vertex_t v1(c, row * ncols + col - 1);
+ // Second vertex.
+ vertex_t v2(c, row * ncols + col);
+ // Edge bewteen V1 and V2.
+ c.add_face(v1 + v2);
+ }
+
+ // Vertical edges.
+ if (row != 0)
+ for (unsigned col = 0; col < ncols; ++col)
+ {
+ // First vertex.
+ vertex_t v1(c, (row - 1) * ncols + col);
+ // Second vertex.
+ vertex_t v2(c, row * ncols + col);
+ // Edge bewteen V1 and V2.
+ c.add_face(v1 + v2);
+ }
+ }
+
+ // Site set (domain) of the image.
+ p_complex<dim, geom_t> pc(c, geom);
+
+ // Image based on this site set.
+ typedef complex_image<dim, geom_t, V> ima_t;
+ ima_t ima(pc);
+ return ima;
+ }
+
+} // end of namespace make
+
+
+#endif // ! APPS_GRAPH_MORPHO_MAKE_HH
--
1.6.3.1
* apps/graph-morpho/convert.hh,
* apps/graph-morpho/debug.hh:
New files.
* apps/graph-morpho/io.hh (println): Remove function.
* apps/graph-morpho/samples-image2d.cc,
* apps/graph-morpho/samples-complex1d.cc:
Adjust clients.
* apps/graph-morpho/Makefile.am (noinst_HEADERS):
Add convert.hh and debug.hh.
---
milena/ChangeLog | 14 +++
milena/apps/graph-morpho/Makefile.am | 2 +-
milena/apps/graph-morpho/convert.hh | 117 +++++++++++++++++++++++++
milena/apps/graph-morpho/debug.hh | 99 +++++++++++++++++++++
milena/apps/graph-morpho/io.hh | 81 -----------------
milena/apps/graph-morpho/samples-complex1d.cc | 39 ++++----
milena/apps/graph-morpho/samples-image2d.cc | 38 ++++----
7 files changed, 269 insertions(+), 121 deletions(-)
create mode 100644 milena/apps/graph-morpho/convert.hh
create mode 100644 milena/apps/graph-morpho/debug.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 669d4f9..dcad3c7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-01 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Clean up some conversion and pretty-printing routines in graph-morpho.
+
+ * apps/graph-morpho/convert.hh,
+ * apps/graph-morpho/debug.hh:
+ New files.
+ * apps/graph-morpho/io.hh (println): Remove function.
+ * apps/graph-morpho/samples-image2d.cc,
+ * apps/graph-morpho/samples-complex1d.cc:
+ Adjust clients.
+ * apps/graph-morpho/Makefile.am (noinst_HEADERS):
+ Add convert.hh and debug.hh.
+
2009-09-30 Roland Levillain <roland(a)lrde.epita.fr>
Generic vertices-edges combinator in apps/graph-morpho/.
diff --git a/milena/apps/graph-morpho/Makefile.am b/milena/apps/graph-morpho/Makefile.am
index 70e177e..76fb7d7 100644
--- a/milena/apps/graph-morpho/Makefile.am
+++ b/milena/apps/graph-morpho/Makefile.am
@@ -20,7 +20,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/milena -I$(top_builddir)/milena
APPS_CXXFLAGS = @APPS_CXXFLAGS@
AM_CXXFLAGS = $(APPS_CXXFLAGS)
-noinst_HEADERS = io.hh morpho.hh make_complex2d.hh
+noinst_HEADERS = convert.hh debug.hh io.hh morpho.hh make_complex2d.hh
noinst_PROGRAMS = samples-complex1d samples-image2d asf-complex1d asf-image2d
samples_complex1d_SOURCES = samples-complex1d.cc
diff --git a/milena/apps/graph-morpho/convert.hh b/milena/apps/graph-morpho/convert.hh
new file mode 100644
index 0000000..e51b4ac
--- /dev/null
+++ b/milena/apps/graph-morpho/convert.hh
@@ -0,0 +1,117 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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 APPS_GRAPH_MORPHO_CONVERT_HH
+# define APPS_GRAPH_MORPHO_CONVERT_HH
+
+/// \file
+/// \brief Conversion between various graph/complex image types.
+
+# include <mln/core/alias/complex_image.hh>
+# include <mln/core/image/image2d.hh>
+
+
+namespace convert
+{
+
+ /// Convert an mln::bin_1complex_image2d to an mln::image2d<bool>.
+ inline
+ mln::image2d<bool>
+ to_image2d(const mln::bin_1complex_image2d& input)
+ {
+ using namespace mln;
+
+ const unsigned dim = 1;
+ typedef geom::complex_geometry<dim, point2d> geom_t;
+
+ // Compute the bounding box of the domain of FROM.
+ accu::shape::bbox<point2d> bbox;
+ p_n_faces_fwd_piter<dim, geom_t> v(input.domain(), 0);
+ for_all(v)
+ {
+ mln_site_(geom_t) s(v);
+ // Site S is point2d multi-site and should be a singleton (since V
+ // iterates on vertices).
+ mln_invariant(s.size() == 1);
+ point2d p = s.front();
+ bbox.take(p);
+ }
+ mln::box2d support = bbox;
+
+ image2d<bool> output(box2d(point2d(support.pmin().row() * 2,
+ support.pmin().col() * 2),
+ point2d(support.pmax().row() * 2,
+ support.pmax().col() * 2)));
+ data::fill(output, false);
+
+ // Iterate on vertices.
+ for_all(v)
+ {
+ mln_site_(geom_t) s(v);
+ // Site S is point2d multi-site and should be a singleton (since V
+ // iterates on vertices).
+ mln_invariant(s.size() == 1);
+ point2d p_in = s.front();
+ point2d p_out(p_in.row() * 2, p_in.col() * 2);
+ output(p_out) = input(v);
+ }
+
+ // Iterate on edges.
+ p_n_faces_fwd_piter<dim, geom_t> e(input.domain(), 1);
+ for_all(e)
+ {
+ mln_site_(geom_t) s(e);
+ // Site S is point2d multi-site and should be a pair (since E
+ // iterates on vertices).
+ mln_invariant(s.size() == 2);
+ point2d p1 = s[0];
+ point2d p2 = s[1];
+ if (p1.row() == p2.row())
+ {
+ // Horizontal edge.
+ point2d p_out(p1.row() * 2,
+ p1.col() + p2.col());
+ output(p_out) = input(e);
+ }
+ else if (p1.col() == p2.col())
+ {
+ // Vertical edge.
+ point2d p_out(p1.row() + p2.row(),
+ p1.col() * 2);
+ output(p_out) = input(e);
+ }
+ else
+ {
+ // Edge not fitting in the 2D regular grid canvas, aborting.
+ abort();
+ }
+ }
+ return output;
+ }
+
+} // end of namespace convert
+
+
+#endif // ! APPS_GRAPH_MORPHO_CONVERT_HH
diff --git a/milena/apps/graph-morpho/debug.hh b/milena/apps/graph-morpho/debug.hh
new file mode 100644
index 0000000..5ad3045
--- /dev/null
+++ b/milena/apps/graph-morpho/debug.hh
@@ -0,0 +1,99 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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 APPS_GRAPH_MORPHO_DEBUG_HH
+# define APPS_GRAPH_MORPHO_DEBUG_HH
+
+/// \file
+/// \brief Pretty-printing between graph/complex image types.
+
+# include <mln/core/alias/complex_image.hh>
+# include <mln/core/image/image2d.hh>
+
+# include <mln/debug/println.hh>
+
+# include "apps/graph-morpho/convert.hh"
+
+
+namespace debug
+{
+
+ /// Pretty print an mln::image2d<bool> viewed as a graph.
+ void
+ println_graph(const std::string& message, const mln::image2d<bool>& input)
+ {
+ // INPUT must have odd numbers of rows and columns.
+ mln_precondition(input.nrows() % 2 == 1);
+ mln_precondition(input.ncols() % 2 == 1);
+
+ mln::image2d<char> output;
+ mln::initialize(output, input);
+ for (int row = input.domain().pmin().row();
+ row <= input.domain().pmax().row(); ++row)
+ {
+ if (row % 2 == 0)
+ // Even row: line with vertices and horizontal edges.
+ for (int col = input.domain().pmin().col();
+ col <= input.domain().pmax().col(); ++col)
+ {
+ mln::point2d p(row, col);
+ if (col % 2 == 0)
+ // Even column: vertex.
+ output(p) = input(p) ? 'O' : '.';
+ else
+ // Odd column: horizontal edge.
+ output(p) = input(p) ? '-' : ' ';
+ }
+ else
+ // Odd row: line with vertical edges and inter-edge spaces
+ // (squares).
+ for (int col = input.domain().pmin().col();
+ col <= input.domain().pmax().col(); ++col)
+ {
+ mln::point2d p(row, col);
+ if (col % 2 == 0)
+ // Even column: vertical edge.
+ output(p) = input(p) ? '|' : ' ';
+ else
+ // Odd column: space.
+ output(p) = ' ';
+ }
+ }
+ mln::debug::println(message, output);
+ }
+
+
+ /// Pretty-print an mln::bin_1complex_image2d viewed as a graph.
+ void
+ println_graph(const std::string& message,
+ const mln::bin_1complex_image2d& input)
+ {
+ println_graph(message, convert::to_image2d(input));
+ }
+
+} // end of namespace debug
+
+
+#endif // ! APPS_GRAPH_MORPHO_DEBUG_HH
diff --git a/milena/apps/graph-morpho/io.hh b/milena/apps/graph-morpho/io.hh
index cdc54bb..8c92949 100644
--- a/milena/apps/graph-morpho/io.hh
+++ b/milena/apps/graph-morpho/io.hh
@@ -153,85 +153,4 @@ make_regular_complex1d_image(const mln::Image<I>& input_)
}
-inline
-void
-println(const std::string& message, const mln::bin_1complex_image2d& ima,
- const mln::box2d& support)
-{
- using namespace mln;
-
- // These are admittedly loose preconditions, but we cannot check
- // much anyway.
- mln_precondition(ima.domain().nfaces_of_dim(0) == support.nsites());
-
- image2d<bool> vertices(support);
- image2d<bool> h_edges(box2d(support.pmin(), support.pmax() - dpoint2d(0, 1)));
- image2d<bool> v_edges(box2d(support.pmin(), support.pmax() - dpoint2d(1, 0)));
-
- const unsigned dim = 1;
- typedef geom::complex_geometry<dim, point2d> geom_t;
-
- // Iterator on vertices.
- p_n_faces_fwd_piter<dim, geom_t> v(ima.domain(), 0);
- for_all(v)
- {
- mln_site_(geom_t) s(v);
- // Site S is point2d multi-site and should be a singleton (since V
- // iterates on vertices).
- mln_invariant(s.size() == 1);
- point2d p = s.front();
- vertices(p) = ima(v);
- }
-
- // Iterator on edges.
- p_n_faces_fwd_piter<dim, geom_t> e(ima.domain(), 1);
- for_all(e)
- {
- mln_site_(geom_t) s(e);
- // Site S is point2d multi-site and should be a pair (since E
- // iterates on vertices).
- mln_invariant(s.size() == 2);
- point2d p1 = s[0];
- point2d p2 = s[1];
- if (p1.row() == p2.row())
- {
- // Horizontal edge.
- h_edges(p1) = ima(e);
- }
- else
- {
- // Vertical edge.
- mln_assertion(p1.col() == p2.col());
- v_edges(p1) = ima(e);
- }
- }
-
- std::cout << message << std::endl;
- for (int row = vertices.domain().pmin().row();
- row <= vertices.domain().pmax().row(); ++row)
- {
- for (int col = vertices.domain().pmin().col();
- col <= vertices.domain().pmax().col(); ++col)
- {
- point2d p(row, col);
- // Vertex.
- std::cout << (vertices(p) ? "O" : ".");
- // Potential horizontal edge on the right of the vertex.
- if (col != vertices.domain().pmax().col())
- std::cout << (h_edges(p) ? " - " : " ");
- }
- std::cout << std::endl;
-
- // Potential vertical edge below the vertices of the current ROW.
- if (row != vertices.domain().pmax().row())
- for (int col = vertices.domain().pmin().col();
- col <= vertices.domain().pmax().col(); ++col)
- {
- point2d p(row, col);
- std::cout << (v_edges(p) ? "| " : " ");
- }
- std::cout << std::endl;
- }
-}
-
#endif // ! APPS_GRAPH_MORPHO_IO_HH
diff --git a/milena/apps/graph-morpho/samples-complex1d.cc b/milena/apps/graph-morpho/samples-complex1d.cc
index bc8f21b..0b32236 100644
--- a/milena/apps/graph-morpho/samples-complex1d.cc
+++ b/milena/apps/graph-morpho/samples-complex1d.cc
@@ -35,6 +35,8 @@
#include "apps/graph-morpho/morpho.hh"
#include "apps/graph-morpho/io.hh"
+#include "apps/graph-morpho/debug.hh"
+
#include "apps/data.hh"
@@ -57,20 +59,19 @@ int main()
paper from Jean Cousty et al. */
image2d<bool> x_pbm = io::pbm::load(MLN_APPS_DIR "/graph-morpho/x.pbm");
ima_t x = make_regular_complex1d_image(x_pbm);
- box2d x_box(x_pbm.nrows() / 2 + 1, x_pbm.ncols() / 2 + 1);
- println("x:", x, x_box);
+ ::debug::println_graph("x:", x);
- println("dilation_e2v(x):", dilation_e2v(x), x_box);
- println("erosion_v2e(x):", erosion_v2e(x), x_box);
+ ::debug::println_graph("dilation_e2v(x):", dilation_e2v(x));
+ ::debug::println_graph("erosion_v2e(x):", erosion_v2e(x));
- println("erosion_e2v(x):", erosion_e2v(x), x_box);
- println("dilation_v2e(x):", dilation_v2e(x), x_box);
+ ::debug::println_graph("erosion_e2v(x):", erosion_e2v(x));
+ ::debug::println_graph("dilation_v2e(x):", dilation_v2e(x));
- println("dilation_graph(x):", dilation_graph(x), x_box);
- println("erosion_graph(x):", erosion_graph(x), x_box);
+ ::debug::println_graph("dilation_graph(x):", dilation_graph(x));
+ ::debug::println_graph("erosion_graph(x):", erosion_graph(x));
- println("alpha3(x):", alpha3(x), x_box);
- println("beta3(x):", beta3(x), x_box);
+ ::debug::println_graph("alpha3(x):", alpha3(x));
+ ::debug::println_graph("beta3(x):", beta3(x));
// --------- //
// Filters. //
@@ -79,20 +80,18 @@ int main()
// Create an image corresponding to the graph Y.
image2d<bool> y_pbm = io::pbm::load(MLN_APPS_DIR "/graph-morpho/y.pbm");
ima_t y = make_regular_complex1d_image(y_pbm);
- box2d y_box(y_pbm.nrows() / 2 + 1, y_pbm.ncols() / 2 + 1);
- println("y:", y, y_box);
+ ::debug::println_graph("y:", y);
- println("opening_graph(y):", opening_graph(y), y_box);
- println("half_opening_graph(y):", half_opening_graph(y), y_box);
- println("beta3(alpha3(y)):", beta3(alpha3(y)), y_box);
+ ::debug::println_graph("opening_graph(y):", opening_graph(y));
+ ::debug::println_graph("half_opening_graph(y):", half_opening_graph(y));
+ ::debug::println_graph("beta3(alpha3(y)):", beta3(alpha3(y)));
// Create an image corresponding to the graph Z.
image2d<bool> z_pbm = io::pbm::load(MLN_APPS_DIR "/graph-morpho/z.pbm");
ima_t z = make_regular_complex1d_image(z_pbm);
- box2d z_box(z_pbm.nrows() / 2 + 1, z_pbm.ncols() / 2 + 1);
- println("z:", z, z_box);
+ ::debug::println_graph("z:", z);
- println("closing_graph(z):", closing_graph(z), z_box);
- println("half_closing_graph(z):", half_closing_graph(z), z_box);
- println("alpha3(beta3(z)):", alpha3(beta3(z)), z_box);
+ ::debug::println_graph("closing_graph(z):", closing_graph(z));
+ ::debug::println_graph("half_closing_graph(z):", half_closing_graph(z));
+ ::debug::println_graph("alpha3(beta3(z)):", alpha3(beta3(z)));
}
diff --git a/milena/apps/graph-morpho/samples-image2d.cc b/milena/apps/graph-morpho/samples-image2d.cc
index 455a147..76d5f7f 100644
--- a/milena/apps/graph-morpho/samples-image2d.cc
+++ b/milena/apps/graph-morpho/samples-image2d.cc
@@ -29,11 +29,11 @@
#include <mln/io/pbm/load.hh>
-#include <mln/debug/println.hh>
-
#include "apps/graph-morpho/morpho.hh"
#include "apps/graph-morpho/io.hh"
+#include "apps/graph-morpho/debug.hh"
+
#include "apps/data.hh"
@@ -58,19 +58,19 @@ int main()
/* Create an image corresponding to the graph X of the ISMM 2009
paper from Jean Cousty et al. */
image2d<bool> x = io::pbm::load(MLN_APPS_DIR "/graph-morpho/x.pbm");
- debug::println("x:", x);
+ ::debug::println_graph("x:", x);
- debug::println("dilation_e2v(x):", dilation_e2v(x)) ;
- debug::println("erosion_v2e(x):", erosion_v2e(x));
+ ::debug::println_graph("dilation_e2v(x):", dilation_e2v(x)) ;
+ ::debug::println_graph("erosion_v2e(x):", erosion_v2e(x));
- debug::println("erosion_e2v(x):", erosion_e2v(x));
- debug::println("dilation_v2e(x):", dilation_v2e(x));
+ ::debug::println_graph("erosion_e2v(x):", erosion_e2v(x));
+ ::debug::println_graph("dilation_v2e(x):", dilation_v2e(x));
- debug::println("dilation_graph(x):", dilation_graph(x));
- debug::println("erosion_graph(x):", erosion_graph(x));
+ ::debug::println_graph("dilation_graph(x):", dilation_graph(x));
+ ::debug::println_graph("erosion_graph(x):", erosion_graph(x));
- debug::println("alpha3(x):", alpha3(x));
- debug::println("beta3(x):", beta3(x));
+ ::debug::println_graph("alpha3(x):", alpha3(x));
+ ::debug::println_graph("beta3(x):", beta3(x));
// --------- //
// Filters. //
@@ -78,17 +78,17 @@ int main()
// Create an image corresponding to the graph Y.
image2d<bool> y = io::pbm::load(MLN_APPS_DIR "/graph-morpho/y.pbm");
- debug::println("y:", y);
+ ::debug::println_graph("y:", y);
- debug::println("opening_graph(y):", opening_graph(y));
- debug::println("half_opening_graph(y):", half_opening_graph(y));
- debug::println("beta3(alpha3(y)):", beta3(alpha3(y)));
+ ::debug::println_graph("opening_graph(y):", opening_graph(y));
+ ::debug::println_graph("half_opening_graph(y):", half_opening_graph(y));
+ ::debug::println_graph("beta3(alpha3(y)):", beta3(alpha3(y)));
// Create an image corresponding to the graph Z.
image2d<bool> z = io::pbm::load(MLN_APPS_DIR "/graph-morpho/z.pbm");
- debug::println("z:", z);
+ ::debug::println_graph("z:", z);
- debug::println("closing_graph(z):", closing_graph(z));
- debug::println("half_closing_graph(z):", half_closing_graph(z));
- debug::println("alpha3(beta3(z)):", alpha3(beta3(z)));
+ ::debug::println_graph("closing_graph(z):", closing_graph(z));
+ ::debug::println_graph("half_closing_graph(z):", half_closing_graph(z));
+ ::debug::println_graph("alpha3(beta3(z)):", alpha3(beta3(z)));
}
--
1.6.3.1
* green/mln/clustering/kmean1d.hh: Do minor modifications.
---
trunk/milena/sandbox/ChangeLog | 14 ++-
.../milena/sandbox/green/mln/clustering/kmean1d.hh | 172 +++++++++++---------
2 files changed, 102 insertions(+), 84 deletions(-)
diff --git a/trunk/milena/sandbox/ChangeLog b/trunk/milena/sandbox/ChangeLog
index 2057d9b..9ddceda 100644
--- a/trunk/milena/sandbox/ChangeLog
+++ b/trunk/milena/sandbox/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-01 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+
+ Correct typo, update documentation and comment debugging outputs.
+
+ * green/mln/clustering/kmean1d.hh: Do minor modifications.
+
2009-09-30 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
First draft for loading and saving example codes for the
@@ -9,18 +15,18 @@
2009-09-29 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
- Fix behaviour when empty class appears. Fix methods order of the
+ Fix behaviour when empty class appears. Fix methods order of the
kmean1d loop.
* green/mln/clustering/kmean1d.hh
(update_kmean, launch_one_time, is_valid, is_descent_valid): Introduce
_is_number_valid which turns to false when empty class appears.
-
+
* green/mln/clustering/kmean1d.hh
(launch_one_time): Fix method call order in kmean's loop.
-
+
* green/mln/clustering/kmean1d.hh
- (launch_n_times): Introduce nb_tries that garanties to be infinite
+ (launch_n_times): Introduce nb_tries that garanties to be infinite
loop safe.
Update kmean.launch_n_times method call.
diff --git a/trunk/milena/sandbox/green/mln/clustering/kmean1d.hh b/trunk/milena/sandbox/green/mln/clustering/kmean1d.hh
index 9f467bd..670cb26 100644
--- a/trunk/milena/sandbox/green/mln/clustering/kmean1d.hh
+++ b/trunk/milena/sandbox/green/mln/clustering/kmean1d.hh
@@ -1,6 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory (LRDE)
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008,2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -32,12 +30,12 @@
///
/// \brief Implements the optimized kmean algorithm.
///
-/// This algorithm is optimized in the way it proceeds directly with the
-/// greylevel attribute inspite of pixel attribute. The algorithm is
-/// independant from the image dimension. But, we have to use to compute
-/// one time the histogram. In fact, we move a recurrent cost to a fix cost
-/// in the complexity. This version is very adapted to image with small
-/// quantification.
+/// This algorithm is optimized in the way it proceeds directly with
+/// the greylevel attribute inspite of the pixel attribute. The
+/// algorithm is independant from the image dimension. But, we have to
+/// compute one time the histogram. In fact, we move a recurrent cost
+/// to a fix cost in the complexity. This version is very adapted to
+/// images with small quantification.
#include <limits.h>
#include <iostream>
@@ -127,7 +125,7 @@ namespace mln
/// \param[in] point : the image as the population of pixels.
/// \param[in] k_center : the number of centers.
/// \param[in] watch_dog : the limit to observe the convergence (10).
- /// \param[in] n_times : the number of times that we executed it (10).
+ /// \param[in] n_times : the number of times that we executed kmean(10).
kmean1d(const t_point_img& point,
const unsigned k_center,
@@ -165,7 +163,7 @@ namespace mln
// Testing outputs
t_color_dbg& get_color_dbg();
t_mean_dbg& get_mean_dbg();
- t_label_dbg& get_label_dbg();
+ t_label_dbg& get_label_dbg();
t_mean_cnv& get_mean_cnv();
t_variance_cnv& get_variance_cnv();
@@ -183,8 +181,8 @@ namespace mln
/// \{
/// \brief Two ways: Regular greylevel tick or random greylevel value or.
///
- /// There is two way to proceed the initialization. First of all, we
- /// divide the greyscale in regular tick and we assigne them to the mean
+ /// There is two way to proceed the initialization. First of all, we
+ /// divide the greyscale in regular tick and we assigne them to the mean
/// of the centers. Finaly, we can ask random initialization along the
/// greyscale axis. The second process is needed to launch_n_times the
/// kmean and converge to the best descent.
@@ -195,7 +193,7 @@ namespace mln
/// \}
-
+
//------------------------------------------------------------------------
// Computations of distance, group, center, within variance
//------------------------------------------------------------------------
@@ -206,7 +204,7 @@ namespace mln
///
/// The kmean process is a loop where distance from centers to pixels are
/// first compute. Then we assign the pixels to their nearest center.
- /// The new location of each center can then update. Finaly, hommogenity
+ /// The new location of each center can then update. Finaly, hommogeneity
/// in group is observed by the within variance.
void update_distance();
@@ -220,17 +218,37 @@ namespace mln
// Main loop
//------------------------------------------------------------------------
+ /// kmean main loop
+ /// \{
+ /// \brief User interface to launch the kmean process.
+ ///
+ /// There are two ways to launch the kmean process. The first one allow to
+ /// run it one time until convergence. As the process is a descent, it
+ /// depends on the initial center locations. The second call allow us to
+ /// rerun the process many times and to keep the best result (the one
+ /// with the smallest within variance).
+
void launch_one_time();
void launch_n_times();
+ /// \}
//------------------------------------------------------------------------
// Checking the validiy of the results
//------------------------------------------------------------------------
- bool is_valid();
- bool is_number_valid();
- bool is_descent_valid();
+ /// Checking the validity of the results.
+ /// \{
+ /// \brief These methods help us to determine the validity of the results.
+ ///
+ /// After each launching the kmean process one time, we need to know if
+ /// the descent was successfull or not. The method is_valid_descent do it
+ /// for us. The method looks for a bad center (a class with no greylevel
+ /// associate to it) and a failure in the convergence.
+
+ bool is_descent_valid();
+
+ /// \}
//------------------------------------------------------------------------
// Debugging tools
@@ -242,9 +260,11 @@ namespace mln
///
/// The methods build_label_dbg and build_all_dbg work in the input data
/// space. The first one build the 2d image of labels. The second call the
- /// first one and then builds the colorize label' image and the mean
- /// greylevel image.
-
+ /// first one and then builds the colorize label' image and the mean
+ /// greylevel image. The update_cnv and finalize_cnv methods are used to
+ /// trace the convergence. They fill two images with the mean info and
+ /// the within variance info along the convergence and the tries.
+
void build_label_dbg();
void build_all_dbg();
void update_cnv();
@@ -264,7 +284,7 @@ namespace mln
/// that the process will not converge at all. The second parameter
/// n_times is the number of times we launch again and again the simple
/// kmean loop. As the kmean process is a descent, restarting the process
- /// from different location will confort us in that we found a global
+ /// from different location will confort us in that we found a global
/// minima, not just a local one.
unsigned _k_center;
@@ -277,14 +297,19 @@ namespace mln
/// \{
/// \brief This information is used to follow the convergence.
///
- /// The within_variance is the homogenity indicator for the kmean process.
- /// The ideal situation is to find the center with the minimum variance
- /// around them. The within variance is just the sum of all variance
- /// around the centers. The current_step variable allows us to remember
- /// the current iteration in the kmean loop. This information is needed
- /// by is_descent_valid routine which decide if convergence occurs or not.
- /// The last information, current_launching, traces the progress while
- /// iterates kmean loop again and again.
+ /// The within_variance is the homogeniety indicator for the
+ /// kmean process. The ideal situation is to find the center
+ /// with the minimum variance around them. The within variance
+ /// is just the sum of all variance around the centers. The
+ /// current_step variable allows us to remember the current
+ /// iteration in the kmean loop. This information is needed by
+ /// is_descent_valid routine which decide if convergence occurs
+ /// or not. The current_step info explicit where we are in the
+ /// kmean iteration. The last information, current_launching,
+ /// traces the progress while iterates kmean loop again and
+ /// again. The flag is_number_valid is set when a empty class
+ /// appears. This flag inhibit the process and force to restart
+ /// a try.
t_result _within_variance;
unsigned _current_step;
@@ -298,9 +323,9 @@ namespace mln
/// Result of the kmean process.
/// \{
/// \brief The center location are the major results of the kmean process.
- ///
+ ///
/// The kmean process result is composed by three information. The best
- /// launching iteration, the best within variance obtained and the
+ /// launching iteration, the best within variance obtained and the
/// location of the centers associated.
unsigned _launching_min;
@@ -323,7 +348,7 @@ namespace mln
/// \{
/// \brief Centers are described by the first moment of their group.
///
- /// Centers are describe by their group attributes like the number of
+ /// Centers are describe by their group attributes like the number of
/// pixels wich are relying on, the mass center of the group and the
/// homogeneity of the group. The variance is used as indicator for the
/// convergence. The number of pixels is used as integrity indicator.
@@ -340,8 +365,8 @@ namespace mln
/// \{
/// \brief The information are concerned with the greylevel input image.
///
- /// The group image allow us to decide which greylevel (and of course
- /// which pixel) is assigned to a center. The distance image give us a
+ /// The group image allow us to decide which greylevel (and of course
+ /// which pixel) is assigned to a center. The distance image give us a
/// clue on how a greylevel could contribute to a center. The summation
/// over the greylevels of a center give us the within variance.
@@ -349,7 +374,7 @@ namespace mln
t_distance_img _distance; // label x graylevel
/// \}
-
+
/// Debugging, calibrating and testing results.
/// \{
/// \brief Some exports information to control the results.
@@ -652,7 +677,7 @@ namespace mln
//--------------------------------------------------------------------------
// Initialization of centers
//--------------------------------------------------------------------------
-
+
template <typename T, unsigned n>
inline
void kmean1d<T,n>::init_mean_regular()
@@ -660,7 +685,7 @@ namespace mln
trace::entering("mln::clustering::kmean1d::init_mean_regular");
T step = (mln_max(t_value) - mln_min(t_value)) / (_k_center-1);
mln_piter(image1d<t_value>) l(_mean.domain());
-
+
for_all(l)
{
_mean(l) = (l.ind()*step) + mln_min(t_value);
@@ -668,7 +693,7 @@ namespace mln
trace::exiting("mln::clustering::kmean1d<T,n,k>::init_mean_regular");
}
-
+
template <typename T, unsigned n>
inline
@@ -684,9 +709,9 @@ namespace mln
{
_mean(l) = (rand() % (max-min)) + min;
- std::cout << "mean" << l << " : " << _mean(l) << std::endl;
+ //std::cout << "mean" << l << " : " << _mean(l) << std::endl;
}
-
+
trace::exiting("mln::clustering::kmean1d::init_mean_random");
}
@@ -755,12 +780,12 @@ namespace mln
label = l.ind();
}
- //std::cout << "d" << l << " = " <<
+ //std::cout << "d" << l << " = " <<
// _distance(point2d(g.ind(), l.ind())) << std::endl;
}
//std::cout << "g = " << g << std::endl;
-
+
_group(g) = label;
//std::cout << "group = " << _group(g) << std::endl;
//std::cout << "-----------" << std::endl;
@@ -783,7 +808,7 @@ namespace mln
//
// Vg in [0..255]
// si w[g] = l
- // c[l] += g
+ // c[l] += h(g) * g
// n[l] += h(g)
//
// c[l] /= n
@@ -800,7 +825,7 @@ namespace mln
}
mln_piter(t_mean_img) l(_mean.domain());
-
+
/*
for_all(l)
{
@@ -810,7 +835,7 @@ namespace mln
*/
for_all(l)
{
- // State the stopping propagation Nan flag
+ // State the stopping propagation Nan flag
_is_number_valid = (0 != _number(l));
// Emergency exit
@@ -821,7 +846,7 @@ namespace mln
_mean(l) /= _number(l);
// Debugging
- std::cout << "c" << l << " = " << _mean(l) << std::endl;
+ //std::cout << "c" << l << " = " << _mean(l) << std::endl;
}
trace::exiting("mln::clustering::kmean1d::update_mean");
@@ -849,7 +874,7 @@ namespace mln
}
_within_variance += _variance(l);
- std::cout << "v(" << l << ") = " << _variance(l) << std::endl;
+ //std::cout << "v(" << l << ") = " << _variance(l) << std::endl;
}
//std::cout << "result" << result << std::endl;
@@ -869,12 +894,12 @@ namespace mln
mln_piter(t_point_img) pi(_point.domain());
mln_piter(t_label_dbg) po(_label_dbg.domain());
-
+
for_all_2(pi, po)
{
t_value val = _point(pi);
t_label grp = _group(point1d(val));
-
+
_label_dbg(po) = grp;
}
@@ -900,14 +925,14 @@ namespace mln
{
trace::entering("mln::clustering::kmean1d::update_cnv");
- _variance_cnv(point2d(_current_launching,
+ _variance_cnv(point2d(_current_launching,
_current_step)) = _within_variance;
mln_piter(t_mean_img) l(_mean.domain());
-
+
for_all(l)
{
- _mean_cnv(point3d(_current_launching,
+ _mean_cnv(point3d(_current_launching,
l.ind(),
_current_step)) = _mean(l);
}
@@ -924,7 +949,7 @@ namespace mln
// saturate the curv with the within variance
for (unsigned i = _current_step; i < _watch_dog; ++i)
_variance_cnv(point2d(_current_launching, i)) = _within_variance;
-
+
for (unsigned i = _current_step; i < _watch_dog; ++i)
{
mln_piter(t_mean_img) l(_mean.domain());
@@ -954,18 +979,7 @@ namespace mln
trace::exiting("mln::clustering::kmean1d::is_descent_valid");
return result;
}
-
- template <typename T, unsigned n>
- inline
- bool kmean1d<T,n>::is_number_valid()
- {
- trace::entering("mln::clustering::kmean1d::is_valid");
- bool result = _is_number_valid;
-
- trace::exiting("mln::clustering::kmean1d::is_valid");
- return result;
- }
//--------------------------------------------------------------------------
// Main loop
@@ -977,7 +991,7 @@ namespace mln
{
trace::entering("mln::clustering::kmean1d::launch_one_time");
- std::cout << "----------------------------------------" << std::endl;
+ //std::cout << "----------------------------------------" << std::endl;
// Initialization to start the descent
t_result old_variance = mln_max(t_result);
@@ -988,7 +1002,7 @@ namespace mln
init_mean();
update_distance();
- std::cout << "first_variance : " << old_variance << std::endl;
+ //std::cout << "first_variance : " << old_variance << std::endl;
// Execute the descent
do
@@ -1009,31 +1023,29 @@ namespace mln
// Debugging code
update_cnv();
- std::cout << "_current_step : " << _current_step << std::endl;
- std::cout << "_within_variance : " << _within_variance << std::endl;
+ //std::cout << "_current_step : " << _current_step << std::endl;
+ //std::cout << "_within_variance : " << _within_variance << std::endl;
++_current_step;
}
while (_current_step < _watch_dog && _within_variance < old_variance);
- std::cout << "----------------------------------------" << std::endl;
+ //std::cout << "----------------------------------------" << std::endl;
finalize_cnv();
trace::exiting("mln::clustering::kmean1d::launch_one_time");
}
- /// FIXME There is a risk of infinite loop if convergence is not observed
- /// FIXME What do we prefer, bad results or infinite loop ?
template <typename T, unsigned n>
inline
void kmean1d<T,n>::launch_n_times()
{
trace::entering("mln::clustering::kmean1d::launch_n_times");
-
- std::cout << "watch_dog : " << _watch_dog << std::endl;
- std::cout << "n_times : " << _n_times << std::endl;
+
+ //std::cout << "watch_dog : " << _watch_dog << std::endl;
+ //std::cout << "n_times : " << _n_times << std::endl;
// number of times we reexecute launch_one_time without any success
unsigned tries = 0;
@@ -1054,15 +1066,15 @@ namespace mln
_mean_min = _mean;
_launching_min = _current_launching;
}
-
+
// Reinitialize the number of echecs possible
tries = 0;
- std::cout << "_current_launching : " << _current_launching
- << std::endl;
+ //std::cout << "_current_launching : " << _current_launching
+ // << std::endl;
- std::cout << "within_variance[" << _current_launching << "] = "
- << _within_variance << std::endl;
+ //std::cout << "within_variance[" << _current_launching << "] = "
+ // << _within_variance << std::endl;
++_current_launching;
}
--
1.5.6.5