* scribo/toolchain/text_in_picture.hh: Remove useless argument.
* src/text_in_picture_neg.cc: Revert color image.
---
scribo/ChangeLog | 8 ++++++++
scribo/scribo/toolchain/text_in_picture.hh | 3 +--
scribo/src/text_in_picture_neg.cc | 8 +++++---
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 5ed918f..8895733 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Improve text_in_picture_neg.
+
+ * scribo/toolchain/text_in_picture.hh: Remove useless argument.
+
+ * src/text_in_picture_neg.cc: Revert color image.
+
2010-11-15 Guillaume Lazzara <z(a)lrde.epita.fr>
* src/content_in_doc.cc: New example extracting document content.
diff --git a/scribo/scribo/toolchain/text_in_picture.hh
b/scribo/scribo/toolchain/text_in_picture.hh
index c8bb05b..7b34114 100644
--- a/scribo/scribo/toolchain/text_in_picture.hh
+++ b/scribo/scribo/toolchain/text_in_picture.hh
@@ -56,7 +56,6 @@ namespace scribo
component_set<mln_ch_value(I, value::label_16)>
text_in_picture(const Image<I>& input_rgb_orig,
bool bg_removal, bool multi_scale_bin,
- bool negate = false,
unsigned max_dim_size = 0, unsigned lambda = 0,
const char *debug_outdir = 0);
@@ -120,7 +119,7 @@ namespace scribo
template <typename I>
component_set<mln_ch_value(I, value::label_16)>
text_in_picture(const Image<I>& input_rgb_orig_,
- bool bg_removal, bool multi_scale_bin, bool negate = false,
+ bool bg_removal, bool multi_scale_bin,
unsigned max_dim_size = 0, unsigned lambda = 0,
const char *debug_outdir = 0)
{
diff --git a/scribo/src/text_in_picture_neg.cc b/scribo/src/text_in_picture_neg.cc
index e3078c6..2da27a5 100644
--- a/scribo/src/text_in_picture_neg.cc
+++ b/scribo/src/text_in_picture_neg.cc
@@ -38,6 +38,8 @@
#include <mln/io/ppm/save.hh>
#include <mln/io/magick/all.hh>
+#include <mln/arith/revert.hh>
+
#include <mln/math/min.hh>
#include <mln/logical/not.hh>
@@ -162,14 +164,13 @@ int main(int argc, char* argv[])
typedef image2d<value::label_16> L;
component_set<L>
comps = toolchain::text_in_picture(input_rgb, bg_removal, multi_scale_bin,
- false,
max_dim_size, lambda, out_base_dir);
typedef image2d<value::label_16> L;
component_set<L>
- comps_neg = toolchain::text_in_picture(input_rgb, bg_removal, multi_scale_bin,
- true,
+ comps_neg = toolchain::text_in_picture(arith::revert(input_rgb), bg_removal,
+ multi_scale_bin,
max_dim_size, lambda, out_base_dir);
@@ -192,4 +193,5 @@ int main(int argc, char* argv[])
std::cout << "# objects = " << merged_comps.nelements() <<
std::endl;
+ return merged_comps.nelements() != 0;
}
--
1.5.6.5