* core/line_info.hh: Rename hidden as is_hidden.
* core/object_links.hh: Add duplicate().
* filter/object_links_bbox_ratio.hh: Use object_links::duplicate.
* debug/links_decision_image.hh,
* src/debug/show_info_median_inter_characters.cc,
* src/debug/show_info_x_height.cc,
* src/debug/show_links_bbox_h_ratio.cc,
* src/debug/show_links_left_right_links_validation.cc: Make
compile again.
* tests/unit_test/unit-tests.mk: Regen.
* text/extract_lines.hh: Update with latest changes.
* text/recognition.hh: Check whether a line is hidden or not.
---
scribo/ChangeLog | 23 ++
scribo/core/line_info.hh | 10 +-
scribo/core/object_links.hh | 14 +
scribo/debug/links_decision_image.hh | 68 +---
scribo/filter/object_links_bbox_ratio.hh | 2 +-
.../src/debug/show_info_median_inter_characters.cc | 194 +---------
scribo/src/debug/show_info_x_height.cc | 224 +----------
scribo/src/debug/show_links_bbox_h_ratio.cc | 26 +-
.../show_links_left_right_links_validation.cc | 34 +-
scribo/tests/unit_test/unit-tests.mk | 406 ++++++++++++++++++--
scribo/text/extract_lines.hh | 111 +++---
scribo/text/recognition.hh | 2 +-
12 files changed, 533 insertions(+), 581 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 0f88d85..bd3f45d 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,28 @@
2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Compilation related fixes in Scribo.
+
+ * core/line_info.hh: Rename hidden as is_hidden.
+
+ * core/object_links.hh: Add duplicate().
+
+ * filter/object_links_bbox_ratio.hh: Use object_links::duplicate.
+
+ * debug/links_decision_image.hh,
+ * src/debug/show_info_median_inter_characters.cc,
+ * src/debug/show_info_x_height.cc,
+ * src/debug/show_links_bbox_h_ratio.cc,
+ * src/debug/show_links_left_right_links_validation.cc: Make
+ compile again.
+
+ * tests/unit_test/unit-tests.mk: Regen.
+
+ * text/extract_lines.hh: Update with latest changes.
+
+ * text/recognition.hh: Check whether a line is hidden or not.
+
+2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add new debug routines.
* debug/char_space_image.hh,
diff --git a/scribo/core/line_info.hh b/scribo/core/line_info.hh
index 55d1430..d4031b0 100644
--- a/scribo/core/line_info.hh
+++ b/scribo/core/line_info.hh
@@ -138,7 +138,7 @@ namespace scribo
/// computing data over lines.
///
/// @{
- bool hidden() const;
+ bool is_hidden() const;
void set_hidden(bool b);
/// @}
@@ -268,10 +268,9 @@ namespace scribo
{
// Id MUST NOT change except if this instance have no id.
if (! is_valid())
- {
id_ = other.id();
- hidden_ = other.hidden_;
- }
+
+ hidden_ = other.hidden_;
tag_ = other.tag();
bbox_ = other.bbox();
@@ -620,7 +619,7 @@ namespace scribo
template <typename L>
bool
- line_info<L>::hidden() const
+ line_info<L>::is_hidden() const
{
return hidden_;
}
@@ -923,6 +922,7 @@ namespace scribo
<< ", orientation=" << info.orientation()
<< ", reading_orientation=" << info.reading_orientation()
<< ", indented=" << info.indented()
+ << ", hidden=" << info.is_hidden()
<< ", text=" << info.text()
<< ")" << std::endl;
}
diff --git a/scribo/core/object_links.hh b/scribo/core/object_links.hh
index c10cae6..09e1cfe 100644
--- a/scribo/core/object_links.hh
+++ b/scribo/core/object_links.hh
@@ -92,6 +92,8 @@ namespace scribo
void init();
+ object_links<L> duplicate() const;
+
private:
mln::util::tracked_ptr<data_t> data_;
};
@@ -219,6 +221,18 @@ namespace scribo
data_->comp_to_link_(i) = i;
}
+ template <typename L>
+ inline
+ object_links<L>
+ object_links<L>::duplicate() const
+ {
+ object_links<L> output;
+ output.data_ = new data_t();
+
+ *(output.data_.ptr_) = *(data_.ptr_);
+ return output;
+ }
+
template <typename L>
std::ostream&
diff --git a/scribo/debug/links_decision_image.hh b/scribo/debug/links_decision_image.hh
index e1cf766..944d17e 100644
--- a/scribo/debug/links_decision_image.hh
+++ b/scribo/debug/links_decision_image.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.
//
@@ -31,15 +32,11 @@
/// Save a color image showing the difference between to object groups.
# include <mln/core/concept/image.hh>
-# include <mln/accu/center.hh>
# include <mln/data/convert.hh>
# include <mln/value/rgb8.hh>
# include <mln/literal/colors.hh>
-# include <mln/util/array.hh>
-# include <mln/norm/l1.hh>
-# include <scribo/core/object_groups.hh>
-# include <scribo/draw/bounding_boxes.hh>
+# include <scribo/core/object_links.hh>
namespace scribo
@@ -55,14 +52,6 @@ namespace scribo
mln_ch_value(I,value::rgb8)
links_decision_image(const Image<I>& input_,
const object_links<L>& links,
- const object_links<L>& filtered_links,
- unsigned max_link_length);
-
- /// \overload
- template <typename I, typename L>
- mln_ch_value(I,value::rgb8)
- links_decision_image(const Image<I>& input_,
- const object_links<L>& links,
const object_links<L>& filtered_links);
# ifndef MLN_INCLUDE_ONLY
@@ -71,74 +60,45 @@ namespace scribo
mln_ch_value(I,value::rgb8)
links_decision_image(const Image<I>& input_,
const object_links<L>& links,
- const object_links<L>& filtered_links,
- unsigned max_link_length)
+ const object_links<L>& filtered_links)
{
trace::entering("scribo::debug::links_decision_image");
const I& input = exact(input_);
- const object_image(L)& objects = links.object_image_();
+ const component_set<L>& comps = links.components();
mln_precondition(input.is_valid());
- mln_precondition(objects.is_valid());
+ mln_precondition(comps.is_valid());
mln_precondition(links.is_valid());
mln_precondition(filtered_links.is_valid());
mln_precondition(links.size() == filtered_links.size());
- mln_precondition(links.object_image_() != filtered_links.object_image_());
/// Fixme: check that objects has been computed from input.
image2d<value::rgb8>
links_decision_image = data::convert(value::rgb8(), input);
- for_all_components(i, objects.bboxes())
- mln::draw::box(links_decision_image, objects.bbox(i), literal::blue);
-
- // Computing mass centers.
- mln::util::array<mln_result(accu::center<mln_psite(I)>)>
- mass_centers = labeling::compute(accu::meta::center(),
- objects, objects.nlabels());
+ for_all_comps(i, comps)
+ mln::draw::box(links_decision_image, comps(i).bbox(), literal::blue);
- for (unsigned i = 1; i < links.size(); ++i)
- {
-
- if (links[i] != i)
+ for_all_links(i, links)
+ if (links(i) != i)
{
value::rgb8 value = literal::green;
- if (links[i] != filtered_links[i])
+ if (links(i) != filtered_links(i))
value = literal::red;
mln_site(I)
- p1 = mass_centers[i],
- p2 = p1 + mln::right; // FIXME: not generic
-
- while (objects(p2) != links[i] && objects.domain().has(p2))
- ++p2.col();
+ p1 = comps(i).mass_center(),
+ p2 = comps(links(i)).mass_center();
- if (norm::l1_distance(p2.to_vec(), p1.to_vec()) < max_link_length)
- mln::draw::line(links_decision_image,
- p1,
- p2,
- value);
+ mln::draw::line(links_decision_image, p1, p2, value);
}
- }
trace::exiting("scribo::debug::links_decision_image");
return links_decision_image;
}
- template <typename I, typename L>
- mln_ch_value(I,value::rgb8)
- links_decision_image(const Image<I>& input_,
- const object_links<L>& links,
- const object_links<L>& filtered_links)
- {
- return links_decision_image(input_,
- links,
- filtered_links,
- mln_max(unsigned));
- }
-
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace scribo::debug
diff --git a/scribo/filter/object_links_bbox_ratio.hh
b/scribo/filter/object_links_bbox_ratio.hh
index d1c01dd..e5d41c6 100644
--- a/scribo/filter/object_links_bbox_ratio.hh
+++ b/scribo/filter/object_links_bbox_ratio.hh
@@ -78,7 +78,7 @@ namespace scribo
const component_set<L>& components = links.components();
- object_links<L> output(links);
+ object_links<L> output = links.duplicate();
for (unsigned i = 1; i < links.nelements(); ++i)
if (links(i) != i)
{
diff --git a/scribo/src/debug/show_info_median_inter_characters.cc
b/scribo/src/debug/show_info_median_inter_characters.cc
index e28ad96..b55079d 100644
--- a/scribo/src/debug/show_info_median_inter_characters.cc
+++ b/scribo/src/debug/show_info_median_inter_characters.cc
@@ -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.
//
@@ -30,58 +31,26 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
-#include <mln/io/pbm/all.hh>
+#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/math/min.hh>
-
-#include <mln/literal/colors.hh>
#include <mln/value/rgb8.hh>
#include <mln/value/label_16.hh>
-#include <mln/value/int_u16.hh>
#include <mln/draw/box.hh>
#include <mln/draw/line.hh>
-#include <mln/extension/adjust.hh>
-
-#include <mln/accu/stat/median_h.hh>
-
-#include <scribo/draw/bounding_boxes.hh>
-
-#include <scribo/primitive/extract/objects.hh>
-
-#include <scribo/primitive/link/merge_double_link.hh>
-#include <scribo/primitive/link/with_single_left_link_dmax_ratio.hh>
-#include <scribo/primitive/link/with_single_right_link_dmax_ratio.hh>
-
-#include <scribo/primitive/group/apply.hh>
-#include <scribo/primitive/group/from_double_link.hh>
-#include <scribo/primitive/group/from_single_link.hh>
-
-#include <scribo/filter/object_links_bbox_h_ratio.hh>
-
-#include <scribo/filter/objects_small.hh>
-#include <scribo/filter/objects_thin.hh>
-#include <scribo/filter/objects_thick.hh>
-
-#include <scribo/filter/object_groups_small.hh>
-
-#include <scribo/debug/decision_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_linked_bboxes_image.hh>
+#include <scribo/text/extract_lines.hh>
+#include <scribo/debug/char_space_image.hh>
#include <scribo/debug/usage.hh>
-#include <scribo/make/debug_filename.hh>
const char *args_desc[][2] =
{
{ "input.pbm", "A binary image. 'False' for objects,
'True'\
for the background." },
- { "debug_dir", "Output directory for debug image" },
{0, 0}
};
@@ -91,15 +60,12 @@ int main(int argc, char* argv[])
using namespace scribo;
using namespace mln;
- if (argc != 3 && argc != 4)
+ if (argc != 3)
return scribo::debug::usage(argv,
"Find text lines using left/right validation and display x-height in a binarized
article.",
- "input.pbm out.ppm <debug_dir>",
- args_desc,
- "A color image. The following colors are used : dark blue for object bboxes,
orange for single object bboxes, purple for group bboxes and light blue for
x-height.");
+ "input.pbm out.ppm",
+ args_desc);
- if (argc == 4)
- scribo::make::internal::debug_filename_prefix = argv[3];
trace::entering("main");
@@ -109,148 +75,10 @@ int main(int argc, char* argv[])
typedef image2d<value::label_16> L;
- /// Finding objects.
- std::cout << "Finding objects..." << std::endl;
- value::label_16 nobjects;
- object_image(L)
- objects = scribo::primitive::extract::objects(input,
- c8(),
- nobjects);
-
-
- /// First filtering.
- std::cout << "Filtering objects..." << std::endl;
- object_image(L) filtered_objects
- = scribo::filter::objects_small(objects, 6);
-
- /// Linking potential objects
- std::cout << "Linking objects..." << std::endl;
- object_links<L> left_link
- = primitive::link::with_single_left_link_dmax_ratio(filtered_objects);
- object_links<L> right_link
- = primitive::link::with_single_right_link_dmax_ratio(filtered_objects);
-
-
- // Validating left and right links.
- object_links<L>
- merged_links = primitive::link::merge_double_link(filtered_objects,
- left_link,
- right_link);
-
-#ifndef NOUT
- if (argc == 4)
- {
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
- scribo::draw::bounding_box_links(output,
- merged_links,
- literal::green);
-
- util::array<bool> drawn(objects.nlabels(), 0);
- for_all_components(i, objects.bboxes())
- if (merged_links[i] == i && ! drawn(i))
- {
- mln::draw::box(output, objects.bbox(i), literal::orange);
- drawn[i] = true;
- }
- else
- {
- mln::draw::box(output, objects.bbox(i), literal::blue);
- mln::draw::box(output, objects.bbox(merged_links[i]), literal::blue);
- drawn[i] = true;
- drawn[merged_links[i]] = true;
- }
-
- io::ppm::save(output, scribo::make::debug_filename("links.ppm"));
- }
-#endif
-
-
- // Remove links if bboxes have too different sizes.
- object_links<L> hratio_filtered_links
- = filter::object_links_bbox_h_ratio(filtered_objects,
- merged_links,
- 2.0f);
-
-
-
-
-#ifndef NOUT
- if (argc == 4)
- {
- image2d<value::rgb8>
- hratio_decision_image = scribo::debug::decision_image(input,
- merged_links,
- hratio_filtered_links);
- io::ppm::save(hratio_decision_image,
- scribo::make::debug_filename("hratio_links_decision_image.ppm"));
- }
-#endif
-
-
-
- // FIXME: from_single_link should return a packed object_groups?
- //
- //######
- object_groups<L>
- groups = primitive::group::from_single_link(filtered_objects,
- hratio_filtered_links);
- value::label_16 n_groups;
- mln::fun::i2v::array<value::label_16>
- groups_packed = mln::make::relabelfun(groups,
- filtered_objects.nlabels(),
- n_groups);
- //######
-
-
- std::cout << "Grouping objects..." << std::endl;
- object_image(L)
- grouped_objects = primitive::group::apply(filtered_objects, groups);
-
-
-
- // Display median character space.
- {
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
- typedef mln::value::int_u<8> median_t;
- typedef mln::accu::stat::median_h<median_t> accu_t;
- util::array<accu_t>
- lspace_med(static_cast<unsigned>(grouped_objects.nlabels()) + 1);
-
- for_all_components(i, filtered_objects.bboxes())
- if (groups_packed(i) != 0)
- {
- if (hratio_filtered_links(i) != i)
- {
- unsigned
- space = filtered_objects.bbox(i).pmin().col() -
filtered_objects.bbox(hratio_filtered_links(i)).pmax().col();
-
- lspace_med(groups_packed(i)).take(space);
-
- }
- }
-
- for_all_components(i, filtered_objects.bboxes())
- if (groups_packed(i) != 0 && lspace_med(groups_packed(i)).card() > 1)
- {
- unsigned med = lspace_med(groups_packed(i)).to_result();
-
- mln::draw::box(output, grouped_objects.bbox(groups_packed(i)),
- literal::purple);
-
- point2d
- beg = filtered_objects.bbox(i).pmax(),
- end = beg;
- beg.row() = filtered_objects.bbox(i).pmin().row();
- mln::draw::line(output, beg, end, literal::cyan);
- beg.col() += med;
- end.col() += med;
- mln::draw::line(output, beg, end, literal::cyan);
-
- }
-
- io::ppm::save(output, argv[2]);
+ line_set<L> line = scribo::text::extract_lines(input, c8());
- }
+ image2d<value::rgb8> output = scribo::debug::char_space_image(input, line);
+ io::ppm::save(output, argv[2]);
trace::exiting("main");
}
diff --git a/scribo/src/debug/show_info_x_height.cc
b/scribo/src/debug/show_info_x_height.cc
index e0c84a6..e5ff8d2 100644
--- a/scribo/src/debug/show_info_x_height.cc
+++ b/scribo/src/debug/show_info_x_height.cc
@@ -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.
//
@@ -30,58 +31,22 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
-#include <mln/io/pbm/all.hh>
+#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/math/min.hh>
-
-#include <mln/literal/colors.hh>
#include <mln/value/rgb8.hh>
#include <mln/value/label_16.hh>
-#include <mln/value/int_u16.hh>
-
-#include <mln/draw/box.hh>
-#include <mln/draw/line.hh>
-
-#include <mln/extension/adjust.hh>
-
-#include <mln/accu/stat/median_h.hh>
-
-#include <scribo/draw/bounding_boxes.hh>
-
-#include <scribo/primitive/extract/objects.hh>
-
-#include <scribo/primitive/link/merge_double_link.hh>
-#include <scribo/primitive/link/with_single_left_link_dmax_ratio.hh>
-#include <scribo/primitive/link/with_single_right_link_dmax_ratio.hh>
-
-#include <scribo/primitive/group/apply.hh>
-#include <scribo/primitive/group/from_double_link.hh>
-#include <scribo/primitive/group/from_single_link.hh>
-
-#include <scribo/filter/object_links_bbox_h_ratio.hh>
-
-#include <scribo/filter/objects_small.hh>
-#include <scribo/filter/objects_thin.hh>
-#include <scribo/filter/objects_thick.hh>
-
-#include <scribo/filter/object_groups_small.hh>
-
-#include <scribo/debug/decision_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_linked_bboxes_image.hh>
+#include <scribo/text/extract_lines.hh>
+#include <scribo/debug/line_info_image.hh>
#include <scribo/debug/usage.hh>
-#include <scribo/make/debug_filename.hh>
const char *args_desc[][2] =
{
{ "input.pbm", "A binary image. 'False' for objects,
'True'\
for the background." },
- { "debug_dir", "Output directory for debug image" },
{0, 0}
};
@@ -91,15 +56,11 @@ int main(int argc, char* argv[])
using namespace scribo;
using namespace mln;
- if (argc != 3 && argc != 4)
+ if (argc != 3)
return scribo::debug::usage(argv,
"Find text lines using left/right validation and display x-height in a binarized
article.",
- "input.pbm out.ppm <debug_dir>",
- args_desc,
- "A color image. The following colors are used : dark blue for object bboxes,
orange for single object bboxes, purple for group bboxes and light blue for
x-height.");
-
- if (argc == 4)
- scribo::make::internal::debug_filename_prefix = argv[3];
+ "input.pbm out.ppm",
+ args_desc);
trace::entering("main");
@@ -109,173 +70,10 @@ int main(int argc, char* argv[])
typedef image2d<value::label_16> L;
- /// Finding objects.
- std::cout << "Finding objects..." << std::endl;
- value::label_16 nobjects;
- object_image(L)
- objects = scribo::primitive::extract::objects(input,
- c8(),
- nobjects);
-
-
- /// First filtering.
- std::cout << "Filtering objects..." << std::endl;
- object_image(L) filtered_objects
- = scribo::filter::objects_small(objects, 6);
-
- /// Linking potential objects
- std::cout << "Linking objects..." << std::endl;
- object_links<L> left_link
- = primitive::link::with_single_left_link_dmax_ratio(filtered_objects);
- object_links<L> right_link
- = primitive::link::with_single_right_link_dmax_ratio(filtered_objects);
-
-
- // Validating left and right links.
- object_links<L>
- merged_links = primitive::link::merge_double_link(filtered_objects,
- left_link,
- right_link);
-
-#ifndef NOUT
- if (argc == 4)
- {
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
- scribo::draw::bounding_box_links(output,
- filtered_objects.bboxes(),
- merged_links,
- literal::green);
-
- util::array<bool> drawn(objects.nlabels(), 0);
- for_all_components(i, objects.bboxes())
- if (merged_links[i] == i && ! drawn(i))
- {
- mln::draw::box(output, objects.bbox(i), literal::orange);
- drawn[i] = true;
- }
- else
- {
- mln::draw::box(output, objects.bbox(i), literal::blue);
- mln::draw::box(output, objects.bbox(merged_links[i]), literal::blue);
- drawn[i] = true;
- drawn[merged_links[i]] = true;
- }
-
- io::ppm::save(output, scribo::make::debug_filename("links.ppm"));
- }
-#endif
-
-
- // Remove links if bboxes have too different sizes.
- object_links<L> hratio_filtered_links
- = filter::object_links_bbox_h_ratio(filtered_objects,
- merged_links,
- 2.0f);
-
-
-
-
-#ifndef NOUT
- if (argc == 4)
- {
- image2d<value::rgb8>
- hratio_decision_image = scribo::debug::decision_image(input,
- merged_links,
- hratio_filtered_links);
- io::ppm::save(hratio_decision_image,
- scribo::make::debug_filename("hratio_links_decision_image.ppm"));
- }
-#endif
-
-
-
- // FIXME: from_single_link should return a packed object_groups?
- //
- //######
- object_groups<L>
- groups = primitive::group::from_single_link(filtered_objects,
- hratio_filtered_links);
- value::label_16 n_groups;
- mln::fun::i2v::array<value::label_16>
- groups_packed = mln::make::relabelfun(groups,
- filtered_objects.nlabels(),
- n_groups);
- //######
-
-
- std::cout << "Grouping objects..." << std::endl;
- object_image(L)
- grouped_objects = primitive::group::apply(filtered_objects, groups);
-
-
-
- // Compute min_row/max_row median
- std::cout << "Preparing output" << std::endl;
- {
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
-
-// scribo::draw::bounding_box_links(output,
-// filtered_objects.bboxes(),
-// hratio_filtered_links,
-// literal::green);
-
- typedef mln::value::int_u<10> median_t;
- typedef mln::accu::stat::median_h<median_t> accu_t;
- util::array<accu_t>
- med_min_row(static_cast<unsigned>(grouped_objects.nlabels()) + 1),
- med_max_row(static_cast<unsigned>(grouped_objects.nlabels()) + 1);
-
-// std::cout << "Find median min/max rows" << std::endl;
- for_all_components(i, filtered_objects.bboxes())
- {
- if (groups_packed(i) != 0)
- {
- med_min_row(groups_packed(i)).take(filtered_objects.bbox(i).pmin().row() -
grouped_objects.bbox(groups_packed(i)).pmin().row());
-
- med_max_row(groups_packed(i)).take(grouped_objects.bbox(groups_packed(i)).pmax().row() -
filtered_objects.bbox(i).pmax().row());
- }
- }
-
- // Output
- std::cout << "Drawing bboxes" << std::endl;
- util::array<bool> drawn(static_cast<unsigned>(filtered_objects.nlabels())
+ 1, 0);
- util::array<bool> single(static_cast<unsigned>(grouped_objects.nlabels())
+ 1);
- for_all_components(i, filtered_objects.bboxes())
- if (hratio_filtered_links[i] == i && ! drawn(i))
- {
- mln::draw::box(output, filtered_objects.bbox(i), literal::orange);
- drawn[i] = true;
- single(groups_packed(i)) = true;
- }
- else
- {
- mln::draw::box(output, filtered_objects.bbox(i), literal::blue);
- mln::draw::box(output, filtered_objects.bbox(hratio_filtered_links[i]),
- literal::blue);
- drawn[i] = true;
- drawn[hratio_filtered_links[i]] = true;
- single(groups_packed(i)) = false;
- }
-
-// std::cout << "Drawing median lines" << std::endl;
- for_all_components(i, grouped_objects.bboxes())
- {
- if (! single(i))
- {
- point2d
- b_top(grouped_objects.bbox(i).pmin().row() + med_min_row(i).to_result(),
grouped_objects.bbox(i).pmin().col()),
- e_top(grouped_objects.bbox(i).pmin().row() + med_min_row(i).to_result(),
grouped_objects.bbox(i).pmax().col()),
- b_bot(grouped_objects.bbox(i).pmax().row() - med_max_row(i).to_result(),
grouped_objects.bbox(i).pmin().col()),
- e_bot(grouped_objects.bbox(i).pmax().row() - med_max_row(i).to_result(),
grouped_objects.bbox(i).pmax().col());
-
- mln::draw::box(output, grouped_objects.bbox(i), literal::purple);
- mln::draw::line(output, b_top, e_top, literal::cyan);
- mln::draw::line(output, b_bot, e_bot, literal::cyan);
- }
- }
+ line_set<L> line = scribo::text::extract_lines(input, c8());
- io::ppm::save(output, argv[2]);
- }
+ image2d<value::rgb8> output = scribo::debug::line_info_image(input, line);
+ io::ppm::save(output, argv[2]);
trace::exiting("main");
}
diff --git a/scribo/src/debug/show_links_bbox_h_ratio.cc
b/scribo/src/debug/show_links_bbox_h_ratio.cc
index 4377b41..7c5756f 100644
--- a/scribo/src/debug/show_links_bbox_h_ratio.cc
+++ b/scribo/src/debug/show_links_bbox_h_ratio.cc
@@ -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.
//
@@ -37,7 +38,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <scribo/primitive/extract/objects.hh>
+#include <scribo/primitive/extract/components.hh>
#include <scribo/primitive/link/with_single_right_link.hh>
#include <scribo/primitive/link/with_single_left_link.hh>
#include <scribo/filter/object_links_bbox_h_ratio.hh>
@@ -52,6 +53,7 @@ const char *args_desc[][2] =
{
{ "input.pbm", "A binary image. True for objects and False for the
background." },
{ "height_ratio", "Min height ratio between two bboxes. (common value :
2)" },
+ { "max_dist", "Max neighborhood lookup distance (default 30)" },
{0, 0}
};
@@ -62,12 +64,11 @@ int main(int argc, char* argv[])
using namespace scribo::primitive::internal;
using namespace mln;
- if (argc != 4)
+ if (argc != 4 && argc != 5)
return scribo::debug::usage(argv,
"Show valid or invalid links according the bboxes height ratio.",
- "input.pbm height_ratio output.ppm",
- args_desc,
- "A color image. Valid links are drawn in green, invalid ones in red.");
+ "input.pbm height_ratio output.ppm <max_dist>",
+ args_desc);
image2d<bool> input;
io::pbm::load(input, argv[1]);
@@ -75,24 +76,27 @@ int main(int argc, char* argv[])
// Finding objects.
value::label_16 nbboxes;
typedef image2d<value::label_16> L;
- object_image(L) objects
- = scribo::primitive::extract::objects(input, c8(), nbboxes);
+ component_set<L> comps
+ = scribo::primitive::extract::components(input, c8(), nbboxes);
+ unsigned max_dist = 30;
+ if (argc == 5)
+ max_dist = atoi(argv[4]);
// Finding right links.
object_links<L> right_links
- = primitive::link::with_single_right_link(objects);
+ = primitive::link::with_single_right_link(comps, max_dist);
// Filtering.
object_links<L> hratio_filtered_links
- = filter::object_links_bbox_h_ratio(objects, right_links, atof(argv[2]));
+ = filter::object_links_bbox_h_ratio(right_links, atof(argv[2]));
// Debug image.
image2d<value::rgb8> hratio_decision_image
= scribo::debug::links_decision_image(input,
right_links,
- hratio_filtered_links, 200);
+ hratio_filtered_links);
io::ppm::save(hratio_decision_image, argv[3]);
}
diff --git a/scribo/src/debug/show_links_left_right_links_validation.cc
b/scribo/src/debug/show_links_left_right_links_validation.cc
index 3c5d1bf..e022fa5 100644
--- a/scribo/src/debug/show_links_left_right_links_validation.cc
+++ b/scribo/src/debug/show_links_left_right_links_validation.cc
@@ -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.
//
@@ -39,7 +40,7 @@
#include <scribo/core/object_links.hh>
#include <scribo/core/object_image.hh>
-#include <scribo/primitive/extract/objects.hh>
+#include <scribo/primitive/extract/components.hh>
#include <scribo/primitive/link/with_single_left_link.hh>
#include <scribo/primitive/link/with_single_right_link.hh>
@@ -70,8 +71,7 @@ int main(int argc, char *argv[])
return scribo::debug::usage(argv,
"Display double validated (left and right) links between objects",
"<input.pbm> <hlmax> <hrmax> <output.ppm>",
- args_desc,
- "A color image. Validated links are drawn in green.");
+ args_desc);
image2d<bool> input;
io::pbm::load(input, argv[1]);
@@ -79,43 +79,41 @@ int main(int argc, char *argv[])
// Finding objects.
value::label_16 nbboxes;
typedef image2d<value::label_16> L;
- object_image(L) objects = primitive::extract::objects(input, c8(), nbboxes);
+ component_set<L> comps = primitive::extract::components(input, c8(), nbboxes);
// Left links.
object_links<L> left_link
- = primitive::link::with_single_left_link(objects, atoi(argv[2]));
+ = primitive::link::with_single_left_link(comps, atoi(argv[2]));
// Right links.
object_links<L> right_link
- = primitive::link::with_single_right_link(objects, atoi(argv[3]));
+ = primitive::link::with_single_right_link(comps, atoi(argv[3]));
// Validation.
object_links<L>
- links = primitive::link::merge_double_link(objects, left_link, right_link);
+ links = primitive::link::merge_double_link(left_link, right_link);
// Saving result.
image2d<value::rgb8> output = data::convert(value::rgb8(), input);
-// scribo::draw::bounding_boxes(output, objects, literal::blue);
scribo::draw::bounding_box_links(output,
- objects.bboxes(),
links,
- literal::green);
+ literal::green, anchor::MassCenter);
- util::array<bool> drawn(static_cast<unsigned>(objects.nlabels()) + 1, 0);
- for_all_components(i, objects.bboxes())
- if (links[i] == i && ! drawn(i))
+ util::array<bool> drawn(unsigned(comps.nelements()) + 1, 0);
+ for_all_comps(i, comps)
+ if (links(i) == i && ! drawn(i))
{
- mln::draw::box(output, objects.bbox(i), literal::orange);
+ mln::draw::box(output, comps(i).bbox(), literal::orange);
drawn[i] = true;
}
else
{
- mln::draw::box(output, objects.bbox(i), literal::blue);
- mln::draw::box(output, objects.bbox(links[i]), literal::blue);
+ mln::draw::box(output, comps(i).bbox(), literal::blue);
+ mln::draw::box(output, comps(links(i)).bbox(), literal::blue);
drawn[i] = true;
- drawn[links[i]] = true;
+ drawn[links(i)] = true;
}
io::ppm::save(output, argv[4]);
diff --git a/scribo/tests/unit_test/unit-tests.mk b/scribo/tests/unit_test/unit-tests.mk
index 055b90e..a37db3b 100644
--- a/scribo/tests/unit_test/unit-tests.mk
+++ b/scribo/tests/unit_test/unit-tests.mk
@@ -2,23 +2,45 @@
check_PROGRAMS = \
scribo_all \
-scribo_binarization_binarize \
+scribo_binarization_global_threshold \
+scribo_binarization_global_threshold_auto \
+scribo_binarization_internal_first_pass_functor \
+scribo_binarization_internal_min_mean_max_stddev \
+scribo_binarization_local_threshold \
scribo_binarization_sauvola \
-scribo_binarization_sauvola_threshold \
-scribo_binarization_simple \
+scribo_binarization_sauvola_ms \
+scribo_binarization_sauvola_ms_split \
+scribo_binarization_sauvola_threshold_image \
+scribo_binarization_sauvola_threshold_image_debug \
+scribo_canvas_integral_browsing \
+scribo_convert_from_qimage \
scribo_core_all \
scribo_core_central_sites \
+scribo_core_component_info \
+scribo_core_component_set \
+scribo_core_concept_dmax_functor \
scribo_core_concept_link_functor \
+scribo_core_def_lbl_type \
scribo_core_erase_objects \
+scribo_core_init_integral_image \
scribo_core_internal_link_functor_base \
+scribo_core_line_info \
+scribo_core_line_set \
scribo_core_macros \
scribo_core_object_groups \
scribo_core_object_image \
scribo_core_object_links \
+scribo_core_tag_anchor \
+scribo_core_tag_component \
+scribo_core_tag_line \
scribo_debug_alignment_decision_image \
scribo_debug_all \
+scribo_debug_bboxes_enlarged_image \
scribo_debug_decision_image \
+scribo_debug_highlight_text_area \
scribo_debug_links_decision_image \
+scribo_debug_looks_like_a_text_line_image \
+scribo_debug_mean_and_base_lines_image \
scribo_debug_save_bboxes_image \
scribo_debug_save_label_image \
scribo_debug_save_linked_bboxes_image \
@@ -26,26 +48,83 @@ scribo_debug_save_object_diff \
scribo_debug_save_table_image \
scribo_debug_several_links_decision_image \
scribo_debug_usage \
+scribo_demo_demat_src_doc_type \
+scribo_demo_demat_src_main_window \
+scribo_demo_demat_src_preprocessing_task \
+scribo_demo_demat_src_process_args \
+scribo_demo_demat_src_runner \
+scribo_demo_review_src_mainwindow \
+scribo_demo_shared_src_bak_crop_item \
+scribo_demo_shared_src_bak_image_viewer \
+scribo_demo_shared_src_bak_types \
+scribo_demo_shared_src_browse_widget \
+scribo_demo_shared_src_crop_item \
+scribo_demo_shared_src_image_viewer \
+scribo_demo_shared_src_internal_bak_interactive_scene \
+scribo_demo_shared_src_internal_bak_selection_rectangle \
+scribo_demo_shared_src_internal_interactive_scene \
+scribo_demo_shared_src_internal_selection_rectangle \
+scribo_demo_shared_src_to_mln_image \
+scribo_demo_shared_src_types \
+scribo_demo_shared_ui_interactive_scene \
+scribo_demo_tip_src_custom_delegate \
+scribo_demo_tip_src_launch_dialog \
+scribo_demo_tip_src_main_window \
+scribo_demo_viewer_browser_widget \
+scribo_demo_viewer_common \
+scribo_demo_viewer_domitem \
+scribo_demo_viewer_dommodel \
+scribo_demo_viewer_help_dialog \
+scribo_demo_viewer_image_region \
+scribo_demo_viewer_image_scene \
+scribo_demo_viewer_image_view \
+scribo_demo_viewer_image_widget \
+scribo_demo_viewer_key_widget \
+scribo_demo_viewer_property_widget \
+scribo_demo_viewer_step_widget \
+scribo_demo_viewer_viewer \
+scribo_demo_viewer_xml_widget \
+scribo_demo_wizard_src_crop_page \
+scribo_demo_wizard_src_crop_widget \
+scribo_demo_wizard_src_doc_type \
+scribo_demo_wizard_src_doc_type_page \
+scribo_demo_wizard_src_doc_type_widget \
+scribo_demo_wizard_src_load_page \
+scribo_demo_wizard_src_load_widget \
+scribo_demo_wizard_src_main_window \
+scribo_demo_wizard_src_preprocessing_page \
+scribo_demo_wizard_src_preprocessing_task \
+scribo_demo_wizard_src_preprocessing_widget \
+scribo_demo_wizard_src_process_page \
+scribo_demo_wizard_src_process_widget \
+scribo_demo_wizard_src_result_page \
+scribo_demo_wizard_src_result_widget \
+scribo_demo_wizard_src_rotate_page \
+scribo_demo_wizard_src_rotate_widget \
+scribo_demo_wizard_src_runner \
scribo_draw_all \
scribo_draw_bounding_box_links \
scribo_draw_bounding_boxes \
+scribo_draw_groups_bboxes \
scribo_estim_object_groups_v_thickness \
scribo_filter_all \
scribo_filter_common_objects_photo \
+scribo_filter_internal_alignment_angle \
+scribo_filter_internal_component_aligned \
scribo_filter_internal_compute \
scribo_filter_object_groups_size_ratio \
scribo_filter_object_groups_small \
scribo_filter_object_groups_v_thickness \
+scribo_filter_object_groups_with_holes \
scribo_filter_object_links_bbox_h_ratio \
scribo_filter_object_links_bbox_overlap \
scribo_filter_object_links_bbox_ratio \
scribo_filter_object_links_bbox_w_ratio \
scribo_filter_object_links_bottom_aligned \
scribo_filter_object_links_center_aligned \
-scribo_filter_object_links_non_aligned \
+scribo_filter_object_links_left_aligned \
scribo_filter_object_links_non_aligned_simple \
-scribo_filter_object_links_non_h_aligned \
-scribo_filter_object_links_non_v_aligned \
+scribo_filter_object_links_right_aligned \
scribo_filter_object_links_top_aligned \
scribo_filter_objects_h_thick \
scribo_filter_objects_h_thin \
@@ -56,18 +135,34 @@ scribo_filter_objects_thick \
scribo_filter_objects_thin \
scribo_filter_objects_v_thick \
scribo_filter_objects_v_thin \
+scribo_filter_objects_with_holes \
+scribo_fun_v2b_label_to_bool \
+scribo_fun_v2b_objects_large_filter \
scribo_fun_v2b_objects_small_filter \
+scribo_io_text_boxes_save \
+scribo_io_xml_save \
scribo_make_all \
scribo_make_debug_filename \
scribo_make_influence_zone_graph \
scribo_make_text \
+scribo_postprocessing_fill_object_holes \
scribo_preprocessing_all \
+scribo_preprocessing_crop \
+scribo_preprocessing_crop_without_localization \
+scribo_preprocessing_denoise \
+scribo_preprocessing_denoise_bg \
+scribo_preprocessing_denoise_fg \
+scribo_preprocessing_deskew \
+scribo_preprocessing_deskew_crop \
+scribo_preprocessing_homogeneous_contrast \
+scribo_preprocessing_rotate_90 \
scribo_preprocessing_split_bg_fg \
-scribo_preprocessing_unskew \
scribo_primitive_all \
scribo_primitive_extract_all \
scribo_primitive_extract_canvas \
scribo_primitive_extract_cells \
+scribo_primitive_extract_components \
+scribo_primitive_extract_horizontal_separators \
scribo_primitive_extract_lines_discontinued \
scribo_primitive_extract_lines_h_discontinued \
scribo_primitive_extract_lines_h_pattern \
@@ -81,32 +176,39 @@ scribo_primitive_extract_lines_v_pattern \
scribo_primitive_extract_lines_v_single \
scribo_primitive_extract_lines_v_thick \
scribo_primitive_extract_lines_v_thick_and_single \
-scribo_primitive_extract_objects \
+scribo_primitive_extract_separators \
+scribo_primitive_extract_vertical_separators \
scribo_primitive_group_all \
scribo_primitive_group_apply \
scribo_primitive_group_from_double_link \
+scribo_primitive_group_from_double_link_any \
scribo_primitive_group_from_graph \
scribo_primitive_group_from_single_link \
+scribo_primitive_group_from_single_link_robust \
scribo_primitive_internal_all \
scribo_primitive_internal_find_graph_link \
-scribo_primitive_internal_find_left_link \
-scribo_primitive_internal_find_right_link \
scribo_primitive_internal_find_root \
+scribo_primitive_internal_find_root_robust \
scribo_primitive_internal_have_link_valid \
-scribo_primitive_internal_init_link_array \
-scribo_primitive_internal_is_invalid_link \
scribo_primitive_internal_is_link_valid \
+scribo_primitive_internal_rd \
scribo_primitive_internal_update_graph_link \
scribo_primitive_internal_update_link_array \
scribo_primitive_link_all \
scribo_primitive_link_compute \
scribo_primitive_link_internal_anchors_3 \
+scribo_primitive_link_internal_compute_anchor \
+scribo_primitive_link_internal_dmax_default \
+scribo_primitive_link_internal_dmax_functor_base \
+scribo_primitive_link_internal_dmax_width_and_height \
+scribo_primitive_link_internal_dmax_width_only \
scribo_primitive_link_internal_find_link \
-scribo_primitive_link_internal_link_center_dmax_base \
-scribo_primitive_link_internal_link_center_dmax_ratio_base \
scribo_primitive_link_internal_link_functor_base \
scribo_primitive_link_internal_link_ms_dmax_base \
scribo_primitive_link_internal_link_ms_dmax_ratio_base \
+scribo_primitive_link_internal_link_several_dmax_base \
+scribo_primitive_link_internal_link_single_dmax_base \
+scribo_primitive_link_internal_link_single_dmax_ratio_base \
scribo_primitive_link_merge_double_link \
scribo_primitive_link_with_graph \
scribo_primitive_link_with_rag \
@@ -114,12 +216,76 @@ scribo_primitive_link_with_several_graphes \
scribo_primitive_link_with_several_left_links \
scribo_primitive_link_with_several_right_closest_links \
scribo_primitive_link_with_several_right_links \
+scribo_primitive_link_with_single_down_link \
scribo_primitive_link_with_single_left_link \
scribo_primitive_link_with_single_left_link_dmax_ratio \
scribo_primitive_link_with_single_right_link \
scribo_primitive_link_with_single_right_link_bottom \
scribo_primitive_link_with_single_right_link_dmax_ratio \
+scribo_primitive_link_with_single_right_link_dmax_ratio_aligned \
scribo_primitive_link_with_single_right_link_top \
+scribo_primitive_link_with_single_up_link \
+scribo_primitive_regroup_from_single_left_link \
+scribo_primitive_remove_separators \
+scribo_sandbox__julien_hough_hough_hough_pgm \
+scribo_sandbox__julien_hough_hough_hough_v1 \
+scribo_sandbox__julien_hough_hough_hough_v2 \
+scribo_sandbox__julien_hough_hough_hough_v3 \
+scribo_sandbox__julien_hough_hough_hough_v4 \
+scribo_sandbox__julien_hough_kht_buffer_2d \
+scribo_sandbox__julien_hough_kht_closing \
+scribo_sandbox__julien_hough_kht_eigen \
+scribo_sandbox__julien_hough_kht_filter \
+scribo_sandbox__julien_hough_kht_kht \
+scribo_sandbox__julien_hough_kht_linking \
+scribo_sandbox__julien_hough_kht_peak_detection \
+scribo_sandbox__julien_hough_kht_subdivision \
+scribo_sandbox__julien_hough_kht_types \
+scribo_sandbox__julien_hough_kht_voting \
+scribo_sandbox__julien_upsampling_eagle \
+scribo_sandbox__julien_upsampling_pyxies \
+scribo_sandbox_green_mln_accu_stat_histo1d \
+scribo_sandbox_green_mln_accu_stat_histo2d \
+scribo_sandbox_green_mln_accu_stat_histo3d_hsl \
+scribo_sandbox_green_mln_accu_stat_histo3d_rgb \
+scribo_sandbox_green_mln_clustering_k_mean \
+scribo_sandbox_green_mln_clustering_kmean1d \
+scribo_sandbox_green_mln_clustering_kmean2d \
+scribo_sandbox_green_mln_clustering_kmean3d \
+scribo_sandbox_green_mln_clustering_kmean_rgb \
+scribo_sandbox_green_mln_display_display_histo \
+scribo_sandbox_green_mln_display_project_histo \
+scribo_sandbox_green_mln_fun_p2b_achromatic \
+scribo_sandbox_green_mln_fun_p2b_component_equals \
+scribo_sandbox_green_mln_fun_v2v_achromatism \
+scribo_sandbox_green_mln_fun_v2v_hue_concentration \
+scribo_sandbox_green_mln_fun_v2v_int_u16_to_int_u14 \
+scribo_sandbox_green_mln_fun_v2v_log \
+scribo_sandbox_green_mln_fun_v2v_rg_to_rgb \
+scribo_sandbox_green_mln_fun_v2v_rgb8_to_int_u8 \
+scribo_sandbox_green_mln_fun_v2v_rgb8_to_rgbn \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_achromatism_map \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_hsv \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_hue_map \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_rg \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_saturation_map \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_value_map \
+scribo_sandbox_green_mln_img_path \
+scribo_sandbox_green_mln_io_plot_save_image_sh \
+scribo_sandbox_green_mln_math_ceil \
+scribo_sandbox_green_mln_math_floor \
+scribo_sandbox_green_mln_value_hsv \
+scribo_sandbox_green_mln_value_rg \
+scribo_sandbox_green_ok_mln_accu_histo_histo1d \
+scribo_sandbox_green_ok_mln_accu_histo_histo2d \
+scribo_sandbox_green_ok_mln_accu_histo_histo3d \
+scribo_sandbox_green_ok_mln_img_path \
+scribo_src_afp_components \
+scribo_src_afp_link \
+scribo_src_afp_regroup \
+scribo_subsampling_bilinear \
+scribo_subsampling_integral \
+scribo_subsampling_integral_single_image \
scribo_table_align_lines_horizontaly \
scribo_table_align_lines_verticaly \
scribo_table_all \
@@ -136,28 +302,55 @@ scribo_table_repair_horizontal_lines \
scribo_table_repair_vertical_lines \
scribo_text_all \
scribo_text_clean \
+scribo_text_clean_inplace \
scribo_text_extract_lines \
-scribo_util_all \
-scribo_util_text
+scribo_text_look_like_text_lines \
+scribo_text_merging \
+scribo_toolchain_nepomuk_text_extraction \
+scribo_toolchain_text_in_doc \
+scribo_upsampling_bs2x \
+scribo_upsampling_eagle
scribo_all_SOURCES = scribo_all.cc
-scribo_binarization_binarize_SOURCES = scribo_binarization_binarize.cc
+scribo_binarization_global_threshold_SOURCES = scribo_binarization_global_threshold.cc
+scribo_binarization_global_threshold_auto_SOURCES =
scribo_binarization_global_threshold_auto.cc
+scribo_binarization_internal_first_pass_functor_SOURCES =
scribo_binarization_internal_first_pass_functor.cc
+scribo_binarization_internal_min_mean_max_stddev_SOURCES =
scribo_binarization_internal_min_mean_max_stddev.cc
+scribo_binarization_local_threshold_SOURCES = scribo_binarization_local_threshold.cc
scribo_binarization_sauvola_SOURCES = scribo_binarization_sauvola.cc
-scribo_binarization_sauvola_threshold_SOURCES = scribo_binarization_sauvola_threshold.cc
-scribo_binarization_simple_SOURCES = scribo_binarization_simple.cc
+scribo_binarization_sauvola_ms_SOURCES = scribo_binarization_sauvola_ms.cc
+scribo_binarization_sauvola_ms_split_SOURCES = scribo_binarization_sauvola_ms_split.cc
+scribo_binarization_sauvola_threshold_image_SOURCES =
scribo_binarization_sauvola_threshold_image.cc
+scribo_binarization_sauvola_threshold_image_debug_SOURCES =
scribo_binarization_sauvola_threshold_image_debug.cc
+scribo_canvas_integral_browsing_SOURCES = scribo_canvas_integral_browsing.cc
+scribo_convert_from_qimage_SOURCES = scribo_convert_from_qimage.cc
scribo_core_all_SOURCES = scribo_core_all.cc
scribo_core_central_sites_SOURCES = scribo_core_central_sites.cc
+scribo_core_component_info_SOURCES = scribo_core_component_info.cc
+scribo_core_component_set_SOURCES = scribo_core_component_set.cc
+scribo_core_concept_dmax_functor_SOURCES = scribo_core_concept_dmax_functor.cc
scribo_core_concept_link_functor_SOURCES = scribo_core_concept_link_functor.cc
+scribo_core_def_lbl_type_SOURCES = scribo_core_def_lbl_type.cc
scribo_core_erase_objects_SOURCES = scribo_core_erase_objects.cc
+scribo_core_init_integral_image_SOURCES = scribo_core_init_integral_image.cc
scribo_core_internal_link_functor_base_SOURCES =
scribo_core_internal_link_functor_base.cc
+scribo_core_line_info_SOURCES = scribo_core_line_info.cc
+scribo_core_line_set_SOURCES = scribo_core_line_set.cc
scribo_core_macros_SOURCES = scribo_core_macros.cc
scribo_core_object_groups_SOURCES = scribo_core_object_groups.cc
scribo_core_object_image_SOURCES = scribo_core_object_image.cc
scribo_core_object_links_SOURCES = scribo_core_object_links.cc
+scribo_core_tag_anchor_SOURCES = scribo_core_tag_anchor.cc
+scribo_core_tag_component_SOURCES = scribo_core_tag_component.cc
+scribo_core_tag_line_SOURCES = scribo_core_tag_line.cc
scribo_debug_alignment_decision_image_SOURCES = scribo_debug_alignment_decision_image.cc
scribo_debug_all_SOURCES = scribo_debug_all.cc
+scribo_debug_bboxes_enlarged_image_SOURCES = scribo_debug_bboxes_enlarged_image.cc
scribo_debug_decision_image_SOURCES = scribo_debug_decision_image.cc
+scribo_debug_highlight_text_area_SOURCES = scribo_debug_highlight_text_area.cc
scribo_debug_links_decision_image_SOURCES = scribo_debug_links_decision_image.cc
+scribo_debug_looks_like_a_text_line_image_SOURCES =
scribo_debug_looks_like_a_text_line_image.cc
+scribo_debug_mean_and_base_lines_image_SOURCES =
scribo_debug_mean_and_base_lines_image.cc
scribo_debug_save_bboxes_image_SOURCES = scribo_debug_save_bboxes_image.cc
scribo_debug_save_label_image_SOURCES = scribo_debug_save_label_image.cc
scribo_debug_save_linked_bboxes_image_SOURCES = scribo_debug_save_linked_bboxes_image.cc
@@ -165,26 +358,83 @@ scribo_debug_save_object_diff_SOURCES =
scribo_debug_save_object_diff.cc
scribo_debug_save_table_image_SOURCES = scribo_debug_save_table_image.cc
scribo_debug_several_links_decision_image_SOURCES =
scribo_debug_several_links_decision_image.cc
scribo_debug_usage_SOURCES = scribo_debug_usage.cc
+scribo_demo_demat_src_doc_type_SOURCES = scribo_demo_demat_src_doc_type.cc
+scribo_demo_demat_src_main_window_SOURCES = scribo_demo_demat_src_main_window.cc
+scribo_demo_demat_src_preprocessing_task_SOURCES =
scribo_demo_demat_src_preprocessing_task.cc
+scribo_demo_demat_src_process_args_SOURCES = scribo_demo_demat_src_process_args.cc
+scribo_demo_demat_src_runner_SOURCES = scribo_demo_demat_src_runner.cc
+scribo_demo_review_src_mainwindow_SOURCES = scribo_demo_review_src_mainwindow.cc
+scribo_demo_shared_src_bak_crop_item_SOURCES = scribo_demo_shared_src_bak_crop_item.cc
+scribo_demo_shared_src_bak_image_viewer_SOURCES =
scribo_demo_shared_src_bak_image_viewer.cc
+scribo_demo_shared_src_bak_types_SOURCES = scribo_demo_shared_src_bak_types.cc
+scribo_demo_shared_src_browse_widget_SOURCES = scribo_demo_shared_src_browse_widget.cc
+scribo_demo_shared_src_crop_item_SOURCES = scribo_demo_shared_src_crop_item.cc
+scribo_demo_shared_src_image_viewer_SOURCES = scribo_demo_shared_src_image_viewer.cc
+scribo_demo_shared_src_internal_bak_interactive_scene_SOURCES =
scribo_demo_shared_src_internal_bak_interactive_scene.cc
+scribo_demo_shared_src_internal_bak_selection_rectangle_SOURCES =
scribo_demo_shared_src_internal_bak_selection_rectangle.cc
+scribo_demo_shared_src_internal_interactive_scene_SOURCES =
scribo_demo_shared_src_internal_interactive_scene.cc
+scribo_demo_shared_src_internal_selection_rectangle_SOURCES =
scribo_demo_shared_src_internal_selection_rectangle.cc
+scribo_demo_shared_src_to_mln_image_SOURCES = scribo_demo_shared_src_to_mln_image.cc
+scribo_demo_shared_src_types_SOURCES = scribo_demo_shared_src_types.cc
+scribo_demo_shared_ui_interactive_scene_SOURCES =
scribo_demo_shared_ui_interactive_scene.cc
+scribo_demo_tip_src_custom_delegate_SOURCES = scribo_demo_tip_src_custom_delegate.cc
+scribo_demo_tip_src_launch_dialog_SOURCES = scribo_demo_tip_src_launch_dialog.cc
+scribo_demo_tip_src_main_window_SOURCES = scribo_demo_tip_src_main_window.cc
+scribo_demo_viewer_browser_widget_SOURCES = scribo_demo_viewer_browser_widget.cc
+scribo_demo_viewer_common_SOURCES = scribo_demo_viewer_common.cc
+scribo_demo_viewer_domitem_SOURCES = scribo_demo_viewer_domitem.cc
+scribo_demo_viewer_dommodel_SOURCES = scribo_demo_viewer_dommodel.cc
+scribo_demo_viewer_help_dialog_SOURCES = scribo_demo_viewer_help_dialog.cc
+scribo_demo_viewer_image_region_SOURCES = scribo_demo_viewer_image_region.cc
+scribo_demo_viewer_image_scene_SOURCES = scribo_demo_viewer_image_scene.cc
+scribo_demo_viewer_image_view_SOURCES = scribo_demo_viewer_image_view.cc
+scribo_demo_viewer_image_widget_SOURCES = scribo_demo_viewer_image_widget.cc
+scribo_demo_viewer_key_widget_SOURCES = scribo_demo_viewer_key_widget.cc
+scribo_demo_viewer_property_widget_SOURCES = scribo_demo_viewer_property_widget.cc
+scribo_demo_viewer_step_widget_SOURCES = scribo_demo_viewer_step_widget.cc
+scribo_demo_viewer_viewer_SOURCES = scribo_demo_viewer_viewer.cc
+scribo_demo_viewer_xml_widget_SOURCES = scribo_demo_viewer_xml_widget.cc
+scribo_demo_wizard_src_crop_page_SOURCES = scribo_demo_wizard_src_crop_page.cc
+scribo_demo_wizard_src_crop_widget_SOURCES = scribo_demo_wizard_src_crop_widget.cc
+scribo_demo_wizard_src_doc_type_SOURCES = scribo_demo_wizard_src_doc_type.cc
+scribo_demo_wizard_src_doc_type_page_SOURCES = scribo_demo_wizard_src_doc_type_page.cc
+scribo_demo_wizard_src_doc_type_widget_SOURCES =
scribo_demo_wizard_src_doc_type_widget.cc
+scribo_demo_wizard_src_load_page_SOURCES = scribo_demo_wizard_src_load_page.cc
+scribo_demo_wizard_src_load_widget_SOURCES = scribo_demo_wizard_src_load_widget.cc
+scribo_demo_wizard_src_main_window_SOURCES = scribo_demo_wizard_src_main_window.cc
+scribo_demo_wizard_src_preprocessing_page_SOURCES =
scribo_demo_wizard_src_preprocessing_page.cc
+scribo_demo_wizard_src_preprocessing_task_SOURCES =
scribo_demo_wizard_src_preprocessing_task.cc
+scribo_demo_wizard_src_preprocessing_widget_SOURCES =
scribo_demo_wizard_src_preprocessing_widget.cc
+scribo_demo_wizard_src_process_page_SOURCES = scribo_demo_wizard_src_process_page.cc
+scribo_demo_wizard_src_process_widget_SOURCES = scribo_demo_wizard_src_process_widget.cc
+scribo_demo_wizard_src_result_page_SOURCES = scribo_demo_wizard_src_result_page.cc
+scribo_demo_wizard_src_result_widget_SOURCES = scribo_demo_wizard_src_result_widget.cc
+scribo_demo_wizard_src_rotate_page_SOURCES = scribo_demo_wizard_src_rotate_page.cc
+scribo_demo_wizard_src_rotate_widget_SOURCES = scribo_demo_wizard_src_rotate_widget.cc
+scribo_demo_wizard_src_runner_SOURCES = scribo_demo_wizard_src_runner.cc
scribo_draw_all_SOURCES = scribo_draw_all.cc
scribo_draw_bounding_box_links_SOURCES = scribo_draw_bounding_box_links.cc
scribo_draw_bounding_boxes_SOURCES = scribo_draw_bounding_boxes.cc
+scribo_draw_groups_bboxes_SOURCES = scribo_draw_groups_bboxes.cc
scribo_estim_object_groups_v_thickness_SOURCES =
scribo_estim_object_groups_v_thickness.cc
scribo_filter_all_SOURCES = scribo_filter_all.cc
scribo_filter_common_objects_photo_SOURCES = scribo_filter_common_objects_photo.cc
+scribo_filter_internal_alignment_angle_SOURCES =
scribo_filter_internal_alignment_angle.cc
+scribo_filter_internal_component_aligned_SOURCES =
scribo_filter_internal_component_aligned.cc
scribo_filter_internal_compute_SOURCES = scribo_filter_internal_compute.cc
scribo_filter_object_groups_size_ratio_SOURCES =
scribo_filter_object_groups_size_ratio.cc
scribo_filter_object_groups_small_SOURCES = scribo_filter_object_groups_small.cc
scribo_filter_object_groups_v_thickness_SOURCES =
scribo_filter_object_groups_v_thickness.cc
+scribo_filter_object_groups_with_holes_SOURCES =
scribo_filter_object_groups_with_holes.cc
scribo_filter_object_links_bbox_h_ratio_SOURCES =
scribo_filter_object_links_bbox_h_ratio.cc
scribo_filter_object_links_bbox_overlap_SOURCES =
scribo_filter_object_links_bbox_overlap.cc
scribo_filter_object_links_bbox_ratio_SOURCES = scribo_filter_object_links_bbox_ratio.cc
scribo_filter_object_links_bbox_w_ratio_SOURCES =
scribo_filter_object_links_bbox_w_ratio.cc
scribo_filter_object_links_bottom_aligned_SOURCES =
scribo_filter_object_links_bottom_aligned.cc
scribo_filter_object_links_center_aligned_SOURCES =
scribo_filter_object_links_center_aligned.cc
-scribo_filter_object_links_non_aligned_SOURCES =
scribo_filter_object_links_non_aligned.cc
+scribo_filter_object_links_left_aligned_SOURCES =
scribo_filter_object_links_left_aligned.cc
scribo_filter_object_links_non_aligned_simple_SOURCES =
scribo_filter_object_links_non_aligned_simple.cc
-scribo_filter_object_links_non_h_aligned_SOURCES =
scribo_filter_object_links_non_h_aligned.cc
-scribo_filter_object_links_non_v_aligned_SOURCES =
scribo_filter_object_links_non_v_aligned.cc
+scribo_filter_object_links_right_aligned_SOURCES =
scribo_filter_object_links_right_aligned.cc
scribo_filter_object_links_top_aligned_SOURCES =
scribo_filter_object_links_top_aligned.cc
scribo_filter_objects_h_thick_SOURCES = scribo_filter_objects_h_thick.cc
scribo_filter_objects_h_thin_SOURCES = scribo_filter_objects_h_thin.cc
@@ -195,18 +445,34 @@ scribo_filter_objects_thick_SOURCES =
scribo_filter_objects_thick.cc
scribo_filter_objects_thin_SOURCES = scribo_filter_objects_thin.cc
scribo_filter_objects_v_thick_SOURCES = scribo_filter_objects_v_thick.cc
scribo_filter_objects_v_thin_SOURCES = scribo_filter_objects_v_thin.cc
+scribo_filter_objects_with_holes_SOURCES = scribo_filter_objects_with_holes.cc
+scribo_fun_v2b_label_to_bool_SOURCES = scribo_fun_v2b_label_to_bool.cc
+scribo_fun_v2b_objects_large_filter_SOURCES = scribo_fun_v2b_objects_large_filter.cc
scribo_fun_v2b_objects_small_filter_SOURCES = scribo_fun_v2b_objects_small_filter.cc
+scribo_io_text_boxes_save_SOURCES = scribo_io_text_boxes_save.cc
+scribo_io_xml_save_SOURCES = scribo_io_xml_save.cc
scribo_make_all_SOURCES = scribo_make_all.cc
scribo_make_debug_filename_SOURCES = scribo_make_debug_filename.cc
scribo_make_influence_zone_graph_SOURCES = scribo_make_influence_zone_graph.cc
scribo_make_text_SOURCES = scribo_make_text.cc
+scribo_postprocessing_fill_object_holes_SOURCES =
scribo_postprocessing_fill_object_holes.cc
scribo_preprocessing_all_SOURCES = scribo_preprocessing_all.cc
+scribo_preprocessing_crop_SOURCES = scribo_preprocessing_crop.cc
+scribo_preprocessing_crop_without_localization_SOURCES =
scribo_preprocessing_crop_without_localization.cc
+scribo_preprocessing_denoise_SOURCES = scribo_preprocessing_denoise.cc
+scribo_preprocessing_denoise_bg_SOURCES = scribo_preprocessing_denoise_bg.cc
+scribo_preprocessing_denoise_fg_SOURCES = scribo_preprocessing_denoise_fg.cc
+scribo_preprocessing_deskew_SOURCES = scribo_preprocessing_deskew.cc
+scribo_preprocessing_deskew_crop_SOURCES = scribo_preprocessing_deskew_crop.cc
+scribo_preprocessing_homogeneous_contrast_SOURCES =
scribo_preprocessing_homogeneous_contrast.cc
+scribo_preprocessing_rotate_90_SOURCES = scribo_preprocessing_rotate_90.cc
scribo_preprocessing_split_bg_fg_SOURCES = scribo_preprocessing_split_bg_fg.cc
-scribo_preprocessing_unskew_SOURCES = scribo_preprocessing_unskew.cc
scribo_primitive_all_SOURCES = scribo_primitive_all.cc
scribo_primitive_extract_all_SOURCES = scribo_primitive_extract_all.cc
scribo_primitive_extract_canvas_SOURCES = scribo_primitive_extract_canvas.cc
scribo_primitive_extract_cells_SOURCES = scribo_primitive_extract_cells.cc
+scribo_primitive_extract_components_SOURCES = scribo_primitive_extract_components.cc
+scribo_primitive_extract_horizontal_separators_SOURCES =
scribo_primitive_extract_horizontal_separators.cc
scribo_primitive_extract_lines_discontinued_SOURCES =
scribo_primitive_extract_lines_discontinued.cc
scribo_primitive_extract_lines_h_discontinued_SOURCES =
scribo_primitive_extract_lines_h_discontinued.cc
scribo_primitive_extract_lines_h_pattern_SOURCES =
scribo_primitive_extract_lines_h_pattern.cc
@@ -220,32 +486,39 @@ scribo_primitive_extract_lines_v_pattern_SOURCES =
scribo_primitive_extract_line
scribo_primitive_extract_lines_v_single_SOURCES =
scribo_primitive_extract_lines_v_single.cc
scribo_primitive_extract_lines_v_thick_SOURCES =
scribo_primitive_extract_lines_v_thick.cc
scribo_primitive_extract_lines_v_thick_and_single_SOURCES =
scribo_primitive_extract_lines_v_thick_and_single.cc
-scribo_primitive_extract_objects_SOURCES = scribo_primitive_extract_objects.cc
+scribo_primitive_extract_separators_SOURCES = scribo_primitive_extract_separators.cc
+scribo_primitive_extract_vertical_separators_SOURCES =
scribo_primitive_extract_vertical_separators.cc
scribo_primitive_group_all_SOURCES = scribo_primitive_group_all.cc
scribo_primitive_group_apply_SOURCES = scribo_primitive_group_apply.cc
scribo_primitive_group_from_double_link_SOURCES =
scribo_primitive_group_from_double_link.cc
+scribo_primitive_group_from_double_link_any_SOURCES =
scribo_primitive_group_from_double_link_any.cc
scribo_primitive_group_from_graph_SOURCES = scribo_primitive_group_from_graph.cc
scribo_primitive_group_from_single_link_SOURCES =
scribo_primitive_group_from_single_link.cc
+scribo_primitive_group_from_single_link_robust_SOURCES =
scribo_primitive_group_from_single_link_robust.cc
scribo_primitive_internal_all_SOURCES = scribo_primitive_internal_all.cc
scribo_primitive_internal_find_graph_link_SOURCES =
scribo_primitive_internal_find_graph_link.cc
-scribo_primitive_internal_find_left_link_SOURCES =
scribo_primitive_internal_find_left_link.cc
-scribo_primitive_internal_find_right_link_SOURCES =
scribo_primitive_internal_find_right_link.cc
scribo_primitive_internal_find_root_SOURCES = scribo_primitive_internal_find_root.cc
+scribo_primitive_internal_find_root_robust_SOURCES =
scribo_primitive_internal_find_root_robust.cc
scribo_primitive_internal_have_link_valid_SOURCES =
scribo_primitive_internal_have_link_valid.cc
-scribo_primitive_internal_init_link_array_SOURCES =
scribo_primitive_internal_init_link_array.cc
-scribo_primitive_internal_is_invalid_link_SOURCES =
scribo_primitive_internal_is_invalid_link.cc
scribo_primitive_internal_is_link_valid_SOURCES =
scribo_primitive_internal_is_link_valid.cc
+scribo_primitive_internal_rd_SOURCES = scribo_primitive_internal_rd.cc
scribo_primitive_internal_update_graph_link_SOURCES =
scribo_primitive_internal_update_graph_link.cc
scribo_primitive_internal_update_link_array_SOURCES =
scribo_primitive_internal_update_link_array.cc
scribo_primitive_link_all_SOURCES = scribo_primitive_link_all.cc
scribo_primitive_link_compute_SOURCES = scribo_primitive_link_compute.cc
scribo_primitive_link_internal_anchors_3_SOURCES =
scribo_primitive_link_internal_anchors_3.cc
+scribo_primitive_link_internal_compute_anchor_SOURCES =
scribo_primitive_link_internal_compute_anchor.cc
+scribo_primitive_link_internal_dmax_default_SOURCES =
scribo_primitive_link_internal_dmax_default.cc
+scribo_primitive_link_internal_dmax_functor_base_SOURCES =
scribo_primitive_link_internal_dmax_functor_base.cc
+scribo_primitive_link_internal_dmax_width_and_height_SOURCES =
scribo_primitive_link_internal_dmax_width_and_height.cc
+scribo_primitive_link_internal_dmax_width_only_SOURCES =
scribo_primitive_link_internal_dmax_width_only.cc
scribo_primitive_link_internal_find_link_SOURCES =
scribo_primitive_link_internal_find_link.cc
-scribo_primitive_link_internal_link_center_dmax_base_SOURCES =
scribo_primitive_link_internal_link_center_dmax_base.cc
-scribo_primitive_link_internal_link_center_dmax_ratio_base_SOURCES =
scribo_primitive_link_internal_link_center_dmax_ratio_base.cc
scribo_primitive_link_internal_link_functor_base_SOURCES =
scribo_primitive_link_internal_link_functor_base.cc
scribo_primitive_link_internal_link_ms_dmax_base_SOURCES =
scribo_primitive_link_internal_link_ms_dmax_base.cc
scribo_primitive_link_internal_link_ms_dmax_ratio_base_SOURCES =
scribo_primitive_link_internal_link_ms_dmax_ratio_base.cc
+scribo_primitive_link_internal_link_several_dmax_base_SOURCES =
scribo_primitive_link_internal_link_several_dmax_base.cc
+scribo_primitive_link_internal_link_single_dmax_base_SOURCES =
scribo_primitive_link_internal_link_single_dmax_base.cc
+scribo_primitive_link_internal_link_single_dmax_ratio_base_SOURCES =
scribo_primitive_link_internal_link_single_dmax_ratio_base.cc
scribo_primitive_link_merge_double_link_SOURCES =
scribo_primitive_link_merge_double_link.cc
scribo_primitive_link_with_graph_SOURCES = scribo_primitive_link_with_graph.cc
scribo_primitive_link_with_rag_SOURCES = scribo_primitive_link_with_rag.cc
@@ -253,12 +526,76 @@ scribo_primitive_link_with_several_graphes_SOURCES =
scribo_primitive_link_with_
scribo_primitive_link_with_several_left_links_SOURCES =
scribo_primitive_link_with_several_left_links.cc
scribo_primitive_link_with_several_right_closest_links_SOURCES =
scribo_primitive_link_with_several_right_closest_links.cc
scribo_primitive_link_with_several_right_links_SOURCES =
scribo_primitive_link_with_several_right_links.cc
+scribo_primitive_link_with_single_down_link_SOURCES =
scribo_primitive_link_with_single_down_link.cc
scribo_primitive_link_with_single_left_link_SOURCES =
scribo_primitive_link_with_single_left_link.cc
scribo_primitive_link_with_single_left_link_dmax_ratio_SOURCES =
scribo_primitive_link_with_single_left_link_dmax_ratio.cc
scribo_primitive_link_with_single_right_link_SOURCES =
scribo_primitive_link_with_single_right_link.cc
scribo_primitive_link_with_single_right_link_bottom_SOURCES =
scribo_primitive_link_with_single_right_link_bottom.cc
scribo_primitive_link_with_single_right_link_dmax_ratio_SOURCES =
scribo_primitive_link_with_single_right_link_dmax_ratio.cc
+scribo_primitive_link_with_single_right_link_dmax_ratio_aligned_SOURCES =
scribo_primitive_link_with_single_right_link_dmax_ratio_aligned.cc
scribo_primitive_link_with_single_right_link_top_SOURCES =
scribo_primitive_link_with_single_right_link_top.cc
+scribo_primitive_link_with_single_up_link_SOURCES =
scribo_primitive_link_with_single_up_link.cc
+scribo_primitive_regroup_from_single_left_link_SOURCES =
scribo_primitive_regroup_from_single_left_link.cc
+scribo_primitive_remove_separators_SOURCES = scribo_primitive_remove_separators.cc
+scribo_sandbox__julien_hough_hough_hough_pgm_SOURCES =
scribo_sandbox__julien_hough_hough_hough_pgm.cc
+scribo_sandbox__julien_hough_hough_hough_v1_SOURCES =
scribo_sandbox__julien_hough_hough_hough_v1.cc
+scribo_sandbox__julien_hough_hough_hough_v2_SOURCES =
scribo_sandbox__julien_hough_hough_hough_v2.cc
+scribo_sandbox__julien_hough_hough_hough_v3_SOURCES =
scribo_sandbox__julien_hough_hough_hough_v3.cc
+scribo_sandbox__julien_hough_hough_hough_v4_SOURCES =
scribo_sandbox__julien_hough_hough_hough_v4.cc
+scribo_sandbox__julien_hough_kht_buffer_2d_SOURCES =
scribo_sandbox__julien_hough_kht_buffer_2d.cc
+scribo_sandbox__julien_hough_kht_closing_SOURCES =
scribo_sandbox__julien_hough_kht_closing.cc
+scribo_sandbox__julien_hough_kht_eigen_SOURCES =
scribo_sandbox__julien_hough_kht_eigen.cc
+scribo_sandbox__julien_hough_kht_filter_SOURCES =
scribo_sandbox__julien_hough_kht_filter.cc
+scribo_sandbox__julien_hough_kht_kht_SOURCES = scribo_sandbox__julien_hough_kht_kht.cc
+scribo_sandbox__julien_hough_kht_linking_SOURCES =
scribo_sandbox__julien_hough_kht_linking.cc
+scribo_sandbox__julien_hough_kht_peak_detection_SOURCES =
scribo_sandbox__julien_hough_kht_peak_detection.cc
+scribo_sandbox__julien_hough_kht_subdivision_SOURCES =
scribo_sandbox__julien_hough_kht_subdivision.cc
+scribo_sandbox__julien_hough_kht_types_SOURCES =
scribo_sandbox__julien_hough_kht_types.cc
+scribo_sandbox__julien_hough_kht_voting_SOURCES =
scribo_sandbox__julien_hough_kht_voting.cc
+scribo_sandbox__julien_upsampling_eagle_SOURCES =
scribo_sandbox__julien_upsampling_eagle.cc
+scribo_sandbox__julien_upsampling_pyxies_SOURCES =
scribo_sandbox__julien_upsampling_pyxies.cc
+scribo_sandbox_green_mln_accu_stat_histo1d_SOURCES =
scribo_sandbox_green_mln_accu_stat_histo1d.cc
+scribo_sandbox_green_mln_accu_stat_histo2d_SOURCES =
scribo_sandbox_green_mln_accu_stat_histo2d.cc
+scribo_sandbox_green_mln_accu_stat_histo3d_hsl_SOURCES =
scribo_sandbox_green_mln_accu_stat_histo3d_hsl.cc
+scribo_sandbox_green_mln_accu_stat_histo3d_rgb_SOURCES =
scribo_sandbox_green_mln_accu_stat_histo3d_rgb.cc
+scribo_sandbox_green_mln_clustering_k_mean_SOURCES =
scribo_sandbox_green_mln_clustering_k_mean.cc
+scribo_sandbox_green_mln_clustering_kmean1d_SOURCES =
scribo_sandbox_green_mln_clustering_kmean1d.cc
+scribo_sandbox_green_mln_clustering_kmean2d_SOURCES =
scribo_sandbox_green_mln_clustering_kmean2d.cc
+scribo_sandbox_green_mln_clustering_kmean3d_SOURCES =
scribo_sandbox_green_mln_clustering_kmean3d.cc
+scribo_sandbox_green_mln_clustering_kmean_rgb_SOURCES =
scribo_sandbox_green_mln_clustering_kmean_rgb.cc
+scribo_sandbox_green_mln_display_display_histo_SOURCES =
scribo_sandbox_green_mln_display_display_histo.cc
+scribo_sandbox_green_mln_display_project_histo_SOURCES =
scribo_sandbox_green_mln_display_project_histo.cc
+scribo_sandbox_green_mln_fun_p2b_achromatic_SOURCES =
scribo_sandbox_green_mln_fun_p2b_achromatic.cc
+scribo_sandbox_green_mln_fun_p2b_component_equals_SOURCES =
scribo_sandbox_green_mln_fun_p2b_component_equals.cc
+scribo_sandbox_green_mln_fun_v2v_achromatism_SOURCES =
scribo_sandbox_green_mln_fun_v2v_achromatism.cc
+scribo_sandbox_green_mln_fun_v2v_hue_concentration_SOURCES =
scribo_sandbox_green_mln_fun_v2v_hue_concentration.cc
+scribo_sandbox_green_mln_fun_v2v_int_u16_to_int_u14_SOURCES =
scribo_sandbox_green_mln_fun_v2v_int_u16_to_int_u14.cc
+scribo_sandbox_green_mln_fun_v2v_log_SOURCES = scribo_sandbox_green_mln_fun_v2v_log.cc
+scribo_sandbox_green_mln_fun_v2v_rg_to_rgb_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rg_to_rgb.cc
+scribo_sandbox_green_mln_fun_v2v_rgb8_to_int_u8_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rgb8_to_int_u8.cc
+scribo_sandbox_green_mln_fun_v2v_rgb8_to_rgbn_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rgb8_to_rgbn.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_achromatism_map_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rgb_to_achromatism_map.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_hsv_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rgb_to_hsv.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_hue_map_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rgb_to_hue_map.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_rg_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rgb_to_rg.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_saturation_map_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rgb_to_saturation_map.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_value_map_SOURCES =
scribo_sandbox_green_mln_fun_v2v_rgb_to_value_map.cc
+scribo_sandbox_green_mln_img_path_SOURCES = scribo_sandbox_green_mln_img_path.cc
+scribo_sandbox_green_mln_io_plot_save_image_sh_SOURCES =
scribo_sandbox_green_mln_io_plot_save_image_sh.cc
+scribo_sandbox_green_mln_math_ceil_SOURCES = scribo_sandbox_green_mln_math_ceil.cc
+scribo_sandbox_green_mln_math_floor_SOURCES = scribo_sandbox_green_mln_math_floor.cc
+scribo_sandbox_green_mln_value_hsv_SOURCES = scribo_sandbox_green_mln_value_hsv.cc
+scribo_sandbox_green_mln_value_rg_SOURCES = scribo_sandbox_green_mln_value_rg.cc
+scribo_sandbox_green_ok_mln_accu_histo_histo1d_SOURCES =
scribo_sandbox_green_ok_mln_accu_histo_histo1d.cc
+scribo_sandbox_green_ok_mln_accu_histo_histo2d_SOURCES =
scribo_sandbox_green_ok_mln_accu_histo_histo2d.cc
+scribo_sandbox_green_ok_mln_accu_histo_histo3d_SOURCES =
scribo_sandbox_green_ok_mln_accu_histo_histo3d.cc
+scribo_sandbox_green_ok_mln_img_path_SOURCES = scribo_sandbox_green_ok_mln_img_path.cc
+scribo_src_afp_components_SOURCES = scribo_src_afp_components.cc
+scribo_src_afp_link_SOURCES = scribo_src_afp_link.cc
+scribo_src_afp_regroup_SOURCES = scribo_src_afp_regroup.cc
+scribo_subsampling_bilinear_SOURCES = scribo_subsampling_bilinear.cc
+scribo_subsampling_integral_SOURCES = scribo_subsampling_integral.cc
+scribo_subsampling_integral_single_image_SOURCES =
scribo_subsampling_integral_single_image.cc
scribo_table_align_lines_horizontaly_SOURCES = scribo_table_align_lines_horizontaly.cc
scribo_table_align_lines_verticaly_SOURCES = scribo_table_align_lines_verticaly.cc
scribo_table_all_SOURCES = scribo_table_all.cc
@@ -275,6 +612,11 @@ scribo_table_repair_horizontal_lines_SOURCES =
scribo_table_repair_horizontal_li
scribo_table_repair_vertical_lines_SOURCES = scribo_table_repair_vertical_lines.cc
scribo_text_all_SOURCES = scribo_text_all.cc
scribo_text_clean_SOURCES = scribo_text_clean.cc
+scribo_text_clean_inplace_SOURCES = scribo_text_clean_inplace.cc
scribo_text_extract_lines_SOURCES = scribo_text_extract_lines.cc
-scribo_util_all_SOURCES = scribo_util_all.cc
-scribo_util_text_SOURCES = scribo_util_text.cc
+scribo_text_look_like_text_lines_SOURCES = scribo_text_look_like_text_lines.cc
+scribo_text_merging_SOURCES = scribo_text_merging.cc
+scribo_toolchain_nepomuk_text_extraction_SOURCES =
scribo_toolchain_nepomuk_text_extraction.cc
+scribo_toolchain_text_in_doc_SOURCES = scribo_toolchain_text_in_doc.cc
+scribo_upsampling_bs2x_SOURCES = scribo_upsampling_bs2x.cc
+scribo_upsampling_eagle_SOURCES = scribo_upsampling_eagle.cc
diff --git a/scribo/text/extract_lines.hh b/scribo/text/extract_lines.hh
index c720d70..1a25cc8 100644
--- a/scribo/text/extract_lines.hh
+++ b/scribo/text/extract_lines.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.
//
@@ -32,33 +33,25 @@
# include <mln/core/concept/image.hh>
-# include <mln/core/site_set/box.hh>
+# include <mln/value/label_16.hh>
-# include <mln/data/fill.hh>
+# include <scribo/core/line_set.hh>
-# include <mln/accu/shape/bbox.hh>
+# include <scribo/primitive/extract/components.hh>
-# include <mln/draw/box.hh>
+# include <scribo/primitive/link/merge_double_link.hh>
+# include <scribo/primitive/link/with_single_left_link_dmax_ratio.hh>
+# include <scribo/primitive/link/with_single_right_link_dmax_ratio.hh>
-# include <mln/labeling/blobs.hh>
-# include <mln/labeling/compute.hh>
+# include <scribo/filter/objects_small.hh>
-# include <mln/util/array.hh>
-# include <mln/util/graph.hh>
-# include <mln/value/label_16.hh>
-
-# include <scribo/primitive/extract/components.hh>
# include <scribo/primitive/group/apply.hh>
-# include <scribo/primitive/link/with_several_left_links.hh>
-# include <scribo/primitive/link/with_several_right_links.hh>
-# include <scribo/primitive/group/from_double_link.hh>
+# include <scribo/primitive/group/from_single_link.hh>
+
+# include <scribo/filter/object_links_bbox_h_ratio.hh>
+
+# include <scribo/text/merging.hh>
-# ifndef SCRIBO_NDEBUG
-# include <mln/literal/colors.hh>
-# include <scribo/make/debug_filename.hh>
-# include <scribo/debug/save_bboxes_image.hh>
-# include <scribo/debug/save_linked_bboxes_image.hh>
-# endif // SCRIBO_NDEBUG
namespace scribo
{
@@ -70,28 +63,22 @@ namespace scribo
/// Extract lines of text in a binary image.
/*!
- ** \param[in] input_ A binary image.
- ** \param[in] nbh_ A neighborhood used for labeling.
- ** \param[in,out] nbboxes Will hold the number of bounding boxes
- ** at the end of the routine.
+ ** \param[in] input A binary image.
+ ** \param[in] nbh A neighborhood used for labeling.
**
- ** \return An object image with grouped potential text components.
+ ** \return A set of lines.
*/
- template <typename I, typename N, typename V>
- object_image(mln_ch_value(I,V))
- extract_lines(const Image<I>& input_,
- const Neighborhood<N>& nbh_,
- V& nbboxes);
+ template <typename I, typename N>
+ line_set<mln_ch_value(I,value::label_16)>
+ extract_lines(const Image<I>& input, const Neighborhood<N>&
nbh);
# ifndef MLN_INCLUDE_ONLY
- template <typename I, typename N, typename V>
- object_image(mln_ch_value(I,V))
- extract_lines(const Image<I>& input_,
- const Neighborhood<N>& nbh_,
- V& nbboxes)
+ template <typename I, typename N>
+ line_set<mln_ch_value(I,value::label_16)>
+ extract_lines(const Image<I>& input_, const Neighborhood<N>&
nbh_)
{
trace::entering("scribo::text::extract_lines");
@@ -101,46 +88,44 @@ namespace scribo
mln_precondition(input.is_valid());
mln_precondition(nbh.is_valid());
- typedef mln_ch_value(I,V) L;
- typedef object_image(L) text_t;
- text_t text = scribo::primitive::extract::components(input, nbh, nbboxes);
+ typedef mln_ch_value(I,value::label_16) L;
+
+ /// Finding comps.
+ value::label_16 ncomps;
+ component_set<L>
+ comps = scribo::primitive::extract::components(input, nbh, ncomps);
-# ifndef SCRIBO_NDEBUG
- debug::save_bboxes_image(input, text.bboxes(), literal::red,
- scribo::make::debug_filename("character-bboxes.ppm"));
-# endif // ! SCRIBO_NDEBUG
+ /// First filtering.
+ component_set<L> filtered_comps
+ = scribo::filter::components_small(comps, 6);
- //Link character bboxes to their left neighboor if possible.
+ /// Linking potential comps
object_links<L> left_link
- = primitive::link::with_several_left_links(text, 30);
+ = primitive::link::with_single_left_link_dmax_ratio(filtered_comps);
object_links<L> right_link
- = primitive::link::with_several_right_links(text, 30);
+ = primitive::link::with_single_right_link_dmax_ratio(filtered_comps);
+
+
+ // Validating left and right links.
+ object_links<L>
+ merged_links = primitive::link::merge_double_link(left_link,
+ right_link);
-# ifndef SCRIBO_NDEBUG
- scribo::debug::save_linked_bboxes_image(input,
- text, left_link, right_link,
- literal::red, literal::cyan,
- literal::yellow, literal::green,
- scribo::make::debug_filename("links.ppm"));
-# endif // ! SCRIBO_NDEBUG
+ // Remove links if bboxes have too different sizes.
+ object_links<L> hratio_filtered_links
+ = filter::object_links_bbox_h_ratio(merged_links, 2.0f);
- //Merge character bboxes through a graph.
object_groups<L>
- groups = primitive::group::from_double_link(text,
- left_link, right_link);
+ groups = primitive::group::from_single_link(hratio_filtered_links);
- text_t grouped_text = primitive::group::apply(text, groups);
-# ifndef SCRIBO_NDEBUG
- debug::save_bboxes_image(input, grouped_text.bboxes(),
- literal::red,
- scribo::make::debug_filename("multiple_links_grouped_text.ppm"));
-# endif // ! SCRIBO_NDEBUG
+ line_set<L> line = scribo::make::line_set(groups);
+ line = text::merging(line);
trace::exiting("scribo::text::extract_lines");
- return grouped_text;
+ return line;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/scribo/text/recognition.hh b/scribo/text/recognition.hh
index 80208cd..8cb0e96 100644
--- a/scribo/text/recognition.hh
+++ b/scribo/text/recognition.hh
@@ -118,7 +118,7 @@ namespace scribo
/// Use text bboxes with Tesseract
for_all_lines(i, lines)
{
- if (! lines(i).is_valid() || lines(i).tag() != line::None || lines(i).type() !=
line::Text)
+ if (! lines(i).is_valid() || lines(i).is_hidden() || lines(i).type() != line::Text)
continue;
// std::cout << "Text recognition... ("
--
1.5.6.5