* binarization/simple.hh,
* debug/save_linked_textbboxes_image.hh,
* debug/save_table_image.hh,
* debug/save_textbboxes_image.hh,
* src/morpho.cc,
* src/table_rebuild_rank.cc,
* src/thin_bboxes.cc,
* table/internal/align_lines.hh,
* table/internal/repair_lines.hh,
* text/extract_lines.hh,
* text/recognition.hh:
Adjust paths and names.
* text/grouping/group_from_single_link.hh:
Include scribo/make/text.hh.
* src/Makefile.am (bin_PROGRAMS): Move
extract_text_double_link,
extract_text_double_several_links,
extract_text_graph,
extract_text_several_graph,
extract_text_several_left_links,
extract_text_single_link,
recognition,
table_rebuild_opening,
table_rebuild_rank and
thin_bboxes...
(EXTRA_DIST): ...here.
(extract_text_double_link_SOURCES)
(extract_text_double_several_links_SOURCES)
(extract_text_graph_SOURCES)
(extract_text_several_graph_SOURCES)
(extract_text_several_left_links_SOURCES)
(extract_text_single_link_SOURCES)
(recognition_SOURCES)
(recognition_CXXFLAGS)
(recognition_LDFLAGS)
(table_rebuild_opening_SOURCES)
(table_rebuild_rank_SOURCES)
(thin_bboxes_SOURCES):
Disable.
---
scribo/ChangeLog | 44 ++++++++++++++++++
scribo/binarization/simple.hh | 2 +-
scribo/debug/save_linked_textbboxes_image.hh | 10 ++--
scribo/debug/save_table_image.hh | 4 +-
scribo/debug/save_textbboxes_image.hh | 4 +-
scribo/src/Makefile.am | 59 +++++++++++++----------
scribo/src/morpho.cc | 7 +--
scribo/src/table_rebuild_rank.cc | 8 ++--
scribo/src/thin_bboxes.cc | 7 +--
scribo/table/internal/align_lines.hh | 4 +-
scribo/table/internal/repair_lines.hh | 4 +-
scribo/text/extract_lines.hh | 2 +-
scribo/text/grouping/group_from_single_link.hh | 1 +
scribo/text/recognition.hh | 2 +-
14 files changed, 104 insertions(+), 54 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 55b969d..a9b29a3 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,49 @@
2009-06-10 Roland Levillain <roland(a)lrde.epita.fr>
+ Have SCRIBO compile.
+
+ * binarization/simple.hh,
+ * debug/save_linked_textbboxes_image.hh,
+ * debug/save_table_image.hh,
+ * debug/save_textbboxes_image.hh,
+ * src/morpho.cc,
+ * src/table_rebuild_rank.cc,
+ * src/thin_bboxes.cc,
+ * table/internal/align_lines.hh,
+ * table/internal/repair_lines.hh,
+ * text/extract_lines.hh,
+ * text/recognition.hh:
+ Adjust paths and names.
+ * text/grouping/group_from_single_link.hh:
+ Include scribo/make/text.hh.
+ * src/Makefile.am (bin_PROGRAMS): Move
+ extract_text_double_link,
+ extract_text_double_several_links,
+ extract_text_graph,
+ extract_text_several_graph,
+ extract_text_several_left_links,
+ extract_text_single_link,
+ recognition,
+ table_rebuild_opening,
+ table_rebuild_rank and
+ thin_bboxes...
+ (EXTRA_DIST): ...here.
+ (extract_text_double_link_SOURCES)
+ (extract_text_double_several_links_SOURCES)
+ (extract_text_graph_SOURCES)
+ (extract_text_several_graph_SOURCES)
+ (extract_text_several_left_links_SOURCES)
+ (extract_text_single_link_SOURCES)
+ (recognition_SOURCES)
+ (recognition_CXXFLAGS)
+ (recognition_LDFLAGS)
+ (table_rebuild_opening_SOURCES)
+ (table_rebuild_rank_SOURCES)
+ (thin_bboxes_SOURCES):
+ Disable.
+
+2009-06-10 Roland Levillain <roland(a)lrde.epita.fr>
+
* tests/unit_test/unit-tests.mk: Regen.
2009-06-09 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
diff --git a/scribo/binarization/simple.hh b/scribo/binarization/simple.hh
index c49b1f5..e36003e 100644
--- a/scribo/binarization/simple.hh
+++ b/scribo/binarization/simple.hh
@@ -37,7 +37,7 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/core/routine/duplicate.hh>
-# include <mln/core/image/image_if.hh>
+# include <mln/core/image/dmorph/image_if.hh>
# include <mln/pw/all.hh>
# include <mln/histo/compute.hh>
diff --git a/scribo/debug/save_linked_textbboxes_image.hh
b/scribo/debug/save_linked_textbboxes_image.hh
index 37b6549..b98defc 100644
--- a/scribo/debug/save_linked_textbboxes_image.hh
+++ b/scribo/debug/save_linked_textbboxes_image.hh
@@ -34,7 +34,7 @@
# include <mln/core/concept/graph.hh>
# include <mln/labeling/compute.hh>
# include <mln/accu/center.hh>
-# include <mln/level/convert.hh>
+# include <mln/data/convert.hh>
# include <mln/value/rgb8.hh>
# include <mln/util/array.hh>
# include <mln/io/ppm/save.hh>
@@ -149,7 +149,7 @@ namespace scribo
trace::entering("scribo::debug::save_linked_textbboxes_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = level::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
draw::bounding_boxes(tmp, text.bboxes(), box_value);
draw::bounding_box_links(tmp, text.mass_centers(), link_array, link_value);
@@ -174,7 +174,7 @@ namespace scribo
trace::entering("scribo::debug::save_linked_textbboxes_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = level::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
draw::bounding_boxes(tmp, text.bboxes(), box_value);
draw::bounding_box_links(tmp, text.mass_centers(),
@@ -203,7 +203,7 @@ namespace scribo
trace::entering("scribo::debug::save_linked_textbboxes_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = level::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
draw::bounding_boxes(tmp, text.bboxes(), box_value);
draw::bounding_box_links(tmp, text.mass_centers(),
@@ -232,7 +232,7 @@ namespace scribo
mln_precondition(exact(g).is_valid());
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = level::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
draw::bounding_boxes(tmp, text.bboxes(), box_value);
draw::bounding_box_links(tmp, text.bboxes(), g, link_value);
diff --git a/scribo/debug/save_table_image.hh b/scribo/debug/save_table_image.hh
index 1c0eada..2ac67af 100644
--- a/scribo/debug/save_table_image.hh
+++ b/scribo/debug/save_table_image.hh
@@ -35,7 +35,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/image/image2d.hh>
# include <mln/data/fill.hh>
-# include <mln/level/convert.hh>
+# include <mln/data/convert.hh>
# include <mln/util/array.hh>
# include <mln/util/couple.hh>
# include <mln/value/rgb8.hh>
@@ -90,7 +90,7 @@ namespace scribo
const I& input = exact(input_);
mln_precondition(input.is_valid());
- mln_ch_value(I,value::rgb8) out2 = level::convert(value::rgb8(), input);
+ mln_ch_value(I, value::rgb8) out2 = data::convert(value::rgb8(), input);
draw::bounding_boxes(out2, tableboxes.first(), bbox_color);
draw::bounding_boxes(out2, tableboxes.second(), bbox_color);
io::ppm::save(out2, filename);
diff --git a/scribo/debug/save_textbboxes_image.hh
b/scribo/debug/save_textbboxes_image.hh
index 1ef5747..a7b23ce 100644
--- a/scribo/debug/save_textbboxes_image.hh
+++ b/scribo/debug/save_textbboxes_image.hh
@@ -31,7 +31,7 @@
/// Draw a list of bounding boxes and their associated mass center.
# include <mln/core/concept/image.hh>
-# include <mln/level/convert.hh>
+# include <mln/data/convert.hh>
# include <mln/value/rgb8.hh>
# include <mln/util/array.hh>
# include <mln/io/ppm/save.hh>
@@ -70,7 +70,7 @@ namespace scribo
trace::entering("scribo::debug::save_textbboxes_image");
mln_precondition(exact(input).is_valid());
- mln_ch_value(I,value::rgb8) tmp = level::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) tmp = data::convert(value::rgb8(), input);
draw::bounding_boxes(tmp, textbboxes, value);
io::ppm::save(tmp, filename);
diff --git a/scribo/src/Makefile.am b/scribo/src/Makefile.am
index 35269cb..0e66301 100644
--- a/scribo/src/Makefile.am
+++ b/scribo/src/Makefile.am
@@ -19,9 +19,6 @@
include $(top_srcdir)/scribo/scribo.mk
-recognition_CXXFLAGS = -I$(HOME)/local/include $(HOME)/local/lib/libtesseract_full.a
-recognition_LDFLAGS = -lpthread
-
SUBDIRS = \
binarization \
preprocessing \
@@ -29,34 +26,44 @@ SUBDIRS = \
bin_PROGRAMS = \
dmap \
- extract_text_double_link \
- extract_text_double_several_links \
- extract_text_graph \
- extract_text_several_graph \
- extract_text_several_left_links \
- extract_text_single_link \
morpho \
negate \
- recognition \
superpose \
- table_rebuild_opening \
- table_rebuild_rank \
- text_in_photo \
+ text_in_photo
+
+# FIXME: These files used to be in bin_PROGRAMS, but as they did not
+# compile, we moved them here.
+EXTRA_DIST = \
+ extract_text_double_link \
+ extract_text_double_several_links \
+ extract_text_graph \
+ extract_text_several_graph \
+ extract_text_several_left_links \
+ extract_text_single_link \
+ table_rebuild_opening \
+ table_rebuild_rank \
thin_bboxes
-dmap_SOURCES = dmap.cc
-extract_text_double_link_SOURCES = extract_text_double_link.cc
-extract_text_double_several_links_SOURCES = extract_text_double_several_links.cc
-extract_text_graph_SOURCES = extract_text_graph.cc
-extract_text_several_graph_SOURCES = extract_text_several_graph.cc
-extract_text_several_left_links_SOURCES = extract_text_several_left_links.cc
-extract_text_single_link_SOURCES = extract_text_single_link.cc
-morpho_SOURCES = morpho.cc
+# FIXME: Should be enclosed in an Automake conditional like HAVE_TESSERACT.
+EXTRA_DIST += recognition
+
+# FIXME: Deactivate source accordingly.
+dmap_SOURCES = dmap.cc
+#extract_text_double_link_SOURCES = extract_text_double_link.cc
+#extract_text_double_several_links_SOURCES = extract_text_double_several_links.cc
+#extract_text_graph_SOURCES = extract_text_graph.cc
+#extract_text_several_graph_SOURCES = extract_text_several_graph.cc
+#extract_text_several_left_links_SOURCES = extract_text_several_left_links.cc
+#extract_text_single_link_SOURCES = extract_text_single_link.cc
+morpho_SOURCES = morpho.cc
negate_SOURCES = negate.cc
-recognition_SOURCES = recognition.cc
+#recognition_SOURCES = recognition.cc
+# FIXME: Do not use $(HOME).
+#recognition_CXXFLAGS =
+# -I$(HOME)/local/include $(HOME)/local/lib/libtesseract_full.a
+#recognition_LDFLAGS = -lpthread
superpose_SOURCES = superpose.cc
-table_rebuild_opening_SOURCES = table_rebuild_opening.cc
-table_rebuild_rank_SOURCES = table_rebuild_rank.cc
+#table_rebuild_opening_SOURCES = table_rebuild_opening.cc
+#table_rebuild_rank_SOURCES = table_rebuild_rank.cc
text_in_photo_SOURCES = text_in_photo.cc
-thin_bboxes_SOURCES = thin_bboxes.cc
-
+#thin_bboxes_SOURCES = thin_bboxes.cc
diff --git a/scribo/src/morpho.cc b/scribo/src/morpho.cc
index d6e2487..7121e57 100644
--- a/scribo/src/morpho.cc
+++ b/scribo/src/morpho.cc
@@ -1,5 +1,4 @@
-// Copyright (C) 2009
- EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -27,7 +26,7 @@
#include <mln/essential/2d.hh>
#include <mln/transform/distance_and_influence_zone_geodesic.hh>
#include <mln/core/var.hh>
-#include <mln/fun/l2l/wrap.hh>
+#include <mln/fun/v2v/wrap.hh>
#include <mln/win/hline2d.hh>
#include <mln/morpho/watershed/flooding.hh>
#include <mln/morpho/watershed/superpose.hh>
@@ -53,7 +52,7 @@ int main(int argc, char *argv[])
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(),
mln_max(unsigned)));
- io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()),
"dmap.pgm");
+ io::pgm::save(data::transform(res.first(), fun::v2v::wrap<label_8>()),
"dmap.pgm");
io::ppm::save(labeling::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
image2d<unsigned>& dmap = res.first();
diff --git a/scribo/src/table_rebuild_rank.cc b/scribo/src/table_rebuild_rank.cc
index bf6d854..1c1764b 100644
--- a/scribo/src/table_rebuild_rank.cc
+++ b/scribo/src/table_rebuild_rank.cc
@@ -27,7 +27,7 @@
#include <mln/essential/2d.hh>
#include <mln/pw/all.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
#include <mln/accu/maj_h.hh>
#include <scribo/table/rebuild.hh>
@@ -73,9 +73,9 @@ int main(int argc, char* argv[])
std::cout << "ncells (including background) = " << ncells
<< std::endl;
image2d<value::rgb8> table_color = mln::labeling::colorize(value::rgb8(), tables,
ncells);
- value::label_8 bg = level::compute(accu::maj_h<value::label_8>(), tables);
+ value::label_8 bg = data::compute(accu::maj_h<value::label_8>(), tables);
- image2d<value::rgb8> sup = level::convert(value::rgb8(), input);
+ image2d<value::rgb8> sup = data::convert(value::rgb8(), input);
data::paste((table_color | pw::value(tables) != pw::cst(bg))
| (pw::value(sup) == pw::cst(literal::black)), sup);
io::ppm::save(sup, scribo::make::debug_filename("table_color_sup.ppm"));
@@ -84,7 +84,7 @@ int main(int argc, char* argv[])
scribo::make::debug_filename("table_cells.ppm"));
io::pgm::save(tables, scribo::make::debug_filename("table_cells.pgm"));
- image2d<value::rgb8> input_rgb = level::convert(value::rgb8(), input);
+ image2d<value::rgb8> input_rgb = data::convert(value::rgb8(), input);
data::fill((input_rgb | pw::value(tables) == pw::cst(0u)).rw(), literal::red);
io::ppm::save(input_rgb,
scribo::make::debug_filename("table_superposed.ppm"));
diff --git a/scribo/src/thin_bboxes.cc b/scribo/src/thin_bboxes.cc
index 408c99b..3f826ff 100644
--- a/scribo/src/thin_bboxes.cc
+++ b/scribo/src/thin_bboxes.cc
@@ -1,5 +1,4 @@
-// Copyright (C) 2009
- EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -26,7 +25,7 @@
#include <mln/essential/2d.hh>
#include <scribo/text/extract_lines.hh>
-#include <scribo/filter/thin_bboxes.hh>
+#include <scribo/filter/thin_objects.hh>
int usage(const char *name)
{
@@ -50,7 +49,7 @@ int main(int argc, char *argv[])
typedef scribo::util::text<image2d<value::label_16> > text_t;
text_t lines = scribo::text::extract_lines(input, c8(), nlines);
- text_t filtered_lines = scribo::filter::thin_bboxes(lines, 5);
+ text_t filtered_lines = scribo::filter::thin_objects(lines, 5);
scribo::debug::save_textbboxes_image(input, filtered_lines.bboxes(),
literal::red,
diff --git a/scribo/table/internal/align_lines.hh b/scribo/table/internal/align_lines.hh
index 7d9c494..10c7e2a 100644
--- a/scribo/table/internal/align_lines.hh
+++ b/scribo/table/internal/align_lines.hh
@@ -33,7 +33,7 @@
# include <mln/core/site_set/box.hh>
-# include <mln/accu/mean.hh>
+# include <mln/accu/stat/mean.hh>
# include <mln/util/array.hh>
# include <mln/util/set.hh>
@@ -156,7 +156,7 @@ namespace scribo
for_all_elements(i, lines)
if (lines[i].nelements() == max_nelts)
{
- accu::mean<unsigned> mean;
+ accu::stat::mean<unsigned> mean;
for_all_elements(j, lines[i])
if (box2line[lines[i][j]] == -1)
mean.take(line_bboxes[lines[i][j]].center()[dim]);
diff --git a/scribo/table/internal/repair_lines.hh
b/scribo/table/internal/repair_lines.hh
index 7ca5d21..26fdc17 100644
--- a/scribo/table/internal/repair_lines.hh
+++ b/scribo/table/internal/repair_lines.hh
@@ -32,8 +32,8 @@
# include <vector>
-# include <mln/core/image/image_if.hh>
-# include <mln/core/image/extension_val.hh>
+# include <mln/core/image/dmorph/image_if.hh>
+# include <mln/core/image/dmorph/extension_val.hh>
# include <mln/pw/all.hh>
diff --git a/scribo/text/extract_lines.hh b/scribo/text/extract_lines.hh
index a814533..f803990 100644
--- a/scribo/text/extract_lines.hh
+++ b/scribo/text/extract_lines.hh
@@ -50,7 +50,7 @@
# include <scribo/text/grouping/group_with_several_left_links.hh>
# include <scribo/text/grouping/group_with_several_right_links.hh>
# include <scribo/text/grouping/group_from_double_link.hh>
-# include <scribo/filter/small_components.hh>
+# include <scribo/filter/small_objects.hh>
# include <scribo/util/text.hh>
# include <scribo/make/debug_filename.hh>
diff --git a/scribo/text/grouping/group_from_single_link.hh
b/scribo/text/grouping/group_from_single_link.hh
index 0bc494c..4885cb5 100644
--- a/scribo/text/grouping/group_from_single_link.hh
+++ b/scribo/text/grouping/group_from_single_link.hh
@@ -42,6 +42,7 @@
# include <scribo/core/macros.hh>
# include <scribo/util/text.hh>
+# include <scribo/make/text.hh>
namespace scribo
diff --git a/scribo/text/recognition.hh b/scribo/text/recognition.hh
index 24852e3..01d0986 100644
--- a/scribo/text/recognition.hh
+++ b/scribo/text/recognition.hh
@@ -33,7 +33,7 @@
/// \todo For each text bbox, we create a new image. We may like to avoid that.
/// \todo Do not store the result in an image?
-# include <mln/core/image/image_if.hh>
+# include <mln/core/image/dmorph/image_if.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/site_set/box.hh>
# include <mln/util/array.hh>
--
1.6.2.4