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
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
ChangeLog:
2009-05-22 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Add tool for point manipulation through plot.
* fabien/igr/point_filtering/Makefile: New target all.
* fabien/igr/point_filtering/main.cc: Load plots and compute filtering.
---
Makefile | 9 +++++++
main.cc | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+)
Index: trunk/milena/sandbox/fabien/igr/point_filtering/main.cc
===================================================================
--- trunk/milena/sandbox/fabien/igr/point_filtering/main.cc (revision 0)
+++ trunk/milena/sandbox/fabien/igr/point_filtering/main.cc (revision 3864)
@@ -0,0 +1,80 @@
+#include <mln/core/image/image1d.hh>
+#include <mln/core/alias/window1d.hh>
+
+#include <mln/io/plot/all.hh>
+
+#include <mln/accu/mean.hh>
+#include <mln/accu/image/all.hh>
+#include <mln/convert/from_to.hh>
+#include <mln/morpho/closing/structural.hh>
+#include <mln/morpho/opening/structural.hh>
+#include <mln/util/array.hh>
+
+
+using namespace mln;
+
+
+int main(int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ std::cout << "Usage: " << argv[0] << "point.plot" << std::endl;
+ }
+
+ util::array<float> arr;
+ io::plot::load(arr, argv[1]);
+ image1d<float> ima;
+ convert::from_to(arr, ima);
+
+ // Raw point.
+ io::plot::save(ima, "raw.plot");
+
+ // Morpho filtering.
+ window1d win_1;
+ win_1
+ .insert(-2)
+ .insert(-1)
+ .insert(0)
+ .insert(1)
+ .insert(2);
+
+ image1d<float> opening_ima = morpho::opening::structural(ima, win_1);
+ image1d<float> closing_ima = morpho::closing::structural(ima, win_1);
+
+ image1d<accu::mean<float> > result;
+
+ initialize(result, ima);
+
+ accu::image::init(result);
+ accu::image::take(result, closing_ima);
+ accu::image::take(result, opening_ima);
+ image1d<float> ima_morpho = accu::image::to_result(result);
+ io::plot::save(ima_morpho, "morpho.plot");
+
+ // Morpho (again).
+ opening_ima = morpho::opening::structural(ima_morpho, win_1);
+ closing_ima = morpho::closing::structural(ima_morpho, win_1);
+
+ initialize(result, ima_morpho);
+
+ accu::image::init(result);
+ accu::image::take(result, closing_ima);
+ accu::image::take(result, opening_ima);
+ image1d<float> ima_morpho2 = accu::image::to_result(result);
+ io::plot::save(ima_morpho2, "morpho2.plot");
+
+ // Morpho (the return of the revenge).
+ opening_ima = morpho::opening::structural(ima_morpho2, win_1);
+ closing_ima = morpho::closing::structural(ima_morpho2, win_1);
+
+ initialize(result, ima_morpho2);
+
+ accu::image::init(result);
+ accu::image::take(result, closing_ima);
+ accu::image::take(result, opening_ima);
+ image1d<float> ima_morpho3 = accu::image::to_result(result);
+ io::plot::save(ima_morpho3, "morpho3.plot");
+
+
+ return 0;
+}
Index: trunk/milena/sandbox/fabien/igr/point_filtering/Makefile
===================================================================
--- trunk/milena/sandbox/fabien/igr/point_filtering/Makefile (revision 0)
+++ trunk/milena/sandbox/fabien/igr/point_filtering/Makefile (revision 3864)
@@ -0,0 +1,9 @@
+include ../Makefile.rules
+
+all: main.cc
+ ${CXX} -I../../../../ ${CXXFLAGS} $^ -o point_filtering
+
+
+clean:
+ rm -rf *.dump *.p?m *.plot *.log *.csv *.dSYM
+ rm point_filtering
1
0
22 May '09
---
ChangeLog | 4 ++++
configure.ac | 1 +
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f92aa95..f7ada5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-05-22 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ * configure.ac: configure milena/tests/core/image/dmorph.
+
+2009-05-22 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Configure scribo directory and generate unit tests.
* configure.ac: configure scribo directory.
diff --git a/configure.ac b/configure.ac
index e9fe195..18e780e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,6 +242,7 @@ AC_CONFIG_FILES([
milena/tests/core/Makefile
milena/tests/core/alias/Makefile
milena/tests/core/image/Makefile
+ milena/tests/core/image/dmorph/Makefile
milena/tests/core/other/Makefile
milena/tests/core/routine/Makefile
milena/tests/core/site_set/Makefile
--
1.5.6.5
1
0
* configure.ac: configure scribo directory and generate unit tests.
* bootstrap: generate unit tests for scribo.
---
ChangeLog | 8 ++++++++
bootstrap | 3 +++
configure.ac | 24 ++++++++++++++++++++++++
3 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ba9076d..f92aa95 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-22 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Configure scribo directory and generate unit tests.
+
+ * configure.ac: configure scribo directory.
+
+ * bootstrap: generate unit tests for scribo.
+
2009-05-15 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
* configure.ac: configure various test directories.
diff --git a/bootstrap b/bootstrap
index 102faf1..9e8babf 100755
--- a/bootstrap
+++ b/bootstrap
@@ -135,6 +135,9 @@ run milena ./generate_dist_headers.sh
# for the tutorial.
run milena/doc ./generate_dist_files.sh
+# Generate unit test files for Scribo.
+run scribo/tests/unit_test ./build_unit_test.sh `pwd`/scribo
+
# Tell what's going on.
set -x
diff --git a/configure.ac b/configure.ac
index 25fd1b0..e9fe195 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,7 @@ AC_ARG_ENABLE([all],
enable_trimesh=yes
with_swig=yes
enable_swilena=yes
+ enable_scribo=yes
enable_apps=yes
enable_tools=yes
])
@@ -169,6 +170,28 @@ AC_CONFIG_FILES(m4_do([swilena/python/sps-local],
[:swilena/python/sps-local.in]),
[chmod +x swilena/python/sps-local])
+## -------- ##
+## Scribo. ##
+## -------- ##
+
+AM_CONDITIONAL([ENABLE_SCRIBO], [test x$enable_scribo = xyes])
+
+AC_CONFIG_FILES([
+ scribo/Makefile
+ scribo/src/Makefile
+ scribo/src/binarization/Makefile
+])
+
+AC_CONFIG_FILES([scribo/tests/data.hh])
+
+AC_CONFIG_FILES([
+ scribo/tests/Makefile
+ scribo/tests/filter/Makefile
+ scribo/tests/preprocessing/Makefile
+ scribo/tests/table/Makefile
+ scribo/tests/text/Makefile
+])
+
## --------------- ##
## Configuration. ##
@@ -190,6 +213,7 @@ AC_CONFIG_FILES([
milena/mesh/Makefile
])
+
## ------- ##
## Tests. ##
## ------- ##
--
1.5.6.5
1
0
* mln/accu/max_site.hh: add a missing include.
* mln/fun/x2x/rotation.hh: Replace 'float' by 'C', the template
parameter.
* mln/fun/x2x/translation.hh: fix header.
* mln/graph/attribute/representative.hh: avoid a warning.
* mln/make/p_edges_with_mass_centers.hh,
* mln/make/p_vertices_with_mass_centers.hh: improve interface.
* mln/math/pi.hh: use a more precise value.
* mln/topo/skeleton/crest.hh: add more documentation.
* mln/transformation/all.hh: fix wrong include.
* tests/make/p_edges_with_mass_centers.cc,
* tests/make/p_vertices_with_mass_centers.cc: update the call of the
routine.
* tests/transformation/rotate.cc: fix wrong reference result.
* tests/util/Makefile.am: remove a non existing test.
---
milena/ChangeLog | 30 +++++++++++++
milena/mln/accu/max_site.hh | 1 +
milena/mln/fun/x2x/rotation.hh | 48 ++++++++++----------
milena/mln/fun/x2x/translation.hh | 2 +-
milena/mln/graph/attribute/representative.hh | 2 +-
milena/mln/make/p_edges_with_mass_centers.hh | 5 +-
milena/mln/make/p_vertices_with_mass_centers.hh | 5 +-
milena/mln/math/pi.hh | 2 +-
milena/mln/topo/skeleton/crest.hh | 34 +++++++++++++++
milena/mln/transformation/all.hh | 2 +-
milena/tests/make/p_edges_with_mass_centers.cc | 2 +-
milena/tests/make/p_vertices_with_mass_centers.cc | 2 +-
milena/tests/transformation/rotate.cc | 4 +-
milena/tests/util/Makefile.am | 1 -
14 files changed, 101 insertions(+), 39 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 83247d6..310c143 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,35 @@
2009-05-18 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Small fixes.
+
+ * mln/accu/max_site.hh: add a missing include.
+
+ * mln/fun/x2x/rotation.hh: Replace 'float' by 'C', the template
+ parameter.
+
+ * mln/fun/x2x/translation.hh: fix header.
+
+ * mln/graph/attribute/representative.hh: avoid a warning.
+
+ * mln/make/p_edges_with_mass_centers.hh,
+ * mln/make/p_vertices_with_mass_centers.hh: improve interface.
+
+ * mln/math/pi.hh: use a more precise value.
+
+ * mln/topo/skeleton/crest.hh: add more documentation.
+
+ * mln/transformation/all.hh: fix wrong include.
+
+ * tests/make/p_edges_with_mass_centers.cc,
+ * tests/make/p_vertices_with_mass_centers.cc: update the call of the
+ routine.
+
+ * tests/transformation/rotate.cc: fix wrong reference result.
+
+ * tests/util/Makefile.am: remove a non existing test.
+
+2009-05-18 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Fix nondeterminism in generators.
* doc/generate_dist_files.sh,
diff --git a/milena/mln/accu/max_site.hh b/milena/mln/accu/max_site.hh
index 56bd2c2..2f9358c 100644
--- a/milena/mln/accu/max_site.hh
+++ b/milena/mln/accu/max_site.hh
@@ -35,6 +35,7 @@
///
/// \todo Use accu::pair just like in accu::min_max.
+# include <mln/core/concept/meta_accumulator.hh>
# include <mln/accu/internal/base.hh>
# include <mln/util/pix.hh>
diff --git a/milena/mln/fun/x2x/rotation.hh b/milena/mln/fun/x2x/rotation.hh
index b38cffb..04938d3 100644
--- a/milena/mln/fun/x2x/rotation.hh
+++ b/milena/mln/fun/x2x/rotation.hh
@@ -62,14 +62,14 @@ namespace mln
{
template < unsigned n, typename C >
algebra::h_mat<n, C>
- get_rot_h_mat(const float alpha_, const algebra::vec<n,C>& axis_)
+ get_rot_h_mat(const C alpha_, const algebra::vec<n,C>& axis_)
{
mln_assertion(!"get_h_mat : n not implemented");
}
template <typename C >
algebra::h_mat<3, C>
- get_rot_h_mat(const float alpha_, const algebra::vec<3,C>& axis_)
+ get_rot_h_mat(const C alpha_, const algebra::vec<3,C>& axis_)
{
//test axis is valid
typedef algebra::vec<3,C> vec_t;
@@ -80,14 +80,14 @@ namespace mln
algebra::vec<3,C> axis = axis_;
axis.normalize();
- const float cos_a = cos(alpha_);
- const float sin_a = sin(alpha_);
- const float u = axis_[0];
- const float v = axis_[1];
- const float w = axis_[2];
- const float u2 = u * u;
- const float v2 = v * v;
- const float w2 = w * w;
+ const C cos_a = cos(alpha_);
+ const C sin_a = sin(alpha_);
+ const C u = axis_[0];
+ const C v = axis_[1];
+ const C w = axis_[2];
+ const C u2 = u * u;
+ const C v2 = v * v;
+ const C w2 = w * w;
algebra::h_mat<3, C> m_;
@@ -116,10 +116,10 @@ namespace mln
template <typename C >
algebra::h_mat<2, C>
- get_rot_h_mat(const float alpha_, const algebra::vec<2,C>&)
+ get_rot_h_mat(const C alpha_, const algebra::vec<2,C>&)
{
- const float cos_a = cos(alpha_);
- const float sin_a = sin(alpha_);
+ const C cos_a = cos(alpha_);
+ const C sin_a = sin(alpha_);
algebra::h_mat<2, C> m_;
@@ -149,7 +149,7 @@ namespace mln
/// Constructor without argument.
rotation();
/// Constructor with radian alpha and a facultative direction (rotation axis).
- rotation(float alpha, const algebra::vec<n,float>& axis);
+ rotation(C alpha, const algebra::vec<n,C>& axis);
/// Constructor with quaternion
rotation(const algebra::quat& q);
/// Constructor with h_mat.
@@ -160,9 +160,9 @@ namespace mln
algebra::vec<n,C> operator()(const algebra::vec<n,C>& v) const;
/// Set a new grade alpha.
- void set_alpha(float alpha);
+ void set_alpha(C alpha);
/// Set a new rotation axis.
- void set_axis(const algebra::vec<n,float>& axis);
+ void set_axis(const algebra::vec<n,C>& axis);
protected:
void update();
@@ -170,8 +170,8 @@ namespace mln
/// FIXME: Is it useful?
- float alpha_;
- algebra::vec <n,float> axis_;
+ C alpha_;
+ algebra::vec <n,C> axis_;
};
@@ -185,7 +185,7 @@ namespace mln
template <unsigned n, typename C>
inline
- rotation<n,C>::rotation(float alpha, const algebra::vec<n,float>& axis)
+ rotation<n,C>::rotation(C alpha, const algebra::vec<n,C>& axis)
:alpha_(alpha),
axis_(axis)
{
@@ -201,13 +201,13 @@ namespace mln
mlc_bool(n == 3)::check();
mln_precondition(q.is_unit());
- float
+ C
w = q.to_vec()[0],
x = q.to_vec()[1], x2 = 2*x*x, xw = 2*x*w,
y = q.to_vec()[2], y2 = 2*y*y, xy = 2*x*y, yw = 2*y*w,
z = q.to_vec()[3], z2 = 2*z*z, xz = 2*x*z, yz = 2*y*z, zw = 2*z*w;
- float t[9] = {1.f - y2 - z2, xy - zw, xz + yw,
+ C t[9] = {1.f - y2 - z2, xy - zw, xz + yw,
xy + zw, 1.f - x2 - z2, yz - xw,
xz - yw, yz + xw, 1.f - x2 - y2};
@@ -262,7 +262,7 @@ namespace mln
template <unsigned n, typename C>
inline
void
- rotation<n,C>::set_alpha(float alpha)
+ rotation<n,C>::set_alpha(C alpha)
{
alpha_ = alpha;
update();
@@ -271,7 +271,7 @@ namespace mln
template <unsigned n, typename C>
inline
void
- rotation<n,C>::set_axis(const algebra::vec<n,float>& axis)
+ rotation<n,C>::set_axis(const algebra::vec<n,C>& axis)
{
axis_ = axis;
update();
@@ -300,7 +300,7 @@ namespace mln
p = tmp / norm::l2(tmp),
p_rot_1 = q.rotate(p),
p_rot_2 = (*this)(p);
- return norm::l2(p_rot_1 - p_rot_2) < mln_epsilon(float);
+ return norm::l2(p_rot_1 - p_rot_2) < mln_epsilon(C);
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/fun/x2x/translation.hh b/milena/mln/fun/x2x/translation.hh
index a6e8a39..e30d27c 100644
--- a/milena/mln/fun/x2x/translation.hh
+++ b/milena/mln/fun/x2x/translation.hh
@@ -1,5 +1,5 @@
// Copyright (C) 2007, 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
diff --git a/milena/mln/graph/attribute/representative.hh b/milena/mln/graph/attribute/representative.hh
index 88ed258..584b3aa 100644
--- a/milena/mln/graph/attribute/representative.hh
+++ b/milena/mln/graph/attribute/representative.hh
@@ -86,7 +86,7 @@ namespace mln
deja_vu_[id] = true;
}
- void process_vertex(unsigned id)
+ void process_vertex(unsigned)
{}
bool to_be_queued(unsigned id)
diff --git a/milena/mln/make/p_edges_with_mass_centers.hh b/milena/mln/make/p_edges_with_mass_centers.hh
index 8a1db50..eb9269d 100644
--- a/milena/mln/make/p_edges_with_mass_centers.hh
+++ b/milena/mln/make/p_edges_with_mass_centers.hh
@@ -61,7 +61,6 @@ namespace mln
/// adjacent regions.
///
/// \param wst_ A watershed image.
- /// \param nbasins The number of basins.
/// \param g_ A region adjacency graph.
///
/// \return A p_edges.
@@ -72,7 +71,6 @@ namespace mln
inline
p_edges<G, fun::i2v::array<util::site_pair<mln_site(W)> > >
p_edges_with_mass_centers(const Image<W>& wst_,
- const mln_value(W)& nbasins,
const Graph<G>& g_);
@@ -83,7 +81,6 @@ namespace mln
inline
p_edges<G, fun::i2v::array<util::site_pair<mln_site(W)> > >
p_edges_with_mass_centers(const Image<W>& wst_,
- const mln_value(W)& nbasins,
const Graph<G>& g_)
{
trace::entering("make::p_edges_with_mass_centers");
@@ -95,6 +92,8 @@ namespace mln
typedef mln_site(W) P;
+ // nbasins does not include the background label.
+ mln_value(W) nbasins = g.v_nmax() - 1;
util::array<mln_vec(P)>
mass_centers = labeling::compute(accu::center<P>(), wst, nbasins);
diff --git a/milena/mln/make/p_vertices_with_mass_centers.hh b/milena/mln/make/p_vertices_with_mass_centers.hh
index 064cdbc..cb7db48 100644
--- a/milena/mln/make/p_vertices_with_mass_centers.hh
+++ b/milena/mln/make/p_vertices_with_mass_centers.hh
@@ -57,7 +57,6 @@ namespace mln
/// corresponding region.
///
/// \param wst_ A watershed image.
- /// \param nbasins The number of basins.
/// \param g_ A region adjacency graph.
///
/// \return A p_vertices.
@@ -68,7 +67,6 @@ namespace mln
inline
p_vertices<G, fun::i2v::array<mln_site(W)> >
p_vertices_with_mass_centers(const Image<W>& wst_,
- const mln_value(W)& nbasins,
const Graph<G>& g_);
@@ -79,7 +77,6 @@ namespace mln
inline
p_vertices<G, fun::i2v::array<mln_site(W)> >
p_vertices_with_mass_centers(const Image<W>& wst_,
- const mln_value(W)& nbasins,
const Graph<G>& g_)
{
trace::entering("make::p_vertices_with_mass_centers");
@@ -92,6 +89,8 @@ namespace mln
typedef mln_site(W) P;
typedef fun::i2v::array<P> vertex_sites_t;
+ // nbasins does not include the background label.
+ mln_value(W) nbasins = g.v_nmax() - 1;
vertex_sites_t vertex_sites;
convert::from_to(labeling::compute(accu::center<P>(), wst, nbasins),
vertex_sites);
diff --git a/milena/mln/math/pi.hh b/milena/mln/math/pi.hh
index 08f6d07..581b236 100644
--- a/milena/mln/math/pi.hh
+++ b/milena/mln/math/pi.hh
@@ -39,7 +39,7 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
- const double pi = 3.1415926535;
+ const double pi = 3.1415926535897932385;
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/topo/skeleton/crest.hh b/milena/mln/topo/skeleton/crest.hh
index 432b57c..db7a617 100644
--- a/milena/mln/topo/skeleton/crest.hh
+++ b/milena/mln/topo/skeleton/crest.hh
@@ -32,6 +32,11 @@
///
/// Compute skeletization constraints.
+# include <mln/core/concept/image.hh>
+# include <mln/core/concept/neighborhood.hh>
+
+# include <mln/data/fill.hh>
+
namespace mln
{
@@ -52,6 +57,35 @@ namespace mln
///
/// \result A binary image.
//
+ /*!
+ *
+ * This implementation is based on the following article:
+ * K. W. Kang, J. W. Suh, and J. H. Kim. Skeletonization of grayscale
+ * character images using pixel superiority index. In Proc. 3rd IAPR
+ * Workshop on Document Analysis Systems, pages 326-335, Nagano,
+ * Japan, 1998.
+ *
+ * Abstract:
+ * "In this paper, we present pixel superiority index as a tool for
+ * designing a skeletonization algorithm which utilizes topographic
+ * features efficiently. We clarify a relationship between pixel
+ * superiority index and topographic features. Then, using the
+ * relationship, we transform a problem of skeletonization into a
+ * problem of skeleton growing. [...]"
+ *
+ *
+ * In Milena, the Pixel Superiority index is defined as follow:
+ * Let v = p.val(), the Pixel superiority index of p is the number of
+ * neighbor pixels having their value/level inferior or equal to
+ * p.val().
+ *
+ * This algorithm keeps sites having their pixel superiority index
+ * greater than 5.
+ *
+ * For good results with 2D images, we advice you to use c8() as
+ * neighborhood.
+ *
+ */
template <typename I, typename D, typename N>
mln_concrete(I)
crest(const Image<I>& input_, const Image<D>& dist_map_,
diff --git a/milena/mln/transformation/all.hh b/milena/mln/transformation/all.hh
index 1379093..dd1adb8 100644
--- a/milena/mln/transformation/all.hh
+++ b/milena/mln/transformation/all.hh
@@ -40,6 +40,6 @@ namespace mln
} // end of namespace mln
-# include <mln/transformation/rotation.hh>
+# include <mln/transformation/rotate.hh>
# endif // ! MLN_TRANSFORMATION_ALL_HH_
diff --git a/milena/tests/make/p_edges_with_mass_centers.cc b/milena/tests/make/p_edges_with_mass_centers.cc
index 967320c..04f3757 100644
--- a/milena/tests/make/p_edges_with_mass_centers.cc
+++ b/milena/tests/make/p_edges_with_mass_centers.cc
@@ -68,7 +68,7 @@ int main()
L nbasins = 4;
typedef p_edges<G,fun::i2v::array<util::site_pair<point2d> > > pe_t;
- pe_t pe = make::p_edges_with_mass_centers(wst, nbasins, g);
+ pe_t pe = make::p_edges_with_mass_centers(wst, g);
typedef util::site_pair<point2d> P;
typedef p_array<P> arr_t;
diff --git a/milena/tests/make/p_vertices_with_mass_centers.cc b/milena/tests/make/p_vertices_with_mass_centers.cc
index 2d103df..29b3d06 100644
--- a/milena/tests/make/p_vertices_with_mass_centers.cc
+++ b/milena/tests/make/p_vertices_with_mass_centers.cc
@@ -66,7 +66,7 @@ int main()
L nbasins = 4;
typedef p_vertices<G,fun::i2v::array<point2d> > pv_t;
- pv_t pv = make::p_vertices_with_mass_centers(wst, nbasins, g);
+ pv_t pv = make::p_vertices_with_mass_centers(wst, g);
typedef p_array<point2d> arr_t;
arr_t arr;
diff --git a/milena/tests/transformation/rotate.cc b/milena/tests/transformation/rotate.cc
index 8bdd90c..d0dfaee 100644
--- a/milena/tests/transformation/rotate.cc
+++ b/milena/tests/transformation/rotate.cc
@@ -34,14 +34,13 @@
# include <mln/make/image.hh>
# include <mln/level/compare.hh>
-# include <mln/debug/println.hh>
int main()
{
using namespace mln;
bool ref_values[][5] = { { 0, 1, 0, 0, 0 },
- { 0, 1, 1, 0, 0 },
+ { 0, 0, 1, 0, 0 },
{ 0, 0, 1, 1, 0 },
{ 0, 0, 0, 1, 1 },
{ 0, 0, 0, 0, 1 } };
@@ -56,5 +55,6 @@ int main()
image2d<bool> ref = make::image(ref_values);
image2d<bool> ima_rot = transformation::rotate(ima, 45);
+
mln_assertion(ima_rot == ref);
}
diff --git a/milena/tests/util/Makefile.am b/milena/tests/util/Makefile.am
index 1e49416..334feb5 100644
--- a/milena/tests/util/Makefile.am
+++ b/milena/tests/util/Makefile.am
@@ -18,7 +18,6 @@ check_PROGRAMS = \
soft_heap \
tree \
tree_fast \
- tree_fast_to_image \
tree_to_fast
adjacency_matrix_SOURCES = adjacency_matrix.cc
--
1.5.6.5
1
0
* doc/generate_dist_files.sh,
* generate_dist_headers.sh: use 'sort -d'.
* doc/outputs/outputs.mk,
* headers.mk,
* tests/unit_test/unit-tests.mk: update lists.
---
milena/ChangeLog | 11 ++
milena/doc/generate_dist_files.sh | 2 +-
milena/doc/outputs/outputs.mk | 6 +-
milena/generate_dist_headers.sh | 4 +-
milena/headers.mk | 154 +++++++++--------
milena/tests/unit_test/unit-tests.mk | 300 ++++++++++++++++++----------------
6 files changed, 256 insertions(+), 221 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1cf2f31..83247d6 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,14 @@
+2009-05-18 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Fix nondeterminism in generators.
+
+ * doc/generate_dist_files.sh,
+ * generate_dist_headers.sh: use 'sort -d'.
+
+ * doc/outputs/outputs.mk,
+ * headers.mk,
+ * tests/unit_test/unit-tests.mk: update lists.
+
2009-05-20 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
New domain morpher, though a function from site to site.
diff --git a/milena/doc/generate_dist_files.sh b/milena/doc/generate_dist_files.sh
index e7c3b38..fdef488 100755
--- a/milena/doc/generate_dist_files.sh
+++ b/milena/doc/generate_dist_files.sh
@@ -14,7 +14,7 @@ for dir in figures outputs examples; do
echo >>$OUT
$ECHO_N "EXTRA_DIST += " >> $OUT
for ftype in cc.raw p*m txt; do
- for file in `find $dir -mindepth 1 -name *.$ftype`; do
+ for file in `find $dir -mindepth 1 -name *.$ftype | sort -d `; do
echo " \\" >> $OUT
$ECHO_N $file >> $OUT
done
diff --git a/milena/doc/outputs/outputs.mk b/milena/doc/outputs/outputs.mk
index 754db84..db8fdec 100644
--- a/milena/doc/outputs/outputs.mk
+++ b/milena/doc/outputs/outputs.mk
@@ -21,9 +21,6 @@ outputs/fun-p2v-1.txt \
outputs/graph-data.txt \
outputs/graph-iter.txt \
outputs/graph-output-1.txt \
-outputs/ima-has.txt \
-outputs/ima-save.txt \
-outputs/ima-size.txt \
outputs/ima2d-1.txt \
outputs/ima2d-2.txt \
outputs/ima2d-3.txt \
@@ -37,6 +34,9 @@ outputs/ima2d-display-2.txt \
outputs/ima2d-display-output-1.txt \
outputs/ima2d-display-output-2.txt \
outputs/ima2d-rot.txt \
+outputs/ima-has.txt \
+outputs/ima-save.txt \
+outputs/ima-size.txt \
outputs/labeling-compute.txt \
outputs/logical-not.txt \
outputs/mln_var.txt \
diff --git a/milena/generate_dist_headers.sh b/milena/generate_dist_headers.sh
index 280d4b2..d6cfa4d 100755
--- a/milena/generate_dist_headers.sh
+++ b/milena/generate_dist_headers.sh
@@ -10,8 +10,8 @@ echo "nobase_include_HEADERS = \\" >> headers.mk
echo "mln/version.hh \\" >> headers.mk
echo "generating headers.mk"
-find mln -type f -name '*.hh'| grep -v "\.svn" | sed -e 's/$/ \\/g' | sort >> headers.mk
-find mln -type f -name '*.hxx'| grep -v "\.svn" | sed -e 's/$/ \\/g'| sort >> headers.mk
+find mln -type f -name '*.hh'| grep -v "\.svn" | sed -e 's/$/ \\/g' | sort -d >> headers.mk
+find mln -type f -name '*.hxx'| grep -v "\.svn" | sed -e 's/$/ \\/g'| sort -d >> headers.mk
last_line=`tail -n 1 headers.mk | sed -e 's/\\\//g'` # remove '\' in last line
sed '$d' < headers.mk > headers.mk.tmp # remove last line
diff --git a/milena/headers.mk b/milena/headers.mk
index 9643f61..c0820c9 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -7,8 +7,8 @@ mln/accu/bbox.hh \
mln/accu/center.hh \
mln/accu/compute.hh \
mln/accu/convolve.hh \
-mln/accu/count.hh \
mln/accu/count_adjacent_vertices.hh \
+mln/accu/count.hh \
mln/accu/count_labels.hh \
mln/accu/essential.hh \
mln/accu/height.hh \
@@ -17,8 +17,8 @@ mln/accu/image/all.hh \
mln/accu/image/essential.hh \
mln/accu/image/init.hh \
mln/accu/image/set_value.hh \
-mln/accu/image/take.hh \
mln/accu/image/take_as_init.hh \
+mln/accu/image/take.hh \
mln/accu/image/take_n_times.hh \
mln/accu/image/to_result.hh \
mln/accu/image/untake.hh \
@@ -26,14 +26,15 @@ mln/accu/inf.hh \
mln/accu/internal/base.hh \
mln/accu/internal/couple.hh \
mln/accu/label_used.hh \
-mln/accu/land.hh \
mln/accu/land_basic.hh \
+mln/accu/land.hh \
mln/accu/line.hh \
-mln/accu/lor.hh \
mln/accu/lor_basic.hh \
+mln/accu/lor.hh \
mln/accu/maj_h.hh \
mln/accu/max.hh \
mln/accu/max_h.hh \
+mln/accu/max_site.hh \
mln/accu/mean.hh \
mln/accu/median_alt.hh \
mln/accu/median_h.hh \
@@ -41,10 +42,10 @@ mln/accu/min.hh \
mln/accu/min_h.hh \
mln/accu/min_max.hh \
mln/accu/nil.hh \
-mln/accu/p.hh \
mln/accu/pair.hh \
-mln/accu/rank.hh \
+mln/accu/p.hh \
mln/accu/rank_bool.hh \
+mln/accu/rank.hh \
mln/accu/rank_high_quant.hh \
mln/accu/rms.hh \
mln/accu/site_set/all.hh \
@@ -57,9 +58,9 @@ mln/accu/stat/variance.hh \
mln/accu/sum.hh \
mln/accu/sup.hh \
mln/accu/take.hh \
-mln/accu/transform.hh \
mln/accu/transform_diagonal.hh \
mln/accu/transform_directional.hh \
+mln/accu/transform.hh \
mln/accu/transform_line.hh \
mln/accu/transform_snake.hh \
mln/accu/transform_stop.hh \
@@ -102,8 +103,8 @@ mln/border/fill.hh \
mln/border/find.hh \
mln/border/get.hh \
mln/border/mirror.hh \
-mln/border/resize.hh \
mln/border/resize_equal.hh \
+mln/border/resize.hh \
mln/border/thickness.hh \
mln/canvas/all.hh \
mln/canvas/browsing/all.hh \
@@ -111,8 +112,8 @@ mln/canvas/browsing/backdiagonal2d.hh \
mln/canvas/browsing/breadth_first_search.hh \
mln/canvas/browsing/depth_first_search.hh \
mln/canvas/browsing/diagonal2d.hh \
-mln/canvas/browsing/dir_struct_elt_incr_update.hh \
mln/canvas/browsing/directional.hh \
+mln/canvas/browsing/dir_struct_elt_incr_update.hh \
mln/canvas/browsing/essential.hh \
mln/canvas/browsing/fwd.hh \
mln/canvas/browsing/hyper_directional.hh \
@@ -140,15 +141,14 @@ mln/convert/impl/from_int_to_value.hh \
mln/convert/impl/from_site_set_to_image.hh \
mln/convert/impl/from_unsigned_to_value.hh \
mln/convert/impl/from_value_to_value.hh \
-mln/convert/to.hh \
mln/convert/to_dpoint.hh \
mln/convert/to_fun.hh \
+mln/convert/to.hh \
mln/convert/to_image.hh \
mln/convert/to_p_array.hh \
mln/convert/to_p_set.hh \
mln/convert/to_upper_window.hh \
mln/convert/to_window.hh \
-mln/core/a_point_of.hh \
mln/core/alias/all.hh \
mln/core/alias/box1d.hh \
mln/core/alias/box2d.hh \
@@ -163,28 +163,29 @@ mln/core/alias/dpoint3d.hh \
mln/core/alias/neighb1d.hh \
mln/core/alias/neighb2d.hh \
mln/core/alias/neighb3d.hh \
-mln/core/alias/p_run2d.hh \
-mln/core/alias/p_runs2d.hh \
mln/core/alias/point1d.hh \
mln/core/alias/point2d.hh \
mln/core/alias/point2d_h.hh \
mln/core/alias/point3d.hh \
+mln/core/alias/p_run2d.hh \
+mln/core/alias/p_runs2d.hh \
mln/core/alias/vec2d.hh \
mln/core/alias/vec3d.hh \
+mln/core/alias/window1d.hh \
+mln/core/alias/window2d.hh \
+mln/core/alias/window3d.hh \
mln/core/alias/w_window1d_float.hh \
mln/core/alias/w_window1d_int.hh \
mln/core/alias/w_window2d_float.hh \
mln/core/alias/w_window2d_int.hh \
mln/core/alias/w_window3d_float.hh \
mln/core/alias/w_window3d_int.hh \
-mln/core/alias/window1d.hh \
-mln/core/alias/window2d.hh \
-mln/core/alias/window3d.hh \
mln/core/all.hh \
+mln/core/a_point_of.hh \
mln/core/box_runstart_piter.hh \
mln/core/category.hh \
-mln/core/clock_neighb.hh \
mln/core/clock_neighb2d.hh \
+mln/core/clock_neighb.hh \
mln/core/concept/accumulator.hh \
mln/core/concept/all.hh \
mln/core/concept/box.hh \
@@ -194,8 +195,8 @@ mln/core/concept/doc/accumulator.hh \
mln/core/concept/doc/box.hh \
mln/core/concept/doc/dpoint.hh \
mln/core/concept/doc/generalized_pixel.hh \
-mln/core/concept/doc/image.hh \
mln/core/concept/doc/image_fastest.hh \
+mln/core/concept/doc/image.hh \
mln/core/concept/doc/iterator.hh \
mln/core/concept/doc/neighborhood.hh \
mln/core/concept/doc/object.hh \
@@ -218,8 +219,8 @@ mln/core/concept/iterator.hh \
mln/core/concept/literal.hh \
mln/core/concept/mesh.hh \
mln/core/concept/meta_accumulator.hh \
-mln/core/concept/meta_fun.hh \
mln/core/concept/meta_function.hh \
+mln/core/concept/meta_fun.hh \
mln/core/concept/neighborhood.hh \
mln/core/concept/object.hh \
mln/core/concept/pixel_iterator.hh \
@@ -239,8 +240,8 @@ mln/core/concept/weighted_window.hh \
mln/core/concept/window.hh \
mln/core/contract.hh \
mln/core/def/all.hh \
-mln/core/def/coord.hh \
mln/core/def/coordf.hh \
+mln/core/def/coord.hh \
mln/core/def/essential.hh \
mln/core/def/low_quant_nbits.hh \
mln/core/dpoint.hh \
@@ -299,9 +300,9 @@ mln/core/image/sparse_encode.hh \
mln/core/image/sparse_image.hh \
mln/core/image/sub_image.hh \
mln/core/image/sub_image_if.hh \
-mln/core/image/t_image.hh \
-mln/core/image/thru_morpher.hh \
mln/core/image/thrubin_morpher.hh \
+mln/core/image/thru_morpher.hh \
+mln/core/image/t_image.hh \
mln/core/image/tr_image.hh \
mln/core/image/tr_mesh.hh \
mln/core/image/unproject_image.hh \
@@ -391,8 +392,8 @@ mln/core/site_set/p_line2d.hh \
mln/core/site_set/p_mutable_array_of.hh \
mln/core/site_set/p_n_faces_piter.hh \
mln/core/site_set/p_priority.hh \
-mln/core/site_set/p_queue.hh \
mln/core/site_set/p_queue_fast.hh \
+mln/core/site_set/p_queue.hh \
mln/core/site_set/p_run.hh \
mln/core/site_set/p_run_piter.hh \
mln/core/site_set/p_set.hh \
@@ -407,8 +408,8 @@ mln/core/trait/op_mult.hh \
mln/core/trait/pixter.hh \
mln/core/trait/qlf_value.hh \
mln/core/var.hh \
-mln/core/w_window.hh \
mln/core/window.hh \
+mln/core/w_window.hh \
mln/data/all.hh \
mln/data/essential.hh \
mln/data/fill.hh \
@@ -452,9 +453,9 @@ mln/estim/essential.hh \
mln/estim/mean.hh \
mln/estim/min_max.hh \
mln/estim/sum.hh \
-mln/extension/adjust.hh \
mln/extension/adjust_duplicate.hh \
mln/extension/adjust_fill.hh \
+mln/extension/adjust.hh \
mln/extension/all.hh \
mln/extension/duplicate.hh \
mln/extension/essential.hh \
@@ -473,11 +474,11 @@ mln/fun/accu_result.hh \
mln/fun/all.hh \
mln/fun/binary.hh \
mln/fun/binary_param.hh \
-mln/fun/c.hh \
mln/fun/cast.hh \
+mln/fun/c.hh \
mln/fun/component/blue.hh \
-mln/fun/component/comp.hh \
mln/fun/component/comp_count.hh \
+mln/fun/component/comp.hh \
mln/fun/component/green.hh \
mln/fun/component/ithcomp.hh \
mln/fun/component/red.hh \
@@ -665,17 +666,18 @@ mln/io/pgm/load.hh \
mln/io/pgm/save.hh \
mln/io/plot/save.hh \
mln/io/pnm/all.hh \
-mln/io/pnm/load.hh \
mln/io/pnm/load_header.hh \
+mln/io/pnm/load.hh \
mln/io/pnm/macros.hh \
mln/io/pnm/max_component.hh \
-mln/io/pnm/save.hh \
mln/io/pnm/save_header.hh \
+mln/io/pnm/save.hh \
mln/io/ppm/all.hh \
mln/io/ppm/load.hh \
mln/io/ppm/save.hh \
mln/io/tiff/all.hh \
mln/io/tiff/load.hh \
+mln/io/tiff/save.hh \
mln/io/txt/all.hh \
mln/io/txt/save.hh \
mln/labeling/all.hh \
@@ -719,22 +721,22 @@ mln/level/sort_psites.hh \
mln/level/stretch.hh \
mln/level/to_enc.hh \
mln/level/transform.hh \
-mln/level/transform.spe.hh \
mln/level/transform_inplace.hh \
+mln/level/transform.spe.hh \
mln/level/update.hh \
mln/level/was.median.hh \
mln/linear/all.hh \
mln/linear/ch_convolve.hh \
-mln/linear/convolve.hh \
mln/linear/convolve_2x1d.hh \
mln/linear/convolve_directional.hh \
+mln/linear/convolve.hh \
mln/linear/essential.hh \
-mln/linear/gaussian.hh \
+mln/linear/gaussian_1d.hh \
+mln/linear/gaussian_directional_2d.hh \
mln/linear/gaussian/filter.hh \
+mln/linear/gaussian.hh \
mln/linear/gaussian/impl.hh \
mln/linear/gaussian/internal/coefficients.hh \
-mln/linear/gaussian_1d.hh \
-mln/linear/gaussian_directional_2d.hh \
mln/linear/lap.hh \
mln/linear/local/convolve.hh \
mln/linear/log.hh \
@@ -777,23 +779,23 @@ mln/make/dummy_p_vertices.hh \
mln/make/edge_image.hh \
mln/make/essential.hh \
mln/make/h_mat.hh \
-mln/make/image.hh \
mln/make/image2d.hh \
mln/make/image3d.hh \
+mln/make/image.hh \
mln/make/influence_zone_adjacency_graph.hh \
mln/make/mat.hh \
mln/make/p_edges_with_mass_centers.hh \
-mln/make/p_vertices_with_mass_centers.hh \
-mln/make/pix.hh \
mln/make/pixel.hh \
+mln/make/pix.hh \
mln/make/point2d_h.hh \
+mln/make/p_vertices_with_mass_centers.hh \
mln/make/rag_and_labeled_wsl.hh \
mln/make/region_adjacency_graph.hh \
mln/make/relabelfun.hh \
mln/make/vec.hh \
mln/make/vertex_image.hh \
mln/make/voronoi.hh \
-mln/make/w_window.hh \
+mln/make/win_chamfer.hh \
mln/make/w_window1d.hh \
mln/make/w_window1d_int.hh \
mln/make/w_window2d.hh \
@@ -801,7 +803,7 @@ mln/make/w_window2d_int.hh \
mln/make/w_window3d.hh \
mln/make/w_window3d_int.hh \
mln/make/w_window_directional.hh \
-mln/make/win_chamfer.hh \
+mln/make/w_window.hh \
mln/math/abs.hh \
mln/math/acos.hh \
mln/math/all.hh \
@@ -821,10 +823,10 @@ mln/math/sqrt.hh \
mln/metal/abort.hh \
mln/metal/all.hh \
mln/metal/ands.hh \
-mln/metal/array.hh \
mln/metal/array1d.hh \
mln/metal/array2d.hh \
mln/metal/array3d.hh \
+mln/metal/array.hh \
mln/metal/bexpr.hh \
mln/metal/bool.hh \
mln/metal/const.hh \
@@ -835,17 +837,17 @@ mln/metal/fix_return.hh \
mln/metal/goes_to.hh \
mln/metal/if.hh \
mln/metal/int.hh \
-mln/metal/is.hh \
mln/metal/is_a.hh \
mln/metal/is_const.hh \
-mln/metal/is_not.hh \
+mln/metal/is.hh \
mln/metal/is_not_a.hh \
mln/metal/is_not_const.hh \
+mln/metal/is_not.hh \
mln/metal/is_not_ref.hh \
mln/metal/is_ref.hh \
mln/metal/is_unqualif.hh \
-mln/metal/mat.hh \
mln/metal/math/all.hh \
+mln/metal/mat.hh \
mln/metal/math/max.hh \
mln/metal/math/pow.hh \
mln/metal/math/root.hh \
@@ -862,7 +864,6 @@ mln/metal/unptr.hh \
mln/metal/unqualif.hh \
mln/metal/unref.hh \
mln/metal/vec.hh \
-mln/morpho/Rd.hh \
mln/morpho/algebraic_filter.hh \
mln/morpho/all.hh \
mln/morpho/approx/all.hh \
@@ -894,8 +895,8 @@ mln/morpho/elementary/closing.hh \
mln/morpho/elementary/dilation.hh \
mln/morpho/elementary/erosion.hh \
mln/morpho/elementary/essential.hh \
-mln/morpho/elementary/gradient.hh \
mln/morpho/elementary/gradient_external.hh \
+mln/morpho/elementary/gradient.hh \
mln/morpho/elementary/gradient_internal.hh \
mln/morpho/elementary/laplacian.hh \
mln/morpho/elementary/like_ero_fun.hh \
@@ -929,12 +930,13 @@ mln/morpho/opening/structural.hh \
mln/morpho/opening/volume.hh \
mln/morpho/plus.hh \
mln/morpho/rank_filter.hh \
+mln/morpho/Rd.hh \
mln/morpho/reconstruction/all.hh \
mln/morpho/reconstruction/by_dilation/all.hh \
mln/morpho/reconstruction/by_dilation/union_find.hh \
mln/morpho/skeleton_constrained.hh \
-mln/morpho/thick_miss.hh \
mln/morpho/thickening.hh \
+mln/morpho/thick_miss.hh \
mln/morpho/thin_fit.hh \
mln/morpho/thinning.hh \
mln/morpho/top_hat.hh \
@@ -1005,14 +1007,14 @@ mln/topo/algebraic_face.hh \
mln/topo/algebraic_n_face.hh \
mln/topo/all.hh \
mln/topo/attic/faces_iter.hh \
-mln/topo/center_only_iter.hh \
mln/topo/centered_iter_adapter.hh \
+mln/topo/center_only_iter.hh \
mln/topo/complex.hh \
mln/topo/complex_iterators.hh \
mln/topo/detach.hh \
mln/topo/essential.hh \
-mln/topo/face.hh \
mln/topo/face_data.hh \
+mln/topo/face.hh \
mln/topo/face_iter.hh \
mln/topo/internal/complex_iterator_base.hh \
mln/topo/internal/complex_relative_iterator_base.hh \
@@ -1026,6 +1028,8 @@ mln/topo/n_face.hh \
mln/topo/n_face_iter.hh \
mln/topo/n_faces_set.hh \
mln/topo/skeleton/breadth_first_thinning.hh \
+mln/topo/skeleton/crest.hh \
+mln/topo/skeleton/is_simple_point.hh \
mln/topo/static_n_face_iter.hh \
mln/trace/all.hh \
mln/trace/entering.hh \
@@ -1044,13 +1048,13 @@ mln/trait/ch_value.hh \
mln/trait/concrete.hh \
mln/trait/essential.hh \
mln/trait/functions.hh \
+mln/trait/image_from_grid.hh \
mln/trait/image/print.hh \
mln/trait/image/props.hh \
-mln/trait/image_from_grid.hh \
mln/trait/images.hh \
mln/trait/neighborhood.hh \
-mln/trait/next/solve.hh \
mln/trait/next/solve_binary.hh \
+mln/trait/next/solve.hh \
mln/trait/next/solve_proxy.hh \
mln/trait/next/solve_unary.hh \
mln/trait/op/all.hh \
@@ -1068,8 +1072,8 @@ mln/trait/op/minus.hh \
mln/trait/op/mod.hh \
mln/trait/op/neq.hh \
mln/trait/op/not.hh \
-mln/trait/op/or.hh \
mln/trait/op/ord.hh \
+mln/trait/op/or.hh \
mln/trait/op/plus.hh \
mln/trait/op/postdec.hh \
mln/trait/op/postinc.hh \
@@ -1083,29 +1087,33 @@ mln/trait/promote.hh \
mln/trait/site_set/print.hh \
mln/trait/site_set/props.hh \
mln/trait/site_sets.hh \
-mln/trait/solve.hh \
mln/trait/solve_binary.hh \
+mln/trait/solve.hh \
mln/trait/solve_unary.hh \
mln/trait/undef.hh \
mln/trait/value/all.hh \
mln/trait/value/comp.hh \
mln/trait/value/essential.hh \
+mln/trait/value_.hh \
mln/trait/value/internal/all.hh \
mln/trait/value/internal/comp.hh \
mln/trait/value/kind.hh \
mln/trait/value/nature.hh \
mln/trait/value/print.hh \
mln/trait/value/quant.hh \
-mln/trait/value_.hh \
mln/trait/window/print.hh \
mln/trait/window/props.hh \
mln/trait/windows.hh \
mln/transform/all.hh \
+mln/transformation/all.hh \
+mln/transformation/essential.hh \
+mln/transformation/rotate.hh \
mln/transform/distance_and_closest_point_geodesic.hh \
mln/transform/distance_and_influence_zone_geodesic.hh \
mln/transform/distance_front.hh \
mln/transform/distance_geodesic.hh \
mln/transform/essential.hh \
+mln/transform/hough.hh \
mln/transform/influence_zone_front.hh \
mln/transform/influence_zone_geodesic.hh \
mln/transform/internal/all.hh \
@@ -1129,16 +1137,16 @@ mln/util/greater_point.hh \
mln/util/greater_psite.hh \
mln/util/ignore.hh \
mln/util/index.hh \
-mln/util/internal/boost_graph.hh \
mln/util/internal/boost_graph_access.hh \
+mln/util/internal/boost_graph.hh \
mln/util/internal/boost_graph_property.hh \
mln/util/internal/boost_graph_structure.hh \
mln/util/internal/edge_impl.hh \
mln/util/internal/graph_base.hh \
-mln/util/internal/graph_iter.hh \
mln/util/internal/graph_iter_base.hh \
-mln/util/internal/graph_nbh_iter.hh \
+mln/util/internal/graph_iter.hh \
mln/util/internal/graph_nbh_iter_base.hh \
+mln/util/internal/graph_nbh_iter.hh \
mln/util/internal/id2element.hh \
mln/util/internal/vertex_impl.hh \
mln/util/lazy_set.hh \
@@ -1156,9 +1164,9 @@ mln/util/site_pair.hh \
mln/util/soft_heap.hh \
mln/util/timer.hh \
mln/util/tracked_ptr.hh \
-mln/util/tree.hh \
mln/util/tree_fast.hh \
mln/util/tree_fast_to_image.hh \
+mln/util/tree.hh \
mln/util/tree_to_fast.hh \
mln/util/tree_to_image.hh \
mln/util/vertex.hh \
@@ -1186,50 +1194,50 @@ mln/value/concept/symbolic.hh \
mln/value/concept/vectorial.hh \
mln/value/equiv.hh \
mln/value/essential.hh \
-mln/value/float01.hh \
-mln/value/float01_.hh \
mln/value/float01_16.hh \
mln/value/float01_8.hh \
mln/value/float01_f.hh \
+mln/value/float01_.hh \
+mln/value/float01.hh \
mln/value/gl16.hh \
mln/value/gl8.hh \
mln/value/glf.hh \
-mln/value/graylevel.hh \
mln/value/graylevel_f.hh \
+mln/value/graylevel.hh \
mln/value/hsi.hh \
mln/value/hsl.hh \
-mln/value/int_s.hh \
-mln/value/int_s16.hh \
-mln/value/int_s32.hh \
-mln/value/int_s8.hh \
-mln/value/int_u.hh \
-mln/value/int_u12.hh \
-mln/value/int_u16.hh \
-mln/value/int_u32.hh \
-mln/value/int_u8.hh \
-mln/value/int_u_sat.hh \
mln/value/internal/all.hh \
mln/value/internal/convert.hh \
mln/value/internal/encoding.hh \
mln/value/internal/essential.hh \
-mln/value/internal/gray_.hh \
mln/value/internal/gray_f.hh \
+mln/value/internal/gray_.hh \
mln/value/internal/integer.hh \
mln/value/internal/iterable_set.hh \
mln/value/internal/limits.hh \
mln/value/internal/value_like.hh \
mln/value/interval.hh \
-mln/value/label.hh \
+mln/value/int_s16.hh \
+mln/value/int_s32.hh \
+mln/value/int_s8.hh \
+mln/value/int_s.hh \
+mln/value/int_u12.hh \
+mln/value/int_u16.hh \
+mln/value/int_u32.hh \
+mln/value/int_u8.hh \
+mln/value/int_u.hh \
+mln/value/int_u_sat.hh \
mln/value/label_16.hh \
mln/value/label_8.hh \
+mln/value/label.hh \
mln/value/lut_vec.hh \
mln/value/mixin.hh \
mln/value/ops.hh \
mln/value/other.hh \
mln/value/proxy.hh \
-mln/value/rgb.hh \
mln/value/rgb16.hh \
mln/value/rgb8.hh \
+mln/value/rgb.hh \
mln/value/scalar.hh \
mln/value/set.hh \
mln/value/shell.hh \
diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk
index 3cca3ea..c3e0944 100644
--- a/milena/tests/unit_test/unit-tests.mk
+++ b/milena/tests/unit_test/unit-tests.mk
@@ -6,8 +6,8 @@ mln_accu_bbox \
mln_accu_center \
mln_accu_compute \
mln_accu_convolve \
-mln_accu_count \
mln_accu_count_adjacent_vertices \
+mln_accu_count \
mln_accu_count_labels \
mln_accu_essential \
mln_accu_height \
@@ -16,8 +16,8 @@ mln_accu_image_all \
mln_accu_image_essential \
mln_accu_image_init \
mln_accu_image_set_value \
-mln_accu_image_take \
mln_accu_image_take_as_init \
+mln_accu_image_take \
mln_accu_image_take_n_times \
mln_accu_image_to_result \
mln_accu_image_untake \
@@ -25,14 +25,15 @@ mln_accu_inf \
mln_accu_internal_base \
mln_accu_internal_couple \
mln_accu_label_used \
-mln_accu_land \
mln_accu_land_basic \
+mln_accu_land \
mln_accu_line \
-mln_accu_lor \
mln_accu_lor_basic \
+mln_accu_lor \
mln_accu_maj_h \
mln_accu_max \
mln_accu_max_h \
+mln_accu_max_site \
mln_accu_mean \
mln_accu_median_alt \
mln_accu_median_h \
@@ -40,10 +41,10 @@ mln_accu_min \
mln_accu_min_h \
mln_accu_min_max \
mln_accu_nil \
-mln_accu_p \
mln_accu_pair \
-mln_accu_rank \
+mln_accu_p \
mln_accu_rank_bool \
+mln_accu_rank \
mln_accu_rank_high_quant \
mln_accu_rms \
mln_accu_site_set_all \
@@ -56,9 +57,9 @@ mln_accu_stat_variance \
mln_accu_sum \
mln_accu_sup \
mln_accu_take \
-mln_accu_transform \
mln_accu_transform_diagonal \
mln_accu_transform_directional \
+mln_accu_transform \
mln_accu_transform_line \
mln_accu_transform_snake \
mln_accu_transform_stop \
@@ -97,8 +98,8 @@ mln_border_fill \
mln_border_find \
mln_border_get \
mln_border_mirror \
-mln_border_resize \
mln_border_resize_equal \
+mln_border_resize \
mln_border_thickness \
mln_canvas_all \
mln_canvas_browsing_all \
@@ -106,8 +107,8 @@ mln_canvas_browsing_backdiagonal2d \
mln_canvas_browsing_breadth_first_search \
mln_canvas_browsing_depth_first_search \
mln_canvas_browsing_diagonal2d \
-mln_canvas_browsing_dir_struct_elt_incr_update \
mln_canvas_browsing_directional \
+mln_canvas_browsing_dir_struct_elt_incr_update \
mln_canvas_browsing_essential \
mln_canvas_browsing_fwd \
mln_canvas_browsing_hyper_directional \
@@ -135,15 +136,14 @@ mln_convert_impl_from_int_to_value \
mln_convert_impl_from_site_set_to_image \
mln_convert_impl_from_unsigned_to_value \
mln_convert_impl_from_value_to_value \
-mln_convert_to \
mln_convert_to_dpoint \
mln_convert_to_fun \
+mln_convert_to \
mln_convert_to_image \
mln_convert_to_p_array \
mln_convert_to_p_set \
mln_convert_to_upper_window \
mln_convert_to_window \
-mln_core_a_point_of \
mln_core_alias_all \
mln_core_alias_box1d \
mln_core_alias_box2d \
@@ -158,28 +158,29 @@ mln_core_alias_dpoint3d \
mln_core_alias_neighb1d \
mln_core_alias_neighb2d \
mln_core_alias_neighb3d \
-mln_core_alias_p_run2d \
-mln_core_alias_p_runs2d \
mln_core_alias_point1d \
mln_core_alias_point2d \
mln_core_alias_point2d_h \
mln_core_alias_point3d \
+mln_core_alias_p_run2d \
+mln_core_alias_p_runs2d \
mln_core_alias_vec2d \
mln_core_alias_vec3d \
+mln_core_alias_window1d \
+mln_core_alias_window2d \
+mln_core_alias_window3d \
mln_core_alias_w_window1d_float \
mln_core_alias_w_window1d_int \
mln_core_alias_w_window2d_float \
mln_core_alias_w_window2d_int \
mln_core_alias_w_window3d_float \
mln_core_alias_w_window3d_int \
-mln_core_alias_window1d \
-mln_core_alias_window2d \
-mln_core_alias_window3d \
mln_core_all \
+mln_core_a_point_of \
mln_core_box_runstart_piter \
mln_core_category \
-mln_core_clock_neighb \
mln_core_clock_neighb2d \
+mln_core_clock_neighb \
mln_core_concept_accumulator \
mln_core_concept_all \
mln_core_concept_box \
@@ -196,8 +197,8 @@ mln_core_concept_iterator \
mln_core_concept_literal \
mln_core_concept_mesh \
mln_core_concept_meta_accumulator \
-mln_core_concept_meta_fun \
mln_core_concept_meta_function \
+mln_core_concept_meta_fun \
mln_core_concept_neighborhood \
mln_core_concept_object \
mln_core_concept_pixel_iterator \
@@ -217,8 +218,8 @@ mln_core_concept_weighted_window \
mln_core_concept_window \
mln_core_contract \
mln_core_def_all \
-mln_core_def_coord \
mln_core_def_coordf \
+mln_core_def_coord \
mln_core_def_essential \
mln_core_def_low_quant_nbits \
mln_core_dpoint \
@@ -277,9 +278,9 @@ mln_core_image_sparse_encode \
mln_core_image_sparse_image \
mln_core_image_sub_image \
mln_core_image_sub_image_if \
-mln_core_image_t_image \
-mln_core_image_thru_morpher \
mln_core_image_thrubin_morpher \
+mln_core_image_thru_morpher \
+mln_core_image_t_image \
mln_core_image_tr_image \
mln_core_image_tr_mesh \
mln_core_image_unproject_image \
@@ -369,8 +370,8 @@ mln_core_site_set_p_line2d \
mln_core_site_set_p_mutable_array_of \
mln_core_site_set_p_n_faces_piter \
mln_core_site_set_p_priority \
-mln_core_site_set_p_queue \
mln_core_site_set_p_queue_fast \
+mln_core_site_set_p_queue \
mln_core_site_set_p_run \
mln_core_site_set_p_run_piter \
mln_core_site_set_p_set \
@@ -385,8 +386,8 @@ mln_core_trait_op_mult \
mln_core_trait_pixter \
mln_core_trait_qlf_value \
mln_core_var \
-mln_core_w_window \
mln_core_window \
+mln_core_w_window \
mln_data_all \
mln_data_essential \
mln_data_fill \
@@ -424,9 +425,9 @@ mln_estim_essential \
mln_estim_mean \
mln_estim_min_max \
mln_estim_sum \
-mln_extension_adjust \
mln_extension_adjust_duplicate \
mln_extension_adjust_fill \
+mln_extension_adjust \
mln_extension_all \
mln_extension_duplicate \
mln_extension_essential \
@@ -445,11 +446,11 @@ mln_fun_accu_result \
mln_fun_all \
mln_fun_binary \
mln_fun_binary_param \
-mln_fun_c \
mln_fun_cast \
+mln_fun_c \
mln_fun_component_blue \
-mln_fun_component_comp \
mln_fun_component_comp_count \
+mln_fun_component_comp \
mln_fun_component_green \
mln_fun_component_ithcomp \
mln_fun_component_red \
@@ -636,17 +637,18 @@ mln_io_pgm_load \
mln_io_pgm_save \
mln_io_plot_save \
mln_io_pnm_all \
-mln_io_pnm_load \
mln_io_pnm_load_header \
+mln_io_pnm_load \
mln_io_pnm_macros \
mln_io_pnm_max_component \
-mln_io_pnm_save \
mln_io_pnm_save_header \
+mln_io_pnm_save \
mln_io_ppm_all \
mln_io_ppm_load \
mln_io_ppm_save \
mln_io_tiff_all \
mln_io_tiff_load \
+mln_io_tiff_save \
mln_io_txt_all \
mln_io_txt_save \
mln_labeling_all \
@@ -693,16 +695,16 @@ mln_level_update \
mln_level_was_median \
mln_linear_all \
mln_linear_ch_convolve \
-mln_linear_convolve \
mln_linear_convolve_2x1d \
mln_linear_convolve_directional \
+mln_linear_convolve \
mln_linear_essential \
-mln_linear_gaussian \
+mln_linear_gaussian_1d \
+mln_linear_gaussian_directional_2d \
mln_linear_gaussian_filter \
+mln_linear_gaussian \
mln_linear_gaussian_impl \
mln_linear_gaussian_internal_coefficients \
-mln_linear_gaussian_1d \
-mln_linear_gaussian_directional_2d \
mln_linear_lap \
mln_linear_local_convolve \
mln_linear_log \
@@ -744,23 +746,23 @@ mln_make_dummy_p_vertices \
mln_make_edge_image \
mln_make_essential \
mln_make_h_mat \
-mln_make_image \
mln_make_image2d \
mln_make_image3d \
+mln_make_image \
mln_make_influence_zone_adjacency_graph \
mln_make_mat \
mln_make_p_edges_with_mass_centers \
-mln_make_p_vertices_with_mass_centers \
-mln_make_pix \
mln_make_pixel \
+mln_make_pix \
mln_make_point2d_h \
+mln_make_p_vertices_with_mass_centers \
mln_make_rag_and_labeled_wsl \
mln_make_region_adjacency_graph \
mln_make_relabelfun \
mln_make_vec \
mln_make_vertex_image \
mln_make_voronoi \
-mln_make_w_window \
+mln_make_win_chamfer \
mln_make_w_window1d \
mln_make_w_window1d_int \
mln_make_w_window2d \
@@ -768,7 +770,7 @@ mln_make_w_window2d_int \
mln_make_w_window3d \
mln_make_w_window3d_int \
mln_make_w_window_directional \
-mln_make_win_chamfer \
+mln_make_w_window \
mln_math_abs \
mln_math_acos \
mln_math_all \
@@ -788,10 +790,10 @@ mln_math_sqrt \
mln_metal_abort \
mln_metal_all \
mln_metal_ands \
-mln_metal_array \
mln_metal_array1d \
mln_metal_array2d \
mln_metal_array3d \
+mln_metal_array \
mln_metal_bexpr \
mln_metal_bool \
mln_metal_const \
@@ -802,17 +804,17 @@ mln_metal_fix_return \
mln_metal_goes_to \
mln_metal_if \
mln_metal_int \
-mln_metal_is \
mln_metal_is_a \
mln_metal_is_const \
-mln_metal_is_not \
+mln_metal_is \
mln_metal_is_not_a \
mln_metal_is_not_const \
+mln_metal_is_not \
mln_metal_is_not_ref \
mln_metal_is_ref \
mln_metal_is_unqualif \
-mln_metal_mat \
mln_metal_math_all \
+mln_metal_mat \
mln_metal_math_max \
mln_metal_math_pow \
mln_metal_math_root \
@@ -829,7 +831,6 @@ mln_metal_unptr \
mln_metal_unqualif \
mln_metal_unref \
mln_metal_vec \
-mln_morpho_Rd \
mln_morpho_algebraic_filter \
mln_morpho_all \
mln_morpho_approx_all \
@@ -861,8 +862,8 @@ mln_morpho_elementary_closing \
mln_morpho_elementary_dilation \
mln_morpho_elementary_erosion \
mln_morpho_elementary_essential \
-mln_morpho_elementary_gradient \
mln_morpho_elementary_gradient_external \
+mln_morpho_elementary_gradient \
mln_morpho_elementary_gradient_internal \
mln_morpho_elementary_laplacian \
mln_morpho_elementary_like_ero_fun \
@@ -895,12 +896,13 @@ mln_morpho_opening_structural \
mln_morpho_opening_volume \
mln_morpho_plus \
mln_morpho_rank_filter \
+mln_morpho_Rd \
mln_morpho_reconstruction_all \
mln_morpho_reconstruction_by_dilation_all \
mln_morpho_reconstruction_by_dilation_union_find \
mln_morpho_skeleton_constrained \
-mln_morpho_thick_miss \
mln_morpho_thickening \
+mln_morpho_thick_miss \
mln_morpho_thin_fit \
mln_morpho_thinning \
mln_morpho_top_hat \
@@ -971,14 +973,14 @@ mln_topo_algebraic_face \
mln_topo_algebraic_n_face \
mln_topo_all \
mln_topo_attic_faces_iter \
-mln_topo_center_only_iter \
mln_topo_centered_iter_adapter \
+mln_topo_center_only_iter \
mln_topo_complex \
mln_topo_complex_iterators \
mln_topo_detach \
mln_topo_essential \
-mln_topo_face \
mln_topo_face_data \
+mln_topo_face \
mln_topo_face_iter \
mln_topo_internal_complex_iterator_base \
mln_topo_internal_complex_relative_iterator_base \
@@ -992,6 +994,8 @@ mln_topo_n_face \
mln_topo_n_face_iter \
mln_topo_n_faces_set \
mln_topo_skeleton_breadth_first_thinning \
+mln_topo_skeleton_crest \
+mln_topo_skeleton_is_simple_point \
mln_topo_static_n_face_iter \
mln_trace_all \
mln_trace_entering \
@@ -1010,13 +1014,13 @@ mln_trait_ch_value \
mln_trait_concrete \
mln_trait_essential \
mln_trait_functions \
+mln_trait_image_from_grid \
mln_trait_image_print \
mln_trait_image_props \
-mln_trait_image_from_grid \
mln_trait_images \
mln_trait_neighborhood \
-mln_trait_next_solve \
mln_trait_next_solve_binary \
+mln_trait_next_solve \
mln_trait_next_solve_proxy \
mln_trait_next_solve_unary \
mln_trait_op_all \
@@ -1034,8 +1038,8 @@ mln_trait_op_minus \
mln_trait_op_mod \
mln_trait_op_neq \
mln_trait_op_not \
-mln_trait_op_or \
mln_trait_op_ord \
+mln_trait_op_or \
mln_trait_op_plus \
mln_trait_op_postdec \
mln_trait_op_postinc \
@@ -1049,29 +1053,33 @@ mln_trait_promote \
mln_trait_site_set_print \
mln_trait_site_set_props \
mln_trait_site_sets \
-mln_trait_solve \
mln_trait_solve_binary \
+mln_trait_solve \
mln_trait_solve_unary \
mln_trait_undef \
mln_trait_value_all \
mln_trait_value_comp \
mln_trait_value_essential \
+mln_trait_value_ \
mln_trait_value_internal_all \
mln_trait_value_internal_comp \
mln_trait_value_kind \
mln_trait_value_nature \
mln_trait_value_print \
mln_trait_value_quant \
-mln_trait_value_ \
mln_trait_window_print \
mln_trait_window_props \
mln_trait_windows \
mln_transform_all \
+mln_transformation_all \
+mln_transformation_essential \
+mln_transformation_rotate \
mln_transform_distance_and_closest_point_geodesic \
mln_transform_distance_and_influence_zone_geodesic \
mln_transform_distance_front \
mln_transform_distance_geodesic \
mln_transform_essential \
+mln_transform_hough \
mln_transform_influence_zone_front \
mln_transform_influence_zone_geodesic \
mln_transform_internal_all \
@@ -1095,16 +1103,16 @@ mln_util_greater_point \
mln_util_greater_psite \
mln_util_ignore \
mln_util_index \
-mln_util_internal_boost_graph \
mln_util_internal_boost_graph_access \
+mln_util_internal_boost_graph \
mln_util_internal_boost_graph_property \
mln_util_internal_boost_graph_structure \
mln_util_internal_edge_impl \
mln_util_internal_graph_base \
-mln_util_internal_graph_iter \
mln_util_internal_graph_iter_base \
-mln_util_internal_graph_nbh_iter \
+mln_util_internal_graph_iter \
mln_util_internal_graph_nbh_iter_base \
+mln_util_internal_graph_nbh_iter \
mln_util_internal_id2element \
mln_util_internal_vertex_impl \
mln_util_lazy_set \
@@ -1122,9 +1130,9 @@ mln_util_site_pair \
mln_util_soft_heap \
mln_util_timer \
mln_util_tracked_ptr \
-mln_util_tree \
mln_util_tree_fast \
mln_util_tree_fast_to_image \
+mln_util_tree \
mln_util_tree_to_fast \
mln_util_tree_to_image \
mln_util_vertex \
@@ -1152,50 +1160,50 @@ mln_value_concept_symbolic \
mln_value_concept_vectorial \
mln_value_equiv \
mln_value_essential \
-mln_value_float01 \
-mln_value_float01_ \
mln_value_float01_16 \
mln_value_float01_8 \
mln_value_float01_f \
+mln_value_float01_ \
+mln_value_float01 \
mln_value_gl16 \
mln_value_gl8 \
mln_value_glf \
-mln_value_graylevel \
mln_value_graylevel_f \
+mln_value_graylevel \
mln_value_hsi \
mln_value_hsl \
-mln_value_int_s \
-mln_value_int_s16 \
-mln_value_int_s32 \
-mln_value_int_s8 \
-mln_value_int_u \
-mln_value_int_u12 \
-mln_value_int_u16 \
-mln_value_int_u32 \
-mln_value_int_u8 \
-mln_value_int_u_sat \
mln_value_internal_all \
mln_value_internal_convert \
mln_value_internal_encoding \
mln_value_internal_essential \
-mln_value_internal_gray_ \
mln_value_internal_gray_f \
+mln_value_internal_gray_ \
mln_value_internal_integer \
mln_value_internal_iterable_set \
mln_value_internal_limits \
mln_value_internal_value_like \
mln_value_interval \
-mln_value_label \
+mln_value_int_s16 \
+mln_value_int_s32 \
+mln_value_int_s8 \
+mln_value_int_s \
+mln_value_int_u12 \
+mln_value_int_u16 \
+mln_value_int_u32 \
+mln_value_int_u8 \
+mln_value_int_u \
+mln_value_int_u_sat \
mln_value_label_16 \
mln_value_label_8 \
+mln_value_label \
mln_value_lut_vec \
mln_value_mixin \
mln_value_ops \
mln_value_other \
mln_value_proxy \
-mln_value_rgb \
mln_value_rgb16 \
mln_value_rgb8 \
+mln_value_rgb \
mln_value_scalar \
mln_value_set \
mln_value_shell \
@@ -1249,8 +1257,8 @@ mln_accu_bbox_SOURCES = mln_accu_bbox.cc
mln_accu_center_SOURCES = mln_accu_center.cc
mln_accu_compute_SOURCES = mln_accu_compute.cc
mln_accu_convolve_SOURCES = mln_accu_convolve.cc
-mln_accu_count_SOURCES = mln_accu_count.cc
mln_accu_count_adjacent_vertices_SOURCES = mln_accu_count_adjacent_vertices.cc
+mln_accu_count_SOURCES = mln_accu_count.cc
mln_accu_count_labels_SOURCES = mln_accu_count_labels.cc
mln_accu_essential_SOURCES = mln_accu_essential.cc
mln_accu_height_SOURCES = mln_accu_height.cc
@@ -1259,8 +1267,8 @@ mln_accu_image_all_SOURCES = mln_accu_image_all.cc
mln_accu_image_essential_SOURCES = mln_accu_image_essential.cc
mln_accu_image_init_SOURCES = mln_accu_image_init.cc
mln_accu_image_set_value_SOURCES = mln_accu_image_set_value.cc
-mln_accu_image_take_SOURCES = mln_accu_image_take.cc
mln_accu_image_take_as_init_SOURCES = mln_accu_image_take_as_init.cc
+mln_accu_image_take_SOURCES = mln_accu_image_take.cc
mln_accu_image_take_n_times_SOURCES = mln_accu_image_take_n_times.cc
mln_accu_image_to_result_SOURCES = mln_accu_image_to_result.cc
mln_accu_image_untake_SOURCES = mln_accu_image_untake.cc
@@ -1268,14 +1276,15 @@ mln_accu_inf_SOURCES = mln_accu_inf.cc
mln_accu_internal_base_SOURCES = mln_accu_internal_base.cc
mln_accu_internal_couple_SOURCES = mln_accu_internal_couple.cc
mln_accu_label_used_SOURCES = mln_accu_label_used.cc
-mln_accu_land_SOURCES = mln_accu_land.cc
mln_accu_land_basic_SOURCES = mln_accu_land_basic.cc
+mln_accu_land_SOURCES = mln_accu_land.cc
mln_accu_line_SOURCES = mln_accu_line.cc
-mln_accu_lor_SOURCES = mln_accu_lor.cc
mln_accu_lor_basic_SOURCES = mln_accu_lor_basic.cc
+mln_accu_lor_SOURCES = mln_accu_lor.cc
mln_accu_maj_h_SOURCES = mln_accu_maj_h.cc
mln_accu_max_SOURCES = mln_accu_max.cc
mln_accu_max_h_SOURCES = mln_accu_max_h.cc
+mln_accu_max_site_SOURCES = mln_accu_max_site.cc
mln_accu_mean_SOURCES = mln_accu_mean.cc
mln_accu_median_alt_SOURCES = mln_accu_median_alt.cc
mln_accu_median_h_SOURCES = mln_accu_median_h.cc
@@ -1283,10 +1292,10 @@ mln_accu_min_SOURCES = mln_accu_min.cc
mln_accu_min_h_SOURCES = mln_accu_min_h.cc
mln_accu_min_max_SOURCES = mln_accu_min_max.cc
mln_accu_nil_SOURCES = mln_accu_nil.cc
-mln_accu_p_SOURCES = mln_accu_p.cc
mln_accu_pair_SOURCES = mln_accu_pair.cc
-mln_accu_rank_SOURCES = mln_accu_rank.cc
+mln_accu_p_SOURCES = mln_accu_p.cc
mln_accu_rank_bool_SOURCES = mln_accu_rank_bool.cc
+mln_accu_rank_SOURCES = mln_accu_rank.cc
mln_accu_rank_high_quant_SOURCES = mln_accu_rank_high_quant.cc
mln_accu_rms_SOURCES = mln_accu_rms.cc
mln_accu_site_set_all_SOURCES = mln_accu_site_set_all.cc
@@ -1299,9 +1308,9 @@ mln_accu_stat_variance_SOURCES = mln_accu_stat_variance.cc
mln_accu_sum_SOURCES = mln_accu_sum.cc
mln_accu_sup_SOURCES = mln_accu_sup.cc
mln_accu_take_SOURCES = mln_accu_take.cc
-mln_accu_transform_SOURCES = mln_accu_transform.cc
mln_accu_transform_diagonal_SOURCES = mln_accu_transform_diagonal.cc
mln_accu_transform_directional_SOURCES = mln_accu_transform_directional.cc
+mln_accu_transform_SOURCES = mln_accu_transform.cc
mln_accu_transform_line_SOURCES = mln_accu_transform_line.cc
mln_accu_transform_snake_SOURCES = mln_accu_transform_snake.cc
mln_accu_transform_stop_SOURCES = mln_accu_transform_stop.cc
@@ -1340,8 +1349,8 @@ mln_border_fill_SOURCES = mln_border_fill.cc
mln_border_find_SOURCES = mln_border_find.cc
mln_border_get_SOURCES = mln_border_get.cc
mln_border_mirror_SOURCES = mln_border_mirror.cc
-mln_border_resize_SOURCES = mln_border_resize.cc
mln_border_resize_equal_SOURCES = mln_border_resize_equal.cc
+mln_border_resize_SOURCES = mln_border_resize.cc
mln_border_thickness_SOURCES = mln_border_thickness.cc
mln_canvas_all_SOURCES = mln_canvas_all.cc
mln_canvas_browsing_all_SOURCES = mln_canvas_browsing_all.cc
@@ -1349,8 +1358,8 @@ mln_canvas_browsing_backdiagonal2d_SOURCES = mln_canvas_browsing_backdiagonal2d.
mln_canvas_browsing_breadth_first_search_SOURCES = mln_canvas_browsing_breadth_first_search.cc
mln_canvas_browsing_depth_first_search_SOURCES = mln_canvas_browsing_depth_first_search.cc
mln_canvas_browsing_diagonal2d_SOURCES = mln_canvas_browsing_diagonal2d.cc
-mln_canvas_browsing_dir_struct_elt_incr_update_SOURCES = mln_canvas_browsing_dir_struct_elt_incr_update.cc
mln_canvas_browsing_directional_SOURCES = mln_canvas_browsing_directional.cc
+mln_canvas_browsing_dir_struct_elt_incr_update_SOURCES = mln_canvas_browsing_dir_struct_elt_incr_update.cc
mln_canvas_browsing_essential_SOURCES = mln_canvas_browsing_essential.cc
mln_canvas_browsing_fwd_SOURCES = mln_canvas_browsing_fwd.cc
mln_canvas_browsing_hyper_directional_SOURCES = mln_canvas_browsing_hyper_directional.cc
@@ -1378,15 +1387,14 @@ mln_convert_impl_from_int_to_value_SOURCES = mln_convert_impl_from_int_to_value.
mln_convert_impl_from_site_set_to_image_SOURCES = mln_convert_impl_from_site_set_to_image.cc
mln_convert_impl_from_unsigned_to_value_SOURCES = mln_convert_impl_from_unsigned_to_value.cc
mln_convert_impl_from_value_to_value_SOURCES = mln_convert_impl_from_value_to_value.cc
-mln_convert_to_SOURCES = mln_convert_to.cc
mln_convert_to_dpoint_SOURCES = mln_convert_to_dpoint.cc
mln_convert_to_fun_SOURCES = mln_convert_to_fun.cc
+mln_convert_to_SOURCES = mln_convert_to.cc
mln_convert_to_image_SOURCES = mln_convert_to_image.cc
mln_convert_to_p_array_SOURCES = mln_convert_to_p_array.cc
mln_convert_to_p_set_SOURCES = mln_convert_to_p_set.cc
mln_convert_to_upper_window_SOURCES = mln_convert_to_upper_window.cc
mln_convert_to_window_SOURCES = mln_convert_to_window.cc
-mln_core_a_point_of_SOURCES = mln_core_a_point_of.cc
mln_core_alias_all_SOURCES = mln_core_alias_all.cc
mln_core_alias_box1d_SOURCES = mln_core_alias_box1d.cc
mln_core_alias_box2d_SOURCES = mln_core_alias_box2d.cc
@@ -1401,28 +1409,29 @@ mln_core_alias_dpoint3d_SOURCES = mln_core_alias_dpoint3d.cc
mln_core_alias_neighb1d_SOURCES = mln_core_alias_neighb1d.cc
mln_core_alias_neighb2d_SOURCES = mln_core_alias_neighb2d.cc
mln_core_alias_neighb3d_SOURCES = mln_core_alias_neighb3d.cc
-mln_core_alias_p_run2d_SOURCES = mln_core_alias_p_run2d.cc
-mln_core_alias_p_runs2d_SOURCES = mln_core_alias_p_runs2d.cc
mln_core_alias_point1d_SOURCES = mln_core_alias_point1d.cc
mln_core_alias_point2d_SOURCES = mln_core_alias_point2d.cc
mln_core_alias_point2d_h_SOURCES = mln_core_alias_point2d_h.cc
mln_core_alias_point3d_SOURCES = mln_core_alias_point3d.cc
+mln_core_alias_p_run2d_SOURCES = mln_core_alias_p_run2d.cc
+mln_core_alias_p_runs2d_SOURCES = mln_core_alias_p_runs2d.cc
mln_core_alias_vec2d_SOURCES = mln_core_alias_vec2d.cc
mln_core_alias_vec3d_SOURCES = mln_core_alias_vec3d.cc
+mln_core_alias_window1d_SOURCES = mln_core_alias_window1d.cc
+mln_core_alias_window2d_SOURCES = mln_core_alias_window2d.cc
+mln_core_alias_window3d_SOURCES = mln_core_alias_window3d.cc
mln_core_alias_w_window1d_float_SOURCES = mln_core_alias_w_window1d_float.cc
mln_core_alias_w_window1d_int_SOURCES = mln_core_alias_w_window1d_int.cc
mln_core_alias_w_window2d_float_SOURCES = mln_core_alias_w_window2d_float.cc
mln_core_alias_w_window2d_int_SOURCES = mln_core_alias_w_window2d_int.cc
mln_core_alias_w_window3d_float_SOURCES = mln_core_alias_w_window3d_float.cc
mln_core_alias_w_window3d_int_SOURCES = mln_core_alias_w_window3d_int.cc
-mln_core_alias_window1d_SOURCES = mln_core_alias_window1d.cc
-mln_core_alias_window2d_SOURCES = mln_core_alias_window2d.cc
-mln_core_alias_window3d_SOURCES = mln_core_alias_window3d.cc
mln_core_all_SOURCES = mln_core_all.cc
+mln_core_a_point_of_SOURCES = mln_core_a_point_of.cc
mln_core_box_runstart_piter_SOURCES = mln_core_box_runstart_piter.cc
mln_core_category_SOURCES = mln_core_category.cc
-mln_core_clock_neighb_SOURCES = mln_core_clock_neighb.cc
mln_core_clock_neighb2d_SOURCES = mln_core_clock_neighb2d.cc
+mln_core_clock_neighb_SOURCES = mln_core_clock_neighb.cc
mln_core_concept_accumulator_SOURCES = mln_core_concept_accumulator.cc
mln_core_concept_all_SOURCES = mln_core_concept_all.cc
mln_core_concept_box_SOURCES = mln_core_concept_box.cc
@@ -1439,8 +1448,8 @@ mln_core_concept_iterator_SOURCES = mln_core_concept_iterator.cc
mln_core_concept_literal_SOURCES = mln_core_concept_literal.cc
mln_core_concept_mesh_SOURCES = mln_core_concept_mesh.cc
mln_core_concept_meta_accumulator_SOURCES = mln_core_concept_meta_accumulator.cc
-mln_core_concept_meta_fun_SOURCES = mln_core_concept_meta_fun.cc
mln_core_concept_meta_function_SOURCES = mln_core_concept_meta_function.cc
+mln_core_concept_meta_fun_SOURCES = mln_core_concept_meta_fun.cc
mln_core_concept_neighborhood_SOURCES = mln_core_concept_neighborhood.cc
mln_core_concept_object_SOURCES = mln_core_concept_object.cc
mln_core_concept_pixel_iterator_SOURCES = mln_core_concept_pixel_iterator.cc
@@ -1460,8 +1469,8 @@ mln_core_concept_weighted_window_SOURCES = mln_core_concept_weighted_window.cc
mln_core_concept_window_SOURCES = mln_core_concept_window.cc
mln_core_contract_SOURCES = mln_core_contract.cc
mln_core_def_all_SOURCES = mln_core_def_all.cc
-mln_core_def_coord_SOURCES = mln_core_def_coord.cc
mln_core_def_coordf_SOURCES = mln_core_def_coordf.cc
+mln_core_def_coord_SOURCES = mln_core_def_coord.cc
mln_core_def_essential_SOURCES = mln_core_def_essential.cc
mln_core_def_low_quant_nbits_SOURCES = mln_core_def_low_quant_nbits.cc
mln_core_dpoint_SOURCES = mln_core_dpoint.cc
@@ -1520,9 +1529,9 @@ mln_core_image_sparse_encode_SOURCES = mln_core_image_sparse_encode.cc
mln_core_image_sparse_image_SOURCES = mln_core_image_sparse_image.cc
mln_core_image_sub_image_SOURCES = mln_core_image_sub_image.cc
mln_core_image_sub_image_if_SOURCES = mln_core_image_sub_image_if.cc
-mln_core_image_t_image_SOURCES = mln_core_image_t_image.cc
-mln_core_image_thru_morpher_SOURCES = mln_core_image_thru_morpher.cc
mln_core_image_thrubin_morpher_SOURCES = mln_core_image_thrubin_morpher.cc
+mln_core_image_thru_morpher_SOURCES = mln_core_image_thru_morpher.cc
+mln_core_image_t_image_SOURCES = mln_core_image_t_image.cc
mln_core_image_tr_image_SOURCES = mln_core_image_tr_image.cc
mln_core_image_tr_mesh_SOURCES = mln_core_image_tr_mesh.cc
mln_core_image_unproject_image_SOURCES = mln_core_image_unproject_image.cc
@@ -1612,8 +1621,8 @@ mln_core_site_set_p_line2d_SOURCES = mln_core_site_set_p_line2d.cc
mln_core_site_set_p_mutable_array_of_SOURCES = mln_core_site_set_p_mutable_array_of.cc
mln_core_site_set_p_n_faces_piter_SOURCES = mln_core_site_set_p_n_faces_piter.cc
mln_core_site_set_p_priority_SOURCES = mln_core_site_set_p_priority.cc
-mln_core_site_set_p_queue_SOURCES = mln_core_site_set_p_queue.cc
mln_core_site_set_p_queue_fast_SOURCES = mln_core_site_set_p_queue_fast.cc
+mln_core_site_set_p_queue_SOURCES = mln_core_site_set_p_queue.cc
mln_core_site_set_p_run_SOURCES = mln_core_site_set_p_run.cc
mln_core_site_set_p_run_piter_SOURCES = mln_core_site_set_p_run_piter.cc
mln_core_site_set_p_set_SOURCES = mln_core_site_set_p_set.cc
@@ -1628,8 +1637,8 @@ mln_core_trait_op_mult_SOURCES = mln_core_trait_op_mult.cc
mln_core_trait_pixter_SOURCES = mln_core_trait_pixter.cc
mln_core_trait_qlf_value_SOURCES = mln_core_trait_qlf_value.cc
mln_core_var_SOURCES = mln_core_var.cc
-mln_core_w_window_SOURCES = mln_core_w_window.cc
mln_core_window_SOURCES = mln_core_window.cc
+mln_core_w_window_SOURCES = mln_core_w_window.cc
mln_data_all_SOURCES = mln_data_all.cc
mln_data_essential_SOURCES = mln_data_essential.cc
mln_data_fill_SOURCES = mln_data_fill.cc
@@ -1667,9 +1676,9 @@ mln_estim_essential_SOURCES = mln_estim_essential.cc
mln_estim_mean_SOURCES = mln_estim_mean.cc
mln_estim_min_max_SOURCES = mln_estim_min_max.cc
mln_estim_sum_SOURCES = mln_estim_sum.cc
-mln_extension_adjust_SOURCES = mln_extension_adjust.cc
mln_extension_adjust_duplicate_SOURCES = mln_extension_adjust_duplicate.cc
mln_extension_adjust_fill_SOURCES = mln_extension_adjust_fill.cc
+mln_extension_adjust_SOURCES = mln_extension_adjust.cc
mln_extension_all_SOURCES = mln_extension_all.cc
mln_extension_duplicate_SOURCES = mln_extension_duplicate.cc
mln_extension_essential_SOURCES = mln_extension_essential.cc
@@ -1688,11 +1697,11 @@ mln_fun_accu_result_SOURCES = mln_fun_accu_result.cc
mln_fun_all_SOURCES = mln_fun_all.cc
mln_fun_binary_SOURCES = mln_fun_binary.cc
mln_fun_binary_param_SOURCES = mln_fun_binary_param.cc
-mln_fun_c_SOURCES = mln_fun_c.cc
mln_fun_cast_SOURCES = mln_fun_cast.cc
+mln_fun_c_SOURCES = mln_fun_c.cc
mln_fun_component_blue_SOURCES = mln_fun_component_blue.cc
-mln_fun_component_comp_SOURCES = mln_fun_component_comp.cc
mln_fun_component_comp_count_SOURCES = mln_fun_component_comp_count.cc
+mln_fun_component_comp_SOURCES = mln_fun_component_comp.cc
mln_fun_component_green_SOURCES = mln_fun_component_green.cc
mln_fun_component_ithcomp_SOURCES = mln_fun_component_ithcomp.cc
mln_fun_component_red_SOURCES = mln_fun_component_red.cc
@@ -1879,17 +1888,18 @@ mln_io_pgm_load_SOURCES = mln_io_pgm_load.cc
mln_io_pgm_save_SOURCES = mln_io_pgm_save.cc
mln_io_plot_save_SOURCES = mln_io_plot_save.cc
mln_io_pnm_all_SOURCES = mln_io_pnm_all.cc
-mln_io_pnm_load_SOURCES = mln_io_pnm_load.cc
mln_io_pnm_load_header_SOURCES = mln_io_pnm_load_header.cc
+mln_io_pnm_load_SOURCES = mln_io_pnm_load.cc
mln_io_pnm_macros_SOURCES = mln_io_pnm_macros.cc
mln_io_pnm_max_component_SOURCES = mln_io_pnm_max_component.cc
-mln_io_pnm_save_SOURCES = mln_io_pnm_save.cc
mln_io_pnm_save_header_SOURCES = mln_io_pnm_save_header.cc
+mln_io_pnm_save_SOURCES = mln_io_pnm_save.cc
mln_io_ppm_all_SOURCES = mln_io_ppm_all.cc
mln_io_ppm_load_SOURCES = mln_io_ppm_load.cc
mln_io_ppm_save_SOURCES = mln_io_ppm_save.cc
mln_io_tiff_all_SOURCES = mln_io_tiff_all.cc
mln_io_tiff_load_SOURCES = mln_io_tiff_load.cc
+mln_io_tiff_save_SOURCES = mln_io_tiff_save.cc
mln_io_txt_all_SOURCES = mln_io_txt_all.cc
mln_io_txt_save_SOURCES = mln_io_txt_save.cc
mln_labeling_all_SOURCES = mln_labeling_all.cc
@@ -1936,16 +1946,16 @@ mln_level_update_SOURCES = mln_level_update.cc
mln_level_was_median_SOURCES = mln_level_was_median.cc
mln_linear_all_SOURCES = mln_linear_all.cc
mln_linear_ch_convolve_SOURCES = mln_linear_ch_convolve.cc
-mln_linear_convolve_SOURCES = mln_linear_convolve.cc
mln_linear_convolve_2x1d_SOURCES = mln_linear_convolve_2x1d.cc
mln_linear_convolve_directional_SOURCES = mln_linear_convolve_directional.cc
+mln_linear_convolve_SOURCES = mln_linear_convolve.cc
mln_linear_essential_SOURCES = mln_linear_essential.cc
-mln_linear_gaussian_SOURCES = mln_linear_gaussian.cc
+mln_linear_gaussian_1d_SOURCES = mln_linear_gaussian_1d.cc
+mln_linear_gaussian_directional_2d_SOURCES = mln_linear_gaussian_directional_2d.cc
mln_linear_gaussian_filter_SOURCES = mln_linear_gaussian_filter.cc
+mln_linear_gaussian_SOURCES = mln_linear_gaussian.cc
mln_linear_gaussian_impl_SOURCES = mln_linear_gaussian_impl.cc
mln_linear_gaussian_internal_coefficients_SOURCES = mln_linear_gaussian_internal_coefficients.cc
-mln_linear_gaussian_1d_SOURCES = mln_linear_gaussian_1d.cc
-mln_linear_gaussian_directional_2d_SOURCES = mln_linear_gaussian_directional_2d.cc
mln_linear_lap_SOURCES = mln_linear_lap.cc
mln_linear_local_convolve_SOURCES = mln_linear_local_convolve.cc
mln_linear_log_SOURCES = mln_linear_log.cc
@@ -1987,23 +1997,23 @@ mln_make_dummy_p_vertices_SOURCES = mln_make_dummy_p_vertices.cc
mln_make_edge_image_SOURCES = mln_make_edge_image.cc
mln_make_essential_SOURCES = mln_make_essential.cc
mln_make_h_mat_SOURCES = mln_make_h_mat.cc
-mln_make_image_SOURCES = mln_make_image.cc
mln_make_image2d_SOURCES = mln_make_image2d.cc
mln_make_image3d_SOURCES = mln_make_image3d.cc
+mln_make_image_SOURCES = mln_make_image.cc
mln_make_influence_zone_adjacency_graph_SOURCES = mln_make_influence_zone_adjacency_graph.cc
mln_make_mat_SOURCES = mln_make_mat.cc
mln_make_p_edges_with_mass_centers_SOURCES = mln_make_p_edges_with_mass_centers.cc
-mln_make_p_vertices_with_mass_centers_SOURCES = mln_make_p_vertices_with_mass_centers.cc
-mln_make_pix_SOURCES = mln_make_pix.cc
mln_make_pixel_SOURCES = mln_make_pixel.cc
+mln_make_pix_SOURCES = mln_make_pix.cc
mln_make_point2d_h_SOURCES = mln_make_point2d_h.cc
+mln_make_p_vertices_with_mass_centers_SOURCES = mln_make_p_vertices_with_mass_centers.cc
mln_make_rag_and_labeled_wsl_SOURCES = mln_make_rag_and_labeled_wsl.cc
mln_make_region_adjacency_graph_SOURCES = mln_make_region_adjacency_graph.cc
mln_make_relabelfun_SOURCES = mln_make_relabelfun.cc
mln_make_vec_SOURCES = mln_make_vec.cc
mln_make_vertex_image_SOURCES = mln_make_vertex_image.cc
mln_make_voronoi_SOURCES = mln_make_voronoi.cc
-mln_make_w_window_SOURCES = mln_make_w_window.cc
+mln_make_win_chamfer_SOURCES = mln_make_win_chamfer.cc
mln_make_w_window1d_SOURCES = mln_make_w_window1d.cc
mln_make_w_window1d_int_SOURCES = mln_make_w_window1d_int.cc
mln_make_w_window2d_SOURCES = mln_make_w_window2d.cc
@@ -2011,7 +2021,7 @@ mln_make_w_window2d_int_SOURCES = mln_make_w_window2d_int.cc
mln_make_w_window3d_SOURCES = mln_make_w_window3d.cc
mln_make_w_window3d_int_SOURCES = mln_make_w_window3d_int.cc
mln_make_w_window_directional_SOURCES = mln_make_w_window_directional.cc
-mln_make_win_chamfer_SOURCES = mln_make_win_chamfer.cc
+mln_make_w_window_SOURCES = mln_make_w_window.cc
mln_math_abs_SOURCES = mln_math_abs.cc
mln_math_acos_SOURCES = mln_math_acos.cc
mln_math_all_SOURCES = mln_math_all.cc
@@ -2031,10 +2041,10 @@ mln_math_sqrt_SOURCES = mln_math_sqrt.cc
mln_metal_abort_SOURCES = mln_metal_abort.cc
mln_metal_all_SOURCES = mln_metal_all.cc
mln_metal_ands_SOURCES = mln_metal_ands.cc
-mln_metal_array_SOURCES = mln_metal_array.cc
mln_metal_array1d_SOURCES = mln_metal_array1d.cc
mln_metal_array2d_SOURCES = mln_metal_array2d.cc
mln_metal_array3d_SOURCES = mln_metal_array3d.cc
+mln_metal_array_SOURCES = mln_metal_array.cc
mln_metal_bexpr_SOURCES = mln_metal_bexpr.cc
mln_metal_bool_SOURCES = mln_metal_bool.cc
mln_metal_const_SOURCES = mln_metal_const.cc
@@ -2045,17 +2055,17 @@ mln_metal_fix_return_SOURCES = mln_metal_fix_return.cc
mln_metal_goes_to_SOURCES = mln_metal_goes_to.cc
mln_metal_if_SOURCES = mln_metal_if.cc
mln_metal_int_SOURCES = mln_metal_int.cc
-mln_metal_is_SOURCES = mln_metal_is.cc
mln_metal_is_a_SOURCES = mln_metal_is_a.cc
mln_metal_is_const_SOURCES = mln_metal_is_const.cc
-mln_metal_is_not_SOURCES = mln_metal_is_not.cc
+mln_metal_is_SOURCES = mln_metal_is.cc
mln_metal_is_not_a_SOURCES = mln_metal_is_not_a.cc
mln_metal_is_not_const_SOURCES = mln_metal_is_not_const.cc
+mln_metal_is_not_SOURCES = mln_metal_is_not.cc
mln_metal_is_not_ref_SOURCES = mln_metal_is_not_ref.cc
mln_metal_is_ref_SOURCES = mln_metal_is_ref.cc
mln_metal_is_unqualif_SOURCES = mln_metal_is_unqualif.cc
-mln_metal_mat_SOURCES = mln_metal_mat.cc
mln_metal_math_all_SOURCES = mln_metal_math_all.cc
+mln_metal_mat_SOURCES = mln_metal_mat.cc
mln_metal_math_max_SOURCES = mln_metal_math_max.cc
mln_metal_math_pow_SOURCES = mln_metal_math_pow.cc
mln_metal_math_root_SOURCES = mln_metal_math_root.cc
@@ -2072,7 +2082,6 @@ mln_metal_unptr_SOURCES = mln_metal_unptr.cc
mln_metal_unqualif_SOURCES = mln_metal_unqualif.cc
mln_metal_unref_SOURCES = mln_metal_unref.cc
mln_metal_vec_SOURCES = mln_metal_vec.cc
-mln_morpho_Rd_SOURCES = mln_morpho_Rd.cc
mln_morpho_algebraic_filter_SOURCES = mln_morpho_algebraic_filter.cc
mln_morpho_all_SOURCES = mln_morpho_all.cc
mln_morpho_approx_all_SOURCES = mln_morpho_approx_all.cc
@@ -2104,8 +2113,8 @@ mln_morpho_elementary_closing_SOURCES = mln_morpho_elementary_closing.cc
mln_morpho_elementary_dilation_SOURCES = mln_morpho_elementary_dilation.cc
mln_morpho_elementary_erosion_SOURCES = mln_morpho_elementary_erosion.cc
mln_morpho_elementary_essential_SOURCES = mln_morpho_elementary_essential.cc
-mln_morpho_elementary_gradient_SOURCES = mln_morpho_elementary_gradient.cc
mln_morpho_elementary_gradient_external_SOURCES = mln_morpho_elementary_gradient_external.cc
+mln_morpho_elementary_gradient_SOURCES = mln_morpho_elementary_gradient.cc
mln_morpho_elementary_gradient_internal_SOURCES = mln_morpho_elementary_gradient_internal.cc
mln_morpho_elementary_laplacian_SOURCES = mln_morpho_elementary_laplacian.cc
mln_morpho_elementary_like_ero_fun_SOURCES = mln_morpho_elementary_like_ero_fun.cc
@@ -2138,12 +2147,13 @@ mln_morpho_opening_structural_SOURCES = mln_morpho_opening_structural.cc
mln_morpho_opening_volume_SOURCES = mln_morpho_opening_volume.cc
mln_morpho_plus_SOURCES = mln_morpho_plus.cc
mln_morpho_rank_filter_SOURCES = mln_morpho_rank_filter.cc
+mln_morpho_Rd_SOURCES = mln_morpho_Rd.cc
mln_morpho_reconstruction_all_SOURCES = mln_morpho_reconstruction_all.cc
mln_morpho_reconstruction_by_dilation_all_SOURCES = mln_morpho_reconstruction_by_dilation_all.cc
mln_morpho_reconstruction_by_dilation_union_find_SOURCES = mln_morpho_reconstruction_by_dilation_union_find.cc
mln_morpho_skeleton_constrained_SOURCES = mln_morpho_skeleton_constrained.cc
-mln_morpho_thick_miss_SOURCES = mln_morpho_thick_miss.cc
mln_morpho_thickening_SOURCES = mln_morpho_thickening.cc
+mln_morpho_thick_miss_SOURCES = mln_morpho_thick_miss.cc
mln_morpho_thin_fit_SOURCES = mln_morpho_thin_fit.cc
mln_morpho_thinning_SOURCES = mln_morpho_thinning.cc
mln_morpho_top_hat_SOURCES = mln_morpho_top_hat.cc
@@ -2214,14 +2224,14 @@ mln_topo_algebraic_face_SOURCES = mln_topo_algebraic_face.cc
mln_topo_algebraic_n_face_SOURCES = mln_topo_algebraic_n_face.cc
mln_topo_all_SOURCES = mln_topo_all.cc
mln_topo_attic_faces_iter_SOURCES = mln_topo_attic_faces_iter.cc
-mln_topo_center_only_iter_SOURCES = mln_topo_center_only_iter.cc
mln_topo_centered_iter_adapter_SOURCES = mln_topo_centered_iter_adapter.cc
+mln_topo_center_only_iter_SOURCES = mln_topo_center_only_iter.cc
mln_topo_complex_SOURCES = mln_topo_complex.cc
mln_topo_complex_iterators_SOURCES = mln_topo_complex_iterators.cc
mln_topo_detach_SOURCES = mln_topo_detach.cc
mln_topo_essential_SOURCES = mln_topo_essential.cc
-mln_topo_face_SOURCES = mln_topo_face.cc
mln_topo_face_data_SOURCES = mln_topo_face_data.cc
+mln_topo_face_SOURCES = mln_topo_face.cc
mln_topo_face_iter_SOURCES = mln_topo_face_iter.cc
mln_topo_internal_complex_iterator_base_SOURCES = mln_topo_internal_complex_iterator_base.cc
mln_topo_internal_complex_relative_iterator_base_SOURCES = mln_topo_internal_complex_relative_iterator_base.cc
@@ -2235,6 +2245,8 @@ mln_topo_n_face_SOURCES = mln_topo_n_face.cc
mln_topo_n_face_iter_SOURCES = mln_topo_n_face_iter.cc
mln_topo_n_faces_set_SOURCES = mln_topo_n_faces_set.cc
mln_topo_skeleton_breadth_first_thinning_SOURCES = mln_topo_skeleton_breadth_first_thinning.cc
+mln_topo_skeleton_crest_SOURCES = mln_topo_skeleton_crest.cc
+mln_topo_skeleton_is_simple_point_SOURCES = mln_topo_skeleton_is_simple_point.cc
mln_topo_static_n_face_iter_SOURCES = mln_topo_static_n_face_iter.cc
mln_trace_all_SOURCES = mln_trace_all.cc
mln_trace_entering_SOURCES = mln_trace_entering.cc
@@ -2253,13 +2265,13 @@ mln_trait_ch_value_SOURCES = mln_trait_ch_value.cc
mln_trait_concrete_SOURCES = mln_trait_concrete.cc
mln_trait_essential_SOURCES = mln_trait_essential.cc
mln_trait_functions_SOURCES = mln_trait_functions.cc
+mln_trait_image_from_grid_SOURCES = mln_trait_image_from_grid.cc
mln_trait_image_print_SOURCES = mln_trait_image_print.cc
mln_trait_image_props_SOURCES = mln_trait_image_props.cc
-mln_trait_image_from_grid_SOURCES = mln_trait_image_from_grid.cc
mln_trait_images_SOURCES = mln_trait_images.cc
mln_trait_neighborhood_SOURCES = mln_trait_neighborhood.cc
-mln_trait_next_solve_SOURCES = mln_trait_next_solve.cc
mln_trait_next_solve_binary_SOURCES = mln_trait_next_solve_binary.cc
+mln_trait_next_solve_SOURCES = mln_trait_next_solve.cc
mln_trait_next_solve_proxy_SOURCES = mln_trait_next_solve_proxy.cc
mln_trait_next_solve_unary_SOURCES = mln_trait_next_solve_unary.cc
mln_trait_op_all_SOURCES = mln_trait_op_all.cc
@@ -2277,8 +2289,8 @@ mln_trait_op_minus_SOURCES = mln_trait_op_minus.cc
mln_trait_op_mod_SOURCES = mln_trait_op_mod.cc
mln_trait_op_neq_SOURCES = mln_trait_op_neq.cc
mln_trait_op_not_SOURCES = mln_trait_op_not.cc
-mln_trait_op_or_SOURCES = mln_trait_op_or.cc
mln_trait_op_ord_SOURCES = mln_trait_op_ord.cc
+mln_trait_op_or_SOURCES = mln_trait_op_or.cc
mln_trait_op_plus_SOURCES = mln_trait_op_plus.cc
mln_trait_op_postdec_SOURCES = mln_trait_op_postdec.cc
mln_trait_op_postinc_SOURCES = mln_trait_op_postinc.cc
@@ -2292,29 +2304,33 @@ mln_trait_promote_SOURCES = mln_trait_promote.cc
mln_trait_site_set_print_SOURCES = mln_trait_site_set_print.cc
mln_trait_site_set_props_SOURCES = mln_trait_site_set_props.cc
mln_trait_site_sets_SOURCES = mln_trait_site_sets.cc
-mln_trait_solve_SOURCES = mln_trait_solve.cc
mln_trait_solve_binary_SOURCES = mln_trait_solve_binary.cc
+mln_trait_solve_SOURCES = mln_trait_solve.cc
mln_trait_solve_unary_SOURCES = mln_trait_solve_unary.cc
mln_trait_undef_SOURCES = mln_trait_undef.cc
mln_trait_value_all_SOURCES = mln_trait_value_all.cc
mln_trait_value_comp_SOURCES = mln_trait_value_comp.cc
mln_trait_value_essential_SOURCES = mln_trait_value_essential.cc
+mln_trait_value__SOURCES = mln_trait_value_.cc
mln_trait_value_internal_all_SOURCES = mln_trait_value_internal_all.cc
mln_trait_value_internal_comp_SOURCES = mln_trait_value_internal_comp.cc
mln_trait_value_kind_SOURCES = mln_trait_value_kind.cc
mln_trait_value_nature_SOURCES = mln_trait_value_nature.cc
mln_trait_value_print_SOURCES = mln_trait_value_print.cc
mln_trait_value_quant_SOURCES = mln_trait_value_quant.cc
-mln_trait_value__SOURCES = mln_trait_value_.cc
mln_trait_window_print_SOURCES = mln_trait_window_print.cc
mln_trait_window_props_SOURCES = mln_trait_window_props.cc
mln_trait_windows_SOURCES = mln_trait_windows.cc
mln_transform_all_SOURCES = mln_transform_all.cc
+mln_transformation_all_SOURCES = mln_transformation_all.cc
+mln_transformation_essential_SOURCES = mln_transformation_essential.cc
+mln_transformation_rotate_SOURCES = mln_transformation_rotate.cc
mln_transform_distance_and_closest_point_geodesic_SOURCES = mln_transform_distance_and_closest_point_geodesic.cc
mln_transform_distance_and_influence_zone_geodesic_SOURCES = mln_transform_distance_and_influence_zone_geodesic.cc
mln_transform_distance_front_SOURCES = mln_transform_distance_front.cc
mln_transform_distance_geodesic_SOURCES = mln_transform_distance_geodesic.cc
mln_transform_essential_SOURCES = mln_transform_essential.cc
+mln_transform_hough_SOURCES = mln_transform_hough.cc
mln_transform_influence_zone_front_SOURCES = mln_transform_influence_zone_front.cc
mln_transform_influence_zone_geodesic_SOURCES = mln_transform_influence_zone_geodesic.cc
mln_transform_internal_all_SOURCES = mln_transform_internal_all.cc
@@ -2338,16 +2354,16 @@ mln_util_greater_point_SOURCES = mln_util_greater_point.cc
mln_util_greater_psite_SOURCES = mln_util_greater_psite.cc
mln_util_ignore_SOURCES = mln_util_ignore.cc
mln_util_index_SOURCES = mln_util_index.cc
-mln_util_internal_boost_graph_SOURCES = mln_util_internal_boost_graph.cc
mln_util_internal_boost_graph_access_SOURCES = mln_util_internal_boost_graph_access.cc
+mln_util_internal_boost_graph_SOURCES = mln_util_internal_boost_graph.cc
mln_util_internal_boost_graph_property_SOURCES = mln_util_internal_boost_graph_property.cc
mln_util_internal_boost_graph_structure_SOURCES = mln_util_internal_boost_graph_structure.cc
mln_util_internal_edge_impl_SOURCES = mln_util_internal_edge_impl.cc
mln_util_internal_graph_base_SOURCES = mln_util_internal_graph_base.cc
-mln_util_internal_graph_iter_SOURCES = mln_util_internal_graph_iter.cc
mln_util_internal_graph_iter_base_SOURCES = mln_util_internal_graph_iter_base.cc
-mln_util_internal_graph_nbh_iter_SOURCES = mln_util_internal_graph_nbh_iter.cc
+mln_util_internal_graph_iter_SOURCES = mln_util_internal_graph_iter.cc
mln_util_internal_graph_nbh_iter_base_SOURCES = mln_util_internal_graph_nbh_iter_base.cc
+mln_util_internal_graph_nbh_iter_SOURCES = mln_util_internal_graph_nbh_iter.cc
mln_util_internal_id2element_SOURCES = mln_util_internal_id2element.cc
mln_util_internal_vertex_impl_SOURCES = mln_util_internal_vertex_impl.cc
mln_util_lazy_set_SOURCES = mln_util_lazy_set.cc
@@ -2365,9 +2381,9 @@ mln_util_site_pair_SOURCES = mln_util_site_pair.cc
mln_util_soft_heap_SOURCES = mln_util_soft_heap.cc
mln_util_timer_SOURCES = mln_util_timer.cc
mln_util_tracked_ptr_SOURCES = mln_util_tracked_ptr.cc
-mln_util_tree_SOURCES = mln_util_tree.cc
mln_util_tree_fast_SOURCES = mln_util_tree_fast.cc
mln_util_tree_fast_to_image_SOURCES = mln_util_tree_fast_to_image.cc
+mln_util_tree_SOURCES = mln_util_tree.cc
mln_util_tree_to_fast_SOURCES = mln_util_tree_to_fast.cc
mln_util_tree_to_image_SOURCES = mln_util_tree_to_image.cc
mln_util_vertex_SOURCES = mln_util_vertex.cc
@@ -2395,50 +2411,50 @@ mln_value_concept_symbolic_SOURCES = mln_value_concept_symbolic.cc
mln_value_concept_vectorial_SOURCES = mln_value_concept_vectorial.cc
mln_value_equiv_SOURCES = mln_value_equiv.cc
mln_value_essential_SOURCES = mln_value_essential.cc
-mln_value_float01_SOURCES = mln_value_float01.cc
-mln_value_float01__SOURCES = mln_value_float01_.cc
mln_value_float01_16_SOURCES = mln_value_float01_16.cc
mln_value_float01_8_SOURCES = mln_value_float01_8.cc
mln_value_float01_f_SOURCES = mln_value_float01_f.cc
+mln_value_float01__SOURCES = mln_value_float01_.cc
+mln_value_float01_SOURCES = mln_value_float01.cc
mln_value_gl16_SOURCES = mln_value_gl16.cc
mln_value_gl8_SOURCES = mln_value_gl8.cc
mln_value_glf_SOURCES = mln_value_glf.cc
-mln_value_graylevel_SOURCES = mln_value_graylevel.cc
mln_value_graylevel_f_SOURCES = mln_value_graylevel_f.cc
+mln_value_graylevel_SOURCES = mln_value_graylevel.cc
mln_value_hsi_SOURCES = mln_value_hsi.cc
mln_value_hsl_SOURCES = mln_value_hsl.cc
-mln_value_int_s_SOURCES = mln_value_int_s.cc
-mln_value_int_s16_SOURCES = mln_value_int_s16.cc
-mln_value_int_s32_SOURCES = mln_value_int_s32.cc
-mln_value_int_s8_SOURCES = mln_value_int_s8.cc
-mln_value_int_u_SOURCES = mln_value_int_u.cc
-mln_value_int_u12_SOURCES = mln_value_int_u12.cc
-mln_value_int_u16_SOURCES = mln_value_int_u16.cc
-mln_value_int_u32_SOURCES = mln_value_int_u32.cc
-mln_value_int_u8_SOURCES = mln_value_int_u8.cc
-mln_value_int_u_sat_SOURCES = mln_value_int_u_sat.cc
mln_value_internal_all_SOURCES = mln_value_internal_all.cc
mln_value_internal_convert_SOURCES = mln_value_internal_convert.cc
mln_value_internal_encoding_SOURCES = mln_value_internal_encoding.cc
mln_value_internal_essential_SOURCES = mln_value_internal_essential.cc
-mln_value_internal_gray__SOURCES = mln_value_internal_gray_.cc
mln_value_internal_gray_f_SOURCES = mln_value_internal_gray_f.cc
+mln_value_internal_gray__SOURCES = mln_value_internal_gray_.cc
mln_value_internal_integer_SOURCES = mln_value_internal_integer.cc
mln_value_internal_iterable_set_SOURCES = mln_value_internal_iterable_set.cc
mln_value_internal_limits_SOURCES = mln_value_internal_limits.cc
mln_value_internal_value_like_SOURCES = mln_value_internal_value_like.cc
mln_value_interval_SOURCES = mln_value_interval.cc
-mln_value_label_SOURCES = mln_value_label.cc
+mln_value_int_s16_SOURCES = mln_value_int_s16.cc
+mln_value_int_s32_SOURCES = mln_value_int_s32.cc
+mln_value_int_s8_SOURCES = mln_value_int_s8.cc
+mln_value_int_s_SOURCES = mln_value_int_s.cc
+mln_value_int_u12_SOURCES = mln_value_int_u12.cc
+mln_value_int_u16_SOURCES = mln_value_int_u16.cc
+mln_value_int_u32_SOURCES = mln_value_int_u32.cc
+mln_value_int_u8_SOURCES = mln_value_int_u8.cc
+mln_value_int_u_SOURCES = mln_value_int_u.cc
+mln_value_int_u_sat_SOURCES = mln_value_int_u_sat.cc
mln_value_label_16_SOURCES = mln_value_label_16.cc
mln_value_label_8_SOURCES = mln_value_label_8.cc
+mln_value_label_SOURCES = mln_value_label.cc
mln_value_lut_vec_SOURCES = mln_value_lut_vec.cc
mln_value_mixin_SOURCES = mln_value_mixin.cc
mln_value_ops_SOURCES = mln_value_ops.cc
mln_value_other_SOURCES = mln_value_other.cc
mln_value_proxy_SOURCES = mln_value_proxy.cc
-mln_value_rgb_SOURCES = mln_value_rgb.cc
mln_value_rgb16_SOURCES = mln_value_rgb16.cc
mln_value_rgb8_SOURCES = mln_value_rgb8.cc
+mln_value_rgb_SOURCES = mln_value_rgb.cc
mln_value_scalar_SOURCES = mln_value_scalar.cc
mln_value_set_SOURCES = mln_value_set.cc
mln_value_shell_SOURCES = mln_value_shell.cc
--
1.5.6.5
1
0
---
milena/sandbox/ChangeLog | 253 ++++++++++++++
milena/sandbox/scribo/Makefile | 65 ----
milena/sandbox/scribo/scribo.mk | 5 -
scribo/Doxyfile | 346 ++++++++++++++++++++
scribo/Doxyfile_tex | 346 ++++++++++++++++++++
{milena/sandbox/scribo => scribo}/Makefile.am | 0
{milena/sandbox/scribo => scribo}/all.hh | 0
.../scribo => scribo}/binarization/simple.hh | 0
{milena/sandbox/scribo => scribo}/core/all.hh | 0
.../scribo => scribo}/core/central_sites.hh | 0
.../scribo => scribo}/core/component_bboxes.hh | 0
.../sandbox/scribo => scribo}/core/erase_bboxes.hh | 0
{milena/sandbox/scribo => scribo}/core/macros.hh | 0
{milena/sandbox/scribo => scribo}/debug/all.hh | 0
.../scribo => scribo}/debug/save_label_image.hh | 0
.../debug/save_linked_textbboxes_image.hh | 0
.../scribo => scribo}/debug/save_table_image.hh | 0
.../debug/save_textbboxes_image.hh | 0
{milena/sandbox/scribo => scribo}/demat.hh | 0
{milena/sandbox/scribo => scribo}/draw/all.hh | 0
.../scribo => scribo}/draw/bounding_box_links.hh | 0
.../scribo => scribo}/draw/bounding_boxes.hh | 0
.../scribo => scribo}/extract/primitive/canvas.hh | 0
.../scribo => scribo}/extract/primitive/cells.hh | 0
.../extract/primitive/lines_discontinued.hh | 0
.../extract/primitive/lines_h_discontinued.hh | 0
.../extract/primitive/lines_thick.hh | 0
.../extract/primitive/lines_v_discontinued.hh | 0
.../scribo => scribo}/extract/primitive/objects.hh | 0
{milena/sandbox/scribo => scribo}/filter/all.hh | 0
.../scribo => scribo}/filter/large_components.hh | 12 +-
.../scribo => scribo}/filter/small_components.hh | 39 +--
.../scribo => scribo}/filter/thick_bboxes.hh | 11 +-
.../scribo => scribo}/filter/thin_bboxes.hh | 15 +-
{milena/sandbox/scribo => scribo}/make/all.hh | 0
.../scribo => scribo}/make/debug_filename.hh | 0
.../scribo => scribo}/make/influence_zone_graph.hh | 0
{milena/sandbox/scribo => scribo}/make/text.hh | 63 ++--
.../sandbox/scribo => scribo}/preprocessing/all.hh | 0
.../scribo => scribo}/preprocessing/unskew.hh | 0
scribo/scribo.mk | 5 +
{milena/sandbox/scribo => scribo}/src/Makefile.am | 0
.../scribo => scribo}/src/binarization/Makefile.am | 0
.../scribo => scribo}/src/binarization/simple.cc | 0
{milena/sandbox/scribo => scribo}/src/dmap.cc | 0
.../src/extract_text_double_link.cc | 6 +-
.../src/extract_text_double_several_links.cc | 0
.../scribo => scribo}/src/extract_text_graph.cc | 10 +-
.../src/extract_text_several_graph.cc | 0
.../src/extract_text_several_left_links.cc | 0
.../src/extract_text_single_link.cc | 0
{milena/sandbox/scribo => scribo}/src/morpho.cc | 0
{milena/sandbox/scribo => scribo}/src/photo.cc | 0
.../sandbox/scribo => scribo}/src/photo_basic.cc | 0
.../src/recognition.cc | 85 ++---
.../scribo => scribo}/src/rectangularity.cc | 0
{milena/sandbox/scribo => scribo}/src/table.cc | 0
.../sandbox/scribo => scribo}/src/table_erase.cc | 19 +-
.../sandbox/scribo => scribo}/src/table_extract.cc | 0
.../scribo/src/table.cc => scribo/src/table_old.cc | 2 +-
.../scribo => scribo}/src/table_rebuild_opening.cc | 0
.../scribo => scribo}/src/table_rebuild_rank.cc | 0
.../sandbox/scribo => scribo}/src/thin_bboxes.cc | 0
.../table/align_lines_horizontaly.hh | 0
.../table/align_lines_verticaly.hh | 0
{milena/sandbox/scribo => scribo}/table/all.hh | 0
.../table/connect_horizontal_lines.hh | 0
.../table/connect_vertical_lines.hh | 0
{milena/sandbox/scribo => scribo}/table/erase.hh | 0
{milena/sandbox/scribo => scribo}/table/extract.hh | 0
.../table/extract_lines_with_opening.hh | 0
.../table/extract_lines_with_rank.hh | 0
.../table/internal/align_lines.hh | 3 +
.../scribo => scribo}/table/internal/all.hh | 0
.../table/internal/connect_lines.hh | 0
.../table/internal/repair_lines.hh | 19 +-
{milena/sandbox/scribo => scribo}/table/rebuild.hh | 6 +-
.../table/repair_horizontal_lines.hh | 0
.../table/repair_vertical_lines.hh | 0
scribo/test.cc | 18 +
.../sandbox/scribo => scribo}/tests/Makefile.am | 0
{milena/sandbox/scribo => scribo}/tests/data.hh.in | 2 +-
.../scribo => scribo}/tests/filter/Makefile.am | 2 +-
.../tests/filter/small_and_large_bboxes.cc | 0
.../scribo => scribo}/tests/table/Makefile.am | 2 +-
.../tests/table/extract_lines_with_rank.cc | 31 +-
.../scribo => scribo}/tests/table/repair_lines.cc | 0
.../scribo => scribo}/tests/text/Makefile.am | 2 +-
{milena/sandbox/scribo => scribo}/text/all.hh | 0
scribo/text/clean.hh | 109 ++++++
.../scribo => scribo}/text/extract_bboxes.hh | 0
.../scribo => scribo}/text/extract_lines.hh | 0
.../sandbox/scribo => scribo}/text/grouping/all.hh | 0
.../text/grouping/group_from_double_link.hh | 33 +--
.../text/grouping/group_from_graph.hh | 47 ++--
.../text/grouping/group_from_single_link.hh | 0
.../text/grouping/group_with_graph.hh | 1 +
.../text/grouping/group_with_several_graphes.hh | 0
.../text/grouping/group_with_several_left_links.hh | 0
.../grouping/group_with_several_right_links.hh | 0
.../text/grouping/group_with_single_left_link.hh | 0
.../text/grouping/group_with_single_right_link.hh | 0
.../text/grouping/internal/all.hh | 0
.../text/grouping/internal/find_graph_link.hh | 0
.../text/grouping/internal/find_left_link.hh | 0
.../text/grouping/internal/find_right_link.hh | 0
.../text/grouping/internal/find_root.hh | 0
.../text/grouping/internal/init_link_array.hh | 0
.../text/grouping/internal/is_link_valid.hh | 0
.../text/grouping/internal/update_graph_link.hh | 0
.../text/grouping/internal/update_link_array.hh | 0
.../sandbox/scribo => scribo}/text/recognition.hh | 86 ++++--
{milena/sandbox/scribo => scribo}/util/all.hh | 0
{milena/sandbox/scribo => scribo}/util/text.hh | 29 ++-
114 files changed, 1367 insertions(+), 305 deletions(-)
delete mode 100644 milena/sandbox/scribo/Makefile
delete mode 100644 milena/sandbox/scribo/scribo.mk
create mode 100644 scribo/Doxyfile
create mode 100644 scribo/Doxyfile_tex
rename {milena/sandbox/scribo => scribo}/Makefile.am (100%)
rename {milena/sandbox/scribo => scribo}/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/binarization/simple.hh (100%)
rename {milena/sandbox/scribo => scribo}/core/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/core/central_sites.hh (100%)
rename {milena/sandbox/scribo => scribo}/core/component_bboxes.hh (100%)
rename {milena/sandbox/scribo => scribo}/core/erase_bboxes.hh (100%)
rename {milena/sandbox/scribo => scribo}/core/macros.hh (100%)
rename {milena/sandbox/scribo => scribo}/debug/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/debug/save_label_image.hh (100%)
rename {milena/sandbox/scribo => scribo}/debug/save_linked_textbboxes_image.hh (100%)
rename {milena/sandbox/scribo => scribo}/debug/save_table_image.hh (100%)
rename {milena/sandbox/scribo => scribo}/debug/save_textbboxes_image.hh (100%)
rename {milena/sandbox/scribo => scribo}/demat.hh (100%)
rename {milena/sandbox/scribo => scribo}/draw/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/draw/bounding_box_links.hh (100%)
rename {milena/sandbox/scribo => scribo}/draw/bounding_boxes.hh (100%)
rename {milena/sandbox/scribo => scribo}/extract/primitive/canvas.hh (100%)
rename {milena/sandbox/scribo => scribo}/extract/primitive/cells.hh (100%)
rename {milena/sandbox/scribo => scribo}/extract/primitive/lines_discontinued.hh (100%)
rename {milena/sandbox/scribo => scribo}/extract/primitive/lines_h_discontinued.hh (100%)
rename {milena/sandbox/scribo => scribo}/extract/primitive/lines_thick.hh (100%)
rename {milena/sandbox/scribo => scribo}/extract/primitive/lines_v_discontinued.hh (100%)
rename {milena/sandbox/scribo => scribo}/extract/primitive/objects.hh (100%)
rename {milena/sandbox/scribo => scribo}/filter/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/filter/large_components.hh (94%)
rename {milena/sandbox/scribo => scribo}/filter/small_components.hh (86%)
rename {milena/sandbox/scribo => scribo}/filter/thick_bboxes.hh (95%)
rename {milena/sandbox/scribo => scribo}/filter/thin_bboxes.hh (91%)
rename {milena/sandbox/scribo => scribo}/make/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/make/debug_filename.hh (100%)
rename {milena/sandbox/scribo => scribo}/make/influence_zone_graph.hh (100%)
rename {milena/sandbox/scribo => scribo}/make/text.hh (77%)
rename {milena/sandbox/scribo => scribo}/preprocessing/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/preprocessing/unskew.hh (100%)
create mode 100644 scribo/scribo.mk
rename {milena/sandbox/scribo => scribo}/src/Makefile.am (100%)
rename {milena/sandbox/scribo => scribo}/src/binarization/Makefile.am (100%)
rename {milena/sandbox/scribo => scribo}/src/binarization/simple.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/dmap.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/extract_text_double_link.cc (96%)
copy {milena/sandbox/scribo => scribo}/src/extract_text_double_several_links.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/extract_text_graph.cc (91%)
rename {milena/sandbox/scribo => scribo}/src/extract_text_several_graph.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/extract_text_several_left_links.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/extract_text_single_link.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/morpho.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/photo.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/photo_basic.cc (100%)
rename milena/sandbox/scribo/src/extract_text_double_several_links.cc => scribo/src/recognition.cc (56%)
rename {milena/sandbox/scribo => scribo}/src/rectangularity.cc (100%)
copy {milena/sandbox/scribo => scribo}/src/table.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/table_erase.cc (78%)
rename {milena/sandbox/scribo => scribo}/src/table_extract.cc (100%)
rename milena/sandbox/scribo/src/table.cc => scribo/src/table_old.cc (99%)
rename {milena/sandbox/scribo => scribo}/src/table_rebuild_opening.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/table_rebuild_rank.cc (100%)
rename {milena/sandbox/scribo => scribo}/src/thin_bboxes.cc (100%)
rename {milena/sandbox/scribo => scribo}/table/align_lines_horizontaly.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/align_lines_verticaly.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/connect_horizontal_lines.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/connect_vertical_lines.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/erase.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/extract.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/extract_lines_with_opening.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/extract_lines_with_rank.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/internal/align_lines.hh (99%)
rename {milena/sandbox/scribo => scribo}/table/internal/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/internal/connect_lines.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/internal/repair_lines.hh (95%)
rename {milena/sandbox/scribo => scribo}/table/rebuild.hh (96%)
rename {milena/sandbox/scribo => scribo}/table/repair_horizontal_lines.hh (100%)
rename {milena/sandbox/scribo => scribo}/table/repair_vertical_lines.hh (100%)
create mode 100644 scribo/test.cc
rename {milena/sandbox/scribo => scribo}/tests/Makefile.am (100%)
rename {milena/sandbox/scribo => scribo}/tests/data.hh.in (95%)
rename {milena/sandbox/scribo => scribo}/tests/filter/Makefile.am (78%)
rename {milena/sandbox/scribo => scribo}/tests/filter/small_and_large_bboxes.cc (100%)
rename {milena/sandbox/scribo => scribo}/tests/table/Makefile.am (82%)
rename {milena/sandbox/scribo => scribo}/tests/table/extract_lines_with_rank.cc (72%)
rename {milena/sandbox/scribo => scribo}/tests/table/repair_lines.cc (100%)
rename {milena/sandbox/scribo => scribo}/tests/text/Makefile.am (66%)
rename {milena/sandbox/scribo => scribo}/text/all.hh (100%)
create mode 100644 scribo/text/clean.hh
rename {milena/sandbox/scribo => scribo}/text/extract_bboxes.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/extract_lines.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_from_double_link.hh (85%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_from_graph.hh (84%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_from_single_link.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_with_graph.hh (99%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_with_several_graphes.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_with_several_left_links.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_with_several_right_links.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_with_single_left_link.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/group_with_single_right_link.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/find_graph_link.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/find_left_link.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/find_right_link.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/find_root.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/init_link_array.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/is_link_valid.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/update_graph_link.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/grouping/internal/update_link_array.hh (100%)
rename {milena/sandbox/scribo => scribo}/text/recognition.hh (65%)
rename {milena/sandbox/scribo => scribo}/util/all.hh (100%)
rename {milena/sandbox/scribo => scribo}/util/text.hh (94%)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index 4ae194b..0bbd9e6 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,256 @@
+2009-05-18 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Move Scribo from sandbox to the root directory.
+
+ * milena/sandbox/scribo/Makefile,
+ * milena/sandbox/scribo/Makefile.am,
+ * milena/sandbox/scribo/all.hh,
+ * milena/sandbox/scribo/binarization/simple.hh,
+ * milena/sandbox/scribo/core/all.hh,
+ * milena/sandbox/scribo/core/central_sites.hh,
+ * milena/sandbox/scribo/core/component_bboxes.hh,
+ * milena/sandbox/scribo/core/erase_bboxes.hh,
+ * milena/sandbox/scribo/core/macros.hh,
+ * milena/sandbox/scribo/debug/all.hh,
+ * milena/sandbox/scribo/debug/save_label_image.hh,
+ * milena/sandbox/scribo/debug/save_linked_textbboxes_image.hh,
+ * milena/sandbox/scribo/debug/save_table_image.hh,
+ * milena/sandbox/scribo/debug/save_textbboxes_image.hh,
+ * milena/sandbox/scribo/demat.hh,
+ * milena/sandbox/scribo/draw/all.hh,
+ * milena/sandbox/scribo/draw/bounding_box_links.hh,
+ * milena/sandbox/scribo/draw/bounding_boxes.hh,
+ * milena/sandbox/scribo/extract/primitive/canvas.hh,
+ * milena/sandbox/scribo/extract/primitive/cells.hh,
+ * milena/sandbox/scribo/extract/primitive/lines_discontinued.hh,
+ * milena/sandbox/scribo/extract/primitive/lines_h_discontinued.hh,
+ * milena/sandbox/scribo/extract/primitive/lines_thick.hh,
+ * milena/sandbox/scribo/extract/primitive/lines_v_discontinued.hh,
+ * milena/sandbox/scribo/extract/primitive/objects.hh,
+ * milena/sandbox/scribo/filter/all.hh,
+ * milena/sandbox/scribo/filter/large_components.hh,
+ * milena/sandbox/scribo/filter/small_components.hh,
+ * milena/sandbox/scribo/filter/thick_bboxes.hh,
+ * milena/sandbox/scribo/filter/thin_bboxes.hh,
+ * milena/sandbox/scribo/make/all.hh,
+ * milena/sandbox/scribo/make/debug_filename.hh,
+ * milena/sandbox/scribo/make/influence_zone_graph.hh,
+ * milena/sandbox/scribo/make/text.hh,
+ * milena/sandbox/scribo/preprocessing/all.hh,
+ * milena/sandbox/scribo/preprocessing/unskew.hh,
+ * milena/sandbox/scribo/scribo.mk,
+ * milena/sandbox/scribo/src/Makefile.am,
+ * milena/sandbox/scribo/src/binarization/Makefile.am,
+ * milena/sandbox/scribo/src/binarization/simple.cc,
+ * milena/sandbox/scribo/src/dmap.cc,
+ * milena/sandbox/scribo/src/extract_text_double_link.cc,
+ * milena/sandbox/scribo/src/extract_text_double_several_links.cc,
+ * milena/sandbox/scribo/src/extract_text_graph.cc,
+ * milena/sandbox/scribo/src/extract_text_several_graph.cc,
+ * milena/sandbox/scribo/src/extract_text_several_left_links.cc,
+ * milena/sandbox/scribo/src/extract_text_single_link.cc,
+ * milena/sandbox/scribo/src/morpho.cc,
+ * milena/sandbox/scribo/src/photo.cc,
+ * milena/sandbox/scribo/src/photo_basic.cc,
+ * milena/sandbox/scribo/src/rectangularity.cc,
+ * milena/sandbox/scribo/src/table.cc,
+ * milena/sandbox/scribo/src/table_erase.cc,
+ * milena/sandbox/scribo/src/table_extract.cc,
+ * milena/sandbox/scribo/src/table_rebuild_opening.cc,
+ * milena/sandbox/scribo/src/table_rebuild_rank.cc,
+ * milena/sandbox/scribo/src/thin_bboxes.cc,
+ * milena/sandbox/scribo/table/align_lines_horizontaly.hh,
+ * milena/sandbox/scribo/table/align_lines_verticaly.hh,
+ * milena/sandbox/scribo/table/all.hh,
+ * milena/sandbox/scribo/table/connect_horizontal_lines.hh,
+ * milena/sandbox/scribo/table/connect_vertical_lines.hh,
+ * milena/sandbox/scribo/table/erase.hh,
+ * milena/sandbox/scribo/table/extract.hh,
+ * milena/sandbox/scribo/table/extract_lines_with_opening.hh,
+ * milena/sandbox/scribo/table/extract_lines_with_rank.hh,
+ * milena/sandbox/scribo/table/internal/align_lines.hh,
+ * milena/sandbox/scribo/table/internal/all.hh,
+ * milena/sandbox/scribo/table/internal/connect_lines.hh,
+ * milena/sandbox/scribo/table/internal/repair_lines.hh,
+ * milena/sandbox/scribo/table/rebuild.hh,
+ * milena/sandbox/scribo/table/repair_horizontal_lines.hh,
+ * milena/sandbox/scribo/table/repair_vertical_lines.hh,
+ * milena/sandbox/scribo/tests/Makefile.am,
+ * milena/sandbox/scribo/tests/data.hh.in,
+ * milena/sandbox/scribo/tests/filter/Makefile.am,
+ * milena/sandbox/scribo/tests/filter/small_and_large_bboxes.cc,
+ * milena/sandbox/scribo/tests/table/Makefile.am,
+ * milena/sandbox/scribo/tests/table/extract_lines_with_rank.cc,
+ * milena/sandbox/scribo/tests/table/repair_lines.cc,
+ * milena/sandbox/scribo/tests/text/Makefile.am,
+ * milena/sandbox/scribo/text/all.hh,
+ * milena/sandbox/scribo/text/extract_bboxes.hh,
+ * milena/sandbox/scribo/text/extract_lines.hh,
+ * milena/sandbox/scribo/text/grouping/all.hh,
+ * milena/sandbox/scribo/text/grouping/group_from_double_link.hh,
+ * milena/sandbox/scribo/text/grouping/group_from_graph.hh,
+ * milena/sandbox/scribo/text/grouping/group_from_single_link.hh,
+ * milena/sandbox/scribo/text/grouping/group_with_graph.hh,
+ * milena/sandbox/scribo/text/grouping/group_with_several_graphes.hh,
+ * milena/sandbox/scribo/text/grouping/group_with_several_left_links.hh,
+ * milena/sandbox/scribo/text/grouping/group_with_several_right_links.hh,
+ * milena/sandbox/scribo/text/grouping/group_with_single_left_link.hh,
+ * milena/sandbox/scribo/text/grouping/group_with_single_right_link.hh,
+ * milena/sandbox/scribo/text/grouping/internal/all.hh,
+ * milena/sandbox/scribo/text/grouping/internal/find_graph_link.hh,
+ * milena/sandbox/scribo/text/grouping/internal/find_left_link.hh,
+ * milena/sandbox/scribo/text/grouping/internal/find_right_link.hh,
+ * milena/sandbox/scribo/text/grouping/internal/find_root.hh,
+ * milena/sandbox/scribo/text/grouping/internal/init_link_array.hh,
+ * milena/sandbox/scribo/text/grouping/internal/is_link_valid.hh,
+ * milena/sandbox/scribo/text/grouping/internal/update_graph_link.hh,
+ * milena/sandbox/scribo/text/grouping/internal/update_link_array.hh,
+ * milena/sandbox/scribo/text/recognition.hh,
+ * milena/sandbox/scribo/util/all.hh,
+ * milena/sandbox/scribo/util/text.hh: move ...
+
+ * scribo/Doxyfile,
+ * scribo/Doxyfile_tex,
+ * scribo/Makefile.am,
+ * scribo/all.hh,
+ * scribo/binarization/simple.hh,
+ * scribo/core/all.hh,
+ * scribo/core/central_sites.hh,
+ * scribo/core/component_bboxes.hh,
+ * scribo/core/erase_bboxes.hh,
+ * scribo/core/macros.hh,
+ * scribo/debug/all.hh,
+ * scribo/debug/save_label_image.hh,
+ * scribo/debug/save_linked_textbboxes_image.hh,
+ * scribo/debug/save_table_image.hh,
+ * scribo/debug/save_textbboxes_image.hh,
+ * scribo/demat.hh,
+ * scribo/draw/all.hh,
+ * scribo/draw/bounding_box_links.hh,
+ * scribo/draw/bounding_boxes.hh,
+ * scribo/extract/primitive/canvas.hh,
+ * scribo/extract/primitive/cells.hh,
+ * scribo/extract/primitive/lines_discontinued.hh,
+ * scribo/extract/primitive/lines_h_discontinued.hh,
+ * scribo/extract/primitive/lines_thick.hh,
+ * scribo/extract/primitive/lines_v_discontinued.hh,
+ * scribo/extract/primitive/objects.hh,
+ * scribo/filter/all.hh,
+ * scribo/filter/large_components.hh,
+ * scribo/filter/small_components.hh,
+ * scribo/filter/thick_bboxes.hh,
+ * scribo/filter/thin_bboxes.hh,
+ * scribo/make/all.hh,
+ * scribo/make/debug_filename.hh,
+ * scribo/make/influence_zone_graph.hh,
+ * scribo/make/text.hh,
+ * scribo/preprocessing/all.hh,
+ * scribo/preprocessing/unskew.hh,
+ * scribo/scribo.mk,
+ * scribo/src/Makefile.am,
+ * scribo/src/binarization/Makefile.am,
+ * scribo/src/binarization/simple.cc,
+ * scribo/src/dmap.cc,
+ * scribo/src/extract_text_double_link.cc,
+ * scribo/src/extract_text_double_several_links.cc,
+ * scribo/src/extract_text_graph.cc,
+ * scribo/src/extract_text_several_graph.cc,
+ * scribo/src/extract_text_several_left_links.cc,
+ * scribo/src/extract_text_single_link.cc,
+ * scribo/src/morpho.cc,
+ * scribo/src/photo.cc,
+ * scribo/src/photo_basic.cc,
+ * scribo/src/recognition.cc,
+ * scribo/src/rectangularity.cc,
+ * scribo/src/table.cc,
+ * scribo/src/table_erase.cc,
+ * scribo/src/table_extract.cc,
+ * scribo/src/table_old.cc,
+ * scribo/src/table_rebuild_opening.cc,
+ * scribo/src/table_rebuild_rank.cc,
+ * scribo/src/thin_bboxes.cc,
+ * scribo/table/align_lines_horizontaly.hh,
+ * scribo/table/align_lines_verticaly.hh,
+ * scribo/table/all.hh,
+ * scribo/table/connect_horizontal_lines.hh,
+ * scribo/table/connect_vertical_lines.hh,
+ * scribo/table/erase.hh,
+ * scribo/table/extract.hh,
+ * scribo/table/extract_lines_with_opening.hh,
+ * scribo/table/extract_lines_with_rank.hh,
+ * scribo/table/internal/align_lines.hh,
+ * scribo/table/internal/all.hh,
+ * scribo/table/internal/connect_lines.hh,
+ * scribo/table/internal/repair_lines.hh,
+ * scribo/table/rebuild.hh,
+ * scribo/table/repair_horizontal_lines.hh,
+ * scribo/table/repair_vertical_lines.hh,
+ * scribo/test.cc,
+ * scribo/tests/Makefile.am,
+ * scribo/tests/data.hh.in,
+ * scribo/src/photo.cc,
+ * scribo/src/photo_basic.cc,
+ * scribo/src/recognition.cc,
+ * scribo/src/rectangularity.cc,
+ * scribo/src/table.cc,
+ * scribo/src/table_erase.cc,
+ * scribo/src/table_extract.cc,
+ * scribo/src/table_old.cc,
+ * scribo/src/table_rebuild_opening.cc,
+ * scribo/src/table_rebuild_rank.cc,
+ * scribo/src/thin_bboxes.cc,
+ * scribo/table/align_lines_horizontaly.hh,
+ * scribo/table/align_lines_verticaly.hh,
+ * scribo/table/all.hh,
+ * scribo/table/connect_horizontal_lines.hh,
+ * scribo/table/connect_vertical_lines.hh,
+ * scribo/table/erase.hh,
+ * scribo/table/extract.hh,
+ * scribo/table/extract_lines_with_opening.hh,
+ * scribo/table/extract_lines_with_rank.hh,
+ * scribo/table/internal/align_lines.hh,
+ * scribo/table/internal/all.hh,
+ * scribo/table/internal/connect_lines.hh,
+ * scribo/table/internal/repair_lines.hh,
+ * scribo/table/rebuild.hh,
+ * scribo/table/repair_horizontal_lines.hh,
+ * scribo/table/repair_vertical_lines.hh,
+ * scribo/test.cc,
+ * scribo/tests/Makefile.am,
+ * scribo/tests/data.hh.in,
+ * scribo/tests/filter/Makefile.am,
+ * scribo/tests/filter/small_and_large_bboxes.cc,
+ * scribo/tests/table/Makefile.am,
+ * scribo/tests/table/extract_lines_with_rank.cc,
+ * scribo/tests/table/repair_lines.cc,
+ * scribo/tests/text/Makefile.am,
+ * scribo/text/all.hh,
+ * scribo/text/clean.hh,
+ * scribo/text/extract_bboxes.hh,
+ * scribo/text/extract_lines.hh,
+ * scribo/text/grouping/all.hh,
+ * scribo/text/grouping/group_from_double_link.hh,
+ * scribo/text/grouping/group_from_graph.hh,
+ * scribo/text/grouping/group_from_single_link.hh,
+ * scribo/text/grouping/group_with_graph.hh,
+ * scribo/text/grouping/group_with_several_graphes.hh,
+ * scribo/text/grouping/group_with_several_left_links.hh,
+ * scribo/text/grouping/group_with_several_right_links.hh,
+ * scribo/text/grouping/group_with_single_left_link.hh,
+ * scribo/text/grouping/group_with_single_right_link.hh,
+ * scribo/text/grouping/internal/all.hh,
+ * scribo/text/grouping/internal/find_graph_link.hh,
+ * scribo/text/grouping/internal/find_left_link.hh,
+ * scribo/text/grouping/internal/find_right_link.hh,
+ * scribo/text/grouping/internal/find_root.hh,
+ * scribo/text/grouping/internal/init_link_array.hh,
+ * scribo/text/grouping/internal/is_link_valid.hh,
+ * scribo/text/grouping/internal/update_graph_link.hh,
+ * scribo/text/grouping/internal/update_link_array.hh,
+ * scribo/text/recognition.hh,
+ * scribo/util/all.hh,
+ * scribo/util/text.hh: ... here.
+
2009-05-19 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Make Etienne's code compile.
diff --git a/milena/sandbox/scribo/Makefile b/milena/sandbox/scribo/Makefile
deleted file mode 100644
index d8b9a68..0000000
--- a/milena/sandbox/scribo/Makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-CXX_FLAGS = -Wextra -Wall -I../.. -I../ -I$(HOME)/local/include -O1 -DNDEBUG # -ggdb #-O1 -DNDEBUG
-
-all: table photo
-
-tabledbg: demat.hh
- g++ -Wextra -Wall -I../.. -I../ -I. -I$(HOME)/local/include -O1 -g src/table.cc $(HOME)/local/lib/libtesseract_full.a -lpthread -o bin/table.out
-
-table: demat.hh
- g++ $(CXX_FLAGS) src/table.cc $(HOME)/local/lib/libtesseract_full.a -lpthread -o bin/table.out
-
-oldtable: demat.old.hh
- g++ $(CXX_FLAGS) src/table_old.cc $(HOME)/local/lib/libtesseract_full.a -lpthread -o bin/table_old.out
-
-photo: demat.hh
- g++ $(CXX_FLAGS) src/photo.cc $(HOME)/local/lib/libtesseract_full.a -lpthread -o bin/photo.out
-
-
-dmap:
- g++ $(CXX_FLAGS) src/dmap.cc -o bin/dmap.out
-
-rectangularity:
- g++ $(CXX_FLAGS) src/rectangularity.cc -o bin/rectangularity.out
-
-
-extract_text_single_link:
- g++ $(CXX_FLAGS) src/extract_text_single_link.cc -o bin/extract_text_single_link.out
-
-extract_text_double_link:
- g++ $(CXX_FLAGS) src/extract_text_double_link.cc -o bin/extract_text_double_link.out
-
-extract_text_double_several_links:
- g++ $(CXX_FLAGS) src/extract_text_double_several_links.cc -o bin/extract_text_double_several_links.out
-
-extract_text_multiple_links:
- g++ $(CXX_FLAGS) src/extract_text_multiple_links.cc -o bin/extract_text_multiple_links.out
-
-extract_text_several_multiple_links:
- g++ $(CXX_FLAGS) src/extract_text_several_multiple_links.cc -o bin/extract_text_several_multiple_links.out
-
-extract_text_several_left_links:
- g++ $(CXX_FLAGS) src/extract_text_several_left_links.cc -o bin/extract_text_several_left_links.out
-
-table_rebuild_rank:
- g++ $(CXX_FLAGS) src/table_rebuild_rank.cc -o bin/table_rebuild_rank.out
-
-table_rebuild_opening:
- g++ $(CXX_FLAGS) src/table_rebuild_opening.cc -o bin/table_rebuild_opening.out
-
-table_extract:
- g++ $(CXX_FLAGS) src/table_extract.cc -o bin/table_extract.out
-
-table_erase:
- g++ $(CXX_FLAGS) src/table_erase.cc -o bin/table_erase.out
-
-thin_bboxes:
- g++ $(CXX_FLAGS) src/thin_bboxes.cc -o bin/thin_bboxes.out
-
-photo_basic:
- g++ $(CXX_FLAGS) src/photo_basic.cc -o bin/photo_basic.out
-
-clean:
- rm *.ppm *.pgm *.pbm
-
-dist-clean: clean
- rm -f bin/table.out bin/photo.out
diff --git a/milena/sandbox/scribo/scribo.mk b/milena/sandbox/scribo/scribo.mk
deleted file mode 100644
index 13b617a..0000000
--- a/milena/sandbox/scribo/scribo.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-include $(top_srcdir)/milena/tests/tests.mk
-
-# Add path to Scribo's headers
-AM_CPPFLAGS += -I$(top_srcdir)/milena/sandbox/ -I$(top_builddir)/milena/sandbox/
-
diff --git a/scribo/Doxyfile b/scribo/Doxyfile
new file mode 100644
index 0000000..1f2f484
--- /dev/null
+++ b/scribo/Doxyfile
@@ -0,0 +1,346 @@
+# Doxyfile 1.5.6
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = "Scribo (Olena)"
+PROJECT_NUMBER = "User documentation"
+OUTPUT_DIRECTORY = ./user/
+CREATE_SUBDIRS = YES
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF =
+ALWAYS_DETAILED_SEC = YES
+INLINE_INHERITED_MEMB = YES
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = ../../../milena \
+ ../../milena \
+ ../../milena/sandbox/scribo \
+ ../../../milena/sandbox/scribo
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+BUILTIN_STL_SUPPORT = YES
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
+TYPEDEF_HIDES_STRUCT = NO
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = NO
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = YES
+HIDE_IN_BODY_DOCS = YES
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = YES
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = YES
+SORT_GROUP_NAMES = YES
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = NO
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = YES
+SHOW_FILES = YES
+SHOW_NAMESPACES = YES
+FILE_VERSION_FILTER =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = YES
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = .
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS = *.cc \
+ *.hh \
+ *.hxx \
+ *.hcc
+RECURSIVE = YES
+EXCLUDE = user \
+ demat.hh \
+ demat.old.hh
+EXCLUDE_SYMLINKS = YES
+EXCLUDE_PATTERNS = *spe.hh
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH = /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/tutorial/samples \
+ /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/tutorial/outputs \
+ /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/tutorial/examples \
+ /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/examples \
+ /lrde/stockholm/lazzara/svn/olena/git/build/milena/doc/tutorial/samples \
+ /lrde/stockholm/lazzara/svn/olena/git/build/milena/doc/tutorial/outputs
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH = /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/tutorial/figures \
+ /lrde/stockholm/lazzara/svn/olena/git/build/milena/doc/tutorial/figures \
+ /lrde/stockholm/lazzara/svn/olena/git/oln/milena/img
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = YES
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_BUNDLE_ID = org.doxygen.Project
+HTML_DYNAMIC_SECTIONS = YES
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = FRAME
+TREEVIEW_WIDTH = 250
+FORMULA_FONTSIZE = 10
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = YES
+LATEX_BATCHMODE = YES
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret" \
+ "mln_piter(T)=typename T::piter" \
+ "mln_fwd_piter(T)=typename T::fwd_piter" \
+ "mln_bkd_piter(T)=typename T::bkd_piter" \
+ "mln_qiter(T)=typename T::qiter" \
+ "mln_fwd_qiter(T)=typename T::fwd_qiter" \
+ "mln_bkd_qiter(T)=typename T::bkd_qiter" \
+ "mln_niter(T)=typename T::niter" \
+ "mln_fwd_niter(T)=typename T::fwd_niter" \
+ "mln_bkd_niter(T)=typename T::bkd_niter" \
+ "mln_viter(T)=typename T::viter" \
+ "mln_fwd_viter(T)=typename T::fwd_viter" \
+ "mln_bkd_viter(T)=typename T::bkd_viter" \
+ "mln_result(T)=typename T::result" \
+ "mln_enc(T)=typename T::enc" \
+ "mln_value(T)=typename T::value" \
+ "mln_qlf_value(T)=typename T::qlf_value" \
+ "mln_pset(T)=typename T::pset" \
+ "mln_sum(T)=typename mln::value::props<T>::sum" \
+ "mln_vset(T)=typename T::vset" \
+ "mln_rvalue(T)=typename T::rvalue" \
+ "mln_lvalue(T)=typename T::lvalue" \
+ "mln_mesh(T)=typename T::mesh" \
+ "mln_coord(T)=typename T::coord" \
+ "mln_site(T)=typename T::site" \
+ "mln_psite(T)=typename T::psite" \
+ "mln_dpsite(T)=typename T::dpsite" \
+ "mln_accu_with(A, T)=typename A::template with< T >::ret" \
+ "mln_trait_op_plus(L, R)=typename mln::trait::op::plus< L , R >::ret" \
+ "mln_trait_op_minus(L, R)=typename mln::trait::op::minus< L , R >::ret" \
+ "mln_trait_op_times(L, R)=typename mln::trait::op::times< L , R >::ret" \
+ "mln_trait_op_div(L, R)=typename mln::trait::op::div< L , R >::ret" \
+ "mln_trait_op_mod(L, R)=typename mln::trait::op::mod< L , R >::ret" \
+ "mln_trait_op_uminus(T)=typename mln::trait::op::uminus< T >::ret" \
+ "mln_ch_value(I, V)=typename mln::trait::ch_value< I, V >::ret" \
+ "mlc_unqualif_(T)=mln::metal::unqualif<T>::ret" \
+ "mln_piter_(T)=T::piter" \
+ "mln_fwd_piter_(T)=T::fwd_piter" \
+ "mln_bkd_piter_(T)=T::bkd_piter" \
+ "mln_qiter_(T)=T::qiter" \
+ "mln_fwd_qiter_(T)=T::fwd_qiter" \
+ "mln_bkd_qiter_(T)=T::bkd_qiter" \
+ "mln_niter_(T)=T::niter" \
+ "mln_fwd_niter_(T)=T::fwd_niter" \
+ "mln_bkd_niter_(T)=T::bkd_niter" \
+ "mln_viter_(T)=T::viter" \
+ "mln_fwd_viter_(T)=T::fwd_viter" \
+ "mln_bkd_viter_(T)=T::bkd_viter" \
+ "mln_result_(T)=T::result" \
+ "mln_enc_(T)=T::enc" \
+ "mln_value_(T)=T::value" \
+ "mln_qlf_value_(T)=T::qlf_value" \
+ "mln_pset_(T)=T::pset" \
+ "mln_sum_(T)=mln::value::props<T>::sum" \
+ "mln_vset_(T)=T::vset" \
+ "mln_rvalue_(T)=T::rvalue" \
+ "mln_lvalue_(T)=T::lvalue" \
+ "mln_mesh_(T)=T::mesh" \
+ "mln_coord_(T)=T::coord" \
+ "mln_site_(T)=T::site" \
+ "mln_psite_(T)=T::psite" \
+ "mln_dpsite_(T)=T::dpsite" \
+ "mln_accu_with_(A, T)=A::template with< T >::ret" \
+ "mln_trait_op_plus_(L, R)=mln::trait::op::plus< L , R >::ret" \
+ "mln_trait_op_minus_(L, R)=mln::trait::op::minus< L , R >::ret" \
+ "mln_trait_op_times_(L, R)=mln::trait::op::times< L , R >::ret" \
+ "mln_trait_op_div_(L, R)=mln::trait::op::div< L , R >::ret" \
+ "mln_trait_op_mod_(L, R)=mln::trait::op::mod< L , R >::ret" \
+ "mln_trait_op_uminus_(T)=mln::trait::op::uminus< T >::ret" \
+ "mln_ch_value_(I, V)=typename mln::trait::ch_value< I, V >::ret" \
+ "mln_ch_value(I, V)_=mln::trait::ch_value< I, V >::ret" \
+ "mln_morpher_lvalue(I)=typename internal::morpher_lvalue_<I>::ret" \
+ "mln_concrete(I)=typename mln::trait::concrete< I >::ret" \
+ "mln_concrete_ch_value(I, V)=typename mln::trait::ch_value< typename mln::trait::concrete< I >::ret, V >::ret" \
+ "mlc_const(T)=typename mln::metal::const_< T >::ret" \
+ "mlc_const_return(T)=typename mln::metal::const_return_< T >::ret" \
+ "mln_element(T)=typename T::element" \
+ "mln_element_(T)=T::element" \
+ "mln_delta(T)=typename T::delta" \
+ "mln_delta_(T)=T::delta" \
+ "mln_dpoint(T)=typename T::dpoint" \
+ "mln_dpoint_(T)=T::dpoint" \
+ "mln_point(T)=typename T::point" \
+ "mln_point_(T)=T::point" \
+ "mln_gradient_component(I)=typename mln::trait::ch_value< I, mln::value::props< typename I::value >::sum >::ret" \
+ "mln_gradient(I)=mln::value::stack_image< I::point::dim, mln::trait::ch_value< I, mln::value::props< typename I::value >::sum >::ret >"
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+MSCGEN_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = YES
+DOT_FONTNAME = FreeSans
+DOT_FONTPATH =
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 1000
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
diff --git a/scribo/Doxyfile_tex b/scribo/Doxyfile_tex
new file mode 100644
index 0000000..d2f4b19
--- /dev/null
+++ b/scribo/Doxyfile_tex
@@ -0,0 +1,346 @@
+# Doxyfile 1.5.6
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = Scribo
+PROJECT_NUMBER = "User documentation"
+OUTPUT_DIRECTORY = ./user/
+CREATE_SUBDIRS = YES
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF =
+ALWAYS_DETAILED_SEC = YES
+INLINE_INHERITED_MEMB = YES
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = ../../../milena \
+ ../../milena \
+ ../../milena/sandbox/scribo \
+ ../../../milena/sandbox/scribo
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 2
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+BUILTIN_STL_SUPPORT = YES
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
+TYPEDEF_HIDES_STRUCT = NO
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = NO
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = YES
+HIDE_IN_BODY_DOCS = YES
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = YES
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = YES
+SORT_GROUP_NAMES = YES
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = NO
+GENERATE_TESTLIST = NO
+GENERATE_BUGLIST = NO
+GENERATE_DEPRECATEDLIST= NO
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = NO
+SHOW_DIRECTORIES = NO
+SHOW_FILES = NO
+SHOW_NAMESPACES = YES
+FILE_VERSION_FILTER =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = YES
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = .
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS = *.cc \
+ *.hh \
+ *.hxx \
+ *.hcc
+RECURSIVE = YES
+EXCLUDE = user
+EXCLUDE_SYMLINKS = YES
+EXCLUDE_PATTERNS = *spe.hh \
+ demat.hh \
+ demat.old.hh
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH = /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/tutorial/samples \
+ /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/tutorial/outputs \
+ /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/tutorial/examples \
+ /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/examples \
+ /lrde/stockholm/lazzara/svn/olena/git/build/milena/doc/tutorial/samples \
+ /lrde/stockholm/lazzara/svn/olena/git/build/milena/doc/tutorial/outputs
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH = /lrde/stockholm/lazzara/svn/olena/git/oln/milena/doc/tutorial/figures \
+ /lrde/stockholm/lazzara/svn/olena/git/build/milena/doc/tutorial/figures \
+ /lrde/stockholm/lazzara/svn/olena/git/oln/milena/img
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION = NO
+REFERENCES_LINK_SOURCE = NO
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = NO
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_BUNDLE_ID = org.doxygen.Project
+HTML_DYNAMIC_SECTIONS = YES
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = FRAME
+TREEVIEW_WIDTH = 250
+FORMULA_FONTSIZE = 10
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = YES
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = YES
+LATEX_BATCHMODE = YES
+LATEX_HIDE_INDICES = YES
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret" \
+ "mln_piter(T)=typename T::piter" \
+ "mln_fwd_piter(T)=typename T::fwd_piter" \
+ "mln_bkd_piter(T)=typename T::bkd_piter" \
+ "mln_qiter(T)=typename T::qiter" \
+ "mln_fwd_qiter(T)=typename T::fwd_qiter" \
+ "mln_bkd_qiter(T)=typename T::bkd_qiter" \
+ "mln_niter(T)=typename T::niter" \
+ "mln_fwd_niter(T)=typename T::fwd_niter" \
+ "mln_bkd_niter(T)=typename T::bkd_niter" \
+ "mln_viter(T)=typename T::viter" \
+ "mln_fwd_viter(T)=typename T::fwd_viter" \
+ "mln_bkd_viter(T)=typename T::bkd_viter" \
+ "mln_result(T)=typename T::result" \
+ "mln_enc(T)=typename T::enc" \
+ "mln_value(T)=typename T::value" \
+ "mln_qlf_value(T)=typename T::qlf_value" \
+ "mln_pset(T)=typename T::pset" \
+ "mln_sum(T)=typename mln::value::props<T>::sum" \
+ "mln_vset(T)=typename T::vset" \
+ "mln_rvalue(T)=typename T::rvalue" \
+ "mln_lvalue(T)=typename T::lvalue" \
+ "mln_mesh(T)=typename T::mesh" \
+ "mln_coord(T)=typename T::coord" \
+ "mln_site(T)=typename T::site" \
+ "mln_psite(T)=typename T::psite" \
+ "mln_dpsite(T)=typename T::dpsite" \
+ "mln_accu_with(A, T)=typename A::template with< T >::ret" \
+ "mln_trait_op_plus(L, R)=typename mln::trait::op::plus< L , R >::ret" \
+ "mln_trait_op_minus(L, R)=typename mln::trait::op::minus< L , R >::ret" \
+ "mln_trait_op_times(L, R)=typename mln::trait::op::times< L , R >::ret" \
+ "mln_trait_op_div(L, R)=typename mln::trait::op::div< L , R >::ret" \
+ "mln_trait_op_mod(L, R)=typename mln::trait::op::mod< L , R >::ret" \
+ "mln_trait_op_uminus(T)=typename mln::trait::op::uminus< T >::ret" \
+ "mln_ch_value(I, V)=typename mln::trait::ch_value< I, V >::ret" \
+ "mlc_unqualif_(T)=mln::metal::unqualif<T>::ret" \
+ "mln_piter_(T)=T::piter" \
+ "mln_fwd_piter_(T)=T::fwd_piter" \
+ "mln_bkd_piter_(T)=T::bkd_piter" \
+ "mln_qiter_(T)=T::qiter" \
+ "mln_fwd_qiter_(T)=T::fwd_qiter" \
+ "mln_bkd_qiter_(T)=T::bkd_qiter" \
+ "mln_niter_(T)=T::niter" \
+ "mln_fwd_niter_(T)=T::fwd_niter" \
+ "mln_bkd_niter_(T)=T::bkd_niter" \
+ "mln_viter_(T)=T::viter" \
+ "mln_fwd_viter_(T)=T::fwd_viter" \
+ "mln_bkd_viter_(T)=T::bkd_viter" \
+ "mln_result_(T)=T::result" \
+ "mln_enc_(T)=T::enc" \
+ "mln_value_(T)=T::value" \
+ "mln_qlf_value_(T)=T::qlf_value" \
+ "mln_pset_(T)=T::pset" \
+ "mln_sum_(T)=mln::value::props<T>::sum" \
+ "mln_vset_(T)=T::vset" \
+ "mln_rvalue_(T)=T::rvalue" \
+ "mln_lvalue_(T)=T::lvalue" \
+ "mln_mesh_(T)=T::mesh" \
+ "mln_coord_(T)=T::coord" \
+ "mln_site_(T)=T::site" \
+ "mln_psite_(T)=T::psite" \
+ "mln_dpsite_(T)=T::dpsite" \
+ "mln_accu_with_(A, T)=A::template with< T >::ret" \
+ "mln_trait_op_plus_(L, R)=mln::trait::op::plus< L , R >::ret" \
+ "mln_trait_op_minus_(L, R)=mln::trait::op::minus< L , R >::ret" \
+ "mln_trait_op_times_(L, R)=mln::trait::op::times< L , R >::ret" \
+ "mln_trait_op_div_(L, R)=mln::trait::op::div< L , R >::ret" \
+ "mln_trait_op_mod_(L, R)=mln::trait::op::mod< L , R >::ret" \
+ "mln_trait_op_uminus_(T)=mln::trait::op::uminus< T >::ret" \
+ "mln_ch_value_(I, V)=typename mln::trait::ch_value< I, V >::ret" \
+ "mln_ch_value(I, V)_=mln::trait::ch_value< I, V >::ret" \
+ "mln_morpher_lvalue(I)=typename internal::morpher_lvalue_<I>::ret" \
+ "mln_concrete(I)=typename mln::trait::concrete< I >::ret" \
+ "mln_concrete_ch_value(I, V)=typename mln::trait::ch_value< typename mln::trait::concrete< I >::ret, V >::ret" \
+ "mlc_const(T)=typename mln::metal::const_< T >::ret" \
+ "mlc_const_return(T)=typename mln::metal::const_return_< T >::ret" \
+ "mln_element(T)=typename T::element" \
+ "mln_element_(T)=T::element" \
+ "mln_delta(T)=typename T::delta" \
+ "mln_delta_(T)=T::delta" \
+ "mln_dpoint(T)=typename T::dpoint" \
+ "mln_dpoint_(T)=T::dpoint" \
+ "mln_point(T)=typename T::point" \
+ "mln_point_(T)=T::point" \
+ "mln_gradient_component(I)=typename mln::trait::ch_value< I, mln::value::props< typename I::value >::sum >::ret" \
+ "mln_gradient(I)=mln::value::stack_image< I::point::dim, mln::trait::ch_value< I, mln::value::props< typename I::value >::sum >::ret >"
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = NO
+MSCGEN_PATH =
+HIDE_UNDOC_RELATIONS = NO
+HAVE_DOT = NO
+DOT_FONTNAME = FreeSans
+DOT_FONTPATH =
+CLASS_GRAPH = NO
+COLLABORATION_GRAPH = NO
+GROUP_GRAPHS = NO
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = NO
+INCLUDED_BY_GRAPH = NO
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = NO
+DIRECTORY_GRAPH = NO
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 1000
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = NO
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
diff --git a/milena/sandbox/scribo/Makefile.am b/scribo/Makefile.am
similarity index 100%
rename from milena/sandbox/scribo/Makefile.am
rename to scribo/Makefile.am
diff --git a/milena/sandbox/scribo/all.hh b/scribo/all.hh
similarity index 100%
rename from milena/sandbox/scribo/all.hh
rename to scribo/all.hh
diff --git a/milena/sandbox/scribo/binarization/simple.hh b/scribo/binarization/simple.hh
similarity index 100%
rename from milena/sandbox/scribo/binarization/simple.hh
rename to scribo/binarization/simple.hh
diff --git a/milena/sandbox/scribo/core/all.hh b/scribo/core/all.hh
similarity index 100%
rename from milena/sandbox/scribo/core/all.hh
rename to scribo/core/all.hh
diff --git a/milena/sandbox/scribo/core/central_sites.hh b/scribo/core/central_sites.hh
similarity index 100%
rename from milena/sandbox/scribo/core/central_sites.hh
rename to scribo/core/central_sites.hh
diff --git a/milena/sandbox/scribo/core/component_bboxes.hh b/scribo/core/component_bboxes.hh
similarity index 100%
rename from milena/sandbox/scribo/core/component_bboxes.hh
rename to scribo/core/component_bboxes.hh
diff --git a/milena/sandbox/scribo/core/erase_bboxes.hh b/scribo/core/erase_bboxes.hh
similarity index 100%
rename from milena/sandbox/scribo/core/erase_bboxes.hh
rename to scribo/core/erase_bboxes.hh
diff --git a/milena/sandbox/scribo/core/macros.hh b/scribo/core/macros.hh
similarity index 100%
rename from milena/sandbox/scribo/core/macros.hh
rename to scribo/core/macros.hh
diff --git a/milena/sandbox/scribo/debug/all.hh b/scribo/debug/all.hh
similarity index 100%
rename from milena/sandbox/scribo/debug/all.hh
rename to scribo/debug/all.hh
diff --git a/milena/sandbox/scribo/debug/save_label_image.hh b/scribo/debug/save_label_image.hh
similarity index 100%
rename from milena/sandbox/scribo/debug/save_label_image.hh
rename to scribo/debug/save_label_image.hh
diff --git a/milena/sandbox/scribo/debug/save_linked_textbboxes_image.hh b/scribo/debug/save_linked_textbboxes_image.hh
similarity index 100%
rename from milena/sandbox/scribo/debug/save_linked_textbboxes_image.hh
rename to scribo/debug/save_linked_textbboxes_image.hh
diff --git a/milena/sandbox/scribo/debug/save_table_image.hh b/scribo/debug/save_table_image.hh
similarity index 100%
rename from milena/sandbox/scribo/debug/save_table_image.hh
rename to scribo/debug/save_table_image.hh
diff --git a/milena/sandbox/scribo/debug/save_textbboxes_image.hh b/scribo/debug/save_textbboxes_image.hh
similarity index 100%
rename from milena/sandbox/scribo/debug/save_textbboxes_image.hh
rename to scribo/debug/save_textbboxes_image.hh
diff --git a/milena/sandbox/scribo/demat.hh b/scribo/demat.hh
similarity index 100%
rename from milena/sandbox/scribo/demat.hh
rename to scribo/demat.hh
diff --git a/milena/sandbox/scribo/draw/all.hh b/scribo/draw/all.hh
similarity index 100%
rename from milena/sandbox/scribo/draw/all.hh
rename to scribo/draw/all.hh
diff --git a/milena/sandbox/scribo/draw/bounding_box_links.hh b/scribo/draw/bounding_box_links.hh
similarity index 100%
rename from milena/sandbox/scribo/draw/bounding_box_links.hh
rename to scribo/draw/bounding_box_links.hh
diff --git a/milena/sandbox/scribo/draw/bounding_boxes.hh b/scribo/draw/bounding_boxes.hh
similarity index 100%
rename from milena/sandbox/scribo/draw/bounding_boxes.hh
rename to scribo/draw/bounding_boxes.hh
diff --git a/milena/sandbox/scribo/extract/primitive/canvas.hh b/scribo/extract/primitive/canvas.hh
similarity index 100%
rename from milena/sandbox/scribo/extract/primitive/canvas.hh
rename to scribo/extract/primitive/canvas.hh
diff --git a/milena/sandbox/scribo/extract/primitive/cells.hh b/scribo/extract/primitive/cells.hh
similarity index 100%
rename from milena/sandbox/scribo/extract/primitive/cells.hh
rename to scribo/extract/primitive/cells.hh
diff --git a/milena/sandbox/scribo/extract/primitive/lines_discontinued.hh b/scribo/extract/primitive/lines_discontinued.hh
similarity index 100%
rename from milena/sandbox/scribo/extract/primitive/lines_discontinued.hh
rename to scribo/extract/primitive/lines_discontinued.hh
diff --git a/milena/sandbox/scribo/extract/primitive/lines_h_discontinued.hh b/scribo/extract/primitive/lines_h_discontinued.hh
similarity index 100%
rename from milena/sandbox/scribo/extract/primitive/lines_h_discontinued.hh
rename to scribo/extract/primitive/lines_h_discontinued.hh
diff --git a/milena/sandbox/scribo/extract/primitive/lines_thick.hh b/scribo/extract/primitive/lines_thick.hh
similarity index 100%
rename from milena/sandbox/scribo/extract/primitive/lines_thick.hh
rename to scribo/extract/primitive/lines_thick.hh
diff --git a/milena/sandbox/scribo/extract/primitive/lines_v_discontinued.hh b/scribo/extract/primitive/lines_v_discontinued.hh
similarity index 100%
rename from milena/sandbox/scribo/extract/primitive/lines_v_discontinued.hh
rename to scribo/extract/primitive/lines_v_discontinued.hh
diff --git a/milena/sandbox/scribo/extract/primitive/objects.hh b/scribo/extract/primitive/objects.hh
similarity index 100%
rename from milena/sandbox/scribo/extract/primitive/objects.hh
rename to scribo/extract/primitive/objects.hh
diff --git a/milena/sandbox/scribo/filter/all.hh b/scribo/filter/all.hh
similarity index 100%
rename from milena/sandbox/scribo/filter/all.hh
rename to scribo/filter/all.hh
diff --git a/milena/sandbox/scribo/filter/large_components.hh b/scribo/filter/large_components.hh
similarity index 94%
rename from milena/sandbox/scribo/filter/large_components.hh
rename to scribo/filter/large_components.hh
index 814f4ed..c3ea79b 100644
--- a/milena/sandbox/scribo/filter/large_components.hh
+++ b/scribo/filter/large_components.hh
@@ -45,6 +45,8 @@
# include <mln/pw/all.hh>
+# include <scribo/make/text.hh>
+
namespace scribo
{
@@ -196,16 +198,10 @@ namespace scribo
}
}
- mln_value(I) new_nbboxes;
- I new_lbl = labeling::relabel(text.label_image(), text.nbboxes(),
- mln::make::relabelfun(f, text.nbboxes(),
- new_nbboxes));
-
- mln_assertion(new_nbboxes.next() == bresult.nelements());
+ util::text<I> output = scribo::make::text(text, f);
trace::exiting("scribo::filter::large_components");
- /// FIXME: construct a new util::text from the old one.
- return scribo::make::text(bresult, new_lbl, new_nbboxes);
+ return output;
}
diff --git a/milena/sandbox/scribo/filter/small_components.hh b/scribo/filter/small_components.hh
similarity index 86%
rename from milena/sandbox/scribo/filter/small_components.hh
rename to scribo/filter/small_components.hh
index 7439ce5..c28772b 100644
--- a/milena/sandbox/scribo/filter/small_components.hh
+++ b/scribo/filter/small_components.hh
@@ -41,11 +41,15 @@
# include <mln/labeling/relabel.hh>
# include <mln/make/relabelfun.hh>
+
# include <mln/util/array.hh>
-# include <mln/value/label_16.hh>
# include <mln/pw/all.hh>
+# include <mln/accu/count.hh>
+
+# include <mln/set/compute.hh>
+
# include <scribo/util/text.hh>
# include <scribo/make/text.hh>
@@ -97,16 +101,16 @@ namespace scribo
/// Filter Functor.
/// Return false for all components which are too small.
- template <typename R>
+ template <typename B>
struct filter_small_components_functor
- : Function_l2b< filter_small_components_functor<R> >
+ : Function_v2b< filter_small_components_functor<B> >
{
/// Constructor
///
/// \param[in] compbboxes Component bounding boxes.
/// \param[in] min_size Minimum component size.
- filter_small_components_functor(const mln::util::array<R>& compbboxes,
+ filter_small_components_functor(const mln::util::array<B>& compbboxes,
unsigned min_size)
: compbboxes_(compbboxes), min_size_(min_size)
{
@@ -119,13 +123,14 @@ namespace scribo
///
/// \return false if the component area is strictly inferion to
/// \p min_size_.
- bool operator()(const value::label_16& l) const
+ template <typename L>
+ bool operator()(const L& l) const
{
return compbboxes_[l] >= min_size_;
}
/// The component bounding boxes.
- const mln::util::array<R>& compbboxes_;
+ const mln::util::array<B>& compbboxes_;
/// The minimum area.
unsigned min_size_;
@@ -161,8 +166,8 @@ namespace scribo
compbboxes_t compbboxes = labeling::compute(accu_count_t(), lbl, nlabels);
typedef internal::filter_small_components_functor<accu_count_res_t> func_t;
- func_t fl2b(compbboxes, min_size);
- labeling::relabel_inplace(lbl, nlabels, fl2b);
+ func_t fv2b(compbboxes, min_size);
+ labeling::relabel_inplace(lbl, nlabels, fv2b);
mln_concrete(I) output = duplicate(input);
data::fill((output | pw::value(lbl) == literal::zero).rw(), false);
@@ -172,17 +177,17 @@ namespace scribo
}
- template <typename I>
+ template <typename L>
inline
- scribo::util::text<I>
- small_components(const scribo::util::text<I>& text,
+ scribo::util::text<L>
+ small_components(const scribo::util::text<L>& text,
unsigned min_size)
{
trace::entering("scribo::filter::small_components");
mln_precondition(text.is_valid());
- typedef mln_site(I) P;
+ typedef mln_site(L) P;
typedef accu::count<P> accu_count_t;
typedef mln_result(accu_count_t) accu_count_res_t;
typedef mln::util::array<accu_count_res_t> nsitecomp_t;
@@ -201,16 +206,10 @@ namespace scribo
}
}
- mln_value(I) new_nbboxes;
- I new_lbl = labeling::relabel(text.label_image(), text.nbboxes(),
- mln::make::relabelfun(f, text.nbboxes(),
- new_nbboxes));
-
- mln_assertion(new_nbboxes.next() == bresult.nelements());
+ util::text<L> output = scribo::make::text(text, f);
trace::exiting("scribo::filter::small_components");
- /// FIXME: construct a new util::text from the old one.
- return scribo::make::text(bresult, new_lbl, new_nbboxes);
+ return output;
}
diff --git a/milena/sandbox/scribo/filter/thick_bboxes.hh b/scribo/filter/thick_bboxes.hh
similarity index 95%
rename from milena/sandbox/scribo/filter/thick_bboxes.hh
rename to scribo/filter/thick_bboxes.hh
index ba097f8..9f717b3 100644
--- a/milena/sandbox/scribo/filter/thick_bboxes.hh
+++ b/scribo/filter/thick_bboxes.hh
@@ -38,6 +38,9 @@
# include <scribo/util/text.hh>
+# include <scribo/make/text.hh>
+
+
namespace scribo
{
@@ -184,15 +187,11 @@ namespace scribo
f(i) = true;
}
- mln_value(L) new_nbboxes;
- L new_lbl = labeling::relabel(text.label_image(), text.nbboxes(),
- mln::make::relabelfun(f, text.nbboxes(), new_nbboxes));
-
- mln_assertion(new_nbboxes.next() == bresult.nelements());
+ util::text<L> output = scribo::make::text(text, f);
trace::exiting("scribo::filter::thick_bboxes");
/// FIXME: construct a new util::text from the old one.
- return scribo::make::text(bresult, new_lbl, new_nbboxes);
+ return output;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/sandbox/scribo/filter/thin_bboxes.hh b/scribo/filter/thin_bboxes.hh
similarity index 91%
rename from milena/sandbox/scribo/filter/thin_bboxes.hh
rename to scribo/filter/thin_bboxes.hh
index 14aeec0..1463a64 100644
--- a/milena/sandbox/scribo/filter/thin_bboxes.hh
+++ b/scribo/filter/thin_bboxes.hh
@@ -83,7 +83,7 @@ namespace scribo
/// Return false for all components which are too large.
template <typename R>
struct filter_too_thin_component_functor
- : Function_l2b< filter_too_thin_component_functor<R> >
+ : Function_v2b< filter_too_thin_component_functor<R> >
{
/// Constructor
@@ -144,8 +144,8 @@ namespace scribo
compbboxes_t compbboxes = labeling::compute(accu_bbox_t(), lbl, nlabels);
typedef internal::filter_too_thin_component_functor<accu_bbox_res_t> func_t;
- func_t fl2b(compbboxes, min_thickness);
- labeling::relabel_inplace(lbl, nlabels, fl2b);
+ func_t fv2b(compbboxes, min_thickness);
+ labeling::relabel_inplace(lbl, nlabels, fv2b);
mln_concrete(I) output = duplicate(input);
data::fill((output | pw::value(lbl) == literal::zero).rw(), false);
@@ -184,15 +184,10 @@ namespace scribo
f(i) = true;
}
- mln_value(L) new_nbboxes;
- L new_lbl = labeling::relabel(text.label_image(), text.nbboxes(),
- mln::make::relabelfun(f, text.nbboxes(), new_nbboxes));
-
- mln_assertion(new_nbboxes.next() == bresult.nelements());
+ util::text<L> output = scribo::make::text(text, f);
trace::exiting("scribo::filter::thin_bboxes");
- /// FIXME: construct a new util::text from the old one.
- return scribo::make::text(bresult, new_lbl, new_nbboxes);
+ return output;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/sandbox/scribo/make/all.hh b/scribo/make/all.hh
similarity index 100%
rename from milena/sandbox/scribo/make/all.hh
rename to scribo/make/all.hh
diff --git a/milena/sandbox/scribo/make/debug_filename.hh b/scribo/make/debug_filename.hh
similarity index 100%
rename from milena/sandbox/scribo/make/debug_filename.hh
rename to scribo/make/debug_filename.hh
diff --git a/milena/sandbox/scribo/make/influence_zone_graph.hh b/scribo/make/influence_zone_graph.hh
similarity index 100%
rename from milena/sandbox/scribo/make/influence_zone_graph.hh
rename to scribo/make/influence_zone_graph.hh
diff --git a/milena/sandbox/scribo/make/text.hh b/scribo/make/text.hh
similarity index 77%
rename from milena/sandbox/scribo/make/text.hh
rename to scribo/make/text.hh
index f46def8..cac6356 100644
--- a/milena/sandbox/scribo/make/text.hh
+++ b/scribo/make/text.hh
@@ -38,8 +38,11 @@
# include <mln/fun/i2v/array.hh>
# include <mln/labeling/blobs.hh>
# include <mln/labeling/compute.hh>
+# include <mln/labeling/relabel.hh>
# include <mln/util/array.hh>
+# include <mln/make/relabelfun.hh>
+# include <scribo/core/macros.hh>
# include <scribo/util/text.hh>
@@ -123,34 +126,38 @@ namespace scribo
//FIXME: we want the following routine to construct a new util::text
// from another one and a relabeling function. It avoids recomputing
// the whole underlying data (mass centers, bboxes...)
-// template <typename L>
-// scribo::util::text<L>
-// text(const scribo::util::text<L>& text,
-// const Function_v2b<F>& f)
-// {
-// trace::entering("scribo::make::text");
-//
-// mln_precondition(text.is_valid());
-//
-// mln_value(L) new_nbboxes;
-// mln::fun::i2v::array<mln_value(L)> fl2l
-// = mln::make::relabelfun(f, text.nbboxes(), new_nbboxes);
-// lbl_ = labeling::relabel(text.label_image(), text.nbboxes(), l2l);
-// text.nbboxes() = new_nbboxes;
-//
-// mln::util::array< accu::bbox<mln_site(I)> > tboxes(text.nbboxes().next());
-// mln::util::array< accu::center<mln_site(I)> > tcenters(text.nbboxes().next());
-// for_all_components(i, text.bboxes())
-// {
-// abboxes[fl2l(i)].take(text.bbox(i));
-// acenters[fl2l(i)].take(text.bbox(i));
-// }
-// convert::from_to(abboxes, text.bboxes());
-// convert::from_to(acenters, text.mass_centers());
-//
-// trace::exiting("scribo::make::text");
-// return scribo::util::text<L>();
-// }
+ template <typename L, typename F>
+ scribo::util::text<L>
+ text(const scribo::util::text<L>& text,
+ const Function<F>& f_)
+ {
+ trace::entering("scribo::make::text");
+
+ mln_precondition(text.is_valid());
+ const F& f = exact(f_);
+
+ mln_value(L) new_nbboxes;
+ mln::fun::i2v::array<mln_value(L)> fv2v
+ = mln::make::relabelfun(f, text.nbboxes(), new_nbboxes);
+ L lbl = labeling::relabel(text.label_image(), text.nbboxes(), fv2v);
+
+ mln::util::array< accu::bbox<mln_site(L)> > tboxes(new_nbboxes.next());
+ mln::util::array< accu::center<mln_site(L)> > tcenters(new_nbboxes.next());
+ for_all_components(i, text.bboxes())
+ {
+ tboxes[fv2v(i)].take(text.bbox(i));
+ tcenters[fv2v(i)].take(text.mass_center(i));
+ }
+
+ scribo::util::text<L> new_text;
+ new_text.nbboxes() = new_nbboxes;
+ new_text.label_image() = lbl;
+ convert::from_to(tboxes, new_text.bboxes());
+ convert::from_to(tcenters, new_text.mass_centers());
+
+ trace::exiting("scribo::make::text");
+ return new_text;
+ }
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/sandbox/scribo/preprocessing/all.hh b/scribo/preprocessing/all.hh
similarity index 100%
rename from milena/sandbox/scribo/preprocessing/all.hh
rename to scribo/preprocessing/all.hh
diff --git a/milena/sandbox/scribo/preprocessing/unskew.hh b/scribo/preprocessing/unskew.hh
similarity index 100%
rename from milena/sandbox/scribo/preprocessing/unskew.hh
rename to scribo/preprocessing/unskew.hh
diff --git a/scribo/scribo.mk b/scribo/scribo.mk
new file mode 100644
index 0000000..866d51a
--- /dev/null
+++ b/scribo/scribo.mk
@@ -0,0 +1,5 @@
+include $(top_srcdir)/milena/tests/tests.mk
+
+# Add path to Scribo's headers
+AM_CPPFLAGS += -I$(top_srcdir)/ -I$(top_builddir)/
+
diff --git a/milena/sandbox/scribo/src/Makefile.am b/scribo/src/Makefile.am
similarity index 100%
rename from milena/sandbox/scribo/src/Makefile.am
rename to scribo/src/Makefile.am
diff --git a/milena/sandbox/scribo/src/binarization/Makefile.am b/scribo/src/binarization/Makefile.am
similarity index 100%
rename from milena/sandbox/scribo/src/binarization/Makefile.am
rename to scribo/src/binarization/Makefile.am
diff --git a/milena/sandbox/scribo/src/binarization/simple.cc b/scribo/src/binarization/simple.cc
similarity index 100%
rename from milena/sandbox/scribo/src/binarization/simple.cc
rename to scribo/src/binarization/simple.cc
diff --git a/milena/sandbox/scribo/src/dmap.cc b/scribo/src/dmap.cc
similarity index 100%
rename from milena/sandbox/scribo/src/dmap.cc
rename to scribo/src/dmap.cc
diff --git a/milena/sandbox/scribo/src/extract_text_double_link.cc b/scribo/src/extract_text_double_link.cc
similarity index 96%
rename from milena/sandbox/scribo/src/extract_text_double_link.cc
rename to scribo/src/extract_text_double_link.cc
index 88f8247..1b2c640 100644
--- a/milena/sandbox/scribo/src/extract_text_double_link.cc
+++ b/scribo/src/extract_text_double_link.cc
@@ -27,9 +27,13 @@
#include <iostream>
-#include <mln/essential/2d.hh>
+#include <mln/core/image/image2d.hh>
#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
+#include <mln/util/array.hh>
+#include <mln/literal/colors.hh>
+#include <mln/io/pbm/load.hh>
+#include <mln/core/alias/neighb2d.hh>
#include <scribo/text/extract_bboxes.hh>
#include <scribo/text/grouping/group_with_single_left_link.hh>
diff --git a/milena/sandbox/scribo/src/extract_text_double_several_links.cc b/scribo/src/extract_text_double_several_links.cc
similarity index 100%
copy from milena/sandbox/scribo/src/extract_text_double_several_links.cc
copy to scribo/src/extract_text_double_several_links.cc
diff --git a/milena/sandbox/scribo/src/extract_text_graph.cc b/scribo/src/extract_text_graph.cc
similarity index 91%
rename from milena/sandbox/scribo/src/extract_text_graph.cc
rename to scribo/src/extract_text_graph.cc
index 99f9a18..190714b 100644
--- a/milena/sandbox/scribo/src/extract_text_graph.cc
+++ b/scribo/src/extract_text_graph.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory
+// 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
@@ -27,7 +27,13 @@
#include <iostream>
-#include <mln/essential/2d.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/value/label_16.hh>
+#include <mln/io/ppm/save.hh>
+#include <mln/io/pbm/load.hh>
+#include <mln/core/alias/neighb2d.hh>
+#include <mln/literal/colors.hh>
+#include <mln/labeling/colorize.hh>
#include <scribo/text/extract_bboxes.hh>
#include <scribo/text/grouping/group_with_graph.hh>
diff --git a/milena/sandbox/scribo/src/extract_text_several_graph.cc b/scribo/src/extract_text_several_graph.cc
similarity index 100%
rename from milena/sandbox/scribo/src/extract_text_several_graph.cc
rename to scribo/src/extract_text_several_graph.cc
diff --git a/milena/sandbox/scribo/src/extract_text_several_left_links.cc b/scribo/src/extract_text_several_left_links.cc
similarity index 100%
rename from milena/sandbox/scribo/src/extract_text_several_left_links.cc
rename to scribo/src/extract_text_several_left_links.cc
diff --git a/milena/sandbox/scribo/src/extract_text_single_link.cc b/scribo/src/extract_text_single_link.cc
similarity index 100%
rename from milena/sandbox/scribo/src/extract_text_single_link.cc
rename to scribo/src/extract_text_single_link.cc
diff --git a/milena/sandbox/scribo/src/morpho.cc b/scribo/src/morpho.cc
similarity index 100%
rename from milena/sandbox/scribo/src/morpho.cc
rename to scribo/src/morpho.cc
diff --git a/milena/sandbox/scribo/src/photo.cc b/scribo/src/photo.cc
similarity index 100%
rename from milena/sandbox/scribo/src/photo.cc
rename to scribo/src/photo.cc
diff --git a/milena/sandbox/scribo/src/photo_basic.cc b/scribo/src/photo_basic.cc
similarity index 100%
rename from milena/sandbox/scribo/src/photo_basic.cc
rename to scribo/src/photo_basic.cc
diff --git a/milena/sandbox/scribo/src/extract_text_double_several_links.cc b/scribo/src/recognition.cc
similarity index 56%
rename from milena/sandbox/scribo/src/extract_text_double_several_links.cc
rename to scribo/src/recognition.cc
index 59dad73..4c270f5 100644
--- a/milena/sandbox/scribo/src/extract_text_double_several_links.cc
+++ b/scribo/src/recognition.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory
+// 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
@@ -27,9 +27,22 @@
#include <iostream>
-#include <mln/essential/2d.hh>
+#include <mln/core/image/image2d.hh>
+
#include <mln/labeling/colorize.hh>
+#include <mln/labeling/wrap.hh>
+
#include <mln/util/timer.hh>
+#include <mln/util/array.hh>
+
+#include <mln/io/txt/save.hh>
+#include <mln/io/pbm/load.hh>
+#include <mln/io/ppm/save.hh>
+#include <mln/io/pgm/save.hh>
+
+#include <mln/value/label_16.hh>
+
+#include <mln/core/alias/neighb2d.hh>
#include <scribo/text/extract_bboxes.hh>
#include <scribo/text/grouping/group_with_several_left_links.hh>
@@ -37,13 +50,18 @@
#include <scribo/debug/save_linked_textbboxes_image.hh>
#include <scribo/text/grouping/group_from_double_link.hh>
#include <scribo/filter/small_components.hh>
+#include <scribo/filter/thin_bboxes.hh>
+#include <scribo/text/recognition.hh>
#include <scribo/debug/save_textbboxes_image.hh>
#include <scribo/make/debug_filename.hh>
+#include <scribo/preprocessing/unskew.hh>
+
+
int usage(const char *name)
{
- std::cout << "Usage: " << name << " <input.pbm> " << std::endl;
+ std::cout << "Usage: " << name << " <input.pbm> <output.txt>" << std::endl;
return 1;
}
@@ -53,73 +71,36 @@ int main(int argc, char* argv[])
using namespace scribo;
using namespace mln;
- if (argc < 1)
+ if (argc < 3)
return usage(argv[0]);
- scribo::make::internal::debug_filename_prefix = "extract_text_double_several_links";
+ scribo::make::internal::debug_filename_prefix = argv[2];
- mln::util::timer t, t2;
image2d<bool> input;
- std::cout << "Loading" << std::endl;
- t.start();
io::pbm::load(input, argv[1]);
- std::cout << t << std::endl;
+ input = preprocessing::unskew(input);
+ /// Extract text.
value::label_16 nbboxes;
- std::cout << "extract bboxes" << std::endl;
- t.restart();
- t2.start();
scribo::util::text<image2d<value::label_16> > text
= text::extract_bboxes(input, c8(), nbboxes);
- std::cout << t << std::endl;
-
- mln::util::timer t3;
- std::cout << "Remove small components" << std::endl;
- t.restart();
- t3.start();
text = filter::small_components(text,4);
- std::cout << t << std::endl;
-
- std::cout << "Group with left link" << std::endl;
- t.restart();
+ text = filter::thin_bboxes(text,2);
mln::util::array<unsigned> left_link
= text::grouping::group_with_several_left_links(text, 30);
- std::cout << t << std::endl;
-
- std::cout << "Group with right link" << std::endl;
- t.restart();
mln::util::array<unsigned> right_link
= text::grouping::group_with_several_right_links(text, 30);
- std::cout << t << std::endl;
-
- std::cout << "BEFORE - nbboxes = " << nbboxes << std::endl;
-
- scribo::debug::save_linked_textbboxes_image(input,
- text, left_link, right_link,
- literal::red, literal::cyan, literal::yellow,
- literal::green,
- scribo::make::debug_filename("links.ppm"));
-
- // With validation.
- std::cout << "Group from double link" << std::endl;
- t.restart();
- scribo::util::text<image2d<value::label_16> > grouped_text
- = text::grouping::group_from_double_link(text, left_link, right_link);
- std::cout << t << std::endl;
- std::cout << "Full process: " << t2 << std::endl;
- std::cout << "Cleanup and grouping process: " << t3 << std::endl;
+ text = text::grouping::group_from_double_link(text, left_link, right_link);
io::ppm::save(mln::labeling::colorize(value::rgb8(),
- grouped_text.label_image(),
- grouped_text.nbboxes()),
- scribo::make::debug_filename("label_color.ppm"));
-
- std::cout << "AFTER double grouping - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
+ labeling::wrap(text.label_image())),
+ scribo::make::debug_filename("lbl_color.ppm"));
+ io::pgm::save(labeling::wrap(text.label_image()),
+ scribo::make::debug_filename("lbl.pgm"));
- scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
- literal::red,
- scribo::make::debug_filename("bboxes.ppm"));
+ image2d<char> ima_txt = scribo::text::recognition(text, "fra");
+ io::txt::save(ima_txt, argv[2]);
}
diff --git a/milena/sandbox/scribo/src/rectangularity.cc b/scribo/src/rectangularity.cc
similarity index 100%
rename from milena/sandbox/scribo/src/rectangularity.cc
rename to scribo/src/rectangularity.cc
diff --git a/milena/sandbox/scribo/src/table.cc b/scribo/src/table.cc
similarity index 100%
copy from milena/sandbox/scribo/src/table.cc
copy to scribo/src/table.cc
diff --git a/milena/sandbox/scribo/src/table_erase.cc b/scribo/src/table_erase.cc
similarity index 78%
rename from milena/sandbox/scribo/src/table_erase.cc
rename to scribo/src/table_erase.cc
index 3cfcb46..15cf880 100644
--- a/milena/sandbox/scribo/src/table_erase.cc
+++ b/scribo/src/table_erase.cc
@@ -27,11 +27,17 @@
#include <iostream>
-#include <mln/essential/2d.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/io/pbm/load.hh>
+#include <mln/io/pbm/save.hh>
#include <mln/io/dump/save.hh>
+#include <mln/value/label_16.hh>
+#include <mln/core/alias/neighb2d.hh>
#include <scribo/table/extract.hh>
+#include <scribo/primitive/lines_h_discontinued.hh>
+#include <scribo/primitive/lines_v_discontinued.hh>
int usage(const char *name)
{
@@ -44,6 +50,7 @@ int main(int argc, char* argv[])
{
using namespace scribo;
using namespace mln;
+ using mln::value::label_16;
if (argc < 1)
return usage(argv[0]);
@@ -57,10 +64,12 @@ int main(int argc, char* argv[])
typedef util::couple<util::array<box2d>,
util::array<box2d> > tables_t;
- value::label_16 ncells;
- tables_t tables = scribo::table::extract_lines_with_rank(input, c8(), ncells,
- win::vline2d(51), win::hline2d(51),
- 8,6);
+ label_16 nhlines, nvlines;
+ util::array<box2d> vlines, hlines;
+ image2d<label_16> lbl_v = primitive::lines_v_discontinued(input, c8(),
+ nvlines, 51, 8);
+ image2d<label_16> lbl_h = primitive::lines_h_discontinued(input, c8(),
+ nhlines, 51, 6);
image2d<bool> input_notables = scribo::table::erase(input, tables);
io::pbm::save(input_notables, scribo::make::debug_filename("input_notables.pbm"));
diff --git a/milena/sandbox/scribo/src/table_extract.cc b/scribo/src/table_extract.cc
similarity index 100%
rename from milena/sandbox/scribo/src/table_extract.cc
rename to scribo/src/table_extract.cc
diff --git a/milena/sandbox/scribo/src/table.cc b/scribo/src/table_old.cc
similarity index 99%
rename from milena/sandbox/scribo/src/table.cc
rename to scribo/src/table_old.cc
index 3a12c57..86e039b 100644
--- a/milena/sandbox/scribo/src/table.cc
+++ b/scribo/src/table_old.cc
@@ -26,7 +26,7 @@
// Public License.
-#include <demat.hh>
+#include "demat.old.hh"
int main(int argc, char*argv[])
{
diff --git a/milena/sandbox/scribo/src/table_rebuild_opening.cc b/scribo/src/table_rebuild_opening.cc
similarity index 100%
rename from milena/sandbox/scribo/src/table_rebuild_opening.cc
rename to scribo/src/table_rebuild_opening.cc
diff --git a/milena/sandbox/scribo/src/table_rebuild_rank.cc b/scribo/src/table_rebuild_rank.cc
similarity index 100%
rename from milena/sandbox/scribo/src/table_rebuild_rank.cc
rename to scribo/src/table_rebuild_rank.cc
diff --git a/milena/sandbox/scribo/src/thin_bboxes.cc b/scribo/src/thin_bboxes.cc
similarity index 100%
rename from milena/sandbox/scribo/src/thin_bboxes.cc
rename to scribo/src/thin_bboxes.cc
diff --git a/milena/sandbox/scribo/table/align_lines_horizontaly.hh b/scribo/table/align_lines_horizontaly.hh
similarity index 100%
rename from milena/sandbox/scribo/table/align_lines_horizontaly.hh
rename to scribo/table/align_lines_horizontaly.hh
diff --git a/milena/sandbox/scribo/table/align_lines_verticaly.hh b/scribo/table/align_lines_verticaly.hh
similarity index 100%
rename from milena/sandbox/scribo/table/align_lines_verticaly.hh
rename to scribo/table/align_lines_verticaly.hh
diff --git a/milena/sandbox/scribo/table/all.hh b/scribo/table/all.hh
similarity index 100%
rename from milena/sandbox/scribo/table/all.hh
rename to scribo/table/all.hh
diff --git a/milena/sandbox/scribo/table/connect_horizontal_lines.hh b/scribo/table/connect_horizontal_lines.hh
similarity index 100%
rename from milena/sandbox/scribo/table/connect_horizontal_lines.hh
rename to scribo/table/connect_horizontal_lines.hh
diff --git a/milena/sandbox/scribo/table/connect_vertical_lines.hh b/scribo/table/connect_vertical_lines.hh
similarity index 100%
rename from milena/sandbox/scribo/table/connect_vertical_lines.hh
rename to scribo/table/connect_vertical_lines.hh
diff --git a/milena/sandbox/scribo/table/erase.hh b/scribo/table/erase.hh
similarity index 100%
rename from milena/sandbox/scribo/table/erase.hh
rename to scribo/table/erase.hh
diff --git a/milena/sandbox/scribo/table/extract.hh b/scribo/table/extract.hh
similarity index 100%
rename from milena/sandbox/scribo/table/extract.hh
rename to scribo/table/extract.hh
diff --git a/milena/sandbox/scribo/table/extract_lines_with_opening.hh b/scribo/table/extract_lines_with_opening.hh
similarity index 100%
rename from milena/sandbox/scribo/table/extract_lines_with_opening.hh
rename to scribo/table/extract_lines_with_opening.hh
diff --git a/milena/sandbox/scribo/table/extract_lines_with_rank.hh b/scribo/table/extract_lines_with_rank.hh
similarity index 100%
rename from milena/sandbox/scribo/table/extract_lines_with_rank.hh
rename to scribo/table/extract_lines_with_rank.hh
diff --git a/milena/sandbox/scribo/table/internal/align_lines.hh b/scribo/table/internal/align_lines.hh
similarity index 99%
rename from milena/sandbox/scribo/table/internal/align_lines.hh
rename to scribo/table/internal/align_lines.hh
index 0902bd4..78ee511 100644
--- a/milena/sandbox/scribo/table/internal/align_lines.hh
+++ b/scribo/table/internal/align_lines.hh
@@ -36,6 +36,9 @@
# include <mln/core/site_set/box.hh>
+
+# include <mln/accu/mean.hh>
+
# include <mln/util/array.hh>
# include <mln/util/set.hh>
diff --git a/milena/sandbox/scribo/table/internal/all.hh b/scribo/table/internal/all.hh
similarity index 100%
rename from milena/sandbox/scribo/table/internal/all.hh
rename to scribo/table/internal/all.hh
diff --git a/milena/sandbox/scribo/table/internal/connect_lines.hh b/scribo/table/internal/connect_lines.hh
similarity index 100%
rename from milena/sandbox/scribo/table/internal/connect_lines.hh
rename to scribo/table/internal/connect_lines.hh
diff --git a/milena/sandbox/scribo/table/internal/repair_lines.hh b/scribo/table/internal/repair_lines.hh
similarity index 95%
rename from milena/sandbox/scribo/table/internal/repair_lines.hh
rename to scribo/table/internal/repair_lines.hh
index 017737c..8b4b297 100644
--- a/milena/sandbox/scribo/table/internal/repair_lines.hh
+++ b/scribo/table/internal/repair_lines.hh
@@ -35,19 +35,32 @@
# include <vector>
-# include <mln/core/concept/image.hh>
+# include <mln/core/image/image_if.hh>
# include <mln/core/image/extension_val.hh>
+
+# include <mln/pw/all.hh>
+
+# include <mln/literal/zero.hh>
+
# include <mln/core/site_set/box.hh>
+
+# include <mln/core/routine/extend.hh>
+
# include <mln/data/fill.hh>
+
# include <mln/util/couple.hh>
# include <mln/util/array.hh>
# include <mln/util/ord.hh>
+
# include <mln/win/line.hh>
-# include <mln/pw/all.hh>
# include <mln/labeling/colorize.hh>
+
# include <mln/value/rgb8.hh>
# include <mln/value/label_16.hh>
+
+# include <mln/core/var.hh>
+
# include <scribo/make/debug_filename.hh>
# include <scribo/core/central_sites.hh>
@@ -106,7 +119,7 @@ namespace scribo
util::array<box<P> > result;
std::vector<bool> to_keep(tableboxes.nelements(), true);
- mln_VAR(tbb_ima, extend(l | pw::value(l) != pw::cst(literal::zero), l));
+ mln_VAR(tbb_ima, extend(l | (pw::value(l) != pw::cst(literal::zero)), l));
//FIXME: use a half window, just the bottom of the vertical line.
line_t vl(max_discontinuity);
mln_piter(tbb_ima_t) p(tbb_ima.domain());
diff --git a/milena/sandbox/scribo/table/rebuild.hh b/scribo/table/rebuild.hh
similarity index 96%
rename from milena/sandbox/scribo/table/rebuild.hh
rename to scribo/table/rebuild.hh
index a446c3a..da53432 100644
--- a/milena/sandbox/scribo/table/rebuild.hh
+++ b/scribo/table/rebuild.hh
@@ -34,10 +34,12 @@
/// Rebuild a table from its line bounding boxes.
# include <mln/core/concept/image.hh>
+# include <mln/core/alias/neighb2d.hh>
# include <mln/labeling/background.hh>
# include <mln/util/array.hh>
# include <mln/util/couple.hh>
# include <mln/value/label_8.hh>
+# include <mln/literal/colors.hh>
# include <scribo/table/align_lines_verticaly.hh>
# include <scribo/table/align_lines_horizontaly.hh>
@@ -116,8 +118,8 @@ namespace scribo
literal::red, "table-aligned.ppm");
# endif
- repair_vertical_lines(input, linebboxes, 30);
- repair_horizontal_lines(input, linebboxes, 30);
+ repair_vertical_lines(input, linebboxes, 10);
+ repair_horizontal_lines(input, linebboxes, 10);
# ifndef SCRIBO_NDEBUG
scribo::debug::save_table_image(input, linebboxes,
diff --git a/milena/sandbox/scribo/table/repair_horizontal_lines.hh b/scribo/table/repair_horizontal_lines.hh
similarity index 100%
rename from milena/sandbox/scribo/table/repair_horizontal_lines.hh
rename to scribo/table/repair_horizontal_lines.hh
diff --git a/milena/sandbox/scribo/table/repair_vertical_lines.hh b/scribo/table/repair_vertical_lines.hh
similarity index 100%
rename from milena/sandbox/scribo/table/repair_vertical_lines.hh
rename to scribo/table/repair_vertical_lines.hh
diff --git a/scribo/test.cc b/scribo/test.cc
new file mode 100644
index 0000000..ea39c12
--- /dev/null
+++ b/scribo/test.cc
@@ -0,0 +1,18 @@
+#include <mln/essential/2d.hh>
+#include <mln/util/ord.hh>
+
+int main()
+{
+ using namespace mln;
+
+
+ point2d p1(0, 2);
+ point2d p2(0, 2);
+
+ std::cout << util::ord_strict(p1, p2) << std::endl;
+ std::cout << util::ord_weak(p1, p2) << std::endl;
+
+ std::cout << util::ord_strict(p2, p1) << std::endl;
+ std::cout << util::ord_weak(p2, p1) << std::endl;
+
+}
diff --git a/milena/sandbox/scribo/tests/Makefile.am b/scribo/tests/Makefile.am
similarity index 100%
rename from milena/sandbox/scribo/tests/Makefile.am
rename to scribo/tests/Makefile.am
diff --git a/milena/sandbox/scribo/tests/data.hh.in b/scribo/tests/data.hh.in
similarity index 95%
rename from milena/sandbox/scribo/tests/data.hh.in
rename to scribo/tests/data.hh.in
index 7196653..6a6f95f 100644
--- a/milena/sandbox/scribo/tests/data.hh.in
+++ b/scribo/tests/data.hh.in
@@ -34,6 +34,6 @@
(as well as additional burden in Makefiles, too.). */
/// \brief The absolute path to the img directory of Scribo.
-# define SCRIBO_IMG_DIR "@abs_top_srcdir@/milena/sandbox/scribo/tests/img"
+# define SCRIBO_IMG_DIR "@abs_top_srcdir@/scribo/tests/img"
#endif // ! SCRIBO_TESTS_DATA_HH
diff --git a/milena/sandbox/scribo/tests/filter/Makefile.am b/scribo/tests/filter/Makefile.am
similarity index 78%
rename from milena/sandbox/scribo/tests/filter/Makefile.am
rename to scribo/tests/filter/Makefile.am
index 0f01eea..d8b1d93 100644
--- a/milena/sandbox/scribo/tests/filter/Makefile.am
+++ b/scribo/tests/filter/Makefile.am
@@ -1,6 +1,6 @@
## Process this file through Automake to create Makefile.in.
-include $(top_srcdir)/milena/sandbox/scribo/scribo.mk
+include $(top_srcdir)/scribo/scribo.mk
check_PROGRAMS = \
small_and_large_bboxes
diff --git a/milena/sandbox/scribo/tests/filter/small_and_large_bboxes.cc b/scribo/tests/filter/small_and_large_bboxes.cc
similarity index 100%
rename from milena/sandbox/scribo/tests/filter/small_and_large_bboxes.cc
rename to scribo/tests/filter/small_and_large_bboxes.cc
diff --git a/milena/sandbox/scribo/tests/table/Makefile.am b/scribo/tests/table/Makefile.am
similarity index 82%
rename from milena/sandbox/scribo/tests/table/Makefile.am
rename to scribo/tests/table/Makefile.am
index 0e008bc..7ad10ad 100644
--- a/milena/sandbox/scribo/tests/table/Makefile.am
+++ b/scribo/tests/table/Makefile.am
@@ -1,6 +1,6 @@
## Process this file through Automake to create Makefile.in.
-include $(top_srcdir)/milena/sandbox/scribo/scribo.mk
+include $(top_srcdir)/scribo/scribo.mk
check_PROGRAMS = \
extract_lines_with_rank \
diff --git a/milena/sandbox/scribo/tests/table/extract_lines_with_rank.cc b/scribo/tests/table/extract_lines_with_rank.cc
similarity index 72%
rename from milena/sandbox/scribo/tests/table/extract_lines_with_rank.cc
rename to scribo/tests/table/extract_lines_with_rank.cc
index 6b36b35..16e8066 100644
--- a/milena/sandbox/scribo/tests/table/extract_lines_with_rank.cc
+++ b/scribo/tests/table/extract_lines_with_rank.cc
@@ -29,7 +29,7 @@
#include <mln/essential/2d.hh>
#include <mln/util/couple.hh>
-#include <scribo/table/extract_lines_with_rank.hh>
+#include <scribo/primitive/discontinued_lines.hh>
#include <scribo/debug/save_table_image.hh>
#include <scribo/tests/data.hh>
@@ -47,21 +47,24 @@ int main(int argc, char *argv[])
image2d<bool> input;
io::pbm::load(input, img.c_str());
- typedef util::couple<util::array<box2d>,
- util::array<box2d> > tblboxes_t;
+ typedef util::array<box2d> lineboxes_t;
- tblboxes_t lineboxes;
- lineboxes.first().append(make::box2d(0,0, 59,59));
- lineboxes.first().append(make::box2d(0,28, 27, 32));
- lineboxes.first().append(make::box2d(31,28, 59,32));
- lineboxes.second().append(make::box2d(0,0, 59,59));
- lineboxes.second().append(make::box2d(27,0, 31, 26));
- lineboxes.second().append(make::box2d(27,34, 31,59));
+ lineboxes_t
+ vboxes,
+ hboxes;
+ vboxes.append(make::box2d(0,0, 59,59));
+ vboxes.append(make::box2d(0,28, 27, 32));
+ vboxes.append(make::box2d(31,28, 59,32));
+ hboxes.append(make::box2d(0,0, 59,59));
+ hboxes.append(make::box2d(27,0, 31, 26));
+ hboxes.append(make::box2d(27,34, 31,59));
value::label_16 nbboxes;
- tblboxes_t lineboxes_test = scribo::table::extract_lines_with_rank(input, c8(),
- nbboxes, win::vline2d(11),
- win::hline2d(11), 2, 2);
- mln_assertion(lineboxes == lineboxes_test);
+ lineboxes_t hboxes_ = scribo::primitive::discontinued_lines(input, c8(),
+ nbboxes, win::hline2d(11), 2);
+ lineboxes_t vboxes_ = scribo::primitive::discontinued_lines(input, c8(),
+ nbboxes, win::vline2d(11), 2);
+ mln_assertion(hboxes_ == hboxes);
+ mln_assertion(vboxes_ == vboxes);
}
diff --git a/milena/sandbox/scribo/tests/table/repair_lines.cc b/scribo/tests/table/repair_lines.cc
similarity index 100%
rename from milena/sandbox/scribo/tests/table/repair_lines.cc
rename to scribo/tests/table/repair_lines.cc
diff --git a/milena/sandbox/scribo/tests/text/Makefile.am b/scribo/tests/text/Makefile.am
similarity index 66%
rename from milena/sandbox/scribo/tests/text/Makefile.am
rename to scribo/tests/text/Makefile.am
index 70e77bf..aef6460 100644
--- a/milena/sandbox/scribo/tests/text/Makefile.am
+++ b/scribo/tests/text/Makefile.am
@@ -1,6 +1,6 @@
## Process this file through Automake to create Makefile.in.
-include $(top_srcdir)/milena/sandbox/scribo/scribo.mk
+include $(top_srcdir)/scribo/scribo.mk
check_PROGRAMS =
diff --git a/milena/sandbox/scribo/text/all.hh b/scribo/text/all.hh
similarity index 100%
rename from milena/sandbox/scribo/text/all.hh
rename to scribo/text/all.hh
diff --git a/scribo/text/clean.hh b/scribo/text/clean.hh
new file mode 100644
index 0000000..c8fa552
--- /dev/null
+++ b/scribo/text/clean.hh
@@ -0,0 +1,109 @@
+// 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.
+
+#ifndef SCRIBO_TEXT_CLEAN_HH
+# define SCRIBO_TEXT_CLEAN_HH
+
+/// \file scribo/text/clean.hh
+///
+/// Improve the quality of a text area.
+
+# include <mln/core/concept/weighted_window.hh>
+# include <mln/morpho/skeleton_constrained.hh>
+# include <mln/topo/skeleton/is_simple_point.hh>
+# include <mln/topo/skeleton/crest.hh>
+
+# include <mln/logical/not.hh>
+
+//# include <mln/debug/filename.hh>
+//# include <mln/io/pbm/save.hh>
+
+namespace scribo
+{
+
+ namespace text
+ {
+
+ template <typename I, typename W>
+ mln_concrete(I)
+ clean(const Image<I>& input_, const Weighted_Window<W>& dmap_win_);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+// static int plop = 0;
+
+ template <typename I, typename W>
+ mln_concrete(I)
+ clean(const Image<I>& input_, const Weighted_Window<W>& dmap_win_)
+ {
+ trace::entering("scribo::text::clean");
+
+ const I& input = exact(input_);
+ const W& dmap_win = exact(dmap_win_);
+ mlc_bool(mln_site_(I)::dim == 2)::check();
+ mlc_equal(mln_value(I),bool)::check();
+ mln_precondition(input.is_valid());
+ mln_precondition(dmap_win.is_valid());
+
+ mln_ch_value(I,unsigned)
+ dmap = transform::distance_front(logical::not_(input), c8(),
+ dmap_win,
+ mln_max(unsigned));
+
+ I constraint = topo::skeleton::crest(input, dmap, c8());
+ mln_postcondition(constraint.is_valid());
+
+ I skeleton =
+ morpho::skeleton_constrained(input, c8(),
+ topo::skeleton::is_simple_point<I,neighb2d>,
+ extend(constraint, false), dmap);
+
+ win::rectangle2d disk(3,3);
+ I output = morpho::dilation(skeleton, disk);
+
+// if (plop < 10)
+// {
+// io::pbm::save(input, mln::debug::filename("input.pbm"));
+// io::pbm::save(skeleton, mln::debug::filename("skeleton.pbm"));
+// io::pbm::save(output, mln::debug::filename("dil_skel.pbm"));
+// ++plop;
+// }
+
+ trace::exiting("scribo::text::clean");
+ return output;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace scribo::text
+
+} // end of namespace scribo
+
+#endif // ! SCRIBO_TEXT_CLEAN_HH
diff --git a/milena/sandbox/scribo/text/extract_bboxes.hh b/scribo/text/extract_bboxes.hh
similarity index 100%
rename from milena/sandbox/scribo/text/extract_bboxes.hh
rename to scribo/text/extract_bboxes.hh
diff --git a/milena/sandbox/scribo/text/extract_lines.hh b/scribo/text/extract_lines.hh
similarity index 100%
rename from milena/sandbox/scribo/text/extract_lines.hh
rename to scribo/text/extract_lines.hh
diff --git a/milena/sandbox/scribo/text/grouping/all.hh b/scribo/text/grouping/all.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/all.hh
rename to scribo/text/grouping/all.hh
diff --git a/milena/sandbox/scribo/text/grouping/group_from_double_link.hh b/scribo/text/grouping/group_from_double_link.hh
similarity index 85%
rename from milena/sandbox/scribo/text/grouping/group_from_double_link.hh
rename to scribo/text/grouping/group_from_double_link.hh
index 3ce5521..7caac87 100644
--- a/milena/sandbox/scribo/text/grouping/group_from_double_link.hh
+++ b/scribo/text/grouping/group_from_double_link.hh
@@ -30,9 +30,12 @@
#ifndef SCRIBO_TEXT_GROUPING_GROUP_FROM_DOUBLE_LINK_HH
# define SCRIBO_TEXT_GROUPING_GROUP_FROM_DOUBLE_LINK_HH
+
/// \file scribo/text/grouping/group_from_double_link.hh
///
-/// Link text bounding boxes with their left neighbor.
+/// Group text bounding boxes from left and right links and validate
+/// These links. A link must exist in both ways to be validated.
+
# include <mln/core/concept/image.hh>
# include <mln/core/site_set/box.hh>
@@ -45,6 +48,8 @@
# include <scribo/util/text.hh>
+# include <scribo/make/text.hh>
+
# include <scribo/text/grouping/internal/find_root.hh>
# include <scribo/text/grouping/internal/is_link_valid.hh>
@@ -74,8 +79,11 @@ namespace scribo
const mln::util::array<unsigned>& left_link,
const mln::util::array<unsigned>& right_link);
+
+
# ifndef MLN_INCLUDE_ONLY
+
template <typename I>
inline
scribo::util::text<I>
@@ -116,32 +124,15 @@ namespace scribo
fun::i2v::array<unsigned> f;
convert::from_to(parent, f);
- // Update bounding boxes information.
- mln::util::array< box<mln_site(I)> > bresult;
- // component 0, the background, has an invalid box.
- bresult.append(box<mln_site(I)>());
- for_all_components(i, tboxes)
- if (tboxes[i].is_valid())
- bresult.append(tboxes[i]);
-
- // Update label image.
- mln_value(I) new_nbboxes;
- I new_lbl = labeling::relabel(text.label_image(),
- text.nbboxes(),
- mln::make::relabelfun(f, text.nbboxes(),
- new_nbboxes));
-
- mln_assertion(bresult.nelements() == new_nbboxes.next());
-
- /// FIXME: construct a new util::text from the old one.
- scribo::util::text<I> result(bresult, new_lbl, new_nbboxes);
-
+ scribo::util::text<I> result = make::text(text, f);
trace::exiting("scribo::text::grouping::group_from_double_link");
return result;
}
+
# endif // ! MLN_INCLUDE_ONLY
+
} // end of namespace scribo::text::grouping
} // end of namespace scribo::text
diff --git a/milena/sandbox/scribo/text/grouping/group_from_graph.hh b/scribo/text/grouping/group_from_graph.hh
similarity index 84%
rename from milena/sandbox/scribo/text/grouping/group_from_graph.hh
rename to scribo/text/grouping/group_from_graph.hh
index 774ed6b..3c6ac3a 100644
--- a/milena/sandbox/scribo/text/grouping/group_from_graph.hh
+++ b/scribo/text/grouping/group_from_graph.hh
@@ -150,32 +150,33 @@ namespace scribo
internal::map_vertex_to_component_id_functor<mln_value(I)> f;
canvas::browsing::depth_first_search(g, f);
- mln::util::array< accu::bbox<mln_site(I)> > tboxes;
- tboxes.resize(text.nbboxes().next());
- for_all_components(i, text.bboxes())
- tboxes[f.vertextocomp(i)].take(text.bbox(i));
-
- // Update bounding boxes.
- mln::util::array<box<mln_site(I)> > bresult;
- // Component 0 - the background has not valid bboxes.
- bresult.append(box<mln_site(I)>());
- for_all_components(i, text.bboxes())
- if (tboxes[i].is_valid())
- bresult.append(tboxes[i].to_result());
-
- mln_assertion(bresult.nelements() == f.ncomp);
-
- // Update label image.
- mln_value(I) new_nbboxes;
- I new_lbl = labeling::relabel(text.label_image(),
- text.nbboxes(),
- f.vertextocomp);
-
- mln_assertion(new_nbboxes.next() == bresult.nelements());
+// mln::util::array< accu::bbox<mln_site(I)> > tboxes;
+// tboxes.resize(text.nbboxes().next());
+// for_all_components(i, text.bboxes())
+// tboxes[f.vertextocomp(i)].take(text.bbox(i));
+//
+// // Update bounding boxes.
+// mln::util::array<box<mln_site(I)> > bresult;
+// // Component 0 - the background has not valid bboxes.
+// bresult.append(box<mln_site(I)>());
+// for_all_components(i, text.bboxes())
+// if (tboxes[i].is_valid())
+// bresult.append(tboxes[i].to_result());
+//
+// mln_assertion(bresult.nelements() == f.ncomp);
+//
+// // Update label image.
+// mln_value(I) new_nbboxes;
+// I new_lbl = labeling::relabel(text.label_image(),
+// text.nbboxes(),
+// f.vertextocomp);
+//
+// mln_assertion(new_nbboxes.next() == bresult.nelements());
trace::exiting("scribo::text::grouping::group_from_graph");
/// FIXME: construct a new util::text from the old one.
- return scribo::make::text(bresult, new_lbl, new_nbboxes);
+// return scribo::make::text(bresult, new_lbl, new_nbboxes);
+ return scribo::make::text(text, f.vertextocomp);
}
diff --git a/milena/sandbox/scribo/text/grouping/group_from_single_link.hh b/scribo/text/grouping/group_from_single_link.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/group_from_single_link.hh
rename to scribo/text/grouping/group_from_single_link.hh
diff --git a/milena/sandbox/scribo/text/grouping/group_with_graph.hh b/scribo/text/grouping/group_with_graph.hh
similarity index 99%
rename from milena/sandbox/scribo/text/grouping/group_with_graph.hh
rename to scribo/text/grouping/group_with_graph.hh
index 490d0d3..555e3c2 100644
--- a/milena/sandbox/scribo/text/grouping/group_with_graph.hh
+++ b/scribo/text/grouping/group_with_graph.hh
@@ -39,6 +39,7 @@
# include <mln/math/abs.hh>
# include <mln/util/array.hh>
+# include <mln/util/graph.hh>
# include <scribo/core/macros.hh>
# include <scribo/text/grouping/internal/init_link_array.hh>
diff --git a/milena/sandbox/scribo/text/grouping/group_with_several_graphes.hh b/scribo/text/grouping/group_with_several_graphes.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/group_with_several_graphes.hh
rename to scribo/text/grouping/group_with_several_graphes.hh
diff --git a/milena/sandbox/scribo/text/grouping/group_with_several_left_links.hh b/scribo/text/grouping/group_with_several_left_links.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/group_with_several_left_links.hh
rename to scribo/text/grouping/group_with_several_left_links.hh
diff --git a/milena/sandbox/scribo/text/grouping/group_with_several_right_links.hh b/scribo/text/grouping/group_with_several_right_links.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/group_with_several_right_links.hh
rename to scribo/text/grouping/group_with_several_right_links.hh
diff --git a/milena/sandbox/scribo/text/grouping/group_with_single_left_link.hh b/scribo/text/grouping/group_with_single_left_link.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/group_with_single_left_link.hh
rename to scribo/text/grouping/group_with_single_left_link.hh
diff --git a/milena/sandbox/scribo/text/grouping/group_with_single_right_link.hh b/scribo/text/grouping/group_with_single_right_link.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/group_with_single_right_link.hh
rename to scribo/text/grouping/group_with_single_right_link.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/all.hh b/scribo/text/grouping/internal/all.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/all.hh
rename to scribo/text/grouping/internal/all.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/find_graph_link.hh b/scribo/text/grouping/internal/find_graph_link.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/find_graph_link.hh
rename to scribo/text/grouping/internal/find_graph_link.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/find_left_link.hh b/scribo/text/grouping/internal/find_left_link.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/find_left_link.hh
rename to scribo/text/grouping/internal/find_left_link.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/find_right_link.hh b/scribo/text/grouping/internal/find_right_link.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/find_right_link.hh
rename to scribo/text/grouping/internal/find_right_link.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/find_root.hh b/scribo/text/grouping/internal/find_root.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/find_root.hh
rename to scribo/text/grouping/internal/find_root.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/init_link_array.hh b/scribo/text/grouping/internal/init_link_array.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/init_link_array.hh
rename to scribo/text/grouping/internal/init_link_array.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/is_link_valid.hh b/scribo/text/grouping/internal/is_link_valid.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/is_link_valid.hh
rename to scribo/text/grouping/internal/is_link_valid.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/update_graph_link.hh b/scribo/text/grouping/internal/update_graph_link.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/update_graph_link.hh
rename to scribo/text/grouping/internal/update_graph_link.hh
diff --git a/milena/sandbox/scribo/text/grouping/internal/update_link_array.hh b/scribo/text/grouping/internal/update_link_array.hh
similarity index 100%
rename from milena/sandbox/scribo/text/grouping/internal/update_link_array.hh
rename to scribo/text/grouping/internal/update_link_array.hh
diff --git a/milena/sandbox/scribo/text/recognition.hh b/scribo/text/recognition.hh
similarity index 65%
rename from milena/sandbox/scribo/text/recognition.hh
rename to scribo/text/recognition.hh
index 1fa3905..287be34 100644
--- a/milena/sandbox/scribo/text/recognition.hh
+++ b/scribo/text/recognition.hh
@@ -36,20 +36,37 @@
/// \todo For each text bbox, we create a new image. We may like to avoid that.
/// \todo Do not store the result in an image?
-# include <mln/core/concept/image.hh>
+# include <mln/core/image/image_if.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/site_set/box.hh>
# include <mln/util/array.hh>
# include <mln/labeling/blobs.hh>
# include <mln/data/fill.hh>
# include <mln/pw/all.hh>
-# include <mln/debug/put_words.hh>
+
+# include <mln/transform/distance_front.hh>
+
+# include <mln/morpho/thickening.hh>
+# include <mln/morpho/dilation.hh>
+
+# include <mln/core/alias/w_window2d_int.hh>
+# include <mln/make/w_window2d_int.hh>
+
+# include <mln/border/resize.hh>
+
+# include <mln/win/rectangle2d.hh>
+# include <mln/win/disk2d.hh>
+# include <mln/win/octagon2d.hh>
+
+# include <mln/debug/put_word.hh>
# include <scribo/core/macros.hh>
+
# include <scribo/util/text.hh>
-# include <tesseract/baseapi.h>
+# include <scribo/text/clean.hh>
+# include <tesseract/baseapi.h>
namespace scribo
@@ -62,65 +79,74 @@ namespace scribo
/// Passes the text bboxes to Tesseract (OCR).
///
- /// \param[in] input_ Image from where the text is extracted.
/// \param[in] text The lines of text.
/// \param[in] language the language which should be recognized by Tesseract.
/// (fra, en, ...)
///
/// \return An image of characters.
- template <typename I, typename L>
- mln_ch_value(I,char)
- text_recognition(const Image<I>& input_,
- const scribo::util::text<L>& text,
- const char *language);
+ template <typename L>
+ mln_ch_value(L,char)
+ recognition(const scribo::util::text<L>& text,
+ const char *language);
+
# ifndef MLN_INCLUDE_ONLY
- template <typename I, typename L>
- mln_ch_value(I,char)
- text_recognition(const Image<I>& input_,
- const scribo::util::text<L>& text,
- const char *language)
+
+ template <typename L>
+ mln_ch_value(L,char)
+ recognition(const scribo::util::text<L>& text,
+ const char *language)
{
trace::entering("scribo::text::recognition");
- mlc_equal(mln_value(I), bool)::check();
- const I& input = exact(input_);
- mln_precondition(input.is_valid());
mln_precondition(text.is_valid());
// Initialize Tesseract.
TessBaseAPI::InitWithLanguage(NULL, NULL, language, NULL, false, 0, NULL);
- mln_ch_value(I,char) txt(input.domain());
+ mln_ch_value(L,char) txt(text.label_image().domain());
data::fill(txt, ' ');
+ typedef mln_ch_value(L,bool) I;
+ int vals[] = { 0, 9, 0, 9, 0,
+ 9, 6, 4, 6, 9,
+ 0, 4, 0, 4, 0,
+ 9, 6, 4, 6, 9,
+ 0, 9, 0, 9, 0 };
+ w_window2d_int dmap_win = mln::make::w_window2d_int(vals);
+
/// Use text bboxes with Tesseract
for_all_components(i, text.bboxes())
{
- mln_ch_value(I,bool) b(text.bbox(i), 0);
- data::fill(b, false);
- data::fill((b | (pw::value(text.label_image()) == pw::cst(i))).rw(),
+ I text_ima(text.bbox(i));
+ data::fill(text_ima, false);
+ data::fill((text_ima | (pw::value(text.label_image()) == pw::cst(i))).rw(),
true);
+
+ /// Improve text quality.
+ I text_ima_cleaned = text::clean(text_ima, dmap_win);
+ border::resize(text_ima_cleaned, 0); // Make sure there is no border.
+
// Recognize characters.
char* s = TessBaseAPI::TesseractRect(
- (unsigned char*) b.buffer(),
- sizeof (bool), // Pixel size.
- b.ncols() * sizeof (bool), // Row_offset
- 0, // Left
- 0, // Top
- b.ncols(), // n cols
- b.nrows()); // n rows
+ (unsigned char*) text_ima_cleaned.buffer(),
+ sizeof (bool), // Pixel size.
+ text_ima.ncols() * sizeof (bool), // Row_offset
+ 0, // Left
+ 0, // Top
+ text_ima.ncols(), // n cols
+ text_ima.nrows()); // n rows
- mln_site(I) p = text.bbox(i).center();
+ mln_site(L) p = text.bbox(i).center();
p.col() -= (text.bbox(i).pmax().col()
- text.bbox(i).pmin().col()) / 2;
if (s != 0)
- debug::put_word(txt, p, s);
+ mln::debug::put_word(txt, p, s);
// The string has been allocated by Tesseract. We must free it.
free(s);
diff --git a/milena/sandbox/scribo/util/all.hh b/scribo/util/all.hh
similarity index 100%
rename from milena/sandbox/scribo/util/all.hh
rename to scribo/util/all.hh
diff --git a/milena/sandbox/scribo/util/text.hh b/scribo/util/text.hh
similarity index 94%
rename from milena/sandbox/scribo/util/text.hh
rename to scribo/util/text.hh
index ceb5765..b9f7406 100644
--- a/milena/sandbox/scribo/util/text.hh
+++ b/scribo/util/text.hh
@@ -86,12 +86,10 @@ namespace scribo
/// @}
/// Return the underlying label image.
+ /// @{
const L& label_image() const;
-
- /// Update the label image.
- /// Note: Updating the label image update the bounding boxes
- /// and the mass centers as well.
- void set_label_image(const Image<L>& lbl);
+ L& label_image();
+ /// @}
/// Return the number of bounding boxes.
const mln_value(L)& nbboxes() const;
@@ -109,7 +107,11 @@ namespace scribo
box<mln_site(L)>& bbox(unsigned i);
/// Return the mass centers.
+ /// @{
const mln::util::array<mln_site(L)::vec>& mass_centers() const;
+ mln::util::array<mln_site(L)::vec>& mass_centers();
+ /// @}
+
/// Return the i-th mass centers.
mln_site(L) mass_center(unsigned i) const;
@@ -169,6 +171,15 @@ namespace scribo
template <typename L>
inline
+ L&
+ text<L>::label_image()
+ {
+// mln_precondition(lbl_.is_valid());
+ return lbl_;
+ }
+
+ template <typename L>
+ inline
const mln_value(L)&
text<L>::nbboxes() const
{
@@ -230,6 +241,14 @@ namespace scribo
template <typename L>
inline
+ mln::util::array<mln_site(L)::vec>&
+ text<L>::mass_centers()
+ {
+ return mass_centers_;
+ }
+
+ template <typename L>
+ inline
mln_site(L)
text<L>::mass_center(unsigned i) const
{
--
1.5.6.5
1
0
20 May '09
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
New domain morpher, though a function from site to site.
* mln/core/site_set/p_transformed.hh: New.
* mln/core/site_set/p_transformed_piter.hh: New.
* mln/core/site_set/all.hh: Update.
* mln/core/image/all.hh: Update.
* mln/core/image/dmorph: New directory.
* mln/core/image/dmorph/transformed_image.hh: New.
* mln/core/image/dmorph/all.hh: New.
* tests/core/site_set/p_transformed.cc: New.
* tests/core/site_set/pset_if.cc: Rename as...
* tests/core/site_set/p_if.cc: ...this.
* tests/core/site_set/Makefile.am: Update.
* tests/core/image/dmorph: New directory.
* tests/core/image/dmorph/Makefile.am: New.
* tests/core/image/dmorph/transformed_image.cc: New.
* tests/core/image/Makefile.am: Update.
Misc.
* mln/core/image/image_if.hh: Layout.
* mln/core/image/sub_image.hh: Layout.
* mln/core/internal/image_base.hh: Layout.
* mln/core/internal/image_morpher.hh: Layout.
* mln/core/internal/image_domain_morpher.hh: Upgrade doc style.
* tests/core/image/p2p_image.cc: Move echo.
mln/core/image/all.hh | 7
mln/core/image/dmorph/all.hh | 39 +++
mln/core/image/dmorph/transformed_image.hh | 272 +++++++++++++++++++++++++++
mln/core/image/image_if.hh | 6
mln/core/image/sub_image.hh | 2
mln/core/internal/image_base.hh | 5
mln/core/internal/image_domain_morpher.hh | 10
mln/core/internal/image_morpher.hh | 2
mln/core/site_set/all.hh | 4
mln/core/site_set/p_transformed.hh | 218 +++++++++++++++++++++
mln/core/site_set/p_transformed_piter.hh | 159 +++++++++++++++
tests/core/image/Makefile.am | 3
tests/core/image/dmorph/Makefile.am | 10
tests/core/image/dmorph/transformed_image.cc | 58 +++++
tests/core/image/p2p_image.cc | 7
tests/core/site_set/Makefile.am | 6
tests/core/site_set/p_if.cc | 6
tests/core/site_set/p_transformed.cc | 58 +++++
18 files changed, 853 insertions(+), 19 deletions(-)
Index: mln/core/site_set/all.hh
--- mln/core/site_set/all.hh (revision 3857)
+++ mln/core/site_set/all.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
@@ -51,6 +52,7 @@
# include <mln/core/site_set/p_run.hh>
# include <mln/core/site_set/p_set.hh>
# include <mln/core/site_set/p_set_of.hh>
+# include <mln/core/site_set/p_transformed.hh>
# include <mln/core/site_set/p_vaccess.hh>
# include <mln/core/site_set/p_vertices.hh>
Index: mln/core/site_set/p_transformed.hh
--- mln/core/site_set/p_transformed.hh (revision 0)
+++ mln/core/site_set/p_transformed.hh (revision 0)
@@ -0,0 +1,218 @@
+// 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.
+
+#ifndef MLN_CORE_SITE_SET_P_TRANSFORMED_HH
+# define MLN_CORE_SITE_SET_P_TRANSFORMED_HH
+
+/// \file mln/core/site_set/p_transformed.hh
+///
+/// Definition of a site set defined by the transformation of another
+/// site set.
+
+# include <mln/core/internal/site_set_base.hh>
+# include <mln/core/concept/function.hh>
+
+
+namespace mln
+{
+
+ // Forward declarations.
+ template <typename S, typename F> struct p_transformed;
+ template <typename Pi, typename S, typename F> struct p_transformed_piter;
+
+
+ namespace trait
+ {
+
+ template <typename S, typename F>
+ struct site_set_< p_transformed<S,F> >
+ {
+ typedef trait::site_set::nsites::unknown nsites;
+ typedef trait::site_set::bbox::unknown bbox;
+ typedef trait::site_set::contents::fixed contents;
+ typedef trait::site_set::arity::multiple arity;
+ };
+
+ } // end of namespace trait
+
+
+ /// Transform a site set \p s through the function \p f.
+ ///
+ /// \param[in] s A site set.
+ /// \param[in] f A function from site to site.
+ /// \return The transformed site set.
+ template <typename S, typename F>
+ p_transformed<S, F>
+ transform(const Site_Set<S>& s, const Function_v2v<F>& f);
+
+
+
+ /// \brief Site set transformed through a function.
+ ///
+ /// \ingroup modsitesetsparse
+ ///
+ /// Parameter \c S is a site set type; parameter F is a function
+ /// from site to site.
+ template <typename S, typename F>
+ class p_transformed
+ : public internal::site_set_base_< mln_psite(S), p_transformed<S,F> >,
+ private metal::equal< mln_result(F), mln_psite(S) >::check_t
+ {
+ typedef p_transformed<S,F> self_;
+ typedef internal::site_set_base_<mln_result(F), self_> super_;
+ public:
+
+ /// Element associated type.
+ typedef mln_element(S) element;
+
+
+ /// Psite associated type.
+ typedef mln_psite(S) psite;
+
+ /// Forward Site_Iterator associated type.
+ typedef p_transformed_piter<mln_fwd_piter(S), S, F> fwd_piter;
+
+ /// Backward Site_Iterator associated type.
+ typedef p_transformed_piter<mln_bkd_piter(S), S, F> bkd_piter;
+
+ /// Site_Iterator associated type.
+ typedef fwd_piter piter;
+
+
+ /// Constructor with a site set \p s and a predicate \p f.
+ p_transformed(const S& s, const F& f);
+
+ /// Constructor without argument.
+ p_transformed();
+
+
+ /// Test if this site set is valid.
+ bool is_valid() const;
+
+
+ /// Test if \p p belongs to the subset.
+ bool has(const psite& p) const;
+
+
+ /// Return the size of this site set in memory.
+ std::size_t memory_size() const;
+
+ /// Return the primary set.
+ const S& primary_set() const;
+
+ /// Return the transformation function.
+ const F& function() const;
+
+ protected:
+
+ S s_;
+ F f_;
+ };
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ template <typename S, typename F>
+ inline
+ p_transformed<S, F>
+ transform(const Site_Set<S>& s, const Function_v2v<F>& f)
+ {
+ mlc_equal(mln_result(F), mln_psite(S))::check();
+ p_transformed<S, F> tmp(exact(s), exact(f));
+ return tmp;
+ }
+
+
+ // p_transformed<S,F>
+
+ template <typename S, typename F>
+ inline
+ p_transformed<S,F>::p_transformed()
+ {
+ }
+
+ template <typename S, typename F>
+ inline
+ p_transformed<S,F>::p_transformed(const S& s, const F& f)
+ : s_(s),
+ f_(f)
+ {
+ }
+
+ template <typename S, typename F>
+ inline
+ bool
+ p_transformed<S,F>::has(const psite& p) const
+ {
+ return s_.has(f_(p));
+ }
+
+ template <typename S, typename F>
+ inline
+ bool
+ p_transformed<S,F>::is_valid() const
+ {
+ return s_.is_valid();
+ }
+
+ template <typename S, typename F>
+ inline
+ std::size_t
+ p_transformed<S,F>::memory_size() const
+ {
+ return s_.memory_size() + sizeof(f_);
+ }
+
+ template <typename S, typename F>
+ inline
+ const S&
+ p_transformed<S,F>::primary_set() const
+ {
+ return s_;
+ }
+
+ template <typename S, typename F>
+ inline
+ const F&
+ p_transformed<S,F>::function() const
+ {
+ return f_;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+} // end of namespace mln
+
+
+
+# include <mln/core/site_set/p_transformed_piter.hh>
+
+
+
+#endif // ! MLN_CORE_SITE_SET_P_TRANSFORMED_HH
Index: mln/core/site_set/p_transformed_piter.hh
--- mln/core/site_set/p_transformed_piter.hh (revision 0)
+++ mln/core/site_set/p_transformed_piter.hh (revision 0)
@@ -0,0 +1,159 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+//
+// 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_CORE_SITE_SET_P_TRANSFORMED_PITER_HH
+# define MLN_CORE_SITE_SET_P_TRANSFORMED_PITER_HH
+
+/// \file mln/core/site_set/p_transformed_piter.hh
+///
+/// Definition of iterators on p_transformed<S,F>.
+
+# include <mln/core/internal/site_set_iterator_base.hh>
+# include <mln/core/site_set/p_transformed.hh>
+
+
+namespace mln
+{
+
+
+ /// Iterator on p_transformed<S,F>.
+ ///
+ /// Parameter \c S is a site set type; parameter F is a function
+ /// from point to Boolean.
+ ///
+ /// \see mln::p_transformed
+ //
+ template <typename Pi, typename S, typename F>
+ struct p_transformed_piter
+ : public internal::site_set_iterator_base< p_transformed<S,F>, // Site_Set.
+ p_transformed_piter<Pi,S,F> > // Exact.
+ {
+ /// Constructor without argument.
+ p_transformed_piter();
+
+ /// Constructor from a site set.
+ p_transformed_piter(const p_transformed<S,F>& s);
+
+ /// Test the iterator validity.
+ bool is_valid_() const;
+
+ /// Invalidate the iterator.
+ void invalidate_();
+
+ /// Start an iteration.
+ void start_();
+
+ /// Go to the next point.
+ void next_();
+
+ /// Change the set site targeted by this iterator.
+ void change_target(const p_transformed<S,F>& s);
+
+ private:
+ typedef p_transformed_piter<Pi,S,F> self_;
+ typedef internal::site_set_iterator_base<p_transformed<S,F>, self_> super_;
+
+ protected:
+ using super_::s_;
+ using super_::p_;
+
+ // The underlying site iterator.
+ Pi pi_;
+ };
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename Pi, typename S, typename F>
+ inline
+ p_transformed_piter<Pi,S,F>::p_transformed_piter()
+ {
+ }
+
+ template <typename Pi, typename S, typename F>
+ inline
+ p_transformed_piter<Pi,S,F>::p_transformed_piter(const p_transformed<S,F>& s)
+ {
+ this->change_target(s);
+ }
+
+ template <typename Pi, typename S, typename F>
+ inline
+ bool
+ p_transformed_piter<Pi,S,F>::is_valid_() const
+ {
+ return pi_.is_valid();
+ }
+
+ template <typename Pi, typename S, typename F>
+ inline
+ void
+ p_transformed_piter<Pi,S,F>::invalidate_()
+ {
+ pi_.invalidate();
+ }
+
+ template <typename Pi, typename S, typename F>
+ inline
+ void
+ p_transformed_piter<Pi,S,F>::start_()
+ {
+ pi_.start();
+ if (pi_.is_valid())
+ p_ = s_->function()(pi_);
+ }
+
+ template <typename Pi, typename S, typename F>
+ inline
+ void
+ p_transformed_piter<Pi,S,F>::next_()
+ {
+ pi_.next();
+ if (pi_.is_valid())
+ p_ = s_->function()(pi_);
+ }
+
+ template <typename Pi, typename S, typename F>
+ inline
+ void
+ p_transformed_piter<Pi,S,F>::change_target(const p_transformed<S,F>& s)
+ {
+ s_ = & s;
+ // p might be also updated since it can hold a pointer towards
+ // the set it designates, so:
+ pi_.change_target(s.primary_set());
+ // Last:
+ this->invalidate();
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+} // end of namespace mln
+
+
+#endif // ! MLN_CORE_SITE_SET_P_TRANSFORMED_PITER_HH
Index: mln/core/image/image_if.hh
--- mln/core/image/image_if.hh (revision 3857)
+++ mln/core/image/image_if.hh (working copy)
@@ -92,6 +92,7 @@
/// \brief Image which domain is restricted by a function.
///
/// \ingroup modimagedomainmorpher
+ //
template <typename I, typename F>
struct image_if : public internal::image_domain_morpher< I,
p_if<mln_domain(I), F>,
@@ -115,18 +116,23 @@
operator image_if<const I, F>() const;
};
+
+
// Operators.
+
// Image | Function_p2b.
/// ima | f creates an image_if with the image ima and the function
/// f.
+ //
template <typename I, typename F>
image_if<I,F>
operator | (Image<I>& ima, const Function_p2b<F>& f);
/// ima | f creates an image_if with the image ima and the function
/// f.
+ //
template <typename I, typename F>
image_if<const I,F>
operator | (const Image<I>& ima, const Function_p2b<F>& f);
Index: mln/core/image/all.hh
--- mln/core/image/all.hh (revision 3857)
+++ mln/core/image/all.hh (working copy)
@@ -34,6 +34,13 @@
/// File that includes all image types.
+// Sub-directories.
+
+# include <mln/core/image/dmorph/all.hh>
+
+
+// Files.
+
# include <mln/core/image/cast_image.hh>
# include <mln/core/image/ch_piter.hh>
# include <mln/core/image/complex_image.hh>
Index: mln/core/image/sub_image.hh
--- mln/core/image/sub_image.hh (revision 3857)
+++ mln/core/image/sub_image.hh (working copy)
@@ -29,7 +29,6 @@
#ifndef MLN_CORE_IMAGE_SUB_IMAGE_HH
# define MLN_CORE_IMAGE_SUB_IMAGE_HH
-
/// \file mln/core/image/sub_image.hh
///
/// Definition of morpher that makes an image become restricted
@@ -38,7 +37,6 @@
/// \todo Add a special case for "ima | box"; think about some other
/// special cases...
-
# include <mln/core/internal/image_domain_morpher.hh>
Index: mln/core/image/dmorph/transformed_image.hh
--- mln/core/image/dmorph/transformed_image.hh (revision 0)
+++ mln/core/image/dmorph/transformed_image.hh (revision 0)
@@ -0,0 +1,272 @@
+// 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.
+
+#ifndef MLN_CORE_IMAGE_DMORPH_TRANSFORMED_IMAGE_HH
+# define MLN_CORE_IMAGE_DMORPH_TRANSFORMED_IMAGE_HH
+
+/// \file mln/core/image/dmorph/transformed_image.hh
+///
+/// Definition of an image morpher that has a site set transformed
+/// through a function.
+///
+/// \todo It is a rough code.
+
+# include <mln/core/internal/image_domain_morpher.hh>
+# include <mln/core/site_set/p_transformed.hh>
+
+
+namespace mln
+{
+
+
+ // Forward declaration.
+ template <typename I, typename F> class transformed_image;
+
+
+ namespace internal
+ {
+
+ /// Data structure for \c mln::transformed_image<I,F>.
+ template <typename I, typename F>
+ struct data< transformed_image<I,F> >
+ {
+ data(I& ima, const F& f);
+
+ I ima_;
+ F f_;
+ p_transformed< mln_domain(I), F> domain_;
+ };
+
+ } // end of namespace mln::internal
+
+
+
+ namespace trait
+ {
+
+ template <typename I, typename F>
+ struct image_< transformed_image<I,F> > : default_image_morpher< I,
+ mln_value(I),
+ transformed_image<I,F> >
+ {
+ typedef trait::image::category::domain_morpher category;
+
+ typedef trait::image::ext_domain::none ext_domain; // No extension of domain.
+ typedef trait::image::ext_value::irrelevant ext_value;
+ typedef trait::image::ext_io::irrelevant ext_io;
+
+ typedef trait::image::vw_io::none vw_io;
+ typedef trait::image::vw_set::none vw_set;
+ typedef trait::image::value_alignment::not_aligned value_alignment;
+ typedef trait::image::value_storage::disrupted value_storage;
+ };
+
+ } // end of namespace mln::trait
+
+
+
+ /// \brief Image having its domain restricted by a site set.
+ ///
+ /// \ingroup modimagedomainmorpher
+ //
+ template <typename I, typename F>
+ struct transformed_image : public internal::image_domain_morpher< I,
+ p_transformed< mln_domain(I), F>,
+ transformed_image<I,F> >
+ {
+ /// Skeleton.
+ typedef transformed_image< tag::image_<I>, tag::function_<F> > skeleton;
+
+ /// Constructor without argument.
+ transformed_image();
+
+ /// Constructor.
+ transformed_image(I& ima, const F& f);
+
+ /// Initialization.
+ void init_(I& ima, const F& f);
+
+
+ /// Give the definition domain.
+ const p_transformed< mln_domain(I), F>& domain() const;
+
+
+ /// Read-only access of pixel value at point site \p p.
+ mln_rvalue(I) operator()(const mln_psite(I)& p) const;
+
+ /// Read and "write if possible" access of pixel value at point
+ /// site \p p.
+ mln_morpher_lvalue(I) operator()(const mln_psite(I)& p);
+
+
+ /// Const promotion via conversion.
+ operator transformed_image<const I, F>() const;
+ };
+
+
+
+ // Morpher creation.
+
+ template <typename I, typename F>
+ transformed_image<const I, F>
+ transform_domain(const Image<I>& ima, const Function_v2v<F>& f);
+
+ template <typename I, typename F>
+ transformed_image<I, F>
+ transform_domain(Image<I>& ima, const Function_v2v<F>& f);
+
+
+
+ template <typename I, typename F, typename J>
+ void init_(tag::image_t, transformed_image<I,F>& target, const J& model);
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ // init_
+
+ template <typename I, typename F, typename J>
+ inline
+ void init_(tag::image_t, transformed_image<I,F>& target, const J& model)
+ {
+ I ima;
+ init_(tag::image, ima, model);
+ F f;
+ init_(tag::function, f, model);
+ target.init_(ima, f);
+ }
+
+
+ // internal::data< transformed_image<I,F> >
+
+ namespace internal
+ {
+
+ template <typename I, typename F>
+ inline
+ data< transformed_image<I,F> >::data(I& ima, const F& f)
+ : ima_(ima),
+ f_(f),
+ domain_(ima.domain(), f)
+ {
+ }
+
+ } // end of namespace mln::internal
+
+
+ // transformed_image<I,F>
+
+ template <typename I, typename F>
+ inline
+ transformed_image<I,F>::transformed_image()
+ {
+ }
+
+ template <typename I, typename F>
+ inline
+ transformed_image<I,F>::transformed_image(I& ima, const F& f)
+ {
+ init_(ima, f);
+ }
+
+ template <typename I, typename F>
+ inline
+ void
+ transformed_image<I,F>::init_(I& ima, const F& f)
+ {
+ mln_precondition(! this->is_valid());
+ this->data_ = new internal::data< transformed_image<I,F> >(ima, f);
+ }
+
+ template <typename I, typename F>
+ inline
+ const p_transformed< mln_domain(I), F>&
+ transformed_image<I,F>::domain() const
+ {
+ return this->data_->domain_;
+ }
+
+template <typename I, typename F>
+inline
+mln_rvalue(I)
+transformed_image<I,F>::operator()(const mln_psite(I)& p) const
+{
+ mln_precondition(this->delegatee_() != 0);
+ mln_precondition(exact(this)->has(p));
+ mln_precondition(this->delegatee_()->has(p));
+ return this->delegatee_()->operator()(this->data_->f_(p));
+}
+
+template <typename I, typename F>
+inline
+mln_morpher_lvalue(I)
+transformed_image<I,F>::operator()(const mln_psite(I)& p)
+{
+ mln_precondition(this->delegatee_() != 0);
+ mln_precondition(exact(this)->has(p));
+ mln_precondition(this->delegatee_()->has(p));
+ return this->delegatee_()->operator()(this->data_->f_(p));
+}
+
+
+ template <typename I, typename F>
+ inline
+ transformed_image<I,F>::operator transformed_image<const I, F>() const
+ {
+ transformed_image<const I, F> tmp(this->data_->ima_,
+ this->data_->f_);
+ return tmp;
+ }
+
+
+ // Morpher creation.
+
+ template <typename I, typename F>
+ inline
+ transformed_image<const I, F>
+ transform_domain(const Image<I>& ima, const Function_v2v<F>& f)
+ {
+ transformed_image<const I, F> tmp(exact(ima), exact(f));
+ return tmp;
+ }
+
+ template <typename I, typename F>
+ inline
+ transformed_image<I, F>
+ transform_domain(Image<I>& ima, const Function_v2v<F>& f)
+ {
+ transformed_image<I, F> tmp(exact(ima), exact(f));
+ return tmp;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+} // end of namespace mln
+
+
+#endif // ! MLN_CORE_IMAGE_DMORPH_TRANSFORMED_IMAGE_HH
Index: mln/core/image/dmorph/all.hh
--- mln/core/image/dmorph/all.hh (revision 0)
+++ mln/core/image/dmorph/all.hh (revision 0)
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef MLN_CORE_IMAGE_DMORPH_ALL_HH
+# define MLN_CORE_IMAGE_DMORPH_ALL_HH
+
+/// \file mln/core/image/dmorph/all.hh
+///
+/// File that includes all domain morpher image types.
+
+
+# include <mln/core/image/dmorph/transformed_image.hh>
+
+
+#endif // ! MLN_CORE_IMAGE_DMORPH_ALL_HH
Index: mln/core/internal/image_base.hh
--- mln/core/internal/image_base.hh (revision 3857)
+++ mln/core/internal/image_base.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -75,8 +76,10 @@
/// A base class for images.
+ ///
/// Parameter \p T is the image value type.
/// Parameter \p S is the image site set type.
+ //
template <typename T, typename S, typename E>
struct image_base
:
Index: mln/core/internal/image_morpher.hh
--- mln/core/internal/image_morpher.hh (revision 3857)
+++ mln/core/internal/image_morpher.hh (working copy)
@@ -48,7 +48,9 @@
{
/// A base class for images that are morphers. Parameter
+ ///
/// \c I is the underlying-morphed image type.
+ //
template <typename I, typename T, typename S, typename E>
class image_morpher : public image_base<T, S, E>
{
Index: mln/core/internal/image_domain_morpher.hh
--- mln/core/internal/image_domain_morpher.hh (revision 3857)
+++ mln/core/internal/image_domain_morpher.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_CORE_INTERNAL_IMAGE_DOMAIN_MORPHER_HH
# define MLN_CORE_INTERNAL_IMAGE_DOMAIN_MORPHER_HH
-/*! \file mln/core/internal/image_domain_morpher.hh
- *
- * \brief Definition of a base class for image morphers w.r.t. domain.
- */
+/// \file mln/core/internal/image_domain_morpher.hh
+///
+/// Definition of a base class for image morphers w.r.t. domain.
# include <mln/core/internal/image_morpher.hh>
Index: tests/core/site_set/p_transformed.cc
--- tests/core/site_set/p_transformed.cc (revision 0)
+++ tests/core/site_set/p_transformed.cc (revision 0)
@@ -0,0 +1,58 @@
+// 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/core/site_set/p_transformed.cc
+///
+/// Tests on mln::p_transformed.
+
+#include <mln/core/alias/box2d.hh>
+#include <mln/core/site_set/p_transformed.hh>
+#include <mln/geom/bbox.hh>
+
+
+
+
+struct wrap : mln::Function_v2v< wrap >
+{
+ typedef mln::point2d result;
+ result operator()(const result& p) const
+ {
+ return result(p.row() + 5, p.col() + 1);
+ }
+};
+
+
+int main()
+{
+ using namespace mln;
+
+ box2d b(2, 2);
+ p_transformed<box2d,wrap> s(b, wrap());
+ box2d b_ = geom::bbox(s);
+
+ mln_assertion(b_.pmin() == point2d(5,1));
+}
Index: tests/core/site_set/p_if.cc
--- tests/core/site_set/p_if.cc (revision 3853)
+++ tests/core/site_set/p_if.cc (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
@@ -26,7 +26,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/core/site_set/pset_if.cc
+/// \file tests/core/site_set/p_if.cc
///
/// Tests on mln::p_if.
Property changes on: tests/core/site_set/p_if.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/core/site_set/Makefile.am
--- tests/core/site_set/Makefile.am (revision 3857)
+++ tests/core/site_set/Makefile.am (working copy)
@@ -13,7 +13,8 @@
p_queue \
p_queue_fast \
p_set \
- pset_if \
+ p_if \
+ p_transformed \
p_vaccess \
p_vertices
@@ -26,7 +27,8 @@
p_queue_SOURCES = p_queue.cc
p_queue_fast_SOURCES = p_queue_fast.cc
p_set_SOURCES = p_set.cc
-pset_if_SOURCES = pset_if.cc
+p_if_SOURCES = p_if.cc
+p_transformed_SOURCES = p_transformed.cc
p_vaccess_SOURCES = p_vaccess.cc
p_vertices_SOURCES = p_vertices.cc
p_edges_SOURCES = p_edges.cc
Index: tests/core/image/p2p_image.cc
--- tests/core/image/p2p_image.cc (revision 3857)
+++ tests/core/image/p2p_image.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
@@ -33,8 +34,6 @@
#include <mln/core/image/p2p_image.hh>
#include <mln/fun/p2p/translation.hh>
-#include <mln/debug/iota.hh>
-
# define ima_ apply_p2p(ima, fun::p2p::translation(dp))
@@ -48,8 +47,6 @@
box2d b = make::box2d(0,0, 2,2);
image2d<int> ima(b, 0); // No border.
- debug::iota(ima);
-
dpoint2d dp(-1,+1);
box2d b_ = make::box2d(-1,+1, 1,3);
Index: tests/core/image/dmorph/Makefile.am
--- tests/core/image/dmorph/Makefile.am (revision 0)
+++ tests/core/image/dmorph/Makefile.am (revision 0)
@@ -0,0 +1,10 @@
+## Process this file through Automake to create Makefile.in.
+
+include $(top_srcdir)/milena/tests/tests.mk
+
+check_PROGRAMS = \
+ transformed_image
+
+transformed_image_SOURCES = transformed_image.cc
+
+TESTS = $(check_PROGRAMS)
Index: tests/core/image/dmorph/transformed_image.cc
--- tests/core/image/dmorph/transformed_image.cc (revision 0)
+++ tests/core/image/dmorph/transformed_image.cc (revision 0)
@@ -0,0 +1,58 @@
+// 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/core/image/dmorph/transformed_image.cc
+///
+/// Tests on mln::transformed_image.
+
+#include <mln/core/var.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/fun/p2p/translation.hh>
+#include <mln/debug/iota.hh>
+#include <mln/geom/bbox.hh>
+
+#include <mln/core/image/dmorph/transformed_image.hh>
+
+
+
+int main()
+{
+ using namespace mln;
+
+ box2d b(2, 3);
+ image2d<int> ima(b);
+ debug::iota(ima);
+
+ dpoint2d dp(-1,+1);
+ mln_VAR( ima_, transform_domain( ima,
+ fun::p2p::translation_t<point2d>(dp) ) );
+
+ box2d b_ = geom::bbox(ima_.domain());
+
+ mln_assertion( b_.pmin() == b.pmin() + dp &&
+ b_.pmax() == b.pmax() + dp );
+}
Index: tests/core/image/Makefile.am
--- tests/core/image/Makefile.am (revision 3857)
+++ tests/core/image/Makefile.am (working copy)
@@ -2,6 +2,9 @@
include $(top_srcdir)/milena/tests/tests.mk
+SUBDIRS = \
+ dmorph
+
##FIXME: re-enable tests
check_PROGRAMS = \
cast_image \
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Make Etienne's code compile.
* folio/test/histo/projected3d.cc: Make it compile.
Comment some parts of code.
projected3d.cc | 93 +++++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 67 insertions(+), 26 deletions(-)
Index: folio/test/histo/projected3d.cc
--- folio/test/histo/projected3d.cc (revision 3856)
+++ folio/test/histo/projected3d.cc (working copy)
@@ -8,6 +8,7 @@
#include <mln/core/image/image_if.hh>
#include <mln/pw/value.hh>
#include <mln/level/transform.hh>
+#include <mln/level/stretch.hh>
#include <mln/arith/revert.hh>
#include <mln/core/alias/neighb3d.hh>
@@ -22,15 +23,20 @@
#include <mln/accu/count.hh>
#include <mln/accu/mean.hh>
+#include <mln/accu/sum.hh>
#include <mln/accu/image/init.hh>
#include <mln/accu/image/take.hh>
+#include <mln/accu/image/to_result.hh>
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
+#include <mln/io/pgm/save.hh>
#include <mln/debug/println.hh>
+
namespace mln
{
+
struct rgb8to6 : Function_v2v< rgb8to6 >
{
typedef value::rgb<6> result;
@@ -40,8 +46,23 @@
return res;
}
};
+
+ struct take_log : Function_v2v< take_log >
+ {
+ typedef float result;
+ float operator()(float f) const
+ {
+ mln_precondition(f > 0);
+ return std::log(f + 1);
+// return std::log(std::log(f + 1) + 1);
+ }
+ };
+
}
+
+
+
int main(int argc, char* argv[])
{
if (argc != 3)
@@ -59,41 +80,61 @@
std::cout << " => loading " << argv[1] << "..." << std::endl;
image2d<value::rgb8> ima;
io::ppm::load(ima, argv[1]);
- image2d<rgb6> ima6 = level::transform(ima, rgb8to6());
+// image2d<rgb6> ima6 = level::transform(ima, rgb8to6());
std::cout << " => computing histogram..." << std::endl;
- image3d<unsigned> histo = histo::compute_histo_rgb<unsigned>(ima6);
+ image3d<unsigned> histo = histo::compute_histo_rgb<unsigned>(ima); // 6);
- std::cout << " => computing reverted histogram..." << std::endl;
- image3d<unsigned> reverted = arith::revert(histo);
+ {
+ mln_VAR(h, histo);
- std::cout << " => computing closure..." << std::endl;
- image3d<unsigned> closed =
- morpho::closing::volume(reverted, c6(), atoi(argv[2]));
+ typedef accu::sum<unsigned> A;
- std::cout << " => computing watershed..." << std::endl;
- value::label_8 nbasin;
- image3d<value::label_8> labels =
- morpho::watershed::flooding(closed, c6(), nbasin);
- std::cout << "found " << nbasin << " labels" << std::endl;
+ image2d<A> h_2d_a(h.nrows(), h.ncols());
+ accu::image::init(h_2d_a);
- labels = morpho::elementary::dilation(labels, c18());
+ accu::image::take( unproject( h_2d_a,
+ h.domain(),
+ fun::v2v::projection<point3d, 2>() ).rw(),
+ h );
- std::cout << " => computing output labelized image..." << std::endl;
- image2d<value::label_8> lab = histo::classify_with_histo_rgb(ima, labels);
+ image2d<float> h_2d = accu::image::to_result(h_2d_a);
+ io::pgm::save( level::stretch( int_u8(),
+ level::transform( h_2d,
+ take_log() ) ),
+ "h_2d.pgm" );
+ }
- std::cout << " => computing projection..." << std::endl;
- typedef accu::mean<int_u8, unsigned, int_u8> A;
+// std::cout << " => computing reverted histogram..." << std::endl;
+// image3d<unsigned> reverted = arith::revert(histo);
- image2d<A> vmean(lab.nrows(), lab.ncols());
- accu::image::init(vmean);
- {
- fun::v2v::projection<point3d, 0> vproj;
- mln_VAR( vmean_, unproject(vmean, lab.domain(), vproj) );
- accu::image::take(vmean_, lab);
- }
+// std::cout << " => computing closure..." << std::endl;
+// image3d<unsigned> closed =
+// morpho::closing::volume(reverted, c6(), atoi(argv[2]));
+
+// std::cout << " => computing watershed..." << std::endl;
+// value::label_8 nbasin;
+// image3d<value::label_8> labels =
+// morpho::watershed::flooding(closed, c6(), nbasin);
+// std::cout << "found " << nbasin << " labels" << std::endl;
+
+// labels = morpho::elementary::dilation(labels, c18());
+
+// std::cout << " => computing output labelized image..." << std::endl;
+// image2d<value::label_8> lab = histo::classify_with_histo_rgb(ima, labels);
+
+// std::cout << " => computing projection..." << std::endl;
+
+// typedef accu::mean<int_u8, unsigned, int_u8> A;
+// image2d<A> vmean(lab.nrows(), lab.ncols());
+// accu::image::init(vmean);
+// {
+// fun::v2v::projection<point3d, 0> vproj;
+// mln_VAR( vmean_, unproject(vmean, lab.domain(), vproj) );
+// accu::image::take(vmean_, lab);
+// }
- std::cout << " => saving " << argv[2] << "..." << std::endl;
- io::ppm::save(vmean, argv[2]);
+// std::cout << " => saving " << argv[2] << "..." << std::endl;
+// io::ppm::save(vmean, argv[2]);
}
1
0
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-05-19 Etienne FOLIO <folio(a)lrde.epita.fr>
HSV type, HSL <-> HSV conversions, and tests.
* sandbox/folio/mln/fun/v2v/hsl_to_hsv.hh: New algorithms.
* sandbox/folio/mln/fun/v2v/rgb_to_hsv.hh: float -> float01_<n>.
* sandbox/folio/mln/histo/compute_histo_3d.hh: Some corrections.
* sandbox/folio/mln/value/hsv.hh: HSV value type.
* sandbox/folio/test/histo/plot_lena.cc: New test.
* sandbox/folio/test/histo/plot_lena_3d.cc: New test.
* sandbox/folio/test/histo/plot_lena_rgb.cc: New test.
* sandbox/folio/test/histo/projected.cc: New test.
* sandbox/folio/test/histo/projected3d.cc: New test.
* sandbox/folio/test/value/circular.cc: test.
* sandbox/folio/test/value/hsv.cc: test.
---
mln/fun/v2v/hsl_to_hsv.hh | 141 ++++++++++++++++++++++++++++++++++++++++++
mln/fun/v2v/rgb_to_hsv.hh | 14 +++-
mln/histo/compute_histo_3d.hh | 24 +++----
mln/value/hsv.hh | 20 ++---
test/histo/plot_lena.cc | 55 ++++++++++++++++
test/histo/plot_lena_3d.cc | 63 ++++++++++++++++++
test/histo/plot_lena_rgb.cc | 56 ++++++++++++++++
test/histo/projected.cc | 49 ++++++++++++++
test/histo/projected3d.cc | 99 +++++++++++++++++++++++++++++
test/value/circular.cc | 113 ++++++++++++++++++++++-----------
test/value/hsv.cc | 27 +++++++-
11 files changed, 595 insertions(+), 66 deletions(-)
Index: trunk/milena/sandbox/folio/test/histo/plot_lena.cc
===================================================================
--- trunk/milena/sandbox/folio/test/histo/plot_lena.cc (revision 0)
+++ trunk/milena/sandbox/folio/test/histo/plot_lena.cc (revision 3856)
@@ -0,0 +1,55 @@
+#include <iostream>
+#include <mln/debug/println.hh>
+#include <mln/literal/all.hh>
+
+#include <mln/io/pgm/load.hh>
+#include <mln/value/int_u8.hh>
+
+#include "../../mln/histo/compute_histo_rgb.hh"
+
+namespace mln
+{
+ namespace histo
+ {
+
+ template <typename T>
+ image1d<unsigned> compute_histo_gs(image2d<T> ima)
+ {
+ typedef mln_trait_value_comp(T, 0)::enc enc; // -> int_u8
+
+ // New histogram-image
+ image1d<unsigned> out(box1d(point1d(mln_min(enc)), // -> 0
+ point1d(mln_max(enc)))); // -> 255
+ data::fill(out, 0);
+
+ // Compute histogram
+ mln_fwd_piter(image2d<T>) p(ima.domain());
+ for_all(p)
+ ++out(point1d(ima(p)));
+
+ return out;
+ }
+
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ using namespace mln;
+ using namespace mln::value;
+
+ // build test image
+ std::cout << " => loading " << argv[1] << "..." << std::endl;
+ image2d<int_u8>ima;
+ io::pgm::load(ima, argv[1]);
+
+ std::cout << " => computing histo..." << std::endl;
+ image1d<unsigned> out = histo::compute_histo_gs(ima);
+
+ typedef image1d<int_u8> I;
+
+ mln_piter_(I) p(out.domain());
+ unsigned i = 0;
+ for_all(p)
+ std::cout << i++ << " " << out(p) << std::endl;
+}
Index: trunk/milena/sandbox/folio/test/histo/projected.cc
===================================================================
--- trunk/milena/sandbox/folio/test/histo/projected.cc (revision 0)
+++ trunk/milena/sandbox/folio/test/histo/projected.cc (revision 3856)
@@ -0,0 +1,49 @@
+#include <iostream>
+#include <mln/debug/println.hh>
+#include <mln/literal/all.hh>
+
+#include "../../mln/histo/compute_histo_rgb.hh"
+
+int main()
+{
+ using namespace mln;
+
+ // build test image
+ image2d<value::rgb8> ima(10, 10);
+
+ value::rgb8 red = literal::red;
+ value::rgb8 green = literal::green;
+ value::rgb8 black = literal::black;
+
+ for (unsigned i = 0; i < 10; ++i)
+ for (unsigned j = 5; j < 10; ++j)
+ {
+ point2d p(j, i);
+ ima(p) = black;
+ }
+
+ for (unsigned i = 0; i < 10; ++i)
+ for (unsigned j = 0; j < 5; ++j)
+ {
+ point2d p(j, i);
+ ima(p) = red;
+ }
+
+ point2d p(8, 2);
+ ima(p) = green;
+
+ std::cout << "input :" << std::endl;
+ debug::println(ima);
+
+ // let's run !
+ image3d<value::int_u8> out = histo::compute_histo_rgb<value::int_u8>(ima);
+
+ // output ?
+ // std::cout << "out(0, 0, 0) = " << out(point3d(0, 0, 0)) << std::endl;
+ // std::cout << "out(255, 0, 0) = " << out(point3d(255, 0, 0)) << std::endl;
+ // std::cout << "out(0, 255, 0) = " << out(point3d(0, 255, 0)) << std::endl;
+
+
+
+ return 0;
+}
Index: trunk/milena/sandbox/folio/test/histo/plot_lena_3d.cc
===================================================================
--- trunk/milena/sandbox/folio/test/histo/plot_lena_3d.cc (revision 0)
+++ trunk/milena/sandbox/folio/test/histo/plot_lena_3d.cc (revision 3856)
@@ -0,0 +1,63 @@
+#include <iostream>
+#include <mln/debug/println.hh>
+#include <mln/literal/all.hh>
+
+#include <mln/io/ppm/load.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/value/rgb8.hh>
+
+//#include "../../mln/histo/compute_histo_rgb.hh"
+
+namespace mln
+{
+ namespace histo
+ {
+
+ template <typename T>
+ image3d<unsigned>
+ compute_histo_3d(image2d<T> ima)
+ {
+ typedef mln_trait_value_comp(T, 0)::enc enc_0; // R -> int_u8
+ typedef mln_trait_value_comp(T, 1)::enc enc_1; // G -> int_u8
+ typedef mln_trait_value_comp(T, 2)::enc enc_2; // B -> int_u8
+
+ // New histogram-image
+ image3d<unsigned> out(box3d(point3d(mln_min(enc_0), // -> 0
+ mln_min(enc_1), // -> 0
+ mln_min(enc_2)), // -> 0
+ point3d(mln_max(enc_0), // -> 255
+ mln_max(enc_1), // -> 255
+ mln_max(enc_2)))); // -> 255
+ data::fill(out, 0);
+
+ // Compute histogram
+ mln_fwd_piter(image2d<T>) p(ima.domain());
+ for_all(p)
+ ++out(point3d(ima(p).comp(0), ima(p).comp(1), ima(p).comp(2)));
+
+ return out;
+ }
+
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ using namespace mln;
+ using namespace mln::value;
+
+ // build test image
+ std::cout << " => loading " << argv[1] << "..." << std::endl;
+ image2d<rgb8>ima;
+ io::ppm::load(ima, argv[1]);
+
+ std::cout << " => computing histo..." << std::endl;
+ image3d<unsigned> out = histo::compute_histo_3d(ima);
+
+ typedef image3d<rgb8> I;
+ mln_piter_(I) p(out.domain());
+ unsigned i, j, k = 0;
+ for_all(p)
+ i += out(p);
+ std::cout << i << std::endl;
+}
Index: trunk/milena/sandbox/folio/test/histo/projected3d.cc
===================================================================
--- trunk/milena/sandbox/folio/test/histo/projected3d.cc (revision 0)
+++ trunk/milena/sandbox/folio/test/histo/projected3d.cc (revision 3856)
@@ -0,0 +1,99 @@
+#include <mln/core/var.hh>
+
+#include <mln/core/image/image1d.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/core/image/unproject_image.hh>
+#include <mln/fun/v2v/projection.hh>
+
+#include <mln/core/image/image_if.hh>
+#include <mln/pw/value.hh>
+#include <mln/level/transform.hh>
+
+#include <mln/arith/revert.hh>
+#include <mln/core/alias/neighb3d.hh>
+#include <mln/value/label_8.hh>
+
+#include <mln/morpho/closing/volume.hh>
+#include <mln/morpho/watershed/flooding.hh>
+#include <mln/morpho/elementary/dilation.hh>
+
+#include "../../mln/histo/compute_histo_rgb.hh"
+#include "../../mln/histo/classify_with_histo_rgb.hh"
+
+#include <mln/accu/count.hh>
+#include <mln/accu/mean.hh>
+#include <mln/accu/image/init.hh>
+#include <mln/accu/image/take.hh>
+
+#include <mln/io/ppm/load.hh>
+#include <mln/io/ppm/save.hh>
+#include <mln/debug/println.hh>
+
+namespace mln
+{
+ struct rgb8to6 : Function_v2v< rgb8to6 >
+ {
+ typedef value::rgb<6> result;
+ value::rgb<6> operator()(const value::rgb<8>& c) const
+ {
+ value::rgb<6> res(c.red() / 4, c.green() / 4, c.blue() / 4);
+ return res;
+ }
+ };
+}
+
+int main(int argc, char* argv[])
+{
+ if (argc != 3)
+ {
+ std::cout << "Usage:" << std::endl
+ << "./a.out <ima_in> <ima_out>" << std::endl;
+ }
+
+ using namespace mln;
+
+ using value::int_u8;
+ typedef value::rgb<6> rgb6;
+ typedef value::int_u<6> int_u6;
+
+ std::cout << " => loading " << argv[1] << "..." << std::endl;
+ image2d<value::rgb8> ima;
+ io::ppm::load(ima, argv[1]);
+ image2d<rgb6> ima6 = level::transform(ima, rgb8to6());
+
+ std::cout << " => computing histogram..." << std::endl;
+ image3d<unsigned> histo = histo::compute_histo_rgb<unsigned>(ima6);
+
+ std::cout << " => computing reverted histogram..." << std::endl;
+ image3d<unsigned> reverted = arith::revert(histo);
+
+ std::cout << " => computing closure..." << std::endl;
+ image3d<unsigned> closed =
+ morpho::closing::volume(reverted, c6(), atoi(argv[2]));
+
+ std::cout << " => computing watershed..." << std::endl;
+ value::label_8 nbasin;
+ image3d<value::label_8> labels =
+ morpho::watershed::flooding(closed, c6(), nbasin);
+ std::cout << "found " << nbasin << " labels" << std::endl;
+
+ labels = morpho::elementary::dilation(labels, c18());
+
+ std::cout << " => computing output labelized image..." << std::endl;
+ image2d<value::label_8> lab = histo::classify_with_histo_rgb(ima, labels);
+
+ std::cout << " => computing projection..." << std::endl;
+ typedef accu::mean<int_u8, unsigned, int_u8> A;
+
+ image2d<A> vmean(lab.nrows(), lab.ncols());
+ accu::image::init(vmean);
+ {
+ fun::v2v::projection<point3d, 0> vproj;
+ mln_VAR( vmean_, unproject(vmean, lab.domain(), vproj) );
+ accu::image::take(vmean_, lab);
+ }
+
+ std::cout << " => saving " << argv[2] << "..." << std::endl;
+ io::ppm::save(vmean, argv[2]);
+
+}
Index: trunk/milena/sandbox/folio/test/histo/plot_lena_rgb.cc
===================================================================
--- trunk/milena/sandbox/folio/test/histo/plot_lena_rgb.cc (revision 0)
+++ trunk/milena/sandbox/folio/test/histo/plot_lena_rgb.cc (revision 3856)
@@ -0,0 +1,56 @@
+#include <iostream>
+#include <mln/debug/println.hh>
+#include <mln/literal/all.hh>
+
+#include <mln/io/ppm/load.hh>
+#include <mln/value/int_u8.hh>
+
+#include "../../mln/histo/compute_histo_rgb.hh"
+
+#include <vector>
+
+int main(int argc, char* argv[])
+{
+ using namespace mln;
+ using namespace mln::value;
+
+ // build test image
+ std::cout << " => loading " << argv[1] << "..." << std::endl;
+ image2d<rgb8>ima;
+ io::ppm::load(ima, argv[1]);
+
+ std::cout << " => computing histo..." << std::endl;
+// image3d<int_u8> out = histo::compute_histo_rgb<value::int_u8>(ima);
+ std::vector<unsigned> red(256, 0);
+ std::vector<unsigned> green(256, 0);
+ std::vector<unsigned> blue(256, 0);
+ mln_fwd_piter_(image2d<rgb8>) p(ima.domain());
+ for_all(p)
+ {
+ ++red[ima(p).red()];
+ ++green[ima(p).green()];
+ ++blue[ima(p).blue()];
+ }
+
+ for (unsigned i = 0; i < 256; ++i)
+ {
+ // unsigned acc0 = 0;
+ // for (unsigned j = 0; j < 256; ++j)
+ // for (unsigned k = 0; k < 256; ++k)
+ // acc0 += out(point3d(i, j, k));
+ // unsigned acc1 = 0;
+ // for (unsigned j = 0; j < 256; ++j)
+ // for (unsigned k = 0; k < 256; ++k)
+ // acc1 += out(point3d(j, i, k));
+ // unsigned acc2 = 0;
+ // for (unsigned j = 0; j < 256; ++j)
+ // for (unsigned k = 0; k < 256; ++k)
+ // acc2 += out(point3d(j, k, i));
+ // std::cout << i << " " << acc0 << " " << acc1 << " " << acc2 << std::endl;
+ std::cout << i << " "
+ << red[i] << " "
+ << green[i] << " "
+ << blue[i] << std::endl;
+ }
+
+}
Index: trunk/milena/sandbox/folio/test/value/hsv.cc
===================================================================
--- trunk/milena/sandbox/folio/test/value/hsv.cc (revision 3855)
+++ trunk/milena/sandbox/folio/test/value/hsv.cc (revision 3856)
@@ -1,13 +1,34 @@
+#include <mln/io/ppm/load.hh>
+#include <mln/io/ppm/save.hh>
+#include <mln/debug/println.hh>
+#include <mln/level/transform.hh>
#include <mln/core/image/image2d.hh>
-#include "../../mln/value/hsv.hh"
+#include "../../mln/fun/v2v/rgb_to_hsv.hh"
#include "../../mln/value/circular.hh"
-int main()
+int main(int argc, char* argv[])
{
using namespace mln;
using namespace mln::value;
- image2d< hsv_< circular<16, 0, 360>, float, float > > ima;
+ if (argc != 3)
+ {
+ std::cout << "Usage:" << std::endl
+ << "./a.out <ima_in> <ima_out>" << std::endl;
+ }
+
+
+ std::cout << " => loading " << argv[1] << "..." << std::endl;
+ image2d<value::rgb8> ima;
+ io::ppm::load(ima, argv[1]);
+
+ image2d<hsv_16f> hsv = level::transform(ima,
+ fun::v2v::f_rgb_to_hsv_16f);
+ ima = level::transform(hsv,
+ fun::v2v::f_hsv_to_rgb_8f);
+
+ std::cout << " => saving " << argv[2] << "..." << std::endl;
+ io::ppm::save(ima, argv[2]);
}
Index: trunk/milena/sandbox/folio/test/value/circular.cc
===================================================================
--- trunk/milena/sandbox/folio/test/value/circular.cc (revision 3855)
+++ trunk/milena/sandbox/folio/test/value/circular.cc (revision 3856)
@@ -4,45 +4,86 @@
#include "../../mln/value/circular.hh"
+template <typename T>
+class DistFct
+{
+ int_u8 operator()(const value::rg8& a, const value::rg8& b)
+ {
+ return a;
+ }
+};
+
+
+template <typename T, typename N, typename D>
+image2d<value::int_u8>
+dist_on_pixels(const image2d<T>& input, const N& nbh,
+ const D& dist)
+{
+ using value::int_u8;
+ image2d<int_u8> output(input.domain());
+
+ mln_piter(box2d) p(input.domain());
+ mln_niter(N) n(nbh, p);
+ for_all(p)
+ {
+ int_u8 d = 0u;
+ for_all(n) if (input.domain().has(n))
+ {
+ int_u8 d_ = dist(input(p), input(n));
+ if (d_ > d)
+ d = d_;
+ }
+ output(p) = d;
+ }
+
+ io::pgm::save(output, "temp_dist.pgm");
+
+ return output;
+}
+
+
int main()
{
using namespace mln;
using namespace mln::value;
- circular<12, 0, 360> inter(21);
- std::cout << "21: " << inter << " " << float(inter) << std::endl;
- inter = 0;
- std::cout << "0: " << inter << std::endl;
- inter = 42;
- std::cout << "42: " << inter << std::endl;
- inter = 359;
- std::cout << "359: " << inter << std::endl;
- inter = 359.5;
- std::cout << "359.5: " << inter << std::endl;
- inter = 360;
- std::cout << "360: " << inter << std::endl;
- inter = 360.5;
- std::cout << "360.5: " << inter << std::endl;
- inter = 361;
- std::cout << "361: " << inter << std::endl;
- inter = 372;
- std::cout << "372: " << inter << std::endl;
- inter = 972;
- std::cout << "972: " << inter << std::endl;
- inter = -0.2;
- std::cout << "-0.2: " << inter << std::endl;
- inter = -1;
- std::cout << "-1: " << inter << std::endl;
- inter = -1;
- std::cout << "-1: " << inter << std::endl;
- inter = -359;
- std::cout << "-359: " << inter << std::endl;
- inter = -359.5;
- std::cout << "-359.5: " << inter << std::endl;
- inter = -360;
- std::cout << "-360: " << inter << std::endl;
- inter = -360.5;
- std::cout << "-360.5: " << inter << std::endl;
- inter = -361;
- std::cout << "-361: " << inter << std::endl;
+ // circular<12, 0, 360> inter(21);
+ // std::cout << "21: " << inter << " " << float(inter) << std::endl;
+ // inter = 0;
+ // std::cout << "0: " << inter << std::endl;
+ // inter = 42;
+ // std::cout << "42: " << inter << std::endl;
+ // inter = 359;
+ // std::cout << "359: " << inter << std::endl;
+ // inter = 359.5;
+ // std::cout << "359.5: " << inter << std::endl;
+ // inter = 360;
+ // std::cout << "360: " << inter << std::endl;
+ // inter = 360.5;
+ // std::cout << "360.5: " << inter << std::endl;
+ // inter = 361;
+ // std::cout << "361: " << inter << std::endl;
+ // inter = 372;
+ // std::cout << "372: " << inter << std::endl;
+ // inter = 972;
+ // std::cout << "972: " << inter << std::endl;
+ // inter = -0.2;
+ // std::cout << "-0.2: " << inter << std::endl;
+ // inter = -1;
+ // std::cout << "-1: " << inter << std::endl;
+ // inter = -1;
+ // std::cout << "-1: " << inter << std::endl;
+ // inter = -359;
+ // std::cout << "-359: " << inter << std::endl;
+ // inter = -359.5;
+ // std::cout << "-359.5: " << inter << std::endl;
+ // inter = -360;
+ // std::cout << "-360: " << inter << std::endl;
+ // inter = -360.5;
+ // std::cout << "-360.5: " << inter << std::endl;
+ // inter = -361;
+ // std::cout << "-361: " << inter << std::endl;
+
+
+
}
Index: trunk/milena/sandbox/folio/mln/histo/compute_histo_3d.hh
===================================================================
--- trunk/milena/sandbox/folio/mln/histo/compute_histo_3d.hh (revision 3855)
+++ trunk/milena/sandbox/folio/mln/histo/compute_histo_3d.hh (revision 3856)
@@ -31,24 +31,22 @@
image3d<unsigned>
operator()(const image2d<T>& ima) const
{
- typedef mln_trait_value_comp(T, 0)::enc enc_0;
- typedef mln_trait_value_comp(T, 1)::enc enc_1;
- typedef mln_trait_value_comp(T, 2)::enc enc_2;
-
- // FIXME: wrong for negative sites!
- image3d<unsigned> out(mln_max(enc_0) + abs(mln_min(enc_0)) + 1,
- mln_max(enc_1) + abs(mln_min(enc_1)) + 1,
- mln_max(enc_2) + abs(mln_min(enc_2)) + 1);
-
- // Count occurences.
+ typedef mln_trait_value_comp(T, 0)::enc enc_0; // R -> int_u8
+ typedef mln_trait_value_comp(T, 1)::enc enc_1; // G -> int_u8
+ typedef mln_trait_value_comp(T, 2)::enc enc_2; // B -> int_u8
+
+ image3d<unsigned> out(box3d(point1d(mln_min(enc_0)), // -> 0
+ point1d(mln_min(enc_1)), // -> 0
+ point1d(mln_min(enc_2)), // -> 0
+ point1d(mln_max(enc_0)), // -> 255
+ point1d(mln_max(enc_1)), // -> 255
+ point1d(mln_max(enc_2)))) // -> 255
data::fill(out, 0);
- mln_fwd_piter(box2d) p(ima.domain());
+ mln_fwd_piter(image2d<T>) p(ima.domain());
for_all(p)
- // comp() not implemented everywhere!
++out(point3d(ima(p).comp(0), ima(p).comp(1), ima(p).comp(2)));
- // return
return out;
}
Index: trunk/milena/sandbox/folio/mln/fun/v2v/hsl_to_hsv.hh
===================================================================
--- trunk/milena/sandbox/folio/mln/fun/v2v/hsl_to_hsv.hh (revision 0)
+++ trunk/milena/sandbox/folio/mln/fun/v2v/hsl_to_hsv.hh (revision 3856)
@@ -0,0 +1,141 @@
+// Copyright (C) 2008 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.
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/// \file mln/fin/v2v/hsl_to_hsv.hh
+///
+/// Conversion between HSL and HSV.
+///
+/// \todo Write a better doc.
+/// \todo Correct/write preconditions.
+
+
+#ifndef MLN_FUN_V2V_HSL_TO_HSV_HH
+# define MLN_FUN_V2V_HSL_TO_HSV_HH
+
+# include <cmath>
+
+# include <mln/trait/value_.hh>
+# include <mln/math/max.hh>
+# include <mln/math/min.hh>
+
+# include "../../value/hsl.hh"
+# include "../../value/hsv.hh"
+
+namespace mln
+{
+
+ namespace fun
+ {
+
+ namespace v2v
+ {
+
+ template <typename T_hsv>
+ struct f_hsl_to_hsv_ : public Function_v2v< f_hsl_to_hsv_<T_hsv> >
+ {
+ typedef T_hsv result;
+
+ template <typename T_hsl>
+ T_hsv operator()(const T_hsl& hsl) const;
+ };
+
+ extern f_hsl_to_hsv_<value::hsv_16f> f_hsl_to_hsv_16f;
+ extern f_hsl_to_hsv_<value::hsv_8f> f_hsl_to_hsv_8f;
+
+ template <typename T_hsl>
+ struct f_hsv_to_hsl_ : public Function_v2v< f_hsv_to_hsl_<T_hsl> >
+ {
+ typedef T_hsl result;
+
+ template <typename T_hsv>
+ T_hsl operator()(const T_hsv& hsv) const;
+ };
+
+ extern f_hsv_to_hsl_<value::hsl_8f> f_hsv_to_hsl_8f;
+ extern f_hsv_to_hsl_<value::hsl_16f> f_hsv_to_hsl_16f;
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ /// Global variables.
+ /// \{
+ f_hsl_to_hsv_<value::hsv_16f> f_hsl_to_hsv_16f;
+ f_hsl_to_hsv_<value::hsv_8f> f_hsl_to_hsv_8f;
+ f_hsv_to_hsl_<value::hsl_8f> f_hsv_to_hsl_8f;
+ f_hsv_to_hsl_<value::hsl_16f> f_hsv_to_hsl_16f;
+ /// \}
+
+ template <typename T_hsv>
+ template <typename T_hsl>
+ inline
+ T_hsv
+ f_hsl_to_hsv_<T_hsv>::operator()(const T_hsl& hsl) const
+ {
+ T_hsv hsv;
+
+ // FIXME: take hsl [[0..360], [0..1], [0..1]]
+
+ hsv.hue() = hsl.hue();
+ float l = hsl.lum() * 2;
+ float s = hsl.sat() * ((hsl.lum() <= 1) ? hsl.lum() : 2 - hsl.lum());
+ hsv.val() = (l + s) / 2;
+ hsv.sat() = (2 * s) / (l + s);
+
+ // return hsv [[0..360], [0..1], [0..1]]
+ return hsv;
+ }
+
+
+ template <typename T_hsl>
+ template <typename T_hsv>
+ inline
+ T_hsl
+ f_hsv_to_hsl_<T_hsl>::operator()(const T_hsv& hsv) const
+ {
+ T_hsl hsl;
+
+ // take hsv [[0..360], [0..1], [0..1]]
+
+ hsl.hue() = hsv.hue();
+ hsl.lum() = (2 - hsv.sat()) * hsv.val();
+ hsl.sat() = hsv.sat() * hsv.val();
+ hsl.sat() /= (hsl.lum() <= 1) ? hsl.lum() : 2 - hsl.lum();
+ hsl.lum() /= 2;
+
+ // FIXME: return hsl [[0..360], [0..1], [0..1]]
+ return hsl;
+ }
+
+# endif // !MLN_INCLUDE_ONLY
+
+ } // end of namespace fun::v2v
+
+ } // end of namespace fun
+
+} // end of namespace mln
+
+#endif // ! MLN_FUN_V2V_HSL_TO_HSV_HH
Index: trunk/milena/sandbox/folio/mln/fun/v2v/rgb_to_hsv.hh
===================================================================
--- trunk/milena/sandbox/folio/mln/fun/v2v/rgb_to_hsv.hh (revision 3855)
+++ trunk/milena/sandbox/folio/mln/fun/v2v/rgb_to_hsv.hh (revision 3856)
@@ -43,6 +43,7 @@
# include <mln/math/min.hh>
# include <mln/value/rgb.hh>
+# include "../../value/hsv.hh"
namespace mln
{
@@ -62,6 +63,9 @@
T_hsv operator()(const T_rgb& rgb) const;
};
+ extern f_rgb_to_hsv_<value::hsv_16f> f_rgb_to_hsv_16f;
+ extern f_rgb_to_hsv_<value::hsv_8f> f_rgb_to_hsv_8f;
+
template <typename T_rgb>
struct f_hsv_to_rgb_ : public Function_v2v< f_hsv_to_rgb_<T_rgb> >
{
@@ -71,9 +75,17 @@
T_rgb operator()(const T_hsv& hsv) const;
};
+ extern f_hsv_to_rgb_<value::rgb8> f_hsv_to_rgb_8f;
+
# ifndef MLN_INCLUDE_ONLY
+ /// Global variables.
+ /// \{
+ f_rgb_to_hsv_<value::hsv_16f> f_rgb_to_hsv_16f;
+ f_rgb_to_hsv_<value::hsv_8f> f_rgb_to_hsv_8f;
+ f_hsv_to_rgb_<value::rgb8> f_hsv_to_rgb_8f;
+ /// \}
template <typename T_hsv>
template <typename T_rgb>
@@ -116,7 +128,7 @@
{
// take hsv [[0..360], [0..1], [0..1]]
- float i = floor(hsv.hue() / 60);
+ unsigned i = floor(hsv.hue() / 60);
float f = hsv.hue() / 60 - i;
float p = hsv.val() * (1 - hsv.sat());
float q = hsv.val() * (1 - f * hsv.sat());
Index: trunk/milena/sandbox/folio/mln/value/hsv.hh
===================================================================
--- trunk/milena/sandbox/folio/mln/value/hsv.hh (revision 3855)
+++ trunk/milena/sandbox/folio/mln/value/hsv.hh (revision 3856)
@@ -59,6 +59,9 @@
template <typename H, typename S, typename V>
class hsv_;
+ typedef hsv_< circular<8, 0, 360>, float01_<8>, float01_<8> > hsv_8f;
+ typedef hsv_< circular<16, 0, 360>, float01_<16>, float01_<16> > hsv_16f;
+
}
@@ -69,11 +72,10 @@
namespace over_load
{
- // ?
template <int n>
void
from_to_(const value::rgb<n>& from,
- value::hsv_<value::circular<n, 0, 360>, float, float>& to);
+ value::hsv_<value::circular<n, 0, 360>, float01_<n>, float01_<n> >& to)
} // end of namespace mln::convert::over_load
@@ -84,8 +86,6 @@
namespace trait
{
- // ?
-
template <typename H, typename S, typename V>
struct set_precise_binary_< op::plus,
mln::value::hsv_<H, S, V>,
@@ -151,7 +151,7 @@
{
enum {
dim = 3,
- nbits = (sizeof (H) + sizeof (S) + sizeof (V)) * 8, // ?
+ nbits = (sizeof (H) + sizeof (S) + sizeof (V)) * 8,
card = mln_value_card_from_(nbits)
};
@@ -199,10 +199,8 @@
/// Constructor from component values.
hsv_(const H& hue, const S& sat, const V& lum)
{
- mln_precondition(hue >= 0);
mln_precondition(sat >= 0);
mln_precondition(val >= 0);
- mln_precondition(hue <= 1.); // ?
mln_precondition(sat <= 1.);
mln_precondition(val <= 1.);
hue_ = hue;
@@ -215,9 +213,6 @@
const S& sat() const;
const V& val() const;
- // ?
- // hue(float), hue(H) instead?
-
/// Read-write access to the hue component.
H& hue();
S& sat();
@@ -395,15 +390,14 @@
namespace over_load
{
- // ?
template <int n>
inline
void
from_to_(const value::rgb<n>& from,
- value::hsv_<value::circular<n, 0, 360>, float, float>& to)
+ value::hsv_<value::circular<n, 0, 360>, float01_<n>, float01_<n> >& to)
{
to = fun::v2v::f_rgb_to_hsv_<
- value::hsv_<value::circular<n, 0, 360>, float, float> >(from);
+ value::hsv_<value::circular<n, 0, 360>, float01_<n>, float01_<n> > >(from);
}
} // end of namespace mln::convert::over_load
1
0
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-05-19 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Extend plot I/O with load() function.
* mln/io/all.hh: Update plot/ entries.
* mln/io/plot/all.hh: New file including plot/ files.
* mln/io/plot/load.hh: New draft for plot loading, nonfunctional.
* mln/io/plot/save.hh: Update delimiter to simple whitespace.
* mln/labeling/compute.hh: Allow accumulator array to be
passed as an argument.
---
io/all.hh | 1
io/plot/all.hh | 50 +++++++++++++++++++++
io/plot/load.hh | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++
io/plot/save.hh | 7 ---
labeling/compute.hh | 79 ++++++++++++++++++++++++++++++++++
5 files changed, 251 insertions(+), 5 deletions(-)
Index: trunk/milena/mln/io/all.hh
===================================================================
--- trunk/milena/mln/io/all.hh (revision 3854)
+++ trunk/milena/mln/io/all.hh (revision 3855)
@@ -53,6 +53,7 @@
# include <mln/io/pbm/all.hh>
# include <mln/io/pfm/all.hh>
# include <mln/io/pgm/all.hh>
+# include <mln/io/plot/all.hh>
# include <mln/io/pnm/all.hh>
# include <mln/io/ppm/all.hh>
# include <mln/io/tiff/all.hh>
Index: trunk/milena/mln/io/plot/all.hh
===================================================================
--- trunk/milena/mln/io/plot/all.hh (revision 0)
+++ trunk/milena/mln/io/plot/all.hh (revision 3855)
@@ -0,0 +1,50 @@
+// 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.
+
+#ifndef MLN_IO_PLOT_ALL_HH
+# define MLN_IO_PLOT_ALL_HH
+
+/// \file mln/io/plot/all.hh
+///
+/// File that includes all plot io materials.
+
+
+namespace mln
+{
+
+ namespace io
+ {
+ /// Namespace of plot input/output handling.
+ namespace plot {}
+ }
+
+}
+
+# include <mln/io/plot/load.hh>
+# include <mln/io/plot/save.hh>
+
+#endif // ! MLN_IO_PLOT_ALL_HH
Index: trunk/milena/mln/io/plot/save.hh
===================================================================
--- trunk/milena/mln/io/plot/save.hh (revision 3854)
+++ trunk/milena/mln/io/plot/save.hh (revision 3855)
@@ -36,10 +36,7 @@
# include <iostream>
# include <fstream>
# include <mln/core/image/image1d.hh>
-# include <mln/metal/equal.hh>
# include <mln/util/array.hh>
-# include <mln/value/int_u8.hh>
-# include <mln/value/rgb8.hh>
namespace mln
@@ -88,7 +85,7 @@
std::ofstream file_out(filename.c_str());
for (unsigned i = 0; i < ima.ninds(); ++i)
- file_out << start_value + i << ", " << ima.at_(i) << std::endl;
+ file_out << start_value + i << " " << ima.at_(i) << std::endl;
trace::exiting("mln::io::plot::save");
}
@@ -102,7 +99,7 @@
std::ofstream file_out(filename.c_str());
for (unsigned i = 0; i < arr.nelements(); ++i)
- file_out << start_value + i << ", " << arr[i] << std::endl;
+ file_out << start_value + i << " " << arr[i] << std::endl;
trace::exiting("mln::io::plot::save");
}
Index: trunk/milena/mln/io/plot/load.hh
===================================================================
--- trunk/milena/mln/io/plot/load.hh (revision 0)
+++ trunk/milena/mln/io/plot/load.hh (revision 3855)
@@ -0,0 +1,119 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+//
+// 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_IO_PLOT_LOAD_HH
+# define MLN_IO_PLOT_LOAD_HH
+
+///
+/// \file mln/io/plot/load.hh
+///
+/// Define a routine which loads in a plot format.
+
+# include <iostream>
+# include <fstream>
+# include <mln/core/image/image1d.hh>
+# include <mln/metal/equal.hh>
+# include <mln/util/array.hh>
+# include <mln/value/int_u8.hh>
+# include <mln/value/rgb8.hh>
+
+
+namespace mln
+{
+
+ namespace io
+ {
+
+ namespace plot
+ {
+
+ /*! Load a Milena 1D image from a plot file.
+ *
+ * \param[in] ima A reference to the image to load.
+ * \param[out] filename The output file.
+ * \param[in] start_value The start index value of the plot
+ * (optional).
+ */
+ template <typename I>
+ void load(image1d<I>& ima,
+ const std::string& filename);
+
+ /*! Load a Milena array from a plot file.
+ *
+ * \param[in] arr A reference to the array to load.
+ * \param[out] filename The output file.
+ * \param[in] start_value The start index value of the plot
+ * (optional).
+ */
+ template <typename I>
+ void load(util::array<I>& arr,
+ const std::string& filename);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ template <typename I>
+ inline
+ void load(image1d<I>& ima, const std::string& filename)
+ {
+ trace::entering("mln::io::plot::load");
+
+ std::ifstream file_out(filename.c_str());
+ for (unsigned i = 0; i < ima.ninds(); ++i)
+ file_out << start_value + i << ", " << ima.at_(i) << std::endl;
+
+ trace::exiting("mln::io::plot::load");
+ }
+
+ template <typename I>
+ inline
+ void load(util::array<I>& arr, const std::string& filename)
+ {
+ trace::entering("mln::io::plot::load");
+
+ std::ifstream file_out(filename.c_str());
+ while (!oef)
+ {
+ if (line is comment)
+ continue;
+ }
+
+ trace::exiting("mln::io::plot::load");
+ }
+
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::io::plot
+
+ } // end of namespace mln::io
+
+} // end of namespace mln
+
+
+#endif // ! MLN_IO_PLOT_LOAD_HH
Index: trunk/milena/mln/labeling/compute.hh
===================================================================
--- trunk/milena/mln/labeling/compute.hh (revision 3854)
+++ trunk/milena/mln/labeling/compute.hh (revision 3855)
@@ -63,6 +63,23 @@
/// Compute an accumulator onto the pixel values of the image \p input.
/// for each component of the image \p label.
///
+ /// \param[in] a An array of accumulator.
+ /// \param[in] input The input image.
+ /// \param[in] label The labeled image.
+ /// \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(util::array<A>& a,
+ const Image<I>& input,
+ 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 An accumulator.
/// \param[in] input The input image.
/// \param[in] label The labeled image.
@@ -227,6 +244,35 @@
return res;
}
+ template <typename A, typename I, typename L>
+ inline
+ util::array<mln_result(A)>
+ compute(util::array<A>& accus,
+ const Image<I>& input_,
+ const Image<L>& label_,
+ const mln_value(L)& nlabels)
+ {
+ trace::entering("labeling::impl::generic::compute");
+ //internal::compute_tests(a_, input_, label_, nlabels);
+
+ //const A& a = exact(a_);
+ const I& input = exact(input_);
+ const L& label = exact(label_);
+
+ // FIXME: Check accus size with nlabels.
+ //util::array<A> accus(static_cast<unsigned>(nlabels) + 1, a);
+
+ mln_piter(I) p(input.domain());
+ for_all(p)
+ accus[label(p)].take(input(p));
+
+ util::array<mln_result(A)> res;
+ convert::from_to(accus, res);
+
+ trace::exiting("labeling::impl::generic::compute");
+ return res;
+ }
+
} // end of namespace mln::labeling::impl::generic
} // end of namespace mln::labeling::impl
@@ -236,6 +282,7 @@
namespace internal
{
+
template <typename A, typename L>
inline
util::array<mln_result(A)>
@@ -258,6 +305,19 @@
return impl::generic::compute(a, input, label, nlabels);
}
+
+ template <typename A, typename I, typename L>
+ inline
+ util::array<mln_result(A)>
+ compute_dispatch(util::array<A>& a,
+ const Image<I>& input,
+ const Image<L>& label,
+ const mln_value(L)& nlabels)
+ {
+ return impl::generic::compute(a, input, label, nlabels);
+ }
+
+
} // end of namespace mln::labeling::internal
@@ -267,6 +327,25 @@
template <typename A, typename I, typename L>
inline
util::array<mln_result(A)>
+ compute(util::array<A>& a,
+ const Image<I>& input,
+ const Image<L>& label,
+ const mln_value(L)& nlabels)
+ {
+ trace::entering("labeling::compute");
+
+ //internal::compute_tests(a, input, label, nlabels);
+
+ typedef util::array<mln_result(A)> R;
+ R res = internal::compute_dispatch(a, input, label, nlabels);
+
+ trace::exiting("labeling::compute");
+ return res;
+ }
+
+ template <typename A, typename I, typename L>
+ inline
+ util::array<mln_result(A)>
compute(const Accumulator<A>& a,
const Image<I>& input,
const Image<L>& label,
1
0