* scribo/binarization/sauvola_ms.hh,
* scribo/binarization/sauvola_threshold_image.hh,
* scribo/preprocessing/deskew.hh,
* scribo/subsampling/integral_single_image.hh: Add mln:: prefix.
---
scribo/ChangeLog | 9 ++++++
scribo/scribo/binarization/sauvola_ms.hh | 28 ++++++++++---------
.../scribo/binarization/sauvola_threshold_image.hh | 9 +++---
scribo/scribo/preprocessing/deskew.hh | 7 +++--
scribo/scribo/subsampling/integral_single_image.hh | 7 +++-
5 files changed, 38 insertions(+), 22 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index dc6c426..8b7d143 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix namespace ambiguities.
+
+ * scribo/binarization/sauvola_ms.hh,
+ * scribo/binarization/sauvola_threshold_image.hh,
+ * scribo/preprocessing/deskew.hh,
+ * scribo/subsampling/integral_single_image.hh: Add mln:: prefix.
+
2010-08-24 Guillaume Lazzara <z(a)lrde.epita.fr>
* scribo/core/line_info.hh: Make stats computation more robust
diff --git a/scribo/scribo/binarization/sauvola_ms.hh
b/scribo/scribo/binarization/sauvola_ms.hh
index e767b86..81169a1 100644
--- a/scribo/scribo/binarization/sauvola_ms.hh
+++ b/scribo/scribo/binarization/sauvola_ms.hh
@@ -755,25 +755,27 @@ namespace scribo
{
util::array<util::couple<unsigned, unsigned> > n(n_scales + 2);
- n(1) = make::couple(ima.nrows(), ima.ncols());
- n(2) = make::couple(sub(n(1).first(), s),
- sub(n(1).second(), s));
+ n(1) = mln::make::couple(ima.nrows(), ima.ncols());
+ n(2) = mln::make::couple(sub(n(1).first(), s),
+ sub(n(1).second(), s));
for (unsigned i = 3; i <= n_scales + 1; ++i)
- n(i) = make::couple(sub(n(i - 1).first(), 2),
- sub(n(i - 1).second(), 2));
+ n(i) = mln::make::couple(sub(n(i - 1).first(), 2),
+ sub(n(i - 1).second(), 2));
util::array<util::couple<mln_domain(I), unsigned> > out(n.size());
- out(0) = make::couple(make::box2d(1,1), 1u);
- out(1) = make::couple(make::box2d(ima.nrows(), ima.ncols()), 2u);
- out(n_scales + 1) = make::couple(make::box2d(n(n_scales + 1).first(),
- n(n_scales + 1).second()),
- 1u);
+ out(0) = mln::make::couple(mln::make::box2d(1,1), 1u);
+ out(1) = mln::make::couple(mln::make::box2d(ima.nrows(),
+ ima.ncols()), 2u);
+ out(n_scales + 1) = mln::make::couple(
+ mln::make::box2d(n(n_scales + 1).first(),
+ n(n_scales + 1).second()), 1u);
for (unsigned i = n_scales; i > 1; --i)
- out(i) = make::couple(make::box2d(2 * out(i + 1).first().nrows(),
- 2 * out(i + 1).first().ncols()),
- 2 * out(i + 1).second());
+ out(i) = mln::make::couple(
+ mln::make::box2d(2 * out(i + 1).first().nrows(),
+ 2 * out(i + 1).first().ncols()),
+ 2 * out(i + 1).second());
out(1).second() = std::max(out(2).first().ncols() * s - ima.ncols(),
out(2).first().nrows() * s - ima.nrows());
diff --git a/scribo/scribo/binarization/sauvola_threshold_image.hh
b/scribo/scribo/binarization/sauvola_threshold_image.hh
index 0225d37..2f63b87 100644
--- a/scribo/scribo/binarization/sauvola_threshold_image.hh
+++ b/scribo/scribo/binarization/sauvola_threshold_image.hh
@@ -432,11 +432,12 @@ namespace scribo
mln_concrete(I) output;
initialize(output, input);
- const def::coord nrows = static_cast<def::coord>(input.nrows());
- const def::coord ncols = static_cast<def::coord>(input.ncols());
+ const mln::def::coord
+ nrows = static_cast<mln::def::coord>(input.nrows()),
+ ncols = static_cast<mln::def::coord>(input.ncols());
- for(def::coord row = 0; row < nrows; ++row)
- for(def::coord col = 0; col < ncols; ++col)
+ for(mln::def::coord row = 0; row < nrows; ++row)
+ for(mln::def::coord col = 0; col < ncols; ++col)
convert::from_to(
internal::compute_sauvola_threshold(P(row, col), simple,
squared, window_size,
diff --git a/scribo/scribo/preprocessing/deskew.hh
b/scribo/scribo/preprocessing/deskew.hh
index 9b86ff7..234ffd6 100644
--- a/scribo/scribo/preprocessing/deskew.hh
+++ b/scribo/scribo/preprocessing/deskew.hh
@@ -227,7 +227,8 @@ namespace scribo
double rho_index = (0.5 + (rho / hough.mrho() + 0.5)
* hough.mrhoi());
- ++(opt::at(hough.acc(), static_cast<def::coord>(rho_index), i));
+ ++(opt::at(hough.acc(),
+ static_cast<mln::def::coord>(rho_index), i));
}
}
@@ -420,8 +421,8 @@ namespace scribo
output = geom::rotate(input_gl, - angle,
//mln_max(mln_value(I)),
extend(input_gl, mln_max(mln_value(I))),
- make::box2d(input_gl.nrows(),
- input_gl.ncols()));
+ mln::make::box2d(input_gl.nrows(),
+ input_gl.ncols()));
trace::exiting("scribo::preprocessing::deskew");
return output;
diff --git a/scribo/scribo/subsampling/integral_single_image.hh
b/scribo/scribo/subsampling/integral_single_image.hh
index 077172a..3404c69 100644
--- a/scribo/scribo/subsampling/integral_single_image.hh
+++ b/scribo/scribo/subsampling/integral_single_image.hh
@@ -32,6 +32,8 @@
/// Both subsampling and integral image computation.
#include <mln/core/concept/image.hh>
+#include <mln/core/concept/box.hh>
+#include <mln/make/box2d.hh>
#include <mln/metal/equal.hh>
#include <mln/extension/fill.hh>
#include <mln/debug/println.hh>
@@ -440,8 +442,9 @@ namespace scribo
mln_precondition(input.domain().pmin() == literal::origin);
mln_precondition(scale > 1);
- box<mln_site(I)> b = make::box2d((input.nrows() + scale - 1) / scale,
- (input.ncols() + scale - 1) / scale);
+ box<mln_site(I)>
+ b = mln::make::box2d((input.nrows() + scale - 1) / scale,
+ (input.ncols() + scale - 1) / scale);
mln_concrete(I) output;
output = integral(input_, scale, integral_sum_sum_2,
b, mln::border::thickness);
--
1.5.6.5