* scribo/toolchain/internal/text_in_doc_preprocess_functor.hh,
* src/binarization/ppm_sauvola.cc,
* src/binarization/ppm_sauvola_ms.cc,
* src/binarization/ppm_sauvola_ms_fg.cc,
* src/binarization/ppm_sauvola_ms_split.cc,
* src/binarization/sauvola.cc,
* src/binarization/sauvola_debug.cc,
* src/binarization/sauvola_ms.cc,
* src/binarization/sauvola_ms_debug.cc,
* src/binarization/sauvola_ms_fg.cc,
* src/text_in_picture.cc,
* src/text_in_picture_neg.cc,
* src/text_recognition_in_picture.cc: Here.
---
scribo/ChangeLog | 18 ++++++++++++++++++
.../internal/text_in_doc_preprocess_functor.hh | 7 ++++---
scribo/src/binarization/ppm_sauvola.cc | 9 +++++----
scribo/src/binarization/ppm_sauvola_ms.cc | 9 +++++----
scribo/src/binarization/ppm_sauvola_ms_fg.cc | 8 ++++----
scribo/src/binarization/ppm_sauvola_ms_split.cc | 5 ++---
scribo/src/binarization/sauvola.cc | 4 ++--
scribo/src/binarization/sauvola_debug.cc | 8 ++++----
scribo/src/binarization/sauvola_ms.cc | 9 +++++----
scribo/src/binarization/sauvola_ms_debug.cc | 9 +++++----
scribo/src/binarization/sauvola_ms_fg.cc | 8 ++++----
scribo/src/text_in_picture.cc | 7 ++++---
scribo/src/text_in_picture_neg.cc | 5 ++---
scribo/src/text_recognition_in_picture.cc | 9 +++++----
14 files changed, 69 insertions(+), 46 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 7d766e9..9abe919 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,23 @@
2011-03-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Make use of mln::fun::v2v::rgb_to_luma.
+
+ * scribo/toolchain/internal/text_in_doc_preprocess_functor.hh,
+ * src/binarization/ppm_sauvola.cc,
+ * src/binarization/ppm_sauvola_ms.cc,
+ * src/binarization/ppm_sauvola_ms_fg.cc,
+ * src/binarization/ppm_sauvola_ms_split.cc,
+ * src/binarization/sauvola.cc,
+ * src/binarization/sauvola_debug.cc,
+ * src/binarization/sauvola_ms.cc,
+ * src/binarization/sauvola_ms_debug.cc,
+ * src/binarization/sauvola_ms_fg.cc,
+ * src/text_in_picture.cc,
+ * src/text_in_picture_neg.cc,
+ * src/text_recognition_in_picture.cc: Here.
+
+2011-03-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
* scribo/io/xml/load.hh: New XML loader.
2011-03-01 Guillaume Lazzara <z(a)lrde.epita.fr>
diff --git a/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
b/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
index 6a9506b..6c0dd5a 100644
--- a/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
+++ b/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2011 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -29,7 +30,7 @@
#include <mln/core/concept/image.hh>
#include <mln/data/transform.hh>
#include <mln/data/convert.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <mln/subsampling/antialiased.hh>
#include <scribo/binarization/sauvola.hh>
@@ -208,7 +209,7 @@ namespace scribo
on_new_progress_label("Convert to gray-scale image");
image2d<value::int_u8>
intensity_ima = mln::data::transform(input_rgb,
- mln::fun::v2v::rgb_to_int_u<8>());
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
on_progress();
diff --git a/scribo/src/binarization/ppm_sauvola.cc
b/scribo/src/binarization/ppm_sauvola.cc
index f0cd355..4732a02 100644
--- a/scribo/src/binarization/ppm_sauvola.cc
+++ b/scribo/src/binarization/ppm_sauvola.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -27,7 +27,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/pbm/save.hh>
#include <mln/data/transform.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <scribo/binarization/sauvola.hh>
#include <scribo/debug/usage.hh>
@@ -74,7 +74,8 @@ int main(int argc, char *argv[])
// Convert to Gray level image.
image2d<value::int_u8>
- input_gl = data::transform(input, mln::fun::v2v::rgb_to_int_u<8>());
+ input_gl = data::transform(input,
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
// Binarize
image2d<bool> out = scribo::binarization::sauvola(input_gl, w, k);
diff --git a/scribo/src/binarization/ppm_sauvola_ms.cc
b/scribo/src/binarization/ppm_sauvola_ms.cc
index eb694c2..cff28f9 100644
--- a/scribo/src/binarization/ppm_sauvola_ms.cc
+++ b/scribo/src/binarization/ppm_sauvola_ms.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -29,7 +29,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/pbm/save.hh>
#include <mln/data/transform.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <scribo/binarization/sauvola_ms.hh>
#include <scribo/debug/usage.hh>
@@ -110,7 +110,8 @@ int main(int argc, char *argv[])
// Convert to Gray level image.
image2d<value::int_u8>
- input_1_gl = data::transform(input_1, mln::fun::v2v::rgb_to_int_u<8>());
+ input_1_gl = data::transform(input_1,
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
// Binarize
image2d<bool>
diff --git a/scribo/src/binarization/ppm_sauvola_ms_fg.cc
b/scribo/src/binarization/ppm_sauvola_ms_fg.cc
index 20f237f..a17ce9f 100644
--- a/scribo/src/binarization/ppm_sauvola_ms_fg.cc
+++ b/scribo/src/binarization/ppm_sauvola_ms_fg.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -31,7 +31,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/pbm/save.hh>
#include <mln/data/transform.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <scribo/binarization/sauvola_ms.hh>
#include <scribo/preprocessing/split_bg_fg.hh>
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
// Convert to Gray level image.
image2d<value::int_u8>
- fg_gl = data::transform(fg, mln::fun::v2v::rgb_to_int_u<8>());
+ fg_gl = data::transform(fg, mln::fun::v2v::rgb_to_luma<value::int_u8>());
// Binarize
image2d<bool>
diff --git a/scribo/src/binarization/ppm_sauvola_ms_split.cc
b/scribo/src/binarization/ppm_sauvola_ms_split.cc
index bb98b38..92a0817 100644
--- a/scribo/src/binarization/ppm_sauvola_ms_split.cc
+++ b/scribo/src/binarization/ppm_sauvola_ms_split.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -29,7 +29,6 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/pbm/save.hh>
#include <mln/data/transform.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
#include <scribo/binarization/sauvola_ms_split.hh>
#include <scribo/debug/usage.hh>
diff --git a/scribo/src/binarization/sauvola.cc b/scribo/src/binarization/sauvola.cc
index 0273071..e8047ab 100644
--- a/scribo/src/binarization/sauvola.cc
+++ b/scribo/src/binarization/sauvola.cc
@@ -29,7 +29,7 @@
#include <mln/io/magick/load.hh>
#include <mln/io/pbm/save.hh>
#include <mln/data/transform.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <scribo/binarization/sauvola.hh>
#include <scribo/debug/usage.hh>
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
// Convert to Gray level image.
image2d<value::int_u8>
- input_1_gl = data::transform(input, mln::fun::v2v::rgb_to_int_u<8>());
+ input_1_gl = data::transform(input,
mln::fun::v2v::rgb_to_luma<value::int_u8>());
image2d<bool> out = scribo::binarization::sauvola(input_1_gl, w, k);
diff --git a/scribo/src/binarization/sauvola_debug.cc
b/scribo/src/binarization/sauvola_debug.cc
index f723851..0c335a8 100644
--- a/scribo/src/binarization/sauvola_debug.cc
+++ b/scribo/src/binarization/sauvola_debug.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -32,7 +32,7 @@
#include <mln/data/convert.hh>
#include <mln/data/saturate.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <scribo/binarization/local_threshold.hh>
#include <scribo/binarization/sauvola.hh>
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
image2d<value::int_u8>
gima = data::transform(input,
- mln::fun::v2v::rgb_to_int_u<8>());
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
image2d<bool>
diff --git a/scribo/src/binarization/sauvola_ms.cc
b/scribo/src/binarization/sauvola_ms.cc
index 541b9e5..6d60ab4 100644
--- a/scribo/src/binarization/sauvola_ms.cc
+++ b/scribo/src/binarization/sauvola_ms.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -31,7 +31,7 @@
#include <mln/io/magick/load.hh>
#include <mln/io/pbm/save.hh>
#include <mln/data/transform.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <scribo/binarization/sauvola_ms.hh>
#include <scribo/debug/usage.hh>
@@ -115,7 +115,8 @@ int main(int argc, char *argv[])
// Convert to Gray level image.
image2d<value::int_u8>
- input_1_gl = data::transform(input_1, mln::fun::v2v::rgb_to_int_u<8>());
+ input_1_gl = data::transform(input_1,
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
// Binarize
image2d<bool>
diff --git a/scribo/src/binarization/sauvola_ms_debug.cc
b/scribo/src/binarization/sauvola_ms_debug.cc
index 6bf9837..70c1a9a 100644
--- a/scribo/src/binarization/sauvola_ms_debug.cc
+++ b/scribo/src/binarization/sauvola_ms_debug.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -29,7 +29,7 @@
#include <mln/io/magick/load.hh>
#include <mln/io/pbm/save.hh>
#include <mln/data/transform.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <scribo/binarization/sauvola_ms.hh>
#include <scribo/debug/usage.hh>
@@ -124,7 +124,8 @@ int main(int argc, char *argv[])
// Convert to Gray level image.
image2d<value::int_u8>
- input_1_gl = data::transform(input_1, mln::fun::v2v::rgb_to_int_u<8>());
+ input_1_gl = data::transform(input_1,
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
// Binarize.
diff --git a/scribo/src/binarization/sauvola_ms_fg.cc
b/scribo/src/binarization/sauvola_ms_fg.cc
index 4227db4..7ff9321 100644
--- a/scribo/src/binarization/sauvola_ms_fg.cc
+++ b/scribo/src/binarization/sauvola_ms_fg.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -31,7 +31,7 @@
#include <mln/io/magick/load.hh>
#include <mln/io/pbm/save.hh>
#include <mln/data/transform.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <scribo/binarization/sauvola_ms.hh>
#include <scribo/preprocessing/split_bg_fg.hh>
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
// Convert to Gray level image.
image2d<value::int_u8>
- fg_gl = data::transform(fg, mln::fun::v2v::rgb_to_int_u<8>());
+ fg_gl = data::transform(fg, mln::fun::v2v::rgb_to_luma<value::int_u8>());
// Binarize
image2d<bool>
diff --git a/scribo/src/text_in_picture.cc b/scribo/src/text_in_picture.cc
index e2f30de..77cf7b6 100644
--- a/scribo/src/text_in_picture.cc
+++ b/scribo/src/text_in_picture.cc
@@ -40,7 +40,7 @@
#include <mln/value/rgb8.hh>
#include <mln/value/label_16.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <mln/subsampling/antialiased.hh>
@@ -236,7 +236,8 @@ int main(int argc, char* argv[])
std::cout << "** Using split_bg_fg" << std::endl;
image2d<value::rgb8>
fg = preprocessing::split_bg_fg(input_rgb, lambda, 32).second();
- intensity_ima = data::transform(fg, mln::fun::v2v::rgb_to_int_u<8>());
+ intensity_ima = data::transform(fg,
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
t_ = timer_;
std::cout << "Foreground extracted. " << t_ <<
std::endl;
@@ -253,7 +254,7 @@ int main(int argc, char* argv[])
timer_.start();
std::cout << "** Using data::transform(intensity)" <<
std::endl;
intensity_ima = data::transform(input_rgb,
- mln::fun::v2v::rgb_to_int_u<8>());
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
t_ = timer_;
std::cout << "Intensity image " << t_ << std::endl;
}
diff --git a/scribo/src/text_in_picture_neg.cc b/scribo/src/text_in_picture_neg.cc
index c1a4317..8d818e0 100644
--- a/scribo/src/text_in_picture_neg.cc
+++ b/scribo/src/text_in_picture_neg.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2011 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -48,8 +49,6 @@
#include <mln/value/rgb8.hh>
#include <mln/value/label_16.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
-
#include <mln/data/wrap.hh>
#include <mln/draw/box.hh>
diff --git a/scribo/src/text_recognition_in_picture.cc
b/scribo/src/text_recognition_in_picture.cc
index a5f93a7..8b76f48 100644
--- a/scribo/src/text_recognition_in_picture.cc
+++ b/scribo/src/text_recognition_in_picture.cc
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -51,7 +51,7 @@
#include <mln/value/rgb8.hh>
#include <mln/value/label_16.hh>
-#include <mln/fun/v2v/rgb_to_int_u.hh>
+#include <mln/fun/v2v/rgb_to_luma.hh>
#include <mln/data/wrap.hh>
@@ -253,7 +253,8 @@ int main(int argc, char* argv[])
// Extract foreground
image2d<value::rgb8>
fg = preprocessing::split_bg_fg(input_rgb, lambda, 32).second();
- intensity_ima = data::transform(fg, mln::fun::v2v::rgb_to_int_u<8>());
+ intensity_ima = data::transform(fg,
+ mln::fun::v2v::rgb_to_luma<value::int_u8>());
// // Perform an initial rotation if needed.
// // input_rgb = geom::rotate(input_rgb, -45, literal::black);
--
1.5.6.5