Olena-patches
Threads by month
- ----- 2025 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2011
- 6 participants
- 92 discussions

last-svn-commit-931-g4765bc4 mln/border/equalize.hh: Fix an invalid assertion.
by Guillaume Lazzara 28 Jun '11
by Guillaume Lazzara 28 Jun '11
28 Jun '11
---
milena/ChangeLog | 4 ++++
milena/mln/border/equalize.hh | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 3e0cbcb..58bec72 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-28 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/border/equalize.hh: Fix an invalid assertion.
+
2011-06-27 Guillaume Lazzara <z(a)lrde.epita.fr>
* mln/debug/draw_graph.hh: Limit the use of exact().
diff --git a/milena/mln/border/equalize.hh b/milena/mln/border/equalize.hh
index 03545aa..72f95aa 100644
--- a/milena/mln/border/equalize.hh
+++ b/milena/mln/border/equalize.hh
@@ -93,7 +93,7 @@ namespace mln
}
else
{
- mln_assertion(b2 < min_thickness);
+ //mln_assertion(b2 < min_thickness); // why ?
mln_assertion(b1 >= min_thickness);
border::resize(ima2, b1);
}
--
1.5.6.5
1
0
* headers.mk,
* tests/unit_test/unit-tests.mk: Here.
---
scribo/ChangeLog | 7 ++++
scribo/headers.mk | 40 ++++++++++++++++++++--
scribo/tests/unit_test/unit-tests.mk | 62 +++++++++++++++++++++++++++++++++-
3 files changed, 105 insertions(+), 4 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index f756ab3..4f89905 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,12 @@
2011-06-28 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Regen generated files.
+
+ * headers.mk,
+ * tests/unit_test/unit-tests.mk: Here.
+
+2011-06-28 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix compilation.
* scribo/core/object_groups.hh,
diff --git a/scribo/headers.mk b/scribo/headers.mk
index 47b4bdd..b7013bf 100644
--- a/scribo/headers.mk
+++ b/scribo/headers.mk
@@ -30,8 +30,10 @@ scribo/core/def/color_type.hh \
scribo/core/def/lbl_type.hh \
scribo/core/document.hh \
scribo/core/erase_objects.hh \
+scribo/core/group_info.hh \
scribo/core/init_integral_image.hh \
scribo/core/internal/doc_serializer.hh \
+scribo/core/internal/sort_comp_ids.hh \
scribo/core/line_info.hh \
scribo/core/line_links.hh \
scribo/core/line_set.hh \
@@ -40,9 +42,11 @@ scribo/core/object_groups.hh \
scribo/core/object_links.hh \
scribo/core/paragraph_info.hh \
scribo/core/paragraph_set.hh \
+scribo/core/stats.hh \
scribo/core/tag/anchor.hh \
scribo/core/tag/component.hh \
scribo/core/tag/line.hh \
+scribo/core/tag/paragraph.hh \
scribo/debug/alignment_decision_image.hh \
scribo/debug/all.hh \
scribo/debug/bboxes_enlarged_image.hh \
@@ -67,20 +71,22 @@ scribo/draw/all.hh \
scribo/draw/bounding_box_links.hh \
scribo/draw/bounding_boxes.hh \
scribo/draw/groups_bboxes.hh \
+scribo/draw/line_components.hh \
scribo/estim/components_features.hh \
scribo/estim/font_boldness.hh \
scribo/estim/font_color.hh \
scribo/estim/internal/compute_skeleton.hh \
-scribo/estim/object_groups_v_thickness.hh \
+scribo/estim/object_groups_mean_width.hh \
scribo/filter/all.hh \
scribo/filter/common/objects_photo.hh \
+scribo/filter/images_in_paragraph.hh \
scribo/filter/internal/alignment_angle.hh \
scribo/filter/internal/component_aligned.hh \
scribo/filter/internal/compute.hh \
scribo/filter/line_links_x_height.hh \
+scribo/filter/object_groups_mean_width.hh \
scribo/filter/object_groups_size_ratio.hh \
scribo/filter/object_groups_small.hh \
-scribo/filter/object_groups_v_thickness.hh \
scribo/filter/object_groups_with_holes.hh \
scribo/filter/object_links_aligned.hh \
scribo/filter/object_links_bbox_h_ratio.hh \
@@ -96,6 +102,7 @@ scribo/filter/object_links_top_aligned.hh \
scribo/filter/objects_h_thick.hh \
scribo/filter/objects_h_thin.hh \
scribo/filter/objects_large.hh \
+scribo/filter/objects_on_border.hh \
scribo/filter/objects_size_ratio.hh \
scribo/filter/objects_small.hh \
scribo/filter/objects_thick.hh \
@@ -103,8 +110,16 @@ scribo/filter/objects_thin.hh \
scribo/filter/objects_v_thick.hh \
scribo/filter/objects_v_thin.hh \
scribo/filter/objects_with_holes.hh \
+scribo/filter/paragraphs_bbox_overlap.hh \
+scribo/filter/paragraphs_in_borders.hh \
+scribo/filter/paragraphs_in_image.hh \
+scribo/filter/separators_in_borders.hh \
+scribo/filter/separators_in_element.hh \
+scribo/filter/separators_in_paragraph.hh \
+scribo/filter/separators_vert_in_borders.hh \
scribo/fun/v2b/label_to_bool.hh \
scribo/fun/v2b/objects_large_filter.hh \
+scribo/fun/v2b/objects_on_border_filter.hh \
scribo/fun/v2b/objects_small_filter.hh \
scribo/fun/v2v/highlight.hh \
scribo/io/img/internal/debug_img_visitor.hh \
@@ -114,12 +129,15 @@ scribo/io/img/internal/non_text_img_visitor.hh \
scribo/io/img/internal/text_img_visitor.hh \
scribo/io/img/save.hh \
scribo/io/text_boxes/save.hh \
+scribo/io/xml/internal/compute_text_colour.hh \
scribo/io/xml/internal/extended_page_xml_visitor.hh \
scribo/io/xml/internal/full_xml_visitor.hh \
scribo/io/xml/internal/page_xml_visitor.hh \
scribo/io/xml/internal/print_box_coords.hh \
scribo/io/xml/internal/print_image_coords.hh \
scribo/io/xml/internal/print_page_preambule.hh \
+scribo/io/xml/internal/save_image_to_xml.hh \
+scribo/io/xml/internal/time_info.hh \
scribo/io/xml/load.hh \
scribo/io/xml/save.hh \
scribo/make/all.hh \
@@ -129,6 +147,7 @@ scribo/make/text_blocks_image.hh \
scribo/make/text_components_image.hh \
scribo/postprocessing/all.hh \
scribo/postprocessing/fill_object_holes.hh \
+scribo/postprocessing/images_to_drop_capital.hh \
scribo/preprocessing/all.hh \
scribo/preprocessing/crop.hh \
scribo/preprocessing/crop_without_localization.hh \
@@ -154,6 +173,7 @@ scribo/primitive/extract/lines_h_pattern.hh \
scribo/primitive/extract/lines_h_single.hh \
scribo/primitive/extract/lines_h_thick.hh \
scribo/primitive/extract/lines_h_thick_and_single.hh \
+scribo/primitive/extract/lines_h_thick_and_thin.hh \
scribo/primitive/extract/lines_pattern.hh \
scribo/primitive/extract/lines_thick.hh \
scribo/primitive/extract/lines_v_discontinued.hh \
@@ -162,6 +182,7 @@ scribo/primitive/extract/lines_v_single.hh \
scribo/primitive/extract/lines_v_thick.hh \
scribo/primitive/extract/lines_v_thick_and_single.hh \
scribo/primitive/extract/non_text.hh \
+scribo/primitive/extract/non_text_hdoc.hh \
scribo/primitive/extract/non_text_kmean.hh \
scribo/primitive/extract/separators.hh \
scribo/primitive/extract/separators_nonvisible.hh \
@@ -243,12 +264,18 @@ scribo/text/clean_inplace.hh \
scribo/text/extract_lines.hh \
scribo/text/extract_lines_with_features.hh \
scribo/text/extract_lines_wo_merge.hh \
+scribo/text/extract_paragraphs.hh \
+scribo/text/extract_paragraphs_hdoc.hh \
scribo/text/link_lines.hh \
scribo/text/look_like_text_lines.hh \
scribo/text/merging.hh \
+scribo/text/merging_hdoc.hh \
+scribo/text/paragraphs_closing.hh \
scribo/text/recognition.hh \
scribo/toolchain/content_in_doc.hh \
+scribo/toolchain/content_in_hdoc.hh \
scribo/toolchain/internal/content_in_doc_functor.hh \
+scribo/toolchain/internal/content_in_hdoc_functor.hh \
scribo/toolchain/internal/text_in_doc_functor.hh \
scribo/toolchain/internal/text_in_doc_preprocess_functor.hh \
scribo/toolchain/internal/toolchain_functor.hh \
@@ -257,7 +284,14 @@ scribo/toolchain/text_in_doc.hh \
scribo/toolchain/text_in_doc_preprocess.hh \
scribo/toolchain/text_in_picture.hh \
scribo/upsampling/bs2x.hh \
-scribo/upsampling/eagle.hh
+scribo/upsampling/eagle.hh \
+scribo/util/box_intersection.hh \
+scribo/util/box_is_included.hh \
+scribo/util/color_to_hex.hh \
+scribo/util/component_outline.hh \
+scribo/util/component_precise_outline.hh \
+scribo/util/hex_to_color.hh \
+scribo/util/text_outline.hh
#<<lrde
nobase_include_HEADERS +=
diff --git a/scribo/tests/unit_test/unit-tests.mk b/scribo/tests/unit_test/unit-tests.mk
index 309b482..b1ce4c9 100644
--- a/scribo/tests/unit_test/unit-tests.mk
+++ b/scribo/tests/unit_test/unit-tests.mk
@@ -133,9 +133,11 @@ scribo_core_object_groups \
scribo_core_object_links \
scribo_core_paragraph_info \
scribo_core_paragraph_set \
+scribo_core_stats \
scribo_core_tag_anchor \
scribo_core_tag_component \
scribo_core_tag_line \
+scribo_core_tag_paragraph \
scribo_debug_alignment_decision_image \
scribo_debug_all \
scribo_debug_bboxes_enlarged_image \
@@ -160,6 +162,7 @@ scribo_draw_all \
scribo_draw_bounding_box_links \
scribo_draw_bounding_boxes \
scribo_draw_groups_bboxes \
+scribo_draw_line_components \
scribo_estim_components_features \
scribo_estim_font_boldness \
scribo_estim_font_color \
@@ -167,6 +170,7 @@ scribo_estim_internal_compute_skeleton \
scribo_estim_object_groups_mean_width \
scribo_filter_all \
scribo_filter_common_objects_photo \
+scribo_filter_images_in_paragraph \
scribo_filter_internal_alignment_angle \
scribo_filter_internal_component_aligned \
scribo_filter_internal_compute \
@@ -189,6 +193,7 @@ scribo_filter_object_links_top_aligned \
scribo_filter_objects_h_thick \
scribo_filter_objects_h_thin \
scribo_filter_objects_large \
+scribo_filter_objects_on_border \
scribo_filter_objects_size_ratio \
scribo_filter_objects_small \
scribo_filter_objects_thick \
@@ -196,8 +201,16 @@ scribo_filter_objects_thin \
scribo_filter_objects_v_thick \
scribo_filter_objects_v_thin \
scribo_filter_objects_with_holes \
+scribo_filter_paragraphs_bbox_overlap \
+scribo_filter_paragraphs_in_borders \
+scribo_filter_paragraphs_in_image \
+scribo_filter_separators_in_borders \
+scribo_filter_separators_in_element \
+scribo_filter_separators_in_paragraph \
+scribo_filter_separators_vert_in_borders \
scribo_fun_v2b_label_to_bool \
scribo_fun_v2b_objects_large_filter \
+scribo_fun_v2b_objects_on_border_filter \
scribo_fun_v2b_objects_small_filter \
scribo_fun_v2v_highlight \
scribo_io_img_internal_debug_img_visitor \
@@ -207,11 +220,13 @@ scribo_io_img_internal_non_text_img_visitor \
scribo_io_img_internal_text_img_visitor \
scribo_io_img_save \
scribo_io_text_boxes_save \
+scribo_io_xml_internal_compute_text_colour \
scribo_io_xml_internal_extended_page_xml_visitor \
scribo_io_xml_internal_page_xml_visitor \
scribo_io_xml_internal_print_box_coords \
scribo_io_xml_internal_print_image_coords \
scribo_io_xml_internal_print_page_preambule \
+scribo_io_xml_internal_time_info \
scribo_io_xml_save \
scribo_make_all \
scribo_make_debug_filename \
@@ -220,6 +235,7 @@ scribo_make_text_blocks_image \
scribo_make_text_components_image \
scribo_postprocessing_all \
scribo_postprocessing_fill_object_holes \
+scribo_postprocessing_images_to_drop_capital \
scribo_preprocessing_all \
scribo_preprocessing_crop \
scribo_preprocessing_crop_without_localization \
@@ -245,6 +261,7 @@ scribo_primitive_extract_lines_h_pattern \
scribo_primitive_extract_lines_h_single \
scribo_primitive_extract_lines_h_thick \
scribo_primitive_extract_lines_h_thick_and_single \
+scribo_primitive_extract_lines_h_thick_and_thin \
scribo_primitive_extract_lines_pattern \
scribo_primitive_extract_lines_thick \
scribo_primitive_extract_lines_v_discontinued \
@@ -253,6 +270,7 @@ scribo_primitive_extract_lines_v_single \
scribo_primitive_extract_lines_v_thick \
scribo_primitive_extract_lines_v_thick_and_single \
scribo_primitive_extract_non_text \
+scribo_primitive_extract_non_text_hdoc \
scribo_primitive_extract_non_text_kmean \
scribo_primitive_extract_separators \
scribo_primitive_extract_separators_nonvisible \
@@ -330,15 +348,27 @@ scribo_text_clean_inplace \
scribo_text_extract_lines \
scribo_text_extract_lines_with_features \
scribo_text_extract_lines_wo_merge \
+scribo_text_extract_paragraphs \
+scribo_text_extract_paragraphs_hdoc \
scribo_text_link_lines \
scribo_text_look_like_text_lines \
scribo_text_merging \
+scribo_text_merging_hdoc \
+scribo_text_paragraphs_closing \
+scribo_toolchain_content_in_hdoc \
+scribo_toolchain_internal_content_in_hdoc_functor \
scribo_toolchain_internal_text_in_doc_preprocess_functor \
scribo_toolchain_internal_toolchain_functor \
scribo_toolchain_text_in_doc_preprocess \
scribo_toolchain_text_in_picture \
scribo_upsampling_bs2x \
-scribo_upsampling_eagle
+scribo_upsampling_eagle \
+scribo_util_box_intersection \
+scribo_util_box_is_included \
+scribo_util_color_to_hex \
+scribo_util_component_outline \
+scribo_util_component_precise_outline \
+scribo_util_hex_to_color
scribo_all_SOURCES = scribo_all.cc
scribo_binarization_all_SOURCES = scribo_binarization_all.cc
@@ -379,9 +409,11 @@ scribo_core_object_groups_SOURCES = scribo_core_object_groups.cc
scribo_core_object_links_SOURCES = scribo_core_object_links.cc
scribo_core_paragraph_info_SOURCES = scribo_core_paragraph_info.cc
scribo_core_paragraph_set_SOURCES = scribo_core_paragraph_set.cc
+scribo_core_stats_SOURCES = scribo_core_stats.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_core_tag_paragraph_SOURCES = scribo_core_tag_paragraph.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
@@ -406,6 +438,7 @@ 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_draw_line_components_SOURCES = scribo_draw_line_components.cc
scribo_estim_components_features_SOURCES = scribo_estim_components_features.cc
scribo_estim_font_boldness_SOURCES = scribo_estim_font_boldness.cc
scribo_estim_font_color_SOURCES = scribo_estim_font_color.cc
@@ -413,6 +446,7 @@ scribo_estim_internal_compute_skeleton_SOURCES = scribo_estim_internal_compute_s
scribo_estim_object_groups_mean_width_SOURCES = scribo_estim_object_groups_mean_width.cc
scribo_filter_all_SOURCES = scribo_filter_all.cc
scribo_filter_common_objects_photo_SOURCES = scribo_filter_common_objects_photo.cc
+scribo_filter_images_in_paragraph_SOURCES = scribo_filter_images_in_paragraph.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
@@ -435,6 +469,7 @@ scribo_filter_object_links_top_aligned_SOURCES = scribo_filter_object_links_top_
scribo_filter_objects_h_thick_SOURCES = scribo_filter_objects_h_thick.cc
scribo_filter_objects_h_thin_SOURCES = scribo_filter_objects_h_thin.cc
scribo_filter_objects_large_SOURCES = scribo_filter_objects_large.cc
+scribo_filter_objects_on_border_SOURCES = scribo_filter_objects_on_border.cc
scribo_filter_objects_size_ratio_SOURCES = scribo_filter_objects_size_ratio.cc
scribo_filter_objects_small_SOURCES = scribo_filter_objects_small.cc
scribo_filter_objects_thick_SOURCES = scribo_filter_objects_thick.cc
@@ -442,8 +477,16 @@ 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_filter_paragraphs_bbox_overlap_SOURCES = scribo_filter_paragraphs_bbox_overlap.cc
+scribo_filter_paragraphs_in_borders_SOURCES = scribo_filter_paragraphs_in_borders.cc
+scribo_filter_paragraphs_in_image_SOURCES = scribo_filter_paragraphs_in_image.cc
+scribo_filter_separators_in_borders_SOURCES = scribo_filter_separators_in_borders.cc
+scribo_filter_separators_in_element_SOURCES = scribo_filter_separators_in_element.cc
+scribo_filter_separators_in_paragraph_SOURCES = scribo_filter_separators_in_paragraph.cc
+scribo_filter_separators_vert_in_borders_SOURCES = scribo_filter_separators_vert_in_borders.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_on_border_filter_SOURCES = scribo_fun_v2b_objects_on_border_filter.cc
scribo_fun_v2b_objects_small_filter_SOURCES = scribo_fun_v2b_objects_small_filter.cc
scribo_fun_v2v_highlight_SOURCES = scribo_fun_v2v_highlight.cc
scribo_io_img_internal_debug_img_visitor_SOURCES = scribo_io_img_internal_debug_img_visitor.cc
@@ -453,11 +496,13 @@ scribo_io_img_internal_non_text_img_visitor_SOURCES = scribo_io_img_internal_non
scribo_io_img_internal_text_img_visitor_SOURCES = scribo_io_img_internal_text_img_visitor.cc
scribo_io_img_save_SOURCES = scribo_io_img_save.cc
scribo_io_text_boxes_save_SOURCES = scribo_io_text_boxes_save.cc
+scribo_io_xml_internal_compute_text_colour_SOURCES = scribo_io_xml_internal_compute_text_colour.cc
scribo_io_xml_internal_extended_page_xml_visitor_SOURCES = scribo_io_xml_internal_extended_page_xml_visitor.cc
scribo_io_xml_internal_page_xml_visitor_SOURCES = scribo_io_xml_internal_page_xml_visitor.cc
scribo_io_xml_internal_print_box_coords_SOURCES = scribo_io_xml_internal_print_box_coords.cc
scribo_io_xml_internal_print_image_coords_SOURCES = scribo_io_xml_internal_print_image_coords.cc
scribo_io_xml_internal_print_page_preambule_SOURCES = scribo_io_xml_internal_print_page_preambule.cc
+scribo_io_xml_internal_time_info_SOURCES = scribo_io_xml_internal_time_info.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
@@ -466,6 +511,7 @@ scribo_make_text_blocks_image_SOURCES = scribo_make_text_blocks_image.cc
scribo_make_text_components_image_SOURCES = scribo_make_text_components_image.cc
scribo_postprocessing_all_SOURCES = scribo_postprocessing_all.cc
scribo_postprocessing_fill_object_holes_SOURCES = scribo_postprocessing_fill_object_holes.cc
+scribo_postprocessing_images_to_drop_capital_SOURCES = scribo_postprocessing_images_to_drop_capital.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
@@ -491,6 +537,7 @@ scribo_primitive_extract_lines_h_pattern_SOURCES = scribo_primitive_extract_line
scribo_primitive_extract_lines_h_single_SOURCES = scribo_primitive_extract_lines_h_single.cc
scribo_primitive_extract_lines_h_thick_SOURCES = scribo_primitive_extract_lines_h_thick.cc
scribo_primitive_extract_lines_h_thick_and_single_SOURCES = scribo_primitive_extract_lines_h_thick_and_single.cc
+scribo_primitive_extract_lines_h_thick_and_thin_SOURCES = scribo_primitive_extract_lines_h_thick_and_thin.cc
scribo_primitive_extract_lines_pattern_SOURCES = scribo_primitive_extract_lines_pattern.cc
scribo_primitive_extract_lines_thick_SOURCES = scribo_primitive_extract_lines_thick.cc
scribo_primitive_extract_lines_v_discontinued_SOURCES = scribo_primitive_extract_lines_v_discontinued.cc
@@ -499,6 +546,7 @@ scribo_primitive_extract_lines_v_single_SOURCES = scribo_primitive_extract_lines
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_non_text_SOURCES = scribo_primitive_extract_non_text.cc
+scribo_primitive_extract_non_text_hdoc_SOURCES = scribo_primitive_extract_non_text_hdoc.cc
scribo_primitive_extract_non_text_kmean_SOURCES = scribo_primitive_extract_non_text_kmean.cc
scribo_primitive_extract_separators_SOURCES = scribo_primitive_extract_separators.cc
scribo_primitive_extract_separators_nonvisible_SOURCES = scribo_primitive_extract_separators_nonvisible.cc
@@ -576,13 +624,25 @@ scribo_text_clean_inplace_SOURCES = scribo_text_clean_inplace.cc
scribo_text_extract_lines_SOURCES = scribo_text_extract_lines.cc
scribo_text_extract_lines_with_features_SOURCES = scribo_text_extract_lines_with_features.cc
scribo_text_extract_lines_wo_merge_SOURCES = scribo_text_extract_lines_wo_merge.cc
+scribo_text_extract_paragraphs_SOURCES = scribo_text_extract_paragraphs.cc
+scribo_text_extract_paragraphs_hdoc_SOURCES = scribo_text_extract_paragraphs_hdoc.cc
scribo_text_link_lines_SOURCES = scribo_text_link_lines.cc
scribo_text_look_like_text_lines_SOURCES = scribo_text_look_like_text_lines.cc
scribo_text_merging_SOURCES = scribo_text_merging.cc
+scribo_text_merging_hdoc_SOURCES = scribo_text_merging_hdoc.cc
+scribo_text_paragraphs_closing_SOURCES = scribo_text_paragraphs_closing.cc
+scribo_toolchain_content_in_hdoc_SOURCES = scribo_toolchain_content_in_hdoc.cc
+scribo_toolchain_internal_content_in_hdoc_functor_SOURCES = scribo_toolchain_internal_content_in_hdoc_functor.cc
scribo_toolchain_internal_text_in_doc_preprocess_functor_SOURCES = scribo_toolchain_internal_text_in_doc_preprocess_functor.cc
scribo_toolchain_internal_toolchain_functor_SOURCES = scribo_toolchain_internal_toolchain_functor.cc
scribo_toolchain_text_in_doc_preprocess_SOURCES = scribo_toolchain_text_in_doc_preprocess.cc
scribo_toolchain_text_in_picture_SOURCES = scribo_toolchain_text_in_picture.cc
scribo_upsampling_bs2x_SOURCES = scribo_upsampling_bs2x.cc
scribo_upsampling_eagle_SOURCES = scribo_upsampling_eagle.cc
+scribo_util_box_intersection_SOURCES = scribo_util_box_intersection.cc
+scribo_util_box_is_included_SOURCES = scribo_util_box_is_included.cc
+scribo_util_color_to_hex_SOURCES = scribo_util_color_to_hex.cc
+scribo_util_component_outline_SOURCES = scribo_util_component_outline.cc
+scribo_util_component_precise_outline_SOURCES = scribo_util_component_precise_outline.cc
+scribo_util_hex_to_color_SOURCES = scribo_util_hex_to_color.cc
--
1.5.6.5
1
0
* scribo/core/object_groups.hh,
* scribo/debug/logger.hh,
* scribo/estim/object_groups_mean_width.hh,
* src/debug/show_paragraph_blocks.cc,
* src/debug/show_text_lines.cc,
* src/non_text_components.cc,
* src/primitive/extract/alignments.cc,
* scribo/text/extract_paragraphs_hdoc.hh: Fix namespace ambiguities.
* scribo/core/object_links.hh: Remove useless find_root().
* scribo/debug/bboxes_enlarged_image.hh,
* scribo/debug/looks_like_a_text_line_image.hh: Update includes.
* scribo/filter/images_in_paragraph.hh,
* scribo/filter/paragraphs_bbox_overlap.hh,
* scribo/filter/paragraphs_in_image.hh,
* scribo/filter/separators_in_element.hh,
* scribo/filter/separators_in_paragraph.hh,
* scribo/io/img/internal/debug_img_visitor.hh,
* scribo/io/img/internal/full_img_visitor.hh,
* scribo/io/xml/internal/compute_text_colour.hh,
* scribo/io/xml/internal/full_xml_visitor.hh,
* scribo/io/xml/internal/page_xml_visitor.hh,
* scribo/io/xml/internal/time_info.hh,
* scribo/postprocessing/images_to_drop_capital.hh,
* scribo/primitive/remove/separators.hh,
* scribo/text/extract_paragraphs.hh,
* scribo/text/paragraphs_closing.hh,
* scribo/toolchain/internal/content_in_hdoc_functor.hh: Add
missing includes.
* scribo/io/xml/load.hh: Fix string conversions.
* scribo/primitive/group/from_double_link.hh
* scribo/primitive/link/with_several_left_links.hh
* scribo/primitive/link/with_several_right_links.hh
* src/afp/link.hh: Update according new API in
object_groups/links.
* src/text_in_picture.cc,
* src/text_in_picture_neg.cc,
* src/text_recognition_in_picture.cc: Update a routine name.
---
scribo/ChangeLog | 48 ++++++++++++++++++++
scribo/scribo/core/object_groups.hh | 20 +++++++--
scribo/scribo/core/object_links.hh | 11 -----
scribo/scribo/debug/bboxes_enlarged_image.hh | 3 +-
scribo/scribo/debug/logger.hh | 10 ++--
.../scribo/debug/looks_like_a_text_line_image.hh | 3 +-
scribo/scribo/estim/object_groups_mean_width.hh | 2 +-
scribo/scribo/filter/images_in_paragraph.hh | 1 +
scribo/scribo/filter/paragraphs_bbox_overlap.hh | 4 +-
scribo/scribo/filter/paragraphs_in_image.hh | 2 +
scribo/scribo/filter/separators_in_element.hh | 1 +
scribo/scribo/filter/separators_in_paragraph.hh | 3 +-
scribo/scribo/io/img/internal/debug_img_visitor.hh | 1 +
scribo/scribo/io/img/internal/full_img_visitor.hh | 1 +
.../scribo/io/xml/internal/compute_text_colour.hh | 3 +
scribo/scribo/io/xml/internal/full_xml_visitor.hh | 1 +
scribo/scribo/io/xml/internal/page_xml_visitor.hh | 1 +
scribo/scribo/io/xml/internal/time_info.hh | 3 +-
scribo/scribo/io/xml/load.hh | 33 +++++++-------
.../postprocessing/images_to_drop_capital.hh | 1 +
scribo/scribo/primitive/group/from_double_link.hh | 25 ++++------
.../primitive/link/with_several_left_links.hh | 16 +++---
.../primitive/link/with_several_right_links.hh | 16 +++---
scribo/scribo/primitive/remove/separators.hh | 1 +
scribo/scribo/text/extract_paragraphs.hh | 1 +
scribo/scribo/text/extract_paragraphs_hdoc.hh | 11 +++--
scribo/scribo/text/paragraphs_closing.hh | 3 +
.../toolchain/internal/content_in_hdoc_functor.hh | 2 +-
scribo/src/afp/link.hh | 6 +-
scribo/src/debug/show_paragraph_blocks.cc | 2 +-
scribo/src/debug/show_text_lines.cc | 4 +-
scribo/src/non_text_components.cc | 2 +-
scribo/src/primitive/extract/alignments.cc | 5 +-
scribo/src/text_in_picture.cc | 6 +-
scribo/src/text_in_picture_neg.cc | 1 -
scribo/src/text_recognition_in_picture.cc | 6 +-
36 files changed, 161 insertions(+), 98 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index b0b50f3..f756ab3 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,51 @@
+2011-06-28 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix compilation.
+
+ * scribo/core/object_groups.hh,
+ * scribo/debug/logger.hh,
+ * scribo/estim/object_groups_mean_width.hh,
+ * src/debug/show_paragraph_blocks.cc,
+ * src/debug/show_text_lines.cc,
+ * src/non_text_components.cc,
+ * src/primitive/extract/alignments.cc,
+ * scribo/text/extract_paragraphs_hdoc.hh: Fix namespace ambiguities.
+
+ * scribo/core/object_links.hh: Remove useless find_root().
+
+ * scribo/debug/bboxes_enlarged_image.hh,
+ * scribo/debug/looks_like_a_text_line_image.hh: Update includes.
+
+ * scribo/filter/images_in_paragraph.hh,
+ * scribo/filter/paragraphs_bbox_overlap.hh,
+ * scribo/filter/paragraphs_in_image.hh,
+ * scribo/filter/separators_in_element.hh,
+ * scribo/filter/separators_in_paragraph.hh,
+ * scribo/io/img/internal/debug_img_visitor.hh,
+ * scribo/io/img/internal/full_img_visitor.hh,
+ * scribo/io/xml/internal/compute_text_colour.hh,
+ * scribo/io/xml/internal/full_xml_visitor.hh,
+ * scribo/io/xml/internal/page_xml_visitor.hh,
+ * scribo/io/xml/internal/time_info.hh,
+ * scribo/postprocessing/images_to_drop_capital.hh,
+ * scribo/primitive/remove/separators.hh,
+ * scribo/text/extract_paragraphs.hh,
+ * scribo/text/paragraphs_closing.hh,
+ * scribo/toolchain/internal/content_in_hdoc_functor.hh: Add
+ missing includes.
+
+ * scribo/io/xml/load.hh: Fix string conversions.
+
+ * scribo/primitive/group/from_double_link.hh
+ * scribo/primitive/link/with_several_left_links.hh
+ * scribo/primitive/link/with_several_right_links.hh
+ * src/afp/link.hh: Update according new API in
+ object_groups/links.
+
+ * src/text_in_picture.cc,
+ * src/text_in_picture_neg.cc,
+ * src/text_recognition_in_picture.cc: Update a routine name.
+
2011-06-27 Guillaume Lazzara <z(a)lrde.epita.fr>
* scribo/toolchain/internal/content_in_doc_functor.hh: Add a
diff --git a/scribo/scribo/core/object_groups.hh b/scribo/scribo/core/object_groups.hh
index 1cc8815..9990996 100644
--- a/scribo/scribo/core/object_groups.hh
+++ b/scribo/scribo/core/object_groups.hh
@@ -54,6 +54,18 @@ namespace scribo
namespace internal
{
+
+ inline
+ unsigned
+ find_root(mln::util::array<unsigned>& parent, unsigned x)
+ {
+ if (parent(x) == x)
+ return x;
+ else
+ return parent(x) = find_root(parent, parent(x));
+ }
+
+
/// Data structure for \c scribo::object_groups<I>.
template <typename L>
struct object_groups_data
@@ -149,7 +161,7 @@ namespace scribo
comp_to_group_ = links.comp_to_link();
unsigned ngroups = 0;
- util::array<unsigned> new_id(comp_to_group_.nelements(), 0);
+ mln::util::array<unsigned> new_id(comp_to_group_.nelements(), 0);
mln::util::array<mln::util::array<component_id_t> > comp_ids(1);
mln::util::array<accu::shape::bbox<mln_site(L)> > bboxes(1);
mln::util::array<unsigned> pixel_areas(1);
@@ -157,7 +169,7 @@ namespace scribo
// Remove potential loops in linking
// FIXME: we may try to avoid loops while linking...
{
- util::array<bool> deja_vu(comp_to_group_.nelements());
+ mln::util::array<bool> deja_vu(comp_to_group_.nelements());
for_all_elements(e, comp_to_group_)
if (comp_to_group_(e) != e && comp_to_group_(e) != 0)
{
@@ -199,7 +211,7 @@ namespace scribo
group_info_.resize(1);
group_info_.reserve(ngroups);
- util::array<unsigned> group_idx(ngroups + 1, 0);
+ mln::util::array<unsigned> group_idx(ngroups + 1, 0);
for (unsigned i = 1; i < new_id.nelements(); ++i)
if (new_id(i))
@@ -306,7 +318,7 @@ namespace scribo
}
template <typename L>
- const util::array<unsigned>&
+ const mln::util::array<unsigned>&
object_groups<L>::comp_to_group() const
{
return data_->comp_to_group_;
diff --git a/scribo/scribo/core/object_links.hh b/scribo/scribo/core/object_links.hh
index 386de41..37fd299 100644
--- a/scribo/scribo/core/object_links.hh
+++ b/scribo/scribo/core/object_links.hh
@@ -51,17 +51,6 @@ namespace scribo
namespace internal
{
- inline
- unsigned
- find_root(mln::util::array<unsigned>& parent, unsigned x)
- {
- if (parent(x) == x)
- return x;
- else
- return parent(x) = find_root(parent, parent(x));
- }
-
-
/// Data structure for \c scribo::object_links<I>.
template <typename L>
struct object_links_data
diff --git a/scribo/scribo/debug/bboxes_enlarged_image.hh b/scribo/scribo/debug/bboxes_enlarged_image.hh
index 2563a1a..24fea2f 100644
--- a/scribo/scribo/debug/bboxes_enlarged_image.hh
+++ b/scribo/scribo/debug/bboxes_enlarged_image.hh
@@ -39,8 +39,7 @@
# include <scribo/core/line_set.hh>
-// Declares internal::looks_like_a_text_line.
-# include <scribo/text/merging.hh>
+# include <scribo/text/look_like_text_lines.hh>
namespace scribo
diff --git a/scribo/scribo/debug/logger.hh b/scribo/scribo/debug/logger.hh
index d955f08..f16dd89 100644
--- a/scribo/scribo/debug/logger.hh
+++ b/scribo/scribo/debug/logger.hh
@@ -246,14 +246,14 @@ namespace scribo
// void
// logger_::log_image_generic(const I& ima, const std::string& name)
// {
- // io::magick::save(ima, mln::debug::filename(name + ".png"));
+ // mln::io::magick::save(ima, mln::debug::filename(name + ".png"));
// }
template <typename I>
void
logger_::log_image_rgb(const I& ima, const std::string& name)
{
- io::ppm::save(ima, mln::debug::filename(name + ".ppm"));
+ mln::io::ppm::save(ima, mln::debug::filename(name + ".ppm"));
}
@@ -261,7 +261,7 @@ namespace scribo
void
logger_::log_image_bool(const I& ima, const std::string& name)
{
- io::pbm::save(ima, mln::debug::filename(name + ".pbm"));
+ mln::io::pbm::save(ima, mln::debug::filename(name + ".pbm"));
}
@@ -269,8 +269,8 @@ namespace scribo
void
logger_::log_image_grayscale(const I& ima, const std::string& name)
{
- io::pgm::save(data::wrap(value::int_u8(), ima),
- mln::debug::filename(name + ".pgm"));
+ mln::io::pgm::save(data::wrap(value::int_u8(), ima),
+ mln::debug::filename(name + ".pgm"));
}
} // end of namespace scribo::debug::internal
diff --git a/scribo/scribo/debug/looks_like_a_text_line_image.hh b/scribo/scribo/debug/looks_like_a_text_line_image.hh
index d8aacf0..376baae 100644
--- a/scribo/scribo/debug/looks_like_a_text_line_image.hh
+++ b/scribo/scribo/debug/looks_like_a_text_line_image.hh
@@ -40,8 +40,7 @@
# include <scribo/core/line_set.hh>
-// Declares internal::looks_like_a_text_line.
-# include <scribo/text/merging.hh>
+# include <scribo/text/look_like_text_lines.hh>
namespace scribo
diff --git a/scribo/scribo/estim/object_groups_mean_width.hh b/scribo/scribo/estim/object_groups_mean_width.hh
index 65d843c..9167db4 100644
--- a/scribo/scribo/estim/object_groups_mean_width.hh
+++ b/scribo/scribo/estim/object_groups_mean_width.hh
@@ -63,7 +63,7 @@ namespace scribo
template <typename L>
- util::array<float>
+ mln::util::array<float>
object_groups_mean_width(const object_groups<L>& groups)
{
trace::entering("scribo::estim::object_groups_mean_width");
diff --git a/scribo/scribo/filter/images_in_paragraph.hh b/scribo/scribo/filter/images_in_paragraph.hh
index 3cf64e1..cf77892 100644
--- a/scribo/scribo/filter/images_in_paragraph.hh
+++ b/scribo/scribo/filter/images_in_paragraph.hh
@@ -33,6 +33,7 @@
# include <mln/core/concept/image.hh>
+# include <mln/draw/box_plain.hh>
# include <scribo/core/component_set.hh>
# include <scribo/core/document.hh>
diff --git a/scribo/scribo/filter/paragraphs_bbox_overlap.hh b/scribo/scribo/filter/paragraphs_bbox_overlap.hh
index 188a77e..1cf9793 100644
--- a/scribo/scribo/filter/paragraphs_bbox_overlap.hh
+++ b/scribo/scribo/filter/paragraphs_bbox_overlap.hh
@@ -38,10 +38,10 @@
# include <mln/core/image/dmorph/image_if.hh>
# include <mln/data/transform.hh>
# include <mln/util/array.hh>
+# include <mln/draw/box_plain.hh>
# include <scribo/core/paragraph_set.hh>
-
-#include <mln/labeling/colorize.hh>
+# include <scribo/util/box_intersection.hh>
namespace scribo
{
diff --git a/scribo/scribo/filter/paragraphs_in_image.hh b/scribo/scribo/filter/paragraphs_in_image.hh
index f67b863..be15b06 100644
--- a/scribo/scribo/filter/paragraphs_in_image.hh
+++ b/scribo/scribo/filter/paragraphs_in_image.hh
@@ -38,11 +38,13 @@
# include <mln/core/image/dmorph/image_if.hh>
# include <mln/data/transform.hh>
+# include <mln/draw/box_plain.hh>
# include <mln/util/array.hh>
# include <mln/pw/all.hh>
+# include <scribo/core/document.hh>
# include <scribo/core/paragraph_set.hh>
# include <scribo/fun/v2b/objects_small_filter.hh>
# include <scribo/primitive/extract/components.hh>
diff --git a/scribo/scribo/filter/separators_in_element.hh b/scribo/scribo/filter/separators_in_element.hh
index a8b0ebb..7e8a437 100644
--- a/scribo/scribo/filter/separators_in_element.hh
+++ b/scribo/scribo/filter/separators_in_element.hh
@@ -33,6 +33,7 @@
# include <mln/core/concept/image.hh>
+# include <mln/draw/box_plain.hh>
# include <scribo/core/component_set.hh>
# include <scribo/core/document.hh>
diff --git a/scribo/scribo/filter/separators_in_paragraph.hh b/scribo/scribo/filter/separators_in_paragraph.hh
index 7c157be..ac399c3 100644
--- a/scribo/scribo/filter/separators_in_paragraph.hh
+++ b/scribo/scribo/filter/separators_in_paragraph.hh
@@ -23,7 +23,7 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef SCRIBO_FILTER_SEPARATORS_IN_PARAGRAPHS_HH
+#ifndef SCRIBO_FILTER_SEPARATORS_IN_PARAGRAPH_HH
# define SCRIBO_FILTER_SEPARATORS_IN_PARAGRAPH_HH
/// \file
@@ -33,6 +33,7 @@
# include <mln/core/concept/image.hh>
+# include <mln/draw/box_plain.hh>
# include <scribo/core/component_set.hh>
# include <scribo/core/document.hh>
diff --git a/scribo/scribo/io/img/internal/debug_img_visitor.hh b/scribo/scribo/io/img/internal/debug_img_visitor.hh
index cde16ed..b5e576b 100644
--- a/scribo/scribo/io/img/internal/debug_img_visitor.hh
+++ b/scribo/scribo/io/img/internal/debug_img_visitor.hh
@@ -37,6 +37,7 @@
# include <mln/draw/polygon.hh>
# include <mln/subsampling/antialiased.hh>
# include <mln/morpho/elementary/gradient_external.hh>
+# include <mln/draw/box.hh>
# include <scribo/core/internal/doc_serializer.hh>
# include <scribo/core/document.hh>
diff --git a/scribo/scribo/io/img/internal/full_img_visitor.hh b/scribo/scribo/io/img/internal/full_img_visitor.hh
index f31eec1..2e4ddad 100644
--- a/scribo/scribo/io/img/internal/full_img_visitor.hh
+++ b/scribo/scribo/io/img/internal/full_img_visitor.hh
@@ -42,6 +42,7 @@
# include <scribo/core/paragraph_set.hh>
# include <scribo/core/line_info.hh>
+# include <scribo/text/paragraphs_closing.hh>
# include <scribo/io/img/internal/draw_edges.hh>
# include <scribo/util/component_precise_outline.hh>
diff --git a/scribo/scribo/io/xml/internal/compute_text_colour.hh b/scribo/scribo/io/xml/internal/compute_text_colour.hh
index f592c08..ef9929e 100644
--- a/scribo/scribo/io/xml/internal/compute_text_colour.hh
+++ b/scribo/scribo/io/xml/internal/compute_text_colour.hh
@@ -31,6 +31,7 @@
/// Find the color name of a given color.
# include <mln/value/rgb8.hh>
+# include <mln/value/int_u8.hh>
# include <mln/make/vec.hh>
# include <mln/norm/l2.hh>
@@ -47,6 +48,8 @@ namespace scribo
namespace internal
{
+ using namespace mln;
+
const char *
compute_text_colour(const value::rgb8& v);
diff --git a/scribo/scribo/io/xml/internal/full_xml_visitor.hh b/scribo/scribo/io/xml/internal/full_xml_visitor.hh
index c6109ee..b4fb683 100644
--- a/scribo/scribo/io/xml/internal/full_xml_visitor.hh
+++ b/scribo/scribo/io/xml/internal/full_xml_visitor.hh
@@ -30,6 +30,7 @@
///
/// XML serializer Visitor.
+# include <iomanip>
# include <fstream>
# include <QByteArray>
diff --git a/scribo/scribo/io/xml/internal/page_xml_visitor.hh b/scribo/scribo/io/xml/internal/page_xml_visitor.hh
index dab1cce..4c15e83 100644
--- a/scribo/scribo/io/xml/internal/page_xml_visitor.hh
+++ b/scribo/scribo/io/xml/internal/page_xml_visitor.hh
@@ -37,6 +37,7 @@
# include <scribo/util/component_precise_outline.hh>
+# include <scribo/io/xml/internal/print_image_coords.hh>
# include <scribo/io/xml/internal/print_box_coords.hh>
# include <scribo/io/xml/internal/print_page_preambule.hh>
# include <scribo/io/xml/internal/compute_text_colour.hh>
diff --git a/scribo/scribo/io/xml/internal/time_info.hh b/scribo/scribo/io/xml/internal/time_info.hh
index 760e856..77aee0d 100644
--- a/scribo/scribo/io/xml/internal/time_info.hh
+++ b/scribo/scribo/io/xml/internal/time_info.hh
@@ -31,6 +31,7 @@
/// Get formated time info for PAGE XML format.
# include <ctime>
+# include <string>
namespace scribo
{
@@ -44,7 +45,7 @@ namespace scribo
namespace internal
{
- using namespace mln;
+ std::string time_info();
# ifndef MLN_INCLUDE_ONLY
diff --git a/scribo/scribo/io/xml/load.hh b/scribo/scribo/io/xml/load.hh
index 4e90b20..984029f 100644
--- a/scribo/scribo/io/xml/load.hh
+++ b/scribo/scribo/io/xml/load.hh
@@ -188,14 +188,14 @@ namespace scribo
// Component Info
case ComponentInfo:
{
- component_info info(atts.value("id").toInt(),
- mln::make::box2d(atts.value("pmin_y").toInt(),
- atts.value("pmin_x").toInt(),
- atts.value("pmax_y").toInt(),
- atts.value("pmax_x").toInt()),
- mln::point2d(atts.value("mass_center_y").toInt(),
- atts.value("mass_center_x").toInt()),
- atts.value("card").toInt());
+ component_info<L> info(atts.value("id").toInt(),
+ mln::make::box2d(atts.value("pmin_y").toInt(),
+ atts.value("pmin_x").toInt(),
+ atts.value("pmax_y").toInt(),
+ atts.value("pmax_x").toInt()),
+ mln::point2d(atts.value("mass_center_y").toInt(),
+ atts.value("mass_center_x").toInt()),
+ atts.value("card").toInt());
info.update_tag(component::str2tag(atts.value("tag").toUtf8().constData()));
@@ -212,7 +212,7 @@ namespace scribo
{
component_features_data comp_features;
comp_features.valid = true;
- comp_features.color = scribo::util::hex_to_color(atts.value("color"));
+ comp_features.color = scribo::util::hex_to_color(atts.value("color").toUtf8().constData());
comp_features.boldness = atts.value("boldness").toFloat();
comp_set_data->infos_.last().update_features(comp_features);
@@ -261,7 +261,8 @@ namespace scribo
// qDebug() << "TextRegion";
current_paragraph = paragraph_info<L>(llinks);
- current_paragraph.set_color_(scribo::util::hex_to_color(atts.value("color")));
+ current_paragraph.set_color_(
+ scribo::util::hex_to_color(atts.value("color").toUtf8().constData()));
current_paragraph.set_color_reliability_(atts.value("color_reliability").toFloat());
}
break;
@@ -282,7 +283,6 @@ namespace scribo
line_data = new scribo::internal::line_info_data<L>(lines, mln::util::array<component_id_t>());
- line_data->holder_ = lines;
line_data->text_ = atts.value("text").toUtf8().constData();
line_data->hidden_ = false;
@@ -299,7 +299,7 @@ namespace scribo
line_data->word_space_ = 0;
line_data->reading_direction_ = line::LeftToRight;
- line_data->type_ = line::str2type(atts.value("txt_text_type").toAscii().constData());
+ line_data->type_ = line::str2type(atts.value("txt_text_type").toUtf8().constData());
line_data->reverse_video_ = (atts.value("txt_reverse_video") == "false" ? false : true);
line_data->orientation_ = 0;
line_data->reading_orientation_ = atts.value("txt_reading_orientation").toInt();
@@ -308,7 +308,8 @@ namespace scribo
line_data->boldness_ = atts.value("boldness").toFloat();
line_data->boldness_reliability_ = atts.value("boldness_reliability").toFloat();
- line_data->color_ = scribo::util::hex_to_color(atts.value("color"));
+ line_data->color_ = scribo::util::hex_to_color(
+ atts.value("color").toUtf8().constData());
line_data->color_reliability_ = atts.value("color_reliability").toFloat();
@@ -514,7 +515,7 @@ namespace scribo
{
case LabeledImage:
{
- QByteArray data = ch.toAscii();
+ QByteArray data = ch.toUtf8();
data = QByteArray::fromBase64(data);
data = qUncompress(data);
memcpy((char *) comp_set_data->ima_.buffer(), data.data(), data.size());
@@ -523,7 +524,7 @@ namespace scribo
case SeparatorsImage:
{
- QByteArray data = ch.toAscii();
+ QByteArray data = ch.toUtf8();
data = QByteArray::fromBase64(data);
data = qUncompress(data);
memcpy((char *) comp_set_data->separators_.buffer(), data.data(), data.size());
@@ -534,7 +535,7 @@ namespace scribo
case HLineSeparatorsImage:
case VLineSeparatorsImage:
{
- QByteArray data = ch.toAscii();
+ QByteArray data = ch.toUtf8();
data = QByteArray::fromBase64(data);
data = qUncompress(data);
memcpy((char *) seps.buffer(), data.data(), data.size());
diff --git a/scribo/scribo/postprocessing/images_to_drop_capital.hh b/scribo/scribo/postprocessing/images_to_drop_capital.hh
index ca76609..f7d18a6 100644
--- a/scribo/scribo/postprocessing/images_to_drop_capital.hh
+++ b/scribo/scribo/postprocessing/images_to_drop_capital.hh
@@ -33,6 +33,7 @@
# include <mln/core/concept/image.hh>
+# include <mln/draw/box_plain.hh>
# include <scribo/core/component_set.hh>
# include <scribo/core/document.hh>
diff --git a/scribo/scribo/primitive/group/from_double_link.hh b/scribo/scribo/primitive/group/from_double_link.hh
index 3af395d..260bfea 100644
--- a/scribo/scribo/primitive/group/from_double_link.hh
+++ b/scribo/scribo/primitive/group/from_double_link.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010. 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -89,27 +89,22 @@ namespace scribo
mln_precondition(left_link.nelements() == right_link.nelements());
- object_groups<L> parent(left_link);
- parent.init();
+ object_links<L> parent = left_link.duplicate();
+
for_all_comps(i, left_link.components())
- {
- mln::util::couple<bool, unsigned>
- nbh = internal::is_link_valid(left_link, right_link, i);
- if (nbh.first())
+ if (internal::is_link_valid(left_link, right_link, i))
{
- unsigned par = internal::find_root(parent, nbh.second());
+ component_id_t par = left_link(i);
if (par < i)
- parent(par) = i;
+ parent.update(par, i);
else
- parent(i) = par;
+ parent.update(i, par);
}
- }
- for (unsigned i = parent.nelements() - 1; i < parent.nelements(); --i)
- parent(i) = parent(parent(i));
+ object_groups<L> result = from_single_link(parent);
trace::exiting("scribo::primitive::group::from_double_link");
- return parent;
+ return result;
}
diff --git a/scribo/scribo/primitive/link/with_several_left_links.hh b/scribo/scribo/primitive/link/with_several_left_links.hh
index 3f9a0cd..e9b53d2 100644
--- a/scribo/scribo/primitive/link/with_several_left_links.hh
+++ b/scribo/scribo/primitive/link/with_several_left_links.hh
@@ -103,16 +103,16 @@ namespace scribo
for_all_comps(i, comps)
{
- if (link_center(i) != i)
- final_link(i) = link_center(i);
+ if (link_center.is_linked(i))
+ final_link.update((i), link_center(i));
else if (link_top(i) == link_bot(i))
- final_link(i) = link_top(i);
- else if (link_top(i) != i && link_bot(i) == i)
- final_link(i) = link_top(i);
- else if (link_bot(i) != i && link_top(i) == i)
- final_link(i) = link_bot(i);
+ final_link.update(i, link_top(i));
+ else if (link_top.is_linked(i) && ! link_bot.is_linked(i))
+ final_link.update(i, link_top(i));
+ else if (link_bot.is_linked(i) && ! link_top.is_linked(i))
+ final_link.update(i, link_bot(i));
else
- final_link(i) = i;
+ final_link.clear(i);
}
diff --git a/scribo/scribo/primitive/link/with_several_right_links.hh b/scribo/scribo/primitive/link/with_several_right_links.hh
index d75ac7b..6590309 100644
--- a/scribo/scribo/primitive/link/with_several_right_links.hh
+++ b/scribo/scribo/primitive/link/with_several_right_links.hh
@@ -106,16 +106,16 @@ namespace scribo
for_all_comps(i, comps)
{
- if (link_center(i) != i)
- final_link(i) = link_center(i);
+ if (link_center.is_linked(i))
+ final_link.update(i, link_center(i));
else if (link_top(i) == link_bot(i))
- final_link(i) = link_top(i);
- else if (link_top(i) != i && link_bot(i) == i)
- final_link(i) = link_top(i);
- else if (link_bot(i) != i && link_top(i) == i)
- final_link(i) = link_bot(i);
+ final_link.update(i, link_top(i));
+ else if (link_top.is_linked(i) && ! link_bot.is_linked(i))
+ final_link.update(i, link_top(i));
+ else if (link_bot.is_linked(i) && ! link_top.is_linked(i))
+ final_link.update(i, link_bot(i));
else
- final_link(i) = i;
+ final_link.clear(i);
}
trace::exiting("scribo::primitive::link::with_several_right_links");
diff --git a/scribo/scribo/primitive/remove/separators.hh b/scribo/scribo/primitive/remove/separators.hh
index 1b75494..192867f 100644
--- a/scribo/scribo/primitive/remove/separators.hh
+++ b/scribo/scribo/primitive/remove/separators.hh
@@ -39,6 +39,7 @@
# include <mln/data/fill.hh>
+# include <mln/border/fill.hh>
# include <mln/border/resize.hh>
diff --git a/scribo/scribo/text/extract_paragraphs.hh b/scribo/scribo/text/extract_paragraphs.hh
index e8e9ac6..1cf9a62 100644
--- a/scribo/scribo/text/extract_paragraphs.hh
+++ b/scribo/scribo/text/extract_paragraphs.hh
@@ -47,6 +47,7 @@
#include <mln/geom/rotate.hh>
#include <mln/literal/colors.hh>
+#include <scribo/core/def/lbl_type.hh>
#include <scribo/core/macros.hh>
#include <scribo/core/line_set.hh>
#include <scribo/core/line_links.hh>
diff --git a/scribo/scribo/text/extract_paragraphs_hdoc.hh b/scribo/scribo/text/extract_paragraphs_hdoc.hh
index 57d3713..52f4ea0 100644
--- a/scribo/scribo/text/extract_paragraphs_hdoc.hh
+++ b/scribo/scribo/text/extract_paragraphs_hdoc.hh
@@ -47,6 +47,7 @@
#include <mln/geom/rotate.hh>
#include <mln/literal/colors.hh>
+#include <scribo/core/def/lbl_type.hh>
#include <scribo/core/macros.hh>
#include <scribo/core/line_set.hh>
#include <scribo/core/line_links.hh>
@@ -1301,18 +1302,18 @@ namespace scribo
rbbox.resize(lines.nelements() + 1);
// std::cout << "Preparing lines" << std::endl;
- prepare_lines(input.domain(), lines , blocks, rbbox);
+ internal::prepare_lines(input.domain(), lines , blocks, rbbox);
// io::pgm::save(blocks, "blocks.pgm");
// std::cout << "Linking left" << std::endl;
- process_left_link(blocks, rbbox, lines , left);
+ internal::process_left_link(blocks, rbbox, lines , left);
// std::cout << "Linking right" << std::endl;
- process_right_link(blocks, rbbox, lines , right);
+ internal::process_right_link(blocks, rbbox, lines , right);
// std::cout << "Finalizing links" << std::endl;
- finalize_links(left, right, lines );
+ internal::finalize_links(left, right, lines );
// std::cout << "Finalizing merging" << std::endl;
// finalize_line_merging(left, right, lines);
// std::cout << "Extracting paragraphs" << std::endl;
- filter::paragraph_links(left, right, output, lines);
+ internal::paragraph_links(left, right, output, lines);
paragraph_set<L> par_set = make::paragraph(output, right);
return par_set;
diff --git a/scribo/scribo/text/paragraphs_closing.hh b/scribo/scribo/text/paragraphs_closing.hh
index 2b685df..13f8bc2 100644
--- a/scribo/scribo/text/paragraphs_closing.hh
+++ b/scribo/scribo/text/paragraphs_closing.hh
@@ -32,7 +32,10 @@
/// Paragraphs closing using CRLA.
# include <mln/draw/line.hh>
+
+# include <scribo/core/paragraph_set.hh>
# include <scribo/draw/line_components.hh>
+# include <scribo/debug/logger.hh>
namespace scribo
{
diff --git a/scribo/scribo/toolchain/internal/content_in_hdoc_functor.hh b/scribo/scribo/toolchain/internal/content_in_hdoc_functor.hh
index 4a74aef..bda31b3 100644
--- a/scribo/scribo/toolchain/internal/content_in_hdoc_functor.hh
+++ b/scribo/scribo/toolchain/internal/content_in_hdoc_functor.hh
@@ -76,7 +76,7 @@
# include <scribo/text/merging_hdoc.hh>
# include <scribo/text/link_lines.hh>
-# include <scribo/text/paragraphs_hdoc.hh>
+# include <scribo/text/extract_paragraphs_hdoc.hh>
# include <scribo/make/debug_filename.hh>
diff --git a/scribo/src/afp/link.hh b/scribo/src/afp/link.hh
index dfcde88..2e2d474 100644
--- a/scribo/src/afp/link.hh
+++ b/scribo/src/afp/link.hh
@@ -52,7 +52,7 @@ namespace scribo
template <typename L>
- util::couple<object_links<L>, object_links<L> >
+ mln::util::couple<object_links<L>, object_links<L> >
left_right(const component_set<L>& components)
{
object_links<L>
@@ -96,7 +96,7 @@ namespace scribo
&& *p != i // Not the current component
&& right(*p) != i) // No loops
{
- right(i) = *p;
+ right.update(i, *p);
break;
}
}
@@ -115,7 +115,7 @@ namespace scribo
&& *p != i // Not the current component
&& left(*p) != i) // No loops
{
- left(i) = *p;
+ left.update(i, *p);
break;
}
}
diff --git a/scribo/src/debug/show_paragraph_blocks.cc b/scribo/src/debug/show_paragraph_blocks.cc
index e99c2ec..0954964 100644
--- a/scribo/src/debug/show_paragraph_blocks.cc
+++ b/scribo/src/debug/show_paragraph_blocks.cc
@@ -87,7 +87,7 @@ int main(int argc, char* argv[])
scribo::paragraph_set<L> parset = scribo::make::paragraph(llinks);
doc.set_paragraphs(parset);
- util::timer t;
+ mln::util::timer t;
t.start();
image2d<bool> blocks;
diff --git a/scribo/src/debug/show_text_lines.cc b/scribo/src/debug/show_text_lines.cc
index 1da0d66..57608f0 100644
--- a/scribo/src/debug/show_text_lines.cc
+++ b/scribo/src/debug/show_text_lines.cc
@@ -74,7 +74,7 @@ int main(int argc, char* argv[])
image2d<bool> input_seps;
mln::io::pbm::load(input_seps, argv[2]);
- util::timer t;
+ mln::util::timer t;
t.start();
typedef image2d<scribo::def::lbl_type> L;
@@ -110,7 +110,7 @@ int main(int argc, char* argv[])
for_all_lines(l, lines)
if (lines(l).is_textline())
{
- const util::array<component_id_t>& comps = lines(l).component_ids();
+ const mln::util::array<component_id_t>& comps = lines(l).component_ids();
const L& lbl = lines.components().labeled_image();
for_all_elements(c, comps)
data::fill((output | lines.components()(comps(c)).bbox()).rw(),
diff --git a/scribo/src/non_text_components.cc b/scribo/src/non_text_components.cc
index 0f4cce4..38a4e5e 100644
--- a/scribo/src/non_text_components.cc
+++ b/scribo/src/non_text_components.cc
@@ -88,7 +88,7 @@ int main(int argc, char* argv[])
image2d<value::rgb8> input;
mln::io::magick::load(input, argv[1]);
- util::timer t;
+ mln::util::timer t;
t.start();
// Preprocess document
diff --git a/scribo/src/primitive/extract/alignments.cc b/scribo/src/primitive/extract/alignments.cc
index 6690b17..544322a 100644
--- a/scribo/src/primitive/extract/alignments.cc
+++ b/scribo/src/primitive/extract/alignments.cc
@@ -30,6 +30,7 @@
#include <scribo/text/extract_lines_wo_merge.hh>
#include <scribo/primitive/extract/alignments.hh>
+#include <scribo/primitive/extract/separators.hh>
#include <scribo/primitive/remove/separators.hh>
#include <scribo/debug/usage.hh>
@@ -77,14 +78,14 @@ int main(int argc, char *argv[])
lines = scribo::text::extract_lines_wo_merge(doc, c8(), separators);
doc.set_paragraphs(scribo::make::paragraph(lines));
- util::timer t;
+ mln::util::timer t;
t.start();
mln::util::couple<component_set<L>, mln_ch_value_(L,bool)>
res = primitive::extract::alignments(doc, dmax_ratio, delta_pixel);
t.stop();
std::cout << t << std::endl;
- io::pbm::save(res.second(), argv[2]);
+ mln::io::pbm::save(res.second(), argv[2]);
trace::exiting("main");
}
diff --git a/scribo/src/text_in_picture.cc b/scribo/src/text_in_picture.cc
index af00c4f..d4b5320 100644
--- a/scribo/src/text_in_picture.cc
+++ b/scribo/src/text_in_picture.cc
@@ -69,7 +69,7 @@
#include <scribo/filter/object_links_bbox_overlap.hh>
#include <scribo/filter/object_groups_small.hh>
-#include <scribo/filter/object_groups_v_thickness.hh>
+#include <scribo/filter/object_groups_mean_width.hh>
#include <scribo/debug/highlight_text_area.hh>
#include <scribo/debug/text_areas_image.hh>
@@ -498,8 +498,8 @@ int main(int argc, char* argv[])
{
std::cout << "** Using group too thin" << std::endl;
filtered_thin_groups
- = filter::object_groups_v_thickness(filtered_small_groups,
- conf.v_thickness);
+ = filter::object_groups_mean_width(filtered_small_groups,
+ conf.v_thickness);
}
else
filtered_thin_groups = filtered_small_groups;
diff --git a/scribo/src/text_in_picture_neg.cc b/scribo/src/text_in_picture_neg.cc
index 2b06a72..9f98372 100644
--- a/scribo/src/text_in_picture_neg.cc
+++ b/scribo/src/text_in_picture_neg.cc
@@ -86,7 +86,6 @@
#include <scribo/filter/common/objects_photo.hh>
#include <scribo/filter/object_groups_small.hh>
-#include <scribo/filter/object_groups_v_thickness.hh>
#include <scribo/debug/highlight_text_area.hh>
#include <scribo/debug/text_areas_image.hh>
diff --git a/scribo/src/text_recognition_in_picture.cc b/scribo/src/text_recognition_in_picture.cc
index de7a9ed..f71b280 100644
--- a/scribo/src/text_recognition_in_picture.cc
+++ b/scribo/src/text_recognition_in_picture.cc
@@ -90,7 +90,7 @@
#include <scribo/filter/common/objects_photo.hh>
#include <scribo/filter/object_groups_small.hh>
-#include <scribo/filter/object_groups_v_thickness.hh>
+#include <scribo/filter/object_groups_mean_width.hh>
#include <scribo/debug/highlight_text_area.hh>
@@ -344,8 +344,8 @@ int main(int argc, char* argv[])
// Remove components part of groups having a mean thickness lower than 8.
object_groups<L> filtered_thin_groups;
filtered_thin_groups
- = filter::object_groups_v_thickness(filtered_small_groups,
- conf.v_thickness);
+ = filter::object_groups_mean_width(filtered_small_groups,
+ conf.v_thickness);
// Grouping groups together if possible.
--
1.5.6.5
1
0

27 Jun '11
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch icdar/hdlac2011 has been updated
discards 905cb974370ac3d9bd7a02f25c03671903a1cec8 (commit)
discards 93197d7eb85b70237cdfa3c2613051a5d19f1455 (commit)
via e286caca4e66e3378ae593b448649d8771cc35fd (commit)
via 2a355ac90c714de870505be5563ea864e9b2a5c3 (commit)
via 6314d3d82bc38dc635a1420037db6101f36de3ec (commit)
via 8dbc001c9c9bf8407652a301e9468f4fa1c03182 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (905cb974370ac3d9bd7a02f25c03671903a1cec8)
\
N -- N -- N (e286caca4e66e3378ae593b448649d8771cc35fd)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
e286cac mln/debug/draw_graph.hh: Limit the use of exact().
2a355ac scribo/toolchain/internal/content_in_doc_functor.hh: Add a timer.
6314d3d Fix XML output.
8dbc001 Fix compilation issues.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 4 +++
milena/mln/debug/draw_graph.hh | 59 +++++++++++++++++++++++++--------------
scribo/ChangeLog | 29 +++++++++++++++++++
3 files changed, 71 insertions(+), 21 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0

last-svn-commit-928-ge286cac mln/debug/draw_graph.hh: Limit the use of exact().
by Guillaume Lazzara 27 Jun '11
by Guillaume Lazzara 27 Jun '11
27 Jun '11
---
milena/ChangeLog | 4 +++
milena/mln/debug/draw_graph.hh | 59 +++++++++++++++++++++++++--------------
2 files changed, 42 insertions(+), 21 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 459cce6..3e0cbcb 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/debug/draw_graph.hh: Limit the use of exact().
+
2011-06-07 Guillaume Lazzara <z(a)lrde.epita.fr>
* mln/draw/polygon.hh: New.
diff --git a/milena/mln/debug/draw_graph.hh b/milena/mln/debug/draw_graph.hh
index b9fc74e..0a27430 100644
--- a/milena/mln/debug/draw_graph.hh
+++ b/milena/mln/debug/draw_graph.hh
@@ -37,6 +37,7 @@
# include <mln/util/line_graph.hh>
# include <mln/util/site_pair.hh>
# include <mln/draw/line.hh>
+# include <mln/draw/box_plain.hh>
# include <mln/data/fill.hh>
# include <mln/metal/equal.hh>
@@ -107,24 +108,27 @@ namespace mln
template <typename I, typename G, typename F>
inline
void
- draw_graph(Image<I>& ima,
+ draw_graph(Image<I>& ima_,
const p_edges<G, F>& pe,
mln_value(I) vcolor,
mln_value(I) ecolor)
{
trace::entering("debug::draw_graph");
+ I& ima = exact(ima_);
+ mln_precondition(ima.is_valid());
+
// Draw edges.
typedef p_edges<G, F> pe_t;
mln_piter(pe_t) p(pe);
for_all(p)
{
- if (exact(ima).has(p.first()) && exact(ima).has(p.second()))
- draw::line(exact(ima), p.first(), p.second(), ecolor);
- if (exact(ima).has(p.first()))
- exact(ima)(p.first()) = vcolor;
- if (exact(ima).has(p.second()))
- exact(ima)(p.second()) = vcolor;
+ if (ima.has(p.first()) && ima.has(p.second()))
+ draw::line(ima, p.first(), p.second(), ecolor);
+ if (ima.has(p.first()))
+ ima(p.first()) = vcolor;
+ if (ima.has(p.second()))
+ ima(p.second()) = vcolor;
}
trace::exiting("debug::draw_graph");
@@ -134,25 +138,28 @@ namespace mln
template <typename I, typename G, typename F>
inline
void
- draw_graph(Image<I>& ima,
+ draw_graph(Image<I>& ima_,
const p_vertices<G, F>& pv,
mln_value(I) vcolor,
mln_value(I) ecolor)
{
trace::entering("debug::draw_graph");
+ I& ima = exact(ima_);
+ mln_precondition(ima.is_valid());
+
// Draw edges.
const G& g = pv.graph();
typedef p_vertices<G, F> pv_t;
mln_edge_iter(G) ei(g);
for_all(ei)
- draw::line(exact(ima), pv(ei.v1()), pv(ei.v2()), ecolor);
+ draw::line(ima, pv(ei.v1()), pv(ei.v2()), ecolor);
// Draw vertices.
mln_piter(pv_t) p(pv);
for_all(p)
- if (exact(ima).has(p))
- exact(ima)(p) = vcolor;
+ if (ima.has(p))
+ ima(p) = vcolor;
trace::exiting("debug::draw_graph");
}
@@ -162,27 +169,34 @@ namespace mln
template <typename I, typename G, typename F, typename V, typename E>
inline
void
- draw_graph(Image<I>& ima,
+ draw_graph(Image<I>& ima_,
const p_vertices<G, F>& pv,
const Function<V>& vcolor_f_, const Function<E>& ecolor_f_)
{
trace::entering("debug::draw_graph");
+ I& ima = exact(ima_);
const V& vcolor_f = exact(vcolor_f_);
const E& ecolor_f = exact(ecolor_f_);
+ mln_precondition(ima.is_valid());
+
// Draw edges.
const G& g = pv.graph();
typedef p_vertices<G, F> pv_t;
mln_edge_iter(G) ei(g);
for_all(ei)
- draw::line(exact(ima), pv(ei.v1()), pv(ei.v2()), ecolor_f(ei.id()));
+ if (ei.v1() != 0 && ei.v2() != 0)
+ draw::line(ima, pv(ei.v1()), pv(ei.v2()), ecolor_f(ei.id()));
// Draw vertices.
mln_piter(pv_t) p(pv);
for_all(p)
- if (exact(ima).has(p))
- exact(ima)(p) = vcolor_f(p);
+ if (ima.has(p) && p.id() != 0u)
+ {
+ box2d box(p + dpoint2d(-5, -5), p + dpoint2d(+5, +5));
+ draw::box_plain(ima, box, vcolor_f(p.id()));
+ }
trace::exiting("debug::draw_graph");
}
@@ -192,15 +206,18 @@ namespace mln
template <typename I, typename G, typename F, typename V, typename E>
inline
void
- draw_graph(Image<I>& ima,
+ draw_graph(Image<I>& ima_,
const p_vertices<util::line_graph<G>, F>& pv,
const Function<V>& vcolor_f_, const Function<E>& ecolor_f_)
{
trace::entering("debug::draw_graph");
+ I& ima = exact(ima_);
const V& vcolor_f = exact(vcolor_f_);
const E& ecolor_f = exact(ecolor_f_);
+ mln_precondition(ima.is_valid());
+
typedef util::line_graph<G> LG;
const LG& lg = pv.graph();
@@ -211,13 +228,13 @@ namespace mln
{
p_line2d l = pv(vi.id());
// Draw edges (Line graph vertices).
- draw::line(exact(ima), l.begin(), l.end(), ecolor_f(vi.id()));
+ draw::line(ima, l.begin(), l.end(), ecolor_f(vi.id()));
// Draw vertices (graph vertices).
- if (exact(ima).has(l.begin()))
- exact(ima)(l.begin()) = vcolor_f(g.edge(vi).v1());
- if (exact(ima).has(l.end()))
- exact(ima)(l.end()) = vcolor_f(g.edge(vi).v2());
+ if (ima.has(l.begin()))
+ ima(l.begin()) = vcolor_f(g.edge(vi).v1());
+ if (ima.has(l.end()))
+ ima(l.end()) = vcolor_f(g.edge(vi).v2());
}
trace::exiting("debug::draw_graph");
--
1.5.6.5
1
0

last-svn-commit-927-g2a355ac scribo/toolchain/internal/content_in_doc_functor.hh: Add a timer.
by Guillaume Lazzara 27 Jun '11
by Guillaume Lazzara 27 Jun '11
27 Jun '11
---
scribo/ChangeLog | 5 ++
.../toolchain/internal/content_in_doc_functor.hh | 62 +++++++++++++++++---
2 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 05512ce..b0b50f3 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,10 @@
2011-06-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * scribo/toolchain/internal/content_in_doc_functor.hh: Add a
+ timer.
+
+2011-06-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix XML output.
* demo/viewer/viewer.cc,
diff --git a/scribo/scribo/toolchain/internal/content_in_doc_functor.hh b/scribo/scribo/toolchain/internal/content_in_doc_functor.hh
index 52ee5b0..705cf4d 100644
--- a/scribo/scribo/toolchain/internal/content_in_doc_functor.hh
+++ b/scribo/scribo/toolchain/internal/content_in_doc_functor.hh
@@ -27,6 +27,10 @@
#ifndef SCRIBO_TOOLCHAIN_INTERNAL_CONTENT_IN_DOC_FUNCTOR_HH
# define SCRIBO_TOOLCHAIN_INTERNAL_CONTENT_IN_DOC_FUNCTOR_HH
+# ifndef SCRIBO_NDEBUG
+# include <mln/util/timer.hh>
+# endif // ! SCRIBO_NDEBUG
+
# include <scribo/core/def/lbl_type.hh>
# include <scribo/core/document.hh>
# include <scribo/core/line_set.hh>
@@ -132,6 +136,19 @@ namespace scribo
// Results
//=========
document<L> doc;
+
+# ifndef SCRIBO_NDEBUG
+ //=============
+ // DEBUG TOOLS
+ //=============
+ virtual void on_start();
+ virtual void on_end();
+ virtual void on_progress();
+
+ mln::util::timer t;
+ mln::util::timer gt;
+# endif // ! SCRIBO_NDEBUG
+
};
@@ -256,14 +273,6 @@ namespace scribo
if (enable_line_seps)
components.add_separators(separators);
- // Debug
-# ifndef SCRIBO_NDEBUG
- debug::logger().log_image(debug::AuxiliaryResults,
- components.separators(),
- "all_separators");
-# endif // ! SCRIBO_NDEBUG
-
-
on_new_progress_label("Filtering components");
components = scribo::filter::components_small(components, 3);
@@ -373,6 +382,10 @@ namespace scribo
//===== DEBUG =====
# ifndef SCRIBO_NDEBUG
+ debug::logger().log_image(debug::AuxiliaryResults,
+ components.separators(),
+ "all_separators");
+
if (debug::logger().is_enabled())
{
if (enable_whitespace_seps)
@@ -598,8 +611,39 @@ namespace scribo
// Nothing
}
-# endif // ! MLN_INCLUDE_ONLY
+# ifndef SCRIBO_NDEBUG
+
+ template <typename I>
+ void
+ content_in_doc_functor<I>::on_start()
+ {
+ gt.start();
+ t.start();
+ }
+
+ template <typename I>
+ void
+ content_in_doc_functor<I>::on_end()
+ {
+ gt.stop();
+ if (verbose)
+ std::cout << "Total time: " << gt << std::endl;
+ }
+
+ template <typename I>
+ void
+ content_in_doc_functor<I>::on_progress()
+ {
+ t.stop();
+ if (verbose)
+ std::cout << t << std::endl;
+ t.restart();
+ }
+
+# endif // ! SCRIBO_NDEBUG
+
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace scribo::toolchain::internal
--
1.5.6.5
1
0
* demo/viewer/viewer.cc,
* demo/viewer/xml_widget.cc: Update tag names.
* scribo/io/xml/internal/extended_page_xml_visitor.hh,
* scribo/io/xml/save.hh: Save component outlines.
---
scribo/ChangeLog | 10 ++++
scribo/demo/viewer/viewer.cc | 10 ++--
scribo/demo/viewer/xml_widget.cc | 2 +-
.../io/xml/internal/extended_page_xml_visitor.hh | 49 +++++++++++++-------
scribo/scribo/io/xml/save.hh | 2 +-
5 files changed, 49 insertions(+), 24 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 248e856..05512ce 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,15 @@
2011-06-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Fix XML output.
+
+ * demo/viewer/viewer.cc,
+ * demo/viewer/xml_widget.cc: Update tag names.
+
+ * scribo/io/xml/internal/extended_page_xml_visitor.hh,
+ * scribo/io/xml/save.hh: Save component outlines.
+
+2011-06-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix compilation issues.
* scribo/core/component_features_data.hh,
diff --git a/scribo/demo/viewer/viewer.cc b/scribo/demo/viewer/viewer.cc
index 173cb3b..12270e1 100644
--- a/scribo/demo/viewer/viewer.cc
+++ b/scribo/demo/viewer/viewer.cc
@@ -368,7 +368,7 @@ Viewer::add_text(QDomNode line)
QDomNode coords = line.firstChild();
- while (!coords.isNull() && !coords.toElement().tagName().contains("coords"))
+ while (!coords.isNull() && !coords.toElement().tagName().contains("Coords"))
coords = coords.nextSibling();
if (coords.isNull())
@@ -416,7 +416,7 @@ Viewer::add_region(QDomNode father, QString attr_id)
QString name = father.toElement().tagName();
region::RegionId id = static_cast<region::RegionId>(region_ids_[name]);
- while (!coords.isNull() && !coords.toElement().tagName().contains("coords"))
+ while (!coords.isNull() && !coords.toElement().tagName().contains("Coords"))
coords = coords.nextSibling();
if (coords.isNull())
@@ -471,7 +471,7 @@ Viewer::add_typo_lines(QDomNode father, QString attr_id)
// Looking for bbox coordinates.
{
QDomNode coords = father.firstChild();
- while (!coords.isNull() && !coords.toElement().tagName().contains("coords"))
+ while (!coords.isNull() && !coords.toElement().tagName().contains("Coords"))
coords = coords.nextSibling();
if (coords.isNull())
@@ -581,7 +581,7 @@ Viewer::load_xml(QString filename)
QDomElement root = doc.documentElement();
QDomNode page = root.firstChild();
- while (!page.isNull() && !page.toElement().tagName().contains("page"))
+ while (!page.isNull() && !page.toElement().tagName().contains("Page"))
page = page.nextSibling();
if (page.isNull())
@@ -611,7 +611,7 @@ Viewer::load_xml(QString filename)
QDomNode coords = region.firstChild();
- while (!coords.isNull() && !coords.toElement().tagName().contains("coords"))
+ while (!coords.isNull() && !coords.toElement().tagName().contains("Coords"))
coords = coords.nextSibling();
if (!container.isNull() && !coords.isNull())
diff --git a/scribo/demo/viewer/xml_widget.cc b/scribo/demo/viewer/xml_widget.cc
index 57d171f..642cf9a 100644
--- a/scribo/demo/viewer/xml_widget.cc
+++ b/scribo/demo/viewer/xml_widget.cc
@@ -86,7 +86,7 @@ void XmlWidget::NFS(QDomNode node, QTreeWidgetItem* item)
if (!node.isNull())
{
QString append;
- if (node.toElement().tagName().contains("point"))
+ if (node.toElement().tagName().contains("Point"))
{
QString x = node.toElement().attribute("x", "0");
QString y = node.toElement().attribute("y", "0");
diff --git a/scribo/scribo/io/xml/internal/extended_page_xml_visitor.hh b/scribo/scribo/io/xml/internal/extended_page_xml_visitor.hh
index d109827..da7a582 100644
--- a/scribo/scribo/io/xml/internal/extended_page_xml_visitor.hh
+++ b/scribo/scribo/io/xml/internal/extended_page_xml_visitor.hh
@@ -52,8 +52,12 @@
# include <scribo/io/xml/internal/print_page_preambule.hh>
# include <scribo/io/xml/internal/compute_text_colour.hh>
+# include <scribo/text/paragraphs_closing.hh>
+
+# include <scribo/util/component_precise_outline.hh>
# include <scribo/util/color_to_hex.hh>
+
namespace scribo
{
@@ -67,31 +71,29 @@ namespace scribo
{
- class extended_page_xml_visitor : public doc_serializer<extended_page_xml_visitor>
+ template <typename L>
+ class extended_page_xml_visitor
+ : public doc_serializer<extended_page_xml_visitor<L> >
{
public:
// Constructor
extended_page_xml_visitor(std::ofstream& out);
// Visit overloads
- template <typename L>
void visit(const document<L>& doc) const;
- template <typename L>
void visit(const component_set<L>& comp_set) const;
- template <typename L>
void visit(const component_info<L>& info) const;
- template <typename L>
void visit(const paragraph_set<L>& parset) const;
- template <typename L>
void visit(const line_info<L>& line) const;
private: // Attributes
std::ofstream& output;
mutable image2d<scribo::def::lbl_type> elt_edge;
+ mutable L lbl_;
};
@@ -99,8 +101,8 @@ namespace scribo
# ifndef MLN_INCLUDE_ONLY
- inline
- extended_page_xml_visitor::extended_page_xml_visitor(std::ofstream& out)
+ template <typename L>
+ extended_page_xml_visitor<L>::extended_page_xml_visitor(std::ofstream& out)
: output(out)
{
}
@@ -111,7 +113,7 @@ namespace scribo
//
template <typename L>
void
- extended_page_xml_visitor::visit(const document<L>& doc) const
+ extended_page_xml_visitor<L>::visit(const document<L>& doc) const
{
// Preambule
print_PAGE_preambule(output, doc, false);
@@ -150,8 +152,9 @@ namespace scribo
//
template <typename L>
void
- extended_page_xml_visitor::visit(const component_set<L>& comp_set) const
+ extended_page_xml_visitor<L>::visit(const component_set<L>& comp_set) const
{
+ lbl_ = comp_set.labeled_image();
for_all_comps(c, comp_set)
if (comp_set(c).is_valid())
comp_set(c).accept(*this);
@@ -162,8 +165,14 @@ namespace scribo
//
template <typename L>
void
- extended_page_xml_visitor::visit(const component_info<L>& info) const
+ extended_page_xml_visitor<L>::visit(const component_info<L>& info) const
{
+ // Getting component outline
+ scribo::def::lbl_type id = (scribo::def::lbl_type)info.id().to_equiv();
+ //const L& lbl = info.holder().labeled_image();
+ p_array<point2d>
+ par = scribo::util::component_precise_outline(lbl_ | info.bbox(), id);
+
switch (info.type())
{
case component::WhitespaceSeparator:
@@ -177,7 +186,7 @@ namespace scribo
<< " y_max=\"" << info.bbox().pmax().row() << "\""
<< ">" << std::endl;
- internal::print_box_coords(output, info.bbox(), " ");
+ internal::print_image_coords(output, par, " ");
output << " </whitespace_separator_region>" << std::endl;
break;
@@ -195,7 +204,7 @@ namespace scribo
<< " y_max=\"" << info.bbox().pmax().row() << "\""
<< ">" << std::endl;
- internal::print_box_coords(output, info.bbox(), " ");
+ internal::print_image_coords(output, par, " ");
output << " </vertical_separator_region>" << std::endl;
break;
@@ -213,7 +222,7 @@ namespace scribo
<< " y_max=\"" << info.bbox().pmax().row() << "\""
<< ">" << std::endl;
- internal::print_box_coords(output, info.bbox(), " ");
+ internal::print_image_coords(output, par, " ");
output << " </horizontal_separator_region>" << std::endl;
break;
@@ -250,13 +259,19 @@ namespace scribo
//
template <typename L>
void
- extended_page_xml_visitor::visit(const paragraph_set<L>& parset) const
+ extended_page_xml_visitor<L>::visit(const paragraph_set<L>& parset) const
{
const line_set<L>& lines = parset.lines();
+ // Prepare paragraph outlines.
+ L par_clo = text::paragraphs_closing(parset);
+
for_all_paragraphs(p, parset)
if (parset(p).is_valid())
{
+ p_array<mln_site(L)> par = scribo::util::component_precise_outline(par_clo
+ | parset(p).bbox(), p);
+
const mln::util::array<line_id_t>& line_ids = parset(p).line_ids();
// FIXME: compute that information on the whole paragraph
@@ -286,7 +301,7 @@ namespace scribo
output << "\">"
<< std::endl;
- internal::print_box_coords(output, parset(p).bbox(), " ");
+ internal::print_image_coords(output, parset(p).bbox(), " ");
// EXTENSIONS - Not officially supported
for_all_paragraph_lines(lid, line_ids)
@@ -303,7 +318,7 @@ namespace scribo
template <typename L>
void
- extended_page_xml_visitor::visit(const line_info<L>& line) const
+ extended_page_xml_visitor<L>::visit(const line_info<L>& line) const
{
if (line.has_text())
{
diff --git a/scribo/scribo/io/xml/save.hh b/scribo/scribo/io/xml/save.hh
index cc6905b..cc02c03 100644
--- a/scribo/scribo/io/xml/save.hh
+++ b/scribo/scribo/io/xml/save.hh
@@ -103,7 +103,7 @@ namespace scribo
template <typename L>
void save_page_extended(const document<L>& doc, std::ofstream& output)
{
- scribo::io::xml::internal::extended_page_xml_visitor f(output);
+ scribo::io::xml::internal::extended_page_xml_visitor<L> f(output);
doc.accept(f);
}
--
1.5.6.5
1
0
* scribo/core/component_features_data.hh,
* scribo/core/group_info.hh,
* scribo/io/xml/internal/compute_text_colour.hh,
* scribo/io/xml/internal/time_info.hh,
* scribo/util/color_to_hex.hh,
* scribo/util/component_precise_outline.hh: Add missing inline.
* scribo/toolchain/internal/text_in_doc_preprocess_functor.hh: Add
a missing include.
---
scribo/ChangeLog | 14 ++++++++++++++
scribo/scribo/core/component_features_data.hh | 1 +
scribo/scribo/core/group_info.hh | 11 +++++++++++
.../scribo/io/xml/internal/compute_text_colour.hh | 1 +
scribo/scribo/io/xml/internal/time_info.hh | 1 +
.../internal/text_in_doc_preprocess_functor.hh | 2 ++
scribo/scribo/util/color_to_hex.hh | 1 +
scribo/scribo/util/component_precise_outline.hh | 5 +++++
8 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index d1678c5..248e856 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,17 @@
+2011-06-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix compilation issues.
+
+ * scribo/core/component_features_data.hh,
+ * scribo/core/group_info.hh,
+ * scribo/io/xml/internal/compute_text_colour.hh,
+ * scribo/io/xml/internal/time_info.hh,
+ * scribo/util/color_to_hex.hh,
+ * scribo/util/component_precise_outline.hh: Add missing inline.
+
+ * scribo/toolchain/internal/text_in_doc_preprocess_functor.hh: Add
+ a missing include.
+
2011-06-20 Guillaume Lazzara <z(a)lrde.epita.fr>
Make different algorithms for doc and hdoc use cases.
diff --git a/scribo/scribo/core/component_features_data.hh b/scribo/scribo/core/component_features_data.hh
index b0a4e47..6064a0f 100644
--- a/scribo/scribo/core/component_features_data.hh
+++ b/scribo/scribo/core/component_features_data.hh
@@ -75,6 +75,7 @@ namespace scribo
}
+ inline
bool
operator==(const component_features_data& lhs,
const component_features_data& rhs)
diff --git a/scribo/scribo/core/group_info.hh b/scribo/scribo/core/group_info.hh
index 19a8ecc..05d5aae 100644
--- a/scribo/scribo/core/group_info.hh
+++ b/scribo/scribo/core/group_info.hh
@@ -80,11 +80,13 @@ namespace scribo
# ifndef MLN_INCLUDE_ONLY
+ inline
group_info::group_info()
: valid_(false)
{
}
+ inline
group_info::group_info(unsigned id, const mln::util::array<component_id_t>& comps,
unsigned pixel_area, const box2d& bbox)
: id_(id), comps_(comps), valid_(true),
@@ -92,53 +94,62 @@ namespace scribo
{
}
+ inline
group_info::group_info(unsigned id, unsigned pixel_area, const box2d& bbox, bool valid)
: id_(id), valid_(valid),
pixel_area_(pixel_area), bbox_(bbox)
{
}
+ inline
const mln::util::array<component_id_t>&
group_info::component_ids() const
{
return comps_;
}
+ inline
mln::util::array<component_id_t>&
group_info::component_ids_()
{
return comps_;
}
+ inline
bool group_info::is_valid() const
{
return valid_;
}
+ inline
void
group_info::invalidate()
{
valid_ = false;
}
+ inline
unsigned
group_info::card() const
{
return comps_.nelements();
}
+ inline
unsigned
group_info::id() const
{
return id_;
}
+ inline
unsigned
group_info::pixel_area() const
{
return pixel_area_;
}
+ inline
const box2d&
group_info::bbox() const
{
diff --git a/scribo/scribo/io/xml/internal/compute_text_colour.hh b/scribo/scribo/io/xml/internal/compute_text_colour.hh
index 86fe454..f592c08 100644
--- a/scribo/scribo/io/xml/internal/compute_text_colour.hh
+++ b/scribo/scribo/io/xml/internal/compute_text_colour.hh
@@ -62,6 +62,7 @@ namespace scribo
# ifndef MLN_INCLUDE_ONLY
+ inline
const char *
compute_text_colour(const value::rgb8& v)
{
diff --git a/scribo/scribo/io/xml/internal/time_info.hh b/scribo/scribo/io/xml/internal/time_info.hh
index 6adc49a..760e856 100644
--- a/scribo/scribo/io/xml/internal/time_info.hh
+++ b/scribo/scribo/io/xml/internal/time_info.hh
@@ -48,6 +48,7 @@ namespace scribo
# ifndef MLN_INCLUDE_ONLY
+ inline
std::string time_info()
{
time_t cur_time = time(NULL);
diff --git a/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh b/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
index 484e28e..d58b4b2 100644
--- a/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
+++ b/scribo/scribo/toolchain/internal/text_in_doc_preprocess_functor.hh
@@ -33,6 +33,8 @@
#include <mln/fun/v2v/rgb_to_luma.hh>
#include <mln/subsampling/antialiased.hh>
+#include <mln/util/timer.hh>
+
#include <scribo/binarization/sauvola.hh>
#include <scribo/binarization/sauvola_ms.hh>
diff --git a/scribo/scribo/util/color_to_hex.hh b/scribo/scribo/util/color_to_hex.hh
index e0ee33f..63dc81e 100644
--- a/scribo/scribo/util/color_to_hex.hh
+++ b/scribo/scribo/util/color_to_hex.hh
@@ -48,6 +48,7 @@ namespace scribo
# ifndef MLN_INCLUDE_ONLY
+ inline
std::string color_to_hex(const value::rgb8& v)
{
std::string result = "#";
diff --git a/scribo/scribo/util/component_precise_outline.hh b/scribo/scribo/util/component_precise_outline.hh
index 175160c..5c87fb4 100644
--- a/scribo/scribo/util/component_precise_outline.hh
+++ b/scribo/scribo/util/component_precise_outline.hh
@@ -122,6 +122,7 @@ namespace scribo
}
}
+ inline
void
left_up_after(int& direction,
const unsigned i)
@@ -155,6 +156,7 @@ namespace scribo
}
}
+ inline
void
right_up_after(int& direction,
const unsigned i)
@@ -186,6 +188,7 @@ namespace scribo
}
}
+ inline
void
right_down_after(int& direction,
const unsigned i)
@@ -219,6 +222,7 @@ namespace scribo
}
}
+ inline
void
left_down_after(int& direction,
const unsigned i)
@@ -274,6 +278,7 @@ namespace scribo
cur_pt = tmp;
}
+ inline
void
filter_points(const mln::p_array<point2d>& points,
mln::p_array<point2d>& waypoints)
--
1.5.6.5
1
0

23 Jun '11
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch icdar/hdlac2011 has been updated
via 905cb974370ac3d9bd7a02f25c03671903a1cec8 (commit)
from 93197d7eb85b70237cdfa3c2613051a5d19f1455 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
905cb97 Add a timer in content_in_doc [to cleanup]
-----------------------------------------------------------------------
Summary of changes:
.../toolchain/internal/content_in_doc_functor.hh | 50 +++++++++++++++++++-
1 files changed, 49 insertions(+), 1 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0

last-svn-commit-926-g905cb97 Add a timer in content_in_doc [to cleanup]
by Guillaume Lazzara 23 Jun '11
by Guillaume Lazzara 23 Jun '11
23 Jun '11
---
.../toolchain/internal/content_in_doc_functor.hh | 50 +++++++++++++++++++-
1 files changed, 49 insertions(+), 1 deletions(-)
diff --git a/scribo/scribo/toolchain/internal/content_in_doc_functor.hh b/scribo/scribo/toolchain/internal/content_in_doc_functor.hh
index dde8196..705cf4d 100644
--- a/scribo/scribo/toolchain/internal/content_in_doc_functor.hh
+++ b/scribo/scribo/toolchain/internal/content_in_doc_functor.hh
@@ -27,6 +27,10 @@
#ifndef SCRIBO_TOOLCHAIN_INTERNAL_CONTENT_IN_DOC_FUNCTOR_HH
# define SCRIBO_TOOLCHAIN_INTERNAL_CONTENT_IN_DOC_FUNCTOR_HH
+# ifndef SCRIBO_NDEBUG
+# include <mln/util/timer.hh>
+# endif // ! SCRIBO_NDEBUG
+
# include <scribo/core/def/lbl_type.hh>
# include <scribo/core/document.hh>
# include <scribo/core/line_set.hh>
@@ -132,6 +136,19 @@ namespace scribo
// Results
//=========
document<L> doc;
+
+# ifndef SCRIBO_NDEBUG
+ //=============
+ // DEBUG TOOLS
+ //=============
+ virtual void on_start();
+ virtual void on_end();
+ virtual void on_progress();
+
+ mln::util::timer t;
+ mln::util::timer gt;
+# endif // ! SCRIBO_NDEBUG
+
};
@@ -594,8 +611,39 @@ namespace scribo
// Nothing
}
-# endif // ! MLN_INCLUDE_ONLY
+# ifndef SCRIBO_NDEBUG
+
+ template <typename I>
+ void
+ content_in_doc_functor<I>::on_start()
+ {
+ gt.start();
+ t.start();
+ }
+ template <typename I>
+ void
+ content_in_doc_functor<I>::on_end()
+ {
+ gt.stop();
+ if (verbose)
+ std::cout << "Total time: " << gt << std::endl;
+ }
+
+ template <typename I>
+ void
+ content_in_doc_functor<I>::on_progress()
+ {
+ t.stop();
+ if (verbose)
+ std::cout << t << std::endl;
+ t.restart();
+ }
+
+
+# endif // ! SCRIBO_NDEBUG
+
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace scribo::toolchain::internal
--
1.5.6.5
1
0