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>
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.
//
......@@ -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);
......
......@@ -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:
......@@ -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>
inline
void
......
......@@ -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,
......
......@@ -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;
}
......
......@@ -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);
}
......
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