* scribo/primitive/link/compute.hh: Update doc.
* scribo/primitive/link/internal/link_single_dmax_base.hh
(start_point_): Remove useless overload.
* scribo/primitive/link/with_single_left_link_dmax_ratio.hh:
Remove useless template parameter.
* scribo/text/merging.hh: Disable debug.
* scribo/toolchain/nepomuk/text_extraction.hh: Enable denoising
and reduce Sauvola's window size.
---
scribo/ChangeLog | 17 +++++++++
scribo/scribo/primitive/link/compute.hh | 5 ++-
.../link/internal/link_single_dmax_base.hh | 14 -------
.../link/with_single_left_link_dmax_ratio.hh | 2 +-
scribo/scribo/text/merging.hh | 38 ++++++++++----------
scribo/scribo/toolchain/nepomuk/text_extraction.hh | 6 ++--
6 files changed, 43 insertions(+), 39 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 9493a12..1f9fc04 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,22 @@
2010-10-21 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Small fixes in Scribo
+
+ * scribo/primitive/link/compute.hh: Update doc.
+
+ * scribo/primitive/link/internal/link_single_dmax_base.hh
+ (start_point_): Remove useless overload.
+
+ * scribo/primitive/link/with_single_left_link_dmax_ratio.hh:
+ Remove useless template parameter.
+
+ * scribo/text/merging.hh: Disable debug.
+
+ * scribo/toolchain/nepomuk/text_extraction.hh: Enable denoising
+ and reduce Sauvola's window size.
+
+2010-10-21 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix issues with object_links and ignored components.
* scribo/filter/object_links_bbox_overlap.hh,
diff --git a/scribo/scribo/primitive/link/compute.hh
b/scribo/scribo/primitive/link/compute.hh
index 3782a50..114971f 100644
--- a/scribo/scribo/primitive/link/compute.hh
+++ b/scribo/scribo/primitive/link/compute.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.
//
@@ -83,7 +84,7 @@ namespace scribo
compute(Link_Functor<F>& functor, anchor::Type anchor);
/// \overload
- /// The default anchor is set to 0, the mass center.
+ /// The default anchor is set to anchor::MassCenter.
template <typename F>
object_links<scribo_support(F)>
compute(Link_Functor<F>& functor);
diff --git a/scribo/scribo/primitive/link/internal/link_single_dmax_base.hh
b/scribo/scribo/primitive/link/internal/link_single_dmax_base.hh
index 6897bd6..aca3e67 100644
--- a/scribo/scribo/primitive/link/internal/link_single_dmax_base.hh
+++ b/scribo/scribo/primitive/link/internal/link_single_dmax_base.hh
@@ -83,9 +83,6 @@ namespace scribo
bool verify_link_criterion_(unsigned current_object,
const P& start_point, const P& p) const;
- mln_site(L) start_point_(unsigned current_object,
- anchor::Type anchor);
-
void start_processing_object_(unsigned current_object);
private:
@@ -130,17 +127,6 @@ namespace scribo
template <typename L, typename E>
inline
- mln_site(L)
- link_single_dmax_base<L, E>::start_point_(unsigned current_object,
- anchor::Type anchor)
- {
- return internal::compute_anchor(this->components_,
- current_object, anchor);
- }
-
-
- template <typename L, typename E>
- inline
void
link_single_dmax_base<L, E>::start_processing_object_(
unsigned current_object)
diff --git a/scribo/scribo/primitive/link/with_single_left_link_dmax_ratio.hh
b/scribo/scribo/primitive/link/with_single_left_link_dmax_ratio.hh
index dc99728..b9a5217 100644
--- a/scribo/scribo/primitive/link/with_single_left_link_dmax_ratio.hh
+++ b/scribo/scribo/primitive/link/with_single_left_link_dmax_ratio.hh
@@ -174,7 +174,7 @@ namespace scribo
}
- template <typename L, typename F>
+ template <typename L>
inline
object_links<L>
with_single_left_link_dmax_ratio(const component_set<L>& components,
diff --git a/scribo/scribo/text/merging.hh b/scribo/scribo/text/merging.hh
index 36d41c2..ed48e57 100644
--- a/scribo/scribo/text/merging.hh
+++ b/scribo/scribo/text/merging.hh
@@ -778,14 +778,14 @@ namespace scribo
}
- std::cout
- << " new txtline = " << count_new_txtline
<< std::endl
- << " comp IN txtline = " << count_comp_IN_txtline
<< std::endl
- << " 2 lines merge = " << count_two_lines_merge
<< std::endl
- << " comp HITS txtline = " << count_comp_HITS_txtline
<< std::endl
- << " txtline IN junk = " << count_txtline_IN_junk
<< std::endl
- << " txtline IN txtline = " << count_txtline_IN_txtline
<< std::endl
- << " WTF! = " << count_WTF << std::endl;
+// std::cout
+// << " new txtline = " << count_new_txtline
<< std::endl
+// << " comp IN txtline = " << count_comp_IN_txtline
<< std::endl
+// << " 2 lines merge = " << count_two_lines_merge
<< std::endl
+// << " comp HITS txtline = " << count_comp_HITS_txtline
<< std::endl
+// << " txtline IN junk = " << count_txtline_IN_junk
<< std::endl
+// << " txtline IN txtline = " << count_txtline_IN_txtline
<< std::endl
+// << " WTF! = " << count_WTF <<
std::endl;
(void) ith_pass;
@@ -854,7 +854,7 @@ namespace scribo
// Sort lines by bbox.nelements() and ids.
std::sort(v.begin(), v.end(), func);
- mln::util::timer t;
+// mln::util::timer t;
// Setting lines as text lines according to specific criterions.
@@ -864,10 +864,10 @@ namespace scribo
// First pass
- t.start();
+// t.start();
one_merge_pass(1, input_domain, v, lines, parent);
- float ts = t.stop();
- std::cout << "time " << ts << std::endl;
+// float ts = t.stop();
+// std::cout << "time " << ts << std::endl;
// lines.force_stats_update();
@@ -878,10 +878,10 @@ namespace scribo
// Second pass
- t.start();
+// t.start();
one_merge_pass(2, input_domain, v, lines, parent); // <- last pass
- ts = t.stop();
- std::cout << "time " << ts << std::endl;
+// ts = t.stop();
+// std::cout << "time " << ts << std::endl;
lines.force_stats_update();
@@ -901,14 +901,14 @@ namespace scribo
{
using namespace mln;
- mln::util::timer t;
- t.start();
+// mln::util::timer t;
+// t.start();
scribo::line_set<L> output
= internal::draw_boxes(lines.components().labeled_image().domain(),
lines);
- float ts = t.stop();
- std::cout << ts << std::endl;
+// float ts = t.stop();
+// std::cout << ts << std::endl;
return output;
}
diff --git a/scribo/scribo/toolchain/nepomuk/text_extraction.hh
b/scribo/scribo/toolchain/nepomuk/text_extraction.hh
index b3136be..e16cd56 100644
--- a/scribo/scribo/toolchain/nepomuk/text_extraction.hh
+++ b/scribo/scribo/toolchain/nepomuk/text_extraction.hh
@@ -104,7 +104,7 @@ namespace scribo
input_gl = preprocessing::deskew(input_gl);
// Binarize foreground to use it in the processing chain.
- input_bin = scribo::binarization::sauvola_ms(input_gl, 101, 3);
+ input_bin = scribo::binarization::sauvola_ms(input_gl, 51, 3);
}
@@ -114,13 +114,13 @@ namespace scribo
// Process
{
// Run document toolchain.
- lines_bg = scribo::toolchain::text_in_doc(input_bin, false, false);
+ lines_bg = scribo::toolchain::text_in_doc(input_bin, true, false);
// Negate document.
logical::not_inplace(input_bin);
// Run document toolchain.
- lines_fg = scribo::toolchain::text_in_doc(input_bin, false, false);
+ lines_fg = scribo::toolchain::text_in_doc(input_bin, true, false);
}
--
1.5.6.5