---
scribo/ChangeLog | 4 ++++
scribo/scribo/binarization/sauvola_threshold.hh | 6 +++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 6c79022..8b2cae5 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,9 @@
2012-08-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * scribo/binarization/sauvola_threshold.hh: Add some debug.
+
+2012-08-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Compute Sauvola on documents with light text and dark background.
* scribo/binarization/internal/compute_local_threshold.hh,
diff --git a/scribo/scribo/binarization/sauvola_threshold.hh
b/scribo/scribo/binarization/sauvola_threshold.hh
index df46e95..7950c13 100644
--- a/scribo/scribo/binarization/sauvola_threshold.hh
+++ b/scribo/scribo/binarization/sauvola_threshold.hh
@@ -44,7 +44,7 @@
# include <scribo/binarization/internal/compute_local_threshold.hh>
# include <scribo/binarization/internal/sauvola_formula.hh>
-
+extern std::string prefix;
namespace scribo
{
@@ -130,6 +130,7 @@ namespace scribo
# ifdef SCRIBO_LOCAL_THRESHOLD_DEBUG
initialize(internal::debug_mean, input);
initialize(internal::debug_stddev, input);
+
initialize(internal::debug_threshold, input);
initialize(internal::debug_alpham, input);
initialize(internal::debug_alphacond, input);
@@ -262,6 +263,9 @@ namespace scribo
simple = init_integral_image(input, scribo::internal::identity_),
squared = init_integral_image(input, scribo::internal::square_);
+ io::dump::save(simple, prefix + "simple.dump");
+ io::dump::save(squared, prefix + "squared.dump");
+
return sauvola_threshold(input, window_size,
K, simple, squared);
}
--
1.7.2.5
Show replies by date