---
scribo/ChangeLog | 5 +++++
.../binarization/internal/sauvola_ms_functor.hh | 16 +++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 1b58c52..20b7c94 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,10 @@
2013-03-07 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * scribo/binarization/internal/sauvola_ms_functor.hh: Handle
+ global variables correctly.
+
+2013-03-07 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Remove scribo/sandbox.
* sandbox/ChangeLog,
diff --git a/scribo/scribo/binarization/internal/sauvola_ms_functor.hh
b/scribo/scribo/binarization/internal/sauvola_ms_functor.hh
index 020caa9..84a205c 100644
--- a/scribo/scribo/binarization/internal/sauvola_ms_functor.hh
+++ b/scribo/scribo/binarization/internal/sauvola_ms_functor.hh
@@ -54,9 +54,9 @@ namespace scribo
namespace internal
{
- double k2 = SCRIBO_DEFAULT_SAUVOLA_K;
- double k3 = SCRIBO_DEFAULT_SAUVOLA_K;
- double k4 = SCRIBO_DEFAULT_SAUVOLA_K;
+ extern double k2;
+ extern double k3;
+ extern double k4;
using namespace mln;
@@ -104,6 +104,16 @@ namespace scribo
# ifndef MLN_INCLUDE_ONLY
+
+# ifndef MLN_WO_GLOBAL_VARS
+
+ double k2 = SCRIBO_DEFAULT_SAUVOLA_K;
+ double k3 = SCRIBO_DEFAULT_SAUVOLA_K;
+ double k4 = SCRIBO_DEFAULT_SAUVOLA_K;
+
+# endif // ! MLN_WO_GLOBAL_VARS
+
+
inline
unsigned my_find_root(image2d<unsigned>& parent, unsigned x)
{
--
1.7.2.5
Show replies by date