* binarization/sauvola_threshold.hh: Help g++ 4.1 find an
unambiguous overload of std::pow.
---
scribo/ChangeLog | 7 +++++++
scribo/src/binarization/sauvola_ms.cc | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 160ced4..2375a50 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-09 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Help g++ 4.1 compile Scribo.
+
+ * binarization/sauvola_threshold.hh: Help g++ 4.1 find an
+ unambiguous overload of std::pow.
+
2010-03-31 Roland Levillain <roland(a)lrde.epita.fr>
Have Scribo compile again.
diff --git a/scribo/src/binarization/sauvola_ms.cc
b/scribo/src/binarization/sauvola_ms.cc
index 196a15c..30742a3 100644
--- a/scribo/src/binarization/sauvola_ms.cc
+++ b/scribo/src/binarization/sauvola_ms.cc
@@ -303,7 +303,7 @@ int main(int argc, char *argv[])
// Additional subscales.
for (unsigned i = 1; i < nb_subscale; ++i)
{
- unsigned ratio = std::pow(q, i);
+ unsigned ratio = std::pow(float(q), int(i));
// std::cout << "Scale " << 2 + i << " - 1/"
<< s * ratio << std::endl;
timer_.restart();
unsigned
@@ -332,7 +332,7 @@ int main(int argc, char *argv[])
for (int i = nb_subscale - 1; i >= 0; --i)
{
- unsigned ratio = std::pow(q, i);
+ unsigned ratio = std::pow(float(q), int(i));
std::cout << "Scale " << 2 + i << " - 1/"
<< s * ratio << " merged" << std::endl;
@@ -369,7 +369,7 @@ int main(int argc, char *argv[])
mln::fun::i2v::array<value::int_u16> f(nb_subscale, 0);
for (unsigned i = 0; i < nb_subscale; ++i)
{
- unsigned ratio = std::pow(q, i);
+ unsigned ratio = std::pow(float(q), int(i));
f(i) = ratio * w;
}
--
1.5.6.5