* scribo/binarization/local_threshold.hh,
* scribo/core/central_sites.hh,
* scribo/debug/save_table_image.hh,
* scribo/filter/object_groups_with_holes.hh,
* scribo/fun/v2b/objects_large_filter.hh,
* scribo/make/influence_zone_graph.hh,
* scribo/postprocessing/fill_object_holes.hh: Fix namespace
ambiguities.
* scribo/toolchain/text_in_doc_preprocess.hh: Fix arguments.
* scribo/toolchain/internal/text_in_doc_preprocess_functor.hh,
* scribo/util/integral_sub_sum_sum2_functor.hh: Use namespace mln.
* scribo/util/compute_sub_domains.hh,
* scribo/util/integral_sum_sum2_functor.hh,
* scribo/util/integral_sum_sum2_global_min_functor.hh,
* src/contest/hdibco-2010/sauvola_ms_hdibco.cc: Add missing
include.
* scribo/io/img/save.hh: Use box2d constructor.
---
scribo/ChangeLog | 26 ++++++++++++++++++++
scribo/scribo/binarization/local_threshold.hh | 6 ++--
scribo/scribo/core/central_sites.hh | 7 +++--
scribo/scribo/debug/save_table_image.hh | 19 +++++++-------
scribo/scribo/filter/object_groups_with_holes.hh | 7 +++--
scribo/scribo/fun/v2b/objects_large_filter.hh | 5 ++-
scribo/scribo/io/img/save.hh | 4 +-
scribo/scribo/make/influence_zone_graph.hh | 9 ++++---
scribo/scribo/postprocessing/fill_object_holes.hh | 19 ++++++++------
.../internal/text_in_doc_preprocess_functor.hh | 2 +
scribo/scribo/toolchain/text_in_doc_preprocess.hh | 8 +++++-
scribo/scribo/util/compute_sub_domains.hh | 4 ++-
.../scribo/util/integral_sub_sum_sum2_functor.hh | 5 ++++
scribo/scribo/util/integral_sum_sum2_functor.hh | 4 ++-
.../util/integral_sum_sum2_global_min_functor.hh | 4 ++-
.../src/contest/hdibco-2010/sauvola_ms_hdibco.cc | 5 ++-
16 files changed, 94 insertions(+), 40 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index a45be28..4f1d5b9 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,29 @@
+2013-03-07 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix compilation issues.
+
+ * scribo/binarization/local_threshold.hh,
+ * scribo/core/central_sites.hh,
+ * scribo/debug/save_table_image.hh,
+ * scribo/filter/object_groups_with_holes.hh,
+ * scribo/fun/v2b/objects_large_filter.hh,
+ * scribo/make/influence_zone_graph.hh,
+ * scribo/postprocessing/fill_object_holes.hh: Fix namespace
+ ambiguities.
+
+ * scribo/toolchain/text_in_doc_preprocess.hh: Fix arguments.
+
+ * scribo/toolchain/internal/text_in_doc_preprocess_functor.hh,
+ * scribo/util/integral_sub_sum_sum2_functor.hh: Use namespace mln.
+
+ * scribo/util/compute_sub_domains.hh,
+ * scribo/util/integral_sum_sum2_functor.hh,
+ * scribo/util/integral_sum_sum2_global_min_functor.hh,
+ * src/contest/hdibco-2010/sauvola_ms_hdibco.cc: Add missing
+ include.
+
+ * scribo/io/img/save.hh: Use box2d constructor.
+
2013-03-01 Guillaume Lazzara <z(a)lrde.epita.fr>
Rename point_at_index and index_of_point.
diff --git a/scribo/scribo/binarization/local_threshold.hh
b/scribo/scribo/binarization/local_threshold.hh
index e7b0f5d..cb3f071 100644
--- a/scribo/scribo/binarization/local_threshold.hh
+++ b/scribo/scribo/binarization/local_threshold.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -162,7 +162,7 @@ namespace scribo
trait::image::speed::any,
const Image<I>& input, const Image<T>& threshold)
{
- return impl::generic::local_threshold(input, threshold);
+ return binarization::impl::generic::local_threshold(input, threshold);
}
@@ -172,7 +172,7 @@ namespace scribo
trait::image::speed::fastest,
const Image<I>& input, const Image<T>& threshold)
{
- return impl::local_threshold_fastest(input, threshold);
+ return binarization::impl::local_threshold_fastest(input, threshold);
}
template <typename I, typename T>
diff --git a/scribo/scribo/core/central_sites.hh b/scribo/scribo/core/central_sites.hh
index 275ba51..47e92d9 100644
--- a/scribo/scribo/core/central_sites.hh
+++ b/scribo/scribo/core/central_sites.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -60,7 +61,7 @@ namespace scribo
**
*/
template <typename P>
- util::couple<P,P>
+ mln::util::couple<P,P>
central_sites(const box<P>& b, unsigned dim);
@@ -69,7 +70,7 @@ namespace scribo
template <typename P>
inline
- util::couple<P,P>
+ mln::util::couple<P,P>
central_sites(const box<P>& b, unsigned dim)
{
trace::entering("scribo::central_sites");
diff --git a/scribo/scribo/debug/save_table_image.hh
b/scribo/scribo/debug/save_table_image.hh
index 746d162..5de6dfc 100644
--- a/scribo/scribo/debug/save_table_image.hh
+++ b/scribo/scribo/debug/save_table_image.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -56,8 +57,8 @@ namespace scribo
template <typename I>
void
save_table_image(const Image<I>& input_,
- util::couple<util::array<box<mln_site(I)> >,
- util::array<box<mln_site(I)> > > tableboxes,
+ mln::util::couple<mln::util::array<box<mln_site(I)> >,
+ mln::util::array<box<mln_site(I)> > > tableboxes,
const value::rgb8& bbox_color,
const std::string& filename);
@@ -67,8 +68,8 @@ namespace scribo
template <typename S>
void
save_table_image(const Site_Set<S>& input_domain,
- util::couple<util::array<box<mln_site(S)> >,
- util::array<box<mln_site(S)> > > tableboxes,
+ mln::util::couple<mln::util::array<box<mln_site(S)> >,
+ mln::util::array<box<mln_site(S)> > > tableboxes,
const value::rgb8& bg_color,
const value::rgb8& bbox_color,
const std::string& filename);
@@ -80,8 +81,8 @@ namespace scribo
template <typename I>
void
save_table_image(const Image<I>& input_,
- util::couple<util::array<box<mln_site(I)> >,
- util::array<box<mln_site(I)> > > tableboxes,
+ mln::util::couple<mln::util::array<box<mln_site(I)> >,
+ mln::util::array<box<mln_site(I)> > > tableboxes,
const value::rgb8& bbox_color,
const std::string& filename)
{
@@ -102,8 +103,8 @@ namespace scribo
template <typename S>
void
save_table_image(const Site_Set<S>& input_domain_,
- util::couple<util::array<box<mln_site(S)> >,
- util::array<box<mln_site(S)> > > tableboxes,
+ mln::util::couple<mln::util::array<box<mln_site(S)> >,
+ mln::util::array<box<mln_site(S)> > > tableboxes,
const value::rgb8& bg_color,
const value::rgb8& bbox_color,
const std::string& filename)
diff --git a/scribo/scribo/filter/object_groups_with_holes.hh
b/scribo/scribo/filter/object_groups_with_holes.hh
index 495d97e..1c5f1a1 100644
--- a/scribo/scribo/filter/object_groups_with_holes.hh
+++ b/scribo/scribo/filter/object_groups_with_holes.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -171,7 +172,7 @@ namespace scribo
// Will store the first background component id associated
// to a group.
- util::array<unsigned> bg_comps(
+ mln::util::array<unsigned> bg_comps(
value::next(components.nelements()), 0);
// Will 'True' if a group has at least two background
@@ -206,7 +207,7 @@ namespace scribo
// 1st pass
{
- util::array<int> dp = positive_offsets_wrt(lbl, nbh);
+ mln::util::array<int> dp = positive_offsets_wrt(lbl, nbh);
const unsigned n_nbhs = dp.nelements();
mln_bkd_pixter(const L) pxl(lbl); // Backward.
diff --git a/scribo/scribo/fun/v2b/objects_large_filter.hh
b/scribo/scribo/fun/v2b/objects_large_filter.hh
index bb41850..4ae7b27 100644
--- a/scribo/scribo/fun/v2b/objects_large_filter.hh
+++ b/scribo/scribo/fun/v2b/objects_large_filter.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -91,7 +92,7 @@ namespace scribo
mutable mln_value(L) nlabels_;
/// Has already been taken into account.
- mutable util::array<bool> marked_;
+ mutable mln::util::array<bool> marked_;
};
diff --git a/scribo/scribo/io/img/save.hh b/scribo/scribo/io/img/save.hh
index 13da5b1..e44b136 100644
--- a/scribo/scribo/io/img/save.hh
+++ b/scribo/scribo/io/img/save.hh
@@ -167,8 +167,8 @@ namespace scribo
mln_precondition(doc.is_valid());
const box2d& ima_domain = doc.image().domain();
- box2d domain = make::box2d(ima_domain.pmin() / reduction_factor,
- ima_domain.pmax() / reduction_factor);
+ box2d domain(ima_domain.pmin() / reduction_factor,
+ ima_domain.pmax() / reduction_factor);
mln::image2d<value::rgb8> output(domain);
data::fill(output, literal::black);
diff --git a/scribo/scribo/make/influence_zone_graph.hh
b/scribo/scribo/make/influence_zone_graph.hh
index c01fba1..9720814 100644
--- a/scribo/scribo/make/influence_zone_graph.hh
+++ b/scribo/scribo/make/influence_zone_graph.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -64,7 +65,7 @@ namespace scribo
///
/// \return a region adjacency graph.
template <typename I, typename N, typename V>
- util::graph
+ mln::util::graph
influence_zone_graph(const Image<I>& input_,
const Neighborhood<N>& nbh_,
const V& label_type,
@@ -74,7 +75,7 @@ namespace scribo
# ifndef MLN_INCLUDE_ONLY
template <typename I, typename N, typename V>
- util::graph
+ mln::util::graph
influence_zone_graph(const Image<I>& input_,
const Neighborhood<N>& nbh_,
const V& label_type,
@@ -96,7 +97,7 @@ namespace scribo
lbl_t iz = transform::influence_zone_geodesic(lbl, nbh, iz_dmax);
- util::graph g
+ mln::util::graph g
= mln::make::influence_zone_adjacency_graph(
iz | (pw::value(iz) != pw::cst(literal::zero)),
nbh, nlabels);
diff --git a/scribo/scribo/postprocessing/fill_object_holes.hh
b/scribo/scribo/postprocessing/fill_object_holes.hh
index 9552d2c..4bf8635 100644
--- a/scribo/scribo/postprocessing/fill_object_holes.hh
+++ b/scribo/scribo/postprocessing/fill_object_holes.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -173,9 +173,9 @@ namespace scribo
image2d<unsigned> parent, card;
L bboxes_ima;
- util::array<unsigned> bg_comps(
+ mln::util::array<unsigned> bg_comps(
value::next(components.nelements()), 0);
- util::array<bool> bg_comps_done(
+ mln::util::array<bool> bg_comps_done(
value::next(components.nelements()), false);
mln::fun::i2v::array<bool>
@@ -204,7 +204,7 @@ namespace scribo
// 1st pass
{
- util::array<int> dp = positive_offsets_wrt(lbl, nbh);
+ mln::util::array<int> dp = positive_offsets_wrt(lbl, nbh);
const unsigned n_nbhs = dp.nelements();
mln_bkd_pixter(const L) pxl(lbl); // Backward.
@@ -338,8 +338,11 @@ namespace scribo
typedef mln_ch_value(I, L) Li;
typedef accu::math::count<mln_site(Li)> A;
- typedef util::couple<Li, util::couple<util::array<unsigned>,
- util::array<A> > > res_t;
+ typedef
+ mln::util::couple<Li,
+ mln::util::couple<
+ mln::util::array<unsigned>,
+ mln::util::array<A> > > res_t;
// Holes card Image
@@ -349,7 +352,7 @@ namespace scribo
res_t res = labeling::blobs_and_compute(input, c8(), nlabels, A());
- util::array<unsigned>& holes_card = res.second().first();
+ mln::util::array<unsigned>& holes_card = res.second().first();
mln_ch_value(I, unsigned)
holes = data::transform(res.first(), holes_card);
@@ -363,7 +366,7 @@ namespace scribo
I input_i = logical::not_(input);
res = labeling::blobs_and_compute(input_i, c8(), nlabels, A());
- util::array<unsigned>& card = res.second().first();
+ mln::util::array<unsigned>& card = res.second().first();
for (unsigned i = 1; i < card.size(); ++i)
card(i) = unsigned(round(card(i) * ratio));
diff --git a/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
b/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
index aea02d8..9ce0e8f 100644
--- a/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
+++ b/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
@@ -53,6 +53,8 @@ namespace scribo
namespace internal
{
+ using namespace mln;
+
/*! \brief Enum of the binarization algorithms available.
Convert: Violently convert from color to binary.
diff --git a/scribo/scribo/toolchain/text_in_doc_preprocess.hh
b/scribo/scribo/toolchain/text_in_doc_preprocess.hh
index 4a48f7e..7a2ced9 100644
--- a/scribo/scribo/toolchain/text_in_doc_preprocess.hh
+++ b/scribo/scribo/toolchain/text_in_doc_preprocess.hh
@@ -111,8 +111,14 @@ namespace scribo
*/
template <typename I>
mln_ch_value(I,bool)
+ text_in_doc_preprocess(const Image<I>& input_, unsigned lambda,
+ double k2, double k3, double k4, bool enable_fg_bg,
+ Image<I>& fg, bool enable_deskew, bool verbose);
+
+ template <typename I>
+ mln_ch_value(I,bool)
text_in_doc_preprocess(const Image<I>& input, unsigned lambda,
- double K, bool enable_fg_bg, Image<I>& fg,
+ bool enable_fg_bg, Image<I>& fg,
bool enable_deskew, bool verbose);
diff --git a/scribo/scribo/util/compute_sub_domains.hh
b/scribo/scribo/util/compute_sub_domains.hh
index e81a88f..72dc0f0 100644
--- a/scribo/scribo/util/compute_sub_domains.hh
+++ b/scribo/scribo/util/compute_sub_domains.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -31,6 +32,7 @@
///
# include <mln/core/image/image2d.hh>
+# include <mln/util/couple.hh>
namespace scribo
{
diff --git a/scribo/scribo/util/integral_sub_sum_sum2_functor.hh
b/scribo/scribo/util/integral_sub_sum_sum2_functor.hh
index 7deba93..71e425d 100644
--- a/scribo/scribo/util/integral_sub_sum_sum2_functor.hh
+++ b/scribo/scribo/util/integral_sub_sum_sum2_functor.hh
@@ -31,6 +31,9 @@
///
///
+# include <mln/core/concept/image.hh>
+# include <mln/core/site_set/box.hh>
+# include <mln/make/box2d.hh>
# include <mln/util/couple.hh>
namespace scribo
@@ -39,6 +42,8 @@ namespace scribo
namespace util
{
+ using namespace mln;
+
template <typename I, typename S = mln_sum(mln_value(I))>
class integral_sub_sum_sum2_functor
{
diff --git a/scribo/scribo/util/integral_sum_sum2_functor.hh
b/scribo/scribo/util/integral_sum_sum2_functor.hh
index c166532..e39ba0a 100644
--- a/scribo/scribo/util/integral_sum_sum2_functor.hh
+++ b/scribo/scribo/util/integral_sum_sum2_functor.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -31,6 +32,7 @@
///
# include <mln/util/couple.hh>
+# include <mln/trait/value_.hh>
namespace scribo
{
diff --git a/scribo/scribo/util/integral_sum_sum2_global_min_functor.hh
b/scribo/scribo/util/integral_sum_sum2_global_min_functor.hh
index 20a61c0..14b0bbb 100644
--- a/scribo/scribo/util/integral_sum_sum2_global_min_functor.hh
+++ b/scribo/scribo/util/integral_sum_sum2_global_min_functor.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2012, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -31,6 +32,7 @@
///
# include <mln/util/couple.hh>
+# include <mln/trait/value_.hh>
namespace scribo
{
diff --git a/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
b/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
index 7ef2455..b7b6a87 100644
--- a/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
+++ b/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -76,7 +77,7 @@ int main(int argc, char *argv[])
// Binarize
image2d<bool>
- output = scribo::binarization::sauvola_ms(input, 101, 3, 0.4);
+ output = scribo::binarization::sauvola_ms(input, 101, 3, 0.4, 0.4, 0.4);
output = scribo::preprocessing::denoise_bg(output, c8(), 4);
output = scribo::postprocessing::fill_object_holes(output, 0.01f);
--
1.7.2.5