* scribo/binarization/sauvola_threshold_image.hh: Fix namespace
ambiguity.
* scribo/io/xml/save.hh
* scribo/primitive/extract/elements.hh
* scribo/primitive/merge/components.hh
* scribo/toolchain/text_in_doc_preprocess.hh
* scribo/toolchain/text_in_picture.hh
* src/binarization/ppm_sauvola_ms.cc
* src/binarization/ppm_sauvola_ms_fg.cc
* src/binarization/ppm_sauvola_ms_split.cc
* src/binarization/sauvola_ms.cc
* src/binarization/sauvola_ms_fg.cc
* src/binarization/sauvola_ms_split.cc
* src/contest/hdibco-2010/sauvola_ms_hdibco.cc
* src/text_in_picture.cc: Add missing includes.
* scribo/primitive/extract/lines_h_pattern.hh,
* scribo/primitive/extract/lines_v_pattern.hh: Make sure the
rectangle have odd dimensions.
* src/Makefile.am: Remove deprecated include path.
* src/binarization/ppm_sauvola.cc: Convert to gray level.
* src/pbm_text_in_doc.cc: Use doc structure.
* src/text_in_picture_neg.cc: Make use of world::rgb::invert.
---
scribo/ChangeLog | 33 ++++++++++++
.../scribo/binarization/sauvola_threshold_image.hh | 4 +-
scribo/scribo/io/xml/save.hh | 1 +
scribo/scribo/primitive/extract/elements.hh | 12 ++++-
scribo/scribo/primitive/extract/lines_h_pattern.hh | 10 +++-
scribo/scribo/primitive/extract/lines_v_pattern.hh | 10 +++-
scribo/scribo/primitive/merge/components.hh | 5 ++
scribo/scribo/toolchain/text_in_doc_preprocess.hh | 2 +
scribo/scribo/toolchain/text_in_picture.hh | 55 ++++++++++++++++++--
scribo/src/Makefile.am | 2 -
scribo/src/binarization/ppm_sauvola.cc | 10 +++-
scribo/src/binarization/ppm_sauvola_ms.cc | 5 ++
scribo/src/binarization/ppm_sauvola_ms_fg.cc | 6 ++
scribo/src/binarization/ppm_sauvola_ms_split.cc | 8 ++-
scribo/src/binarization/sauvola_ms.cc | 5 ++
scribo/src/binarization/sauvola_ms_fg.cc | 6 ++
scribo/src/binarization/sauvola_ms_split.cc | 3 +-
.../src/contest/hdibco-2010/sauvola_ms_hdibco.cc | 2 +
scribo/src/pbm_text_in_doc.cc | 10 +++-
scribo/src/text_in_picture.cc | 15 -----
scribo/src/text_in_picture_neg.cc | 5 ++-
21 files changed, 172 insertions(+), 37 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index f6248fa..9812499 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,38 @@
2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Compilation fixes.
+
+ * scribo/binarization/sauvola_threshold_image.hh: Fix namespace
+ ambiguity.
+
+ * scribo/io/xml/save.hh
+ * scribo/primitive/extract/elements.hh
+ * scribo/primitive/merge/components.hh
+ * scribo/toolchain/text_in_doc_preprocess.hh
+ * scribo/toolchain/text_in_picture.hh
+ * src/binarization/ppm_sauvola_ms.cc
+ * src/binarization/ppm_sauvola_ms_fg.cc
+ * src/binarization/ppm_sauvola_ms_split.cc
+ * src/binarization/sauvola_ms.cc
+ * src/binarization/sauvola_ms_fg.cc
+ * src/binarization/sauvola_ms_split.cc
+ * src/contest/hdibco-2010/sauvola_ms_hdibco.cc
+ * src/text_in_picture.cc: Add missing includes.
+
+ * scribo/primitive/extract/lines_h_pattern.hh,
+ * scribo/primitive/extract/lines_v_pattern.hh: Make sure the
+ rectangle have odd dimensions.
+
+ * src/Makefile.am: Remove deprecated include path.
+
+ * src/binarization/ppm_sauvola.cc: Convert to gray level.
+
+ * src/pbm_text_in_doc.cc: Use doc structure.
+
+ * src/text_in_picture_neg.cc: Make use of world::rgb::invert.
+
+2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
* scribo/core/document.hh: Add new methods.
2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
diff --git a/scribo/scribo/binarization/sauvola_threshold_image.hh
b/scribo/scribo/binarization/sauvola_threshold_image.hh
index 05a7064..94cd688 100644
--- a/scribo/scribo/binarization/sauvola_threshold_image.hh
+++ b/scribo/scribo/binarization/sauvola_threshold_image.hh
@@ -144,8 +144,8 @@ namespace scribo
ncols = static_cast<mln::def::coord>(input.ncols());
- for(def::coord row = 0; row < nrows; ++row)
- for(def::coord col = 0; col < ncols; ++col)
+ for(mln::def::coord row = 0; row < nrows; ++row)
+ for(mln::def::coord col = 0; col < ncols; ++col)
{
# ifdef SCRIBO_SAUVOLA_DEBUG
diff --git a/scribo/scribo/io/xml/save.hh b/scribo/scribo/io/xml/save.hh
index 928db17..3c182e7 100644
--- a/scribo/scribo/io/xml/save.hh
+++ b/scribo/scribo/io/xml/save.hh
@@ -35,6 +35,7 @@
# include <map>
+# include <scribo/core/document.hh>
# include <scribo/core/line_set.hh>
namespace scribo
diff --git a/scribo/scribo/primitive/extract/elements.hh
b/scribo/scribo/primitive/extract/elements.hh
index c083988..2e6a0cb 100644
--- a/scribo/scribo/primitive/extract/elements.hh
+++ b/scribo/scribo/primitive/extract/elements.hh
@@ -33,6 +33,7 @@
# define SCRIBO_PRIMITIVE_EXTRACT_ELEMENTS_HH
# include <mln/core/image/image2d.hh>
+# include <mln/core/alias/neighb2d.hh>
# include <mln/data/fill.hh>
# include <mln/util/array.hh>
# include <mln/labeling/compute.hh>
@@ -40,16 +41,21 @@
# include <mln/accu/math/count.hh>
# include <mln/pw/all.hh>
+# include <mln/draw/box_plain.hh>
+
# include <mln/value/label_8.hh>
+# include <mln/value/rgb.hh>
# include <mln/value/rgb8.hh>
# include <scribo/core/macros.hh>
# include <scribo/core/component_set.hh>
+# include <scribo/core/document.hh>
# include <scribo/core/line_set.hh>
+# include <scribo/core/def/lbl_type.hh>
# include <scribo/filter/objects_small.hh>
-#include <mln/clustering/kmean_rgb.hh>
-#include <mln/fun/v2v/rgb8_to_rgbn.hh>
+# include <mln/clustering/kmean_rgb.hh>
+# include <mln/fun/v2v/rgb8_to_rgbn.hh>
namespace scribo
{
@@ -60,6 +66,8 @@ namespace scribo
namespace extract
{
+ using namespace mln;
+
template <typename L, typename I>
component_set<L>
diff --git a/scribo/scribo/primitive/extract/lines_h_pattern.hh
b/scribo/scribo/primitive/extract/lines_h_pattern.hh
index 0da7900..6a1f7f0 100644
--- a/scribo/scribo/primitive/extract/lines_h_pattern.hh
+++ b/scribo/scribo/primitive/extract/lines_h_pattern.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -30,6 +31,8 @@
///
/// Extract horizontal lines matching a specific pattern.
+# include <cmath>
+
# include <mln/core/concept/image.hh>
# include <mln/core/alias/window2d.hh>
# include <mln/win/rectangle2d.hh>
@@ -103,9 +106,12 @@ namespace scribo
mln_concrete(I) output = lines_pattern(input, length, 1, win);
+ unsigned new_length = length / 2 + delta;
+ new_length += 1 - (new_length % 2); // Guaranty that new_length is odd.
+
mln_concrete(I)
output_dil = morpho::dilation(output,
- win::rectangle2d(3, length / 2 + delta));
+ win::rectangle2d(3, new_length));
output = scribo::primitive::internal::rd(output, input * output_dil);
diff --git a/scribo/scribo/primitive/extract/lines_v_pattern.hh
b/scribo/scribo/primitive/extract/lines_v_pattern.hh
index cbdf080..8a103ac 100644
--- a/scribo/scribo/primitive/extract/lines_v_pattern.hh
+++ b/scribo/scribo/primitive/extract/lines_v_pattern.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -30,6 +31,8 @@
///
/// Extract vertical lines matching a specific pattern.
+# include <cmath>
+
# include <mln/core/concept/image.hh>
# include <mln/core/alias/window2d.hh>
# include <mln/win/rectangle2d.hh>
@@ -85,9 +88,12 @@ namespace scribo
mln_concrete(I) output = lines_pattern(input, length, 0, win);
+ unsigned new_length = length / 2 + delta;
+ new_length += 1 - (new_length % 2); // Guaranty that new_length is odd.
+
mln_concrete(I)
output_dil = morpho::dilation(output,
- win::rectangle2d(length / 2 + delta, 3));
+ win::rectangle2d(new_length, 3));
output = scribo::primitive::internal::rd(output, input * output_dil);
diff --git a/scribo/scribo/primitive/merge/components.hh
b/scribo/scribo/primitive/merge/components.hh
index 7570d2e..72f3e9d 100644
--- a/scribo/scribo/primitive/merge/components.hh
+++ b/scribo/scribo/primitive/merge/components.hh
@@ -30,7 +30,12 @@
#ifndef SCRIBO_PRIMITIVE_MERGE_COMPONENTS_HH
# define SCRIBO_PRIMITIVE_MERGE_COMPONENTS_HH
+# include <mln/core/concept/function.hh>
# include <mln/core/image/vmorph/fun_image.hh>
+# include <mln/data/fill.hh>
+# include <mln/pw/all.hh>
+
+# include <scribo/core/component_set.hh>
namespace scribo
diff --git a/scribo/scribo/toolchain/text_in_doc_preprocess.hh
b/scribo/scribo/toolchain/text_in_doc_preprocess.hh
index 4b7d1e2..00a626e 100644
--- a/scribo/scribo/toolchain/text_in_doc_preprocess.hh
+++ b/scribo/scribo/toolchain/text_in_doc_preprocess.hh
@@ -32,6 +32,8 @@
#include <mln/core/concept/image.hh>
+#include <mln/data/transform.hh>
+#include <mln/fun/v2v/rgb_to_int_u.hh>
#include <scribo/binarization/sauvola_ms.hh>
diff --git a/scribo/scribo/toolchain/text_in_picture.hh
b/scribo/scribo/toolchain/text_in_picture.hh
index 7b34114..9746645 100644
--- a/scribo/scribo/toolchain/text_in_picture.hh
+++ b/scribo/scribo/toolchain/text_in_picture.hh
@@ -33,11 +33,58 @@
/// Localize text in a picture.
+# include <libgen.h>
+# include <iostream>
+# include <mln/core/image/image2d.hh>
+# include <mln/core/alias/neighb2d.hh>
-#include <src/afp/components.hh>
-#include <src/afp/link.hh>
-#include <src/afp/regroup.hh>
+# include <mln/literal/colors.hh>
+# include <mln/value/rgb8.hh>
+# include <mln/value/label_16.hh>
+
+# include <mln/fun/v2v/rgb_to_int_u.hh>
+
+# include <mln/subsampling/antialiased.hh>
+
+# include <scribo/draw/bounding_boxes.hh>
+# include <scribo/draw/groups_bboxes.hh>
+
+# include <scribo/binarization/sauvola_ms.hh>
+# include <scribo/binarization/sauvola.hh>
+
+# include <scribo/primitive/extract/components.hh>
+
+# include <scribo/primitive/link/merge_double_link.hh>
+# include <scribo/primitive/link/with_single_left_link.hh>
+# include <scribo/primitive/link/with_single_right_link.hh>
+
+# include <scribo/primitive/group/apply.hh>
+# include <scribo/primitive/group/from_double_link.hh>
+# include <scribo/primitive/group/from_single_link.hh>
+
+# include <scribo/primitive/regroup/from_single_left_link.hh>
+
+# include <scribo/filter/object_groups_with_holes.hh>
+
+# include <scribo/filter/object_links_bbox_h_ratio.hh>
+# include <scribo/filter/object_links_bbox_overlap.hh>
+
+# include <scribo/filter/object_groups_small.hh>
+# include <scribo/filter/object_groups_v_thickness.hh>
+
+# include <scribo/debug/decision_image.hh>
+# include <scribo/debug/save_linked_bboxes_image.hh>
+
+# include <scribo/debug/usage.hh>
+
+# include <scribo/preprocessing/split_bg_fg.hh>
+
+# include <scribo/make/debug_filename.hh>
+
+# include <src/afp/components.hh>
+# include <src/afp/link.hh>
+# include <src/afp/regroup.hh>
# include <mln/util/timer.hh>
@@ -126,7 +173,7 @@ namespace scribo
trace::entering("scribo::toolchain::text_in_picture");
const I& input_rgb_orig = exact(input_rgb_orig_);
- mln_precondition(input.is_valid());
+ mln_precondition(input_rgb_orig.is_valid());
using namespace scribo;
using namespace scribo::primitive;
diff --git a/scribo/src/Makefile.am b/scribo/src/Makefile.am
index 9efa0da..6cf233c 100644
--- a/scribo/src/Makefile.am
+++ b/scribo/src/Makefile.am
@@ -99,8 +99,6 @@ if HAVE_TESSERACT
utilexec_PROGRAMS += content_in_doc
content_in_doc_SOURCES = content_in_doc.cc
content_in_doc_CPPFLAGS = $(AM_CPPFLAGS) \
- -I/home/lazzara/git/oln/scribo/sandbox/green/ \
- -I/home/lazzara/git/oln/scribo/sandbox/z/ \
$(TESSERACT_CPPFLAGS) \
$(TIFF_CPPFLAGS) \
$(MAGICKXX_CPPFLAGS)
diff --git a/scribo/src/binarization/ppm_sauvola.cc
b/scribo/src/binarization/ppm_sauvola.cc
index 330af70..f0cd355 100644
--- a/scribo/src/binarization/ppm_sauvola.cc
+++ b/scribo/src/binarization/ppm_sauvola.cc
@@ -26,6 +26,8 @@
#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.hh>
#include <scribo/debug/usage.hh>
@@ -66,10 +68,16 @@ int main(int argc, char *argv[])
std::cout << "Using w=" << w << " and k="
<< k << std::endl;
+ // Load
image2d<value::rgb8> input;
io::ppm::load(input, argv[1]);
- image2d<bool> out = scribo::binarization::sauvola(input, w, k);
+ // Convert to Gray level image.
+ image2d<value::int_u8>
+ input_gl = data::transform(input, mln::fun::v2v::rgb_to_int_u<8>());
+
+ // Binarize
+ image2d<bool> out = scribo::binarization::sauvola(input_gl, w, k);
io::pbm::save(out, argv[2]);
diff --git a/scribo/src/binarization/ppm_sauvola_ms.cc
b/scribo/src/binarization/ppm_sauvola_ms.cc
index 9e68b0e..eb694c2 100644
--- a/scribo/src/binarization/ppm_sauvola_ms.cc
+++ b/scribo/src/binarization/ppm_sauvola_ms.cc
@@ -28,6 +28,8 @@
#include <mln/value/int_u8.hh>
#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.hh>
#include <scribo/debug/usage.hh>
@@ -99,6 +101,9 @@ int main(int argc, char *argv[])
else
k = 0.34f;
+ std::cout << "Using w_1=" << w_1 << " - s="
<< s
+ << " - k=" << k << std::endl;
+
// Load
image2d<value::rgb8> input_1;
io::ppm::load(input_1, argv[1]);
diff --git a/scribo/src/binarization/ppm_sauvola_ms_fg.cc
b/scribo/src/binarization/ppm_sauvola_ms_fg.cc
index 33a11ac..20f237f 100644
--- a/scribo/src/binarization/ppm_sauvola_ms_fg.cc
+++ b/scribo/src/binarization/ppm_sauvola_ms_fg.cc
@@ -24,10 +24,14 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+/// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/value/rgb8.hh>
#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.hh>
#include <scribo/preprocessing/split_bg_fg.hh>
@@ -103,6 +107,8 @@ int main(int argc, char *argv[])
else
k = 0.34f;
+ std::cout << "Using w_1=" << w_1 << " - s="
<< s
+ << " - k=" << k << std::endl;
// Load
image2d<value::rgb8> input_1;
diff --git a/scribo/src/binarization/ppm_sauvola_ms_split.cc
b/scribo/src/binarization/ppm_sauvola_ms_split.cc
index 84e4abf..bb98b38 100644
--- a/scribo/src/binarization/ppm_sauvola_ms_split.cc
+++ b/scribo/src/binarization/ppm_sauvola_ms_split.cc
@@ -28,6 +28,8 @@
#include <mln/value/rgb8.hh>
#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>
@@ -113,11 +115,13 @@ int main(int argc, char *argv[])
image2d<value::rgb8> input_1;
io::ppm::load(input_1, argv[1]);
- std::cout << "Using w=" << w_1 << " - s="
<< s << " - min_ntrue=" << min_ntrue << " -
k=" << k << std::endl;
+ std::cout << "Using w=" << w_1 << " - s="
<< s
+ << " - min_ntrue=" << min_ntrue << " - k="
<< k << std::endl;
// Binarize
image2d<bool>
- output = scribo::binarization::sauvola_ms_split(input_1, w_1, s, min_ntrue, k);
+ output = scribo::binarization::sauvola_ms_split(input_1, w_1, s,
+ min_ntrue, k);
io::pbm::save(output, argv[2]);
}
diff --git a/scribo/src/binarization/sauvola_ms.cc
b/scribo/src/binarization/sauvola_ms.cc
index 5f07484..7c3bcf0 100644
--- a/scribo/src/binarization/sauvola_ms.cc
+++ b/scribo/src/binarization/sauvola_ms.cc
@@ -24,6 +24,8 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+/// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/value/int_u8.hh>
#include <mln/io/magick/load.hh>
@@ -102,6 +104,9 @@ int main(int argc, char *argv[])
else
k = 0.34f;
+ std::cout << "Using w_1=" << w_1 << " - s="
<< s
+ << " - k=" << k << std::endl;
+
// Load
image2d<value::rgb8> input_1;
io::magick::load(input_1, argv[1]);
diff --git a/scribo/src/binarization/sauvola_ms_fg.cc
b/scribo/src/binarization/sauvola_ms_fg.cc
index cad605f..4227db4 100644
--- a/scribo/src/binarization/sauvola_ms_fg.cc
+++ b/scribo/src/binarization/sauvola_ms_fg.cc
@@ -24,10 +24,14 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+/// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/value/rgb8.hh>
#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 <scribo/binarization/sauvola_ms.hh>
#include <scribo/preprocessing/split_bg_fg.hh>
@@ -86,6 +90,8 @@ int main(int argc, char *argv[])
unsigned s = atoi(argv[4]);
+ std::cout << "Using w_1=" << w_1 << " - s="
<< s << std::endl;
+
// Load
image2d<value::rgb8> input_1;
io::magick::load(input_1, argv[1]);
diff --git a/scribo/src/binarization/sauvola_ms_split.cc
b/scribo/src/binarization/sauvola_ms_split.cc
index fc9e15c..691bfc9 100644
--- a/scribo/src/binarization/sauvola_ms_split.cc
+++ b/scribo/src/binarization/sauvola_ms_split.cc
@@ -107,7 +107,8 @@ int main(int argc, char *argv[])
else
k = 0.34f;
-
+ std::cout << "Using w_1=" << w_1 << " - s="
<< s
+ << " - k=" << k << std::endl;
image2d<value::rgb8> input_1;
io::magick::load(input_1, argv[1]);
diff --git a/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
b/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
index 68fdaac..7ef2455 100644
--- a/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
+++ b/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
@@ -29,6 +29,8 @@
#include <mln/io/pgm/load.hh>
#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.hh>
#include <scribo/postprocessing/fill_object_holes.hh>
diff --git a/scribo/src/pbm_text_in_doc.cc b/scribo/src/pbm_text_in_doc.cc
index 23ed9e7..96cb92b 100644
--- a/scribo/src/pbm_text_in_doc.cc
+++ b/scribo/src/pbm_text_in_doc.cc
@@ -40,6 +40,7 @@
#include <scribo/toolchain/text_in_doc.hh>
+#include <scribo/core/document.hh>
#include <scribo/core/line_set.hh>
#include <scribo/debug/usage.hh>
@@ -91,11 +92,11 @@ int main(int argc, char* argv[])
trace::entering("main");
+ typedef image2d<scribo::def::lbl_type> L;
image2d<bool> input;
mln::io::pbm::load(input, argv[1]);
-
// Optional Cropping
point2d crop_shift = literal::origin;
if (argc >= 8)
@@ -119,12 +120,15 @@ int main(int argc, char* argv[])
// Run document toolchain.
- typedef image2d<scribo::def::lbl_type> L;
line_set<L>
lines = scribo::toolchain::text_in_doc(input, denoise, debug);
+ scribo::document<L> doc;
+ doc.set_filename(argv[1]);
+ doc.set_text(lines);
+
// Saving results
- scribo::io::xml::save(argv[1], lines, "out.xml", true);
+ scribo::io::xml::save(doc, "out.xml", true);
// Specify shift due to potential previous crop.
scribo::io::text_boxes::save(lines, argv[2], crop_shift);
diff --git a/scribo/src/text_in_picture.cc b/scribo/src/text_in_picture.cc
index cdd2749..042b8d3 100644
--- a/scribo/src/text_in_picture.cc
+++ b/scribo/src/text_in_picture.cc
@@ -28,33 +28,20 @@
#include <iostream>
#include <mln/core/image/image2d.hh>
-#include <mln/core/image/imorph/tr_image.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/colorize.hh>
-#include <mln/data/stretch.hh>
-
#include <mln/io/pbm/all.hh>
#include <mln/io/ppm/save.hh>
#include <mln/io/magick/all.hh>
-#include <mln/math/min.hh>
-
-#include <mln/logical/not.hh>
-
#include <mln/literal/colors.hh>
#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>
-
-#include <mln/geom/translate.hh>
-
#include <mln/subsampling/antialiased.hh>
#include <scribo/draw/bounding_boxes.hh>
@@ -81,8 +68,6 @@
#include <scribo/filter/object_links_bbox_h_ratio.hh>
#include <scribo/filter/object_links_bbox_overlap.hh>
-#include <scribo/filter/common/objects_photo.hh>
-
#include <scribo/filter/object_groups_small.hh>
#include <scribo/filter/object_groups_v_thickness.hh>
diff --git a/scribo/src/text_in_picture_neg.cc b/scribo/src/text_in_picture_neg.cc
index 2da27a5..7d6694a 100644
--- a/scribo/src/text_in_picture_neg.cc
+++ b/scribo/src/text_in_picture_neg.cc
@@ -58,6 +58,8 @@
#include <mln/subsampling/antialiased.hh>
+#include <mln/world/rgb/invert.hh>
+
#include <scribo/draw/bounding_boxes.hh>
#include <scribo/draw/groups_bboxes.hh>
@@ -169,7 +171,8 @@ int main(int argc, char* argv[])
typedef image2d<value::label_16> L;
component_set<L>
- comps_neg = toolchain::text_in_picture(arith::revert(input_rgb), bg_removal,
+ comps_neg = toolchain::text_in_picture(world::rgb::invert(input_rgb),
+ bg_removal,
multi_scale_bin,
max_dim_size, lambda, out_base_dir);
--
1.5.6.5