Commit 0a82e15f authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Improve text_in_picture_neg.

	* scribo/toolchain/text_in_picture.hh: Remove useless argument.

	* src/text_in_picture_neg.cc: Revert color image.
parent 07d3bc07
2010-11-16 Guillaume Lazzara <z@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@lrde.epita.fr> 2010-11-15 Guillaume Lazzara <z@lrde.epita.fr>
* src/content_in_doc.cc: New example extracting document content. * src/content_in_doc.cc: New example extracting document content.
......
...@@ -56,7 +56,6 @@ namespace scribo ...@@ -56,7 +56,6 @@ namespace scribo
component_set<mln_ch_value(I, value::label_16)> component_set<mln_ch_value(I, value::label_16)>
text_in_picture(const Image<I>& input_rgb_orig, text_in_picture(const Image<I>& input_rgb_orig,
bool bg_removal, bool multi_scale_bin, bool bg_removal, bool multi_scale_bin,
bool negate = false,
unsigned max_dim_size = 0, unsigned lambda = 0, unsigned max_dim_size = 0, unsigned lambda = 0,
const char *debug_outdir = 0); const char *debug_outdir = 0);
...@@ -120,7 +119,7 @@ namespace scribo ...@@ -120,7 +119,7 @@ namespace scribo
template <typename I> template <typename I>
component_set<mln_ch_value(I, value::label_16)> component_set<mln_ch_value(I, value::label_16)>
text_in_picture(const Image<I>& input_rgb_orig_, 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, unsigned max_dim_size = 0, unsigned lambda = 0,
const char *debug_outdir = 0) const char *debug_outdir = 0)
{ {
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include <mln/io/ppm/save.hh> #include <mln/io/ppm/save.hh>
#include <mln/io/magick/all.hh> #include <mln/io/magick/all.hh>
#include <mln/arith/revert.hh>
#include <mln/math/min.hh> #include <mln/math/min.hh>
#include <mln/logical/not.hh> #include <mln/logical/not.hh>
...@@ -162,14 +164,13 @@ int main(int argc, char* argv[]) ...@@ -162,14 +164,13 @@ int main(int argc, char* argv[])
typedef image2d<value::label_16> L; typedef image2d<value::label_16> L;
component_set<L> component_set<L>
comps = toolchain::text_in_picture(input_rgb, bg_removal, multi_scale_bin, comps = toolchain::text_in_picture(input_rgb, bg_removal, multi_scale_bin,
false,
max_dim_size, lambda, out_base_dir); max_dim_size, lambda, out_base_dir);
typedef image2d<value::label_16> L; typedef image2d<value::label_16> L;
component_set<L> component_set<L>
comps_neg = toolchain::text_in_picture(input_rgb, bg_removal, multi_scale_bin, comps_neg = toolchain::text_in_picture(arith::revert(input_rgb), bg_removal,
true, multi_scale_bin,
max_dim_size, lambda, out_base_dir); max_dim_size, lambda, out_base_dir);
...@@ -192,4 +193,5 @@ int main(int argc, char* argv[]) ...@@ -192,4 +193,5 @@ int main(int argc, char* argv[])
std::cout << "# objects = " << merged_comps.nelements() << std::endl; std::cout << "# objects = " << merged_comps.nelements() << std::endl;
return merged_comps.nelements() != 0;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment