* scribo/binarization/all.hh: Add missing includes.
* scribo/binarization/internal/niblack_threshold_functor.hh,
* scribo/binarization/internal/sauvola_threshold_functor.hh: Add
input image as attribute.
---
scribo/ChangeLog | 10 ++++++++++
scribo/scribo/binarization/all.hh | 6 ++++++
.../internal/niblack_threshold_functor.hh | 6 ++++--
.../internal/sauvola_threshold_functor.hh | 8 +++++---
4 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 1fd80aa..bc93c4f 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,15 @@
2013-03-22 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Small fixes.
+
+ * scribo/binarization/all.hh: Add missing includes.
+
+ * scribo/binarization/internal/niblack_threshold_functor.hh,
+ * scribo/binarization/internal/sauvola_threshold_functor.hh: Add
+ input image as attribute.
+
+2013-03-22 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Share a functor used in Wolf's binarization.
* scribo/binarization/internal/global_max_stddev_functor.hh: New.
diff --git a/scribo/scribo/binarization/all.hh b/scribo/scribo/binarization/all.hh
index d05f996..ef45487 100644
--- a/scribo/scribo/binarization/all.hh
+++ b/scribo/scribo/binarization/all.hh
@@ -51,14 +51,20 @@ namespace scribo
# include <scribo/binarization/local_threshold.hh>
# include <scribo/binarization/niblack.hh>
+# include <scribo/binarization/niblack_fast.hh>
+# include <scribo/binarization/niblack_threshold.hh>
# include <scribo/binarization/otsu.hh>
+# include <scribo/binarization/otsu_threshold.hh>
# include <scribo/binarization/sauvola.hh>
# include <scribo/binarization/sauvola_ms.hh>
# include <scribo/binarization/sauvola_ms_split.hh>
# include <scribo/binarization/sauvola_threshold.hh>
+# include <scribo/binarization/singh.hh>
+
# include <scribo/binarization/wolf.hh>
+# include <scribo/binarization/wolf_fast.hh>
#endif // ! SCRIBO_BINARIZATION_ALL_HH
diff --git a/scribo/scribo/binarization/internal/niblack_threshold_functor.hh
b/scribo/scribo/binarization/internal/niblack_threshold_functor.hh
index d26d733..621ccd8 100644
--- a/scribo/scribo/binarization/internal/niblack_threshold_functor.hh
+++ b/scribo/scribo/binarization/internal/niblack_threshold_functor.hh
@@ -77,6 +77,7 @@ namespace scribo
typedef mln_concrete(I) th_t;
th_t output;
+ mln_concrete(I) input;
mln_value(I)* po;
@@ -94,9 +95,10 @@ namespace scribo
template <typename I>
niblack_threshold_functor<I>::niblack_threshold_functor(const
Image<I>& input_,
double K)
- : K_(K)
+ : input(input_),
+ K_(K)
{
- mln_precondition(exact(input).is_valid());
+ mln_precondition(exact(input_).is_valid());
mln_precondition(K > 0.);
}
diff --git a/scribo/scribo/binarization/internal/sauvola_threshold_functor.hh
b/scribo/scribo/binarization/internal/sauvola_threshold_functor.hh
index 19b7bf3..bea9d14 100644
--- a/scribo/scribo/binarization/internal/sauvola_threshold_functor.hh
+++ b/scribo/scribo/binarization/internal/sauvola_threshold_functor.hh
@@ -66,7 +66,7 @@ namespace scribo
sauvola_threshold_functor(const Image<I>& input,
double K, double R);
- init();
+ void init();
// Run every 4 pixels.
void exec(double mean, double stddev);
@@ -77,6 +77,7 @@ namespace scribo
typedef mln_concrete(I) th_t;
th_t output;
+ mln_concrete(I) input;
mln_value(I)* po;
@@ -93,9 +94,10 @@ namespace scribo
#ifndef MLN_INCLUDE_ONLY
template <typename I>
- sauvola_threshold_functor<I>::sauvola_threshold_functor(const
Image<I>& input_,
+ sauvola_threshold_functor<I>::sauvola_threshold_functor(const
Image<I>& input,
double K, double R)
- : K_(K),
+ : input(input),
+ K_(K),
R_(R)
{
mln_precondition(exact(input).is_valid());
--
1.7.2.5
Show replies by date