Commit 9c95965d authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

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.
parent 87288fed
2010-10-21 Guillaume Lazzara <z@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@lrde.epita.fr> 2010-10-21 Guillaume Lazzara <z@lrde.epita.fr>
Fix issues with object_links and ignored components. Fix issues with object_links and ignored components.
......
// 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. // This file is part of Olena.
// //
...@@ -83,7 +84,7 @@ namespace scribo ...@@ -83,7 +84,7 @@ namespace scribo
compute(Link_Functor<F>& functor, anchor::Type anchor); compute(Link_Functor<F>& functor, anchor::Type anchor);
/// \overload /// \overload
/// The default anchor is set to 0, the mass center. /// The default anchor is set to anchor::MassCenter.
template <typename F> template <typename F>
object_links<scribo_support(F)> object_links<scribo_support(F)>
compute(Link_Functor<F>& functor); compute(Link_Functor<F>& functor);
......
...@@ -83,9 +83,6 @@ namespace scribo ...@@ -83,9 +83,6 @@ namespace scribo
bool verify_link_criterion_(unsigned current_object, bool verify_link_criterion_(unsigned current_object,
const P& start_point, const P& p) const; 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); void start_processing_object_(unsigned current_object);
private: private:
...@@ -128,17 +125,6 @@ namespace scribo ...@@ -128,17 +125,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> template <typename L, typename E>
inline inline
void void
......
...@@ -174,7 +174,7 @@ namespace scribo ...@@ -174,7 +174,7 @@ namespace scribo
} }
template <typename L, typename F> template <typename L>
inline inline
object_links<L> object_links<L>
with_single_left_link_dmax_ratio(const component_set<L>& components, with_single_left_link_dmax_ratio(const component_set<L>& components,
......
...@@ -778,14 +778,14 @@ namespace scribo ...@@ -778,14 +778,14 @@ namespace scribo
} }
std::cout // std::cout
<< " new txtline = " << count_new_txtline << std::endl // << " new txtline = " << count_new_txtline << std::endl
<< " comp IN txtline = " << count_comp_IN_txtline << std::endl // << " comp IN txtline = " << count_comp_IN_txtline << std::endl
<< " 2 lines merge = " << count_two_lines_merge << std::endl // << " 2 lines merge = " << count_two_lines_merge << std::endl
<< " comp HITS txtline = " << count_comp_HITS_txtline << std::endl // << " comp HITS txtline = " << count_comp_HITS_txtline << std::endl
<< " txtline IN junk = " << count_txtline_IN_junk << std::endl // << " txtline IN junk = " << count_txtline_IN_junk << std::endl
<< " txtline IN txtline = " << count_txtline_IN_txtline << std::endl // << " txtline IN txtline = " << count_txtline_IN_txtline << std::endl
<< " WTF! = " << count_WTF << std::endl; // << " WTF! = " << count_WTF << std::endl;
(void) ith_pass; (void) ith_pass;
...@@ -854,7 +854,7 @@ namespace scribo ...@@ -854,7 +854,7 @@ namespace scribo
// Sort lines by bbox.nelements() and ids. // Sort lines by bbox.nelements() and ids.
std::sort(v.begin(), v.end(), func); std::sort(v.begin(), v.end(), func);
mln::util::timer t; // mln::util::timer t;
// Setting lines as text lines according to specific criterions. // Setting lines as text lines according to specific criterions.
...@@ -864,10 +864,10 @@ namespace scribo ...@@ -864,10 +864,10 @@ namespace scribo
// First pass // First pass
t.start(); // t.start();
one_merge_pass(1, input_domain, v, lines, parent); one_merge_pass(1, input_domain, v, lines, parent);
float ts = t.stop(); // float ts = t.stop();
std::cout << "time " << ts << std::endl; // std::cout << "time " << ts << std::endl;
// lines.force_stats_update(); // lines.force_stats_update();
...@@ -878,10 +878,10 @@ namespace scribo ...@@ -878,10 +878,10 @@ namespace scribo
// Second pass // Second pass
t.start(); // t.start();
one_merge_pass(2, input_domain, v, lines, parent); // <- last pass one_merge_pass(2, input_domain, v, lines, parent); // <- last pass
ts = t.stop(); // ts = t.stop();
std::cout << "time " << ts << std::endl; // std::cout << "time " << ts << std::endl;
lines.force_stats_update(); lines.force_stats_update();
...@@ -901,14 +901,14 @@ namespace scribo ...@@ -901,14 +901,14 @@ namespace scribo
{ {
using namespace mln; using namespace mln;
mln::util::timer t; // mln::util::timer t;
t.start(); // t.start();
scribo::line_set<L> output scribo::line_set<L> output
= internal::draw_boxes(lines.components().labeled_image().domain(), = internal::draw_boxes(lines.components().labeled_image().domain(),
lines); lines);
float ts = t.stop(); // float ts = t.stop();
std::cout << ts << std::endl; // std::cout << ts << std::endl;
return output; return output;
} }
......
...@@ -104,7 +104,7 @@ namespace scribo ...@@ -104,7 +104,7 @@ namespace scribo
input_gl = preprocessing::deskew(input_gl); input_gl = preprocessing::deskew(input_gl);
// Binarize foreground to use it in the processing chain. // 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 ...@@ -114,13 +114,13 @@ namespace scribo
// Process // Process
{ {
// Run document toolchain. // 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. // Negate document.
logical::not_inplace(input_bin); logical::not_inplace(input_bin);
// Run document toolchain. // 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);
} }
......
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