LRE
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
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
List overview
Download
Olena-patches
November 2010
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
olena-patches@lrde.epita.fr
7 participants
370 discussions
Start a n
N
ew thread
last-svn-commit-669-ga2b46dc Regen .mk files in Scribo.
by Guillaume Lazzara
* headers.mk, * tests/unit_test/unit-tests.mk: Regen. --- scribo/ChangeLog | 7 +++++++ scribo/headers.mk | 10 +++++++++- scribo/tests/unit_test/unit-tests.mk | 22 ++++++++++++++++++++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 8f5a26a..be2365e 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,12 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + Regen .mk files in Scribo. + + * headers.mk, + * tests/unit_test/unit-tests.mk: Regen. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + Compilation fixes. * scribo/binarization/sauvola_threshold_image.hh: Fix namespace diff --git a/scribo/headers.mk b/scribo/headers.mk index 30256bb..5585ccc 100644 --- a/scribo/headers.mk +++ b/scribo/headers.mk @@ -5,13 +5,14 @@ scribo/all.hh \ scribo/binarization/all.hh \ scribo/binarization/global_threshold.hh \ scribo/binarization/global_threshold_auto.hh \ +scribo/binarization/internal/compute_sauvola_threshold.hh \ scribo/binarization/internal/first_pass_functor.hh \ +scribo/binarization/internal/sauvola_debug.hh \ scribo/binarization/local_threshold.hh \ scribo/binarization/sauvola.hh \ scribo/binarization/sauvola_ms.hh \ scribo/binarization/sauvola_ms_split.hh \ scribo/binarization/sauvola_threshold_image.hh \ -scribo/binarization/sauvola_threshold_image_debug.hh \ scribo/canvas/integral_browsing.hh \ scribo/convert/from_qimage.hh \ scribo/core/all.hh \ @@ -21,6 +22,7 @@ scribo/core/component_set.hh \ scribo/core/concept/dmax_functor.hh \ scribo/core/concept/link_functor.hh \ scribo/core/def/lbl_type.hh \ +scribo/core/document.hh \ scribo/core/erase_objects.hh \ scribo/core/init_integral_image.hh \ scribo/core/line_info.hh \ @@ -109,6 +111,7 @@ scribo/primitive/extract/all.hh \ scribo/primitive/extract/canvas.hh \ scribo/primitive/extract/cells.hh \ scribo/primitive/extract/components.hh \ +scribo/primitive/extract/elements.hh \ scribo/primitive/extract/horizontal_separators.hh \ scribo/primitive/extract/lines_discontinued.hh \ scribo/primitive/extract/lines_h_discontinued.hh \ @@ -124,10 +127,12 @@ 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/separators.hh \ +scribo/primitive/extract/separators_nonvisible.hh \ scribo/primitive/extract/vertical_separators.hh \ scribo/primitive/group/all.hh \ scribo/primitive/group/apply.hh \ scribo/primitive/group/from_double_link.hh \ +scribo/primitive/group/from_double_link_any.hh \ scribo/primitive/group/from_graph.hh \ scribo/primitive/group/from_single_link.hh \ scribo/primitive/internal/all.hh \ @@ -165,8 +170,10 @@ scribo/primitive/link/with_single_left_link_dmax_ratio.hh \ scribo/primitive/link/with_single_right_link.hh \ scribo/primitive/link/with_single_right_link_bottom.hh \ scribo/primitive/link/with_single_right_link_dmax_ratio.hh \ +scribo/primitive/link/with_single_right_link_dmax_ratio_aligned.hh \ scribo/primitive/link/with_single_right_link_top.hh \ scribo/primitive/link/with_single_up_link.hh \ +scribo/primitive/merge/components.hh \ scribo/primitive/regroup/from_single_left_link.hh \ scribo/primitive/regroup/from_single_left_link_wrt_h_ratio.hh \ scribo/primitive/remove/separators.hh \ @@ -197,6 +204,7 @@ scribo/text/recognition.hh \ scribo/toolchain/nepomuk/text_extraction.hh \ 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 diff --git a/scribo/tests/unit_test/unit-tests.mk b/scribo/tests/unit_test/unit-tests.mk index 57c3c38..bd8b787 100644 --- a/scribo/tests/unit_test/unit-tests.mk +++ b/scribo/tests/unit_test/unit-tests.mk @@ -48,13 +48,14 @@ scribo_all \ scribo_binarization_all \ scribo_binarization_global_threshold \ scribo_binarization_global_threshold_auto \ +scribo_binarization_internal_compute_sauvola_threshold \ scribo_binarization_internal_first_pass_functor \ +scribo_binarization_internal_sauvola_debug \ scribo_binarization_local_threshold \ scribo_binarization_sauvola \ scribo_binarization_sauvola_ms \ scribo_binarization_sauvola_ms_split \ scribo_binarization_sauvola_threshold_image \ -scribo_binarization_sauvola_threshold_image_debug \ scribo_canvas_integral_browsing \ scribo_core_all \ scribo_core_central_sites \ @@ -63,6 +64,7 @@ scribo_core_component_set \ scribo_core_concept_dmax_functor \ scribo_core_concept_link_functor \ scribo_core_def_lbl_type \ +scribo_core_document \ scribo_core_erase_objects \ scribo_core_init_integral_image \ scribo_core_line_info \ @@ -151,6 +153,7 @@ scribo_primitive_extract_all \ scribo_primitive_extract_canvas \ scribo_primitive_extract_cells \ scribo_primitive_extract_components \ +scribo_primitive_extract_elements \ scribo_primitive_extract_horizontal_separators \ scribo_primitive_extract_lines_discontinued \ scribo_primitive_extract_lines_h_discontinued \ @@ -166,10 +169,12 @@ scribo_primitive_extract_lines_v_single \ scribo_primitive_extract_lines_v_thick \ scribo_primitive_extract_lines_v_thick_and_single \ scribo_primitive_extract_separators \ +scribo_primitive_extract_separators_nonvisible \ scribo_primitive_extract_vertical_separators \ scribo_primitive_group_all \ scribo_primitive_group_apply \ scribo_primitive_group_from_double_link \ +scribo_primitive_group_from_double_link_any \ scribo_primitive_group_from_graph \ scribo_primitive_group_from_single_link \ scribo_primitive_internal_all \ @@ -203,8 +208,10 @@ scribo_primitive_link_with_single_left_link_dmax_ratio \ scribo_primitive_link_with_single_right_link \ scribo_primitive_link_with_single_right_link_bottom \ scribo_primitive_link_with_single_right_link_dmax_ratio \ +scribo_primitive_link_with_single_right_link_dmax_ratio_aligned \ scribo_primitive_link_with_single_right_link_top \ scribo_primitive_link_with_single_up_link \ +scribo_primitive_merge_components \ scribo_primitive_regroup_from_single_left_link \ scribo_primitive_regroup_from_single_left_link_wrt_h_ratio \ scribo_primitive_remove_separators \ @@ -231,6 +238,8 @@ scribo_text_clean_inplace \ scribo_text_extract_lines \ scribo_text_look_like_text_lines \ scribo_text_merging \ +scribo_toolchain_text_in_doc_preprocess \ +scribo_toolchain_text_in_picture \ scribo_upsampling_bs2x \ scribo_upsampling_eagle @@ -238,13 +247,14 @@ scribo_all_SOURCES = scribo_all.cc scribo_binarization_all_SOURCES = scribo_binarization_all.cc scribo_binarization_global_threshold_SOURCES = scribo_binarization_global_threshold.cc scribo_binarization_global_threshold_auto_SOURCES = scribo_binarization_global_threshold_auto.cc +scribo_binarization_internal_compute_sauvola_threshold_SOURCES = scribo_binarization_internal_compute_sauvola_threshold.cc scribo_binarization_internal_first_pass_functor_SOURCES = scribo_binarization_internal_first_pass_functor.cc +scribo_binarization_internal_sauvola_debug_SOURCES = scribo_binarization_internal_sauvola_debug.cc scribo_binarization_local_threshold_SOURCES = scribo_binarization_local_threshold.cc scribo_binarization_sauvola_SOURCES = scribo_binarization_sauvola.cc scribo_binarization_sauvola_ms_SOURCES = scribo_binarization_sauvola_ms.cc scribo_binarization_sauvola_ms_split_SOURCES = scribo_binarization_sauvola_ms_split.cc scribo_binarization_sauvola_threshold_image_SOURCES = scribo_binarization_sauvola_threshold_image.cc -scribo_binarization_sauvola_threshold_image_debug_SOURCES = scribo_binarization_sauvola_threshold_image_debug.cc scribo_canvas_integral_browsing_SOURCES = scribo_canvas_integral_browsing.cc scribo_core_all_SOURCES = scribo_core_all.cc scribo_core_central_sites_SOURCES = scribo_core_central_sites.cc @@ -253,6 +263,7 @@ scribo_core_component_set_SOURCES = scribo_core_component_set.cc scribo_core_concept_dmax_functor_SOURCES = scribo_core_concept_dmax_functor.cc scribo_core_concept_link_functor_SOURCES = scribo_core_concept_link_functor.cc scribo_core_def_lbl_type_SOURCES = scribo_core_def_lbl_type.cc +scribo_core_document_SOURCES = scribo_core_document.cc scribo_core_erase_objects_SOURCES = scribo_core_erase_objects.cc scribo_core_init_integral_image_SOURCES = scribo_core_init_integral_image.cc scribo_core_line_info_SOURCES = scribo_core_line_info.cc @@ -341,6 +352,7 @@ scribo_primitive_extract_all_SOURCES = scribo_primitive_extract_all.cc scribo_primitive_extract_canvas_SOURCES = scribo_primitive_extract_canvas.cc scribo_primitive_extract_cells_SOURCES = scribo_primitive_extract_cells.cc scribo_primitive_extract_components_SOURCES = scribo_primitive_extract_components.cc +scribo_primitive_extract_elements_SOURCES = scribo_primitive_extract_elements.cc scribo_primitive_extract_horizontal_separators_SOURCES = scribo_primitive_extract_horizontal_separators.cc scribo_primitive_extract_lines_discontinued_SOURCES = scribo_primitive_extract_lines_discontinued.cc scribo_primitive_extract_lines_h_discontinued_SOURCES = scribo_primitive_extract_lines_h_discontinued.cc @@ -356,10 +368,12 @@ 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_separators_SOURCES = scribo_primitive_extract_separators.cc +scribo_primitive_extract_separators_nonvisible_SOURCES = scribo_primitive_extract_separators_nonvisible.cc scribo_primitive_extract_vertical_separators_SOURCES = scribo_primitive_extract_vertical_separators.cc scribo_primitive_group_all_SOURCES = scribo_primitive_group_all.cc scribo_primitive_group_apply_SOURCES = scribo_primitive_group_apply.cc scribo_primitive_group_from_double_link_SOURCES = scribo_primitive_group_from_double_link.cc +scribo_primitive_group_from_double_link_any_SOURCES = scribo_primitive_group_from_double_link_any.cc scribo_primitive_group_from_graph_SOURCES = scribo_primitive_group_from_graph.cc scribo_primitive_group_from_single_link_SOURCES = scribo_primitive_group_from_single_link.cc scribo_primitive_internal_all_SOURCES = scribo_primitive_internal_all.cc @@ -393,8 +407,10 @@ scribo_primitive_link_with_single_left_link_dmax_ratio_SOURCES = scribo_primitiv scribo_primitive_link_with_single_right_link_SOURCES = scribo_primitive_link_with_single_right_link.cc scribo_primitive_link_with_single_right_link_bottom_SOURCES = scribo_primitive_link_with_single_right_link_bottom.cc scribo_primitive_link_with_single_right_link_dmax_ratio_SOURCES = scribo_primitive_link_with_single_right_link_dmax_ratio.cc +scribo_primitive_link_with_single_right_link_dmax_ratio_aligned_SOURCES = scribo_primitive_link_with_single_right_link_dmax_ratio_aligned.cc scribo_primitive_link_with_single_right_link_top_SOURCES = scribo_primitive_link_with_single_right_link_top.cc scribo_primitive_link_with_single_up_link_SOURCES = scribo_primitive_link_with_single_up_link.cc +scribo_primitive_merge_components_SOURCES = scribo_primitive_merge_components.cc scribo_primitive_regroup_from_single_left_link_SOURCES = scribo_primitive_regroup_from_single_left_link.cc scribo_primitive_regroup_from_single_left_link_wrt_h_ratio_SOURCES = scribo_primitive_regroup_from_single_left_link_wrt_h_ratio.cc scribo_primitive_remove_separators_SOURCES = scribo_primitive_remove_separators.cc @@ -421,6 +437,8 @@ scribo_text_clean_inplace_SOURCES = scribo_text_clean_inplace.cc scribo_text_extract_lines_SOURCES = scribo_text_extract_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_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 -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-670-g63c3277 Regen .mk files in Scribo.
by Guillaume Lazzara
* headers.mk, * tests/unit_test/unit-tests.mk: Regen. --- scribo/ChangeLog | 7 +++++++ scribo/headers.mk | 10 +++++++++- scribo/tests/unit_test/unit-tests.mk | 22 ++++++++++++++++++++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 9812499..6c4d48d 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,12 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + Regen .mk files in Scribo. + + * headers.mk, + * tests/unit_test/unit-tests.mk: Regen. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + Compilation fixes. * scribo/binarization/sauvola_threshold_image.hh: Fix namespace diff --git a/scribo/headers.mk b/scribo/headers.mk index 30256bb..5585ccc 100644 --- a/scribo/headers.mk +++ b/scribo/headers.mk @@ -5,13 +5,14 @@ scribo/all.hh \ scribo/binarization/all.hh \ scribo/binarization/global_threshold.hh \ scribo/binarization/global_threshold_auto.hh \ +scribo/binarization/internal/compute_sauvola_threshold.hh \ scribo/binarization/internal/first_pass_functor.hh \ +scribo/binarization/internal/sauvola_debug.hh \ scribo/binarization/local_threshold.hh \ scribo/binarization/sauvola.hh \ scribo/binarization/sauvola_ms.hh \ scribo/binarization/sauvola_ms_split.hh \ scribo/binarization/sauvola_threshold_image.hh \ -scribo/binarization/sauvola_threshold_image_debug.hh \ scribo/canvas/integral_browsing.hh \ scribo/convert/from_qimage.hh \ scribo/core/all.hh \ @@ -21,6 +22,7 @@ scribo/core/component_set.hh \ scribo/core/concept/dmax_functor.hh \ scribo/core/concept/link_functor.hh \ scribo/core/def/lbl_type.hh \ +scribo/core/document.hh \ scribo/core/erase_objects.hh \ scribo/core/init_integral_image.hh \ scribo/core/line_info.hh \ @@ -109,6 +111,7 @@ scribo/primitive/extract/all.hh \ scribo/primitive/extract/canvas.hh \ scribo/primitive/extract/cells.hh \ scribo/primitive/extract/components.hh \ +scribo/primitive/extract/elements.hh \ scribo/primitive/extract/horizontal_separators.hh \ scribo/primitive/extract/lines_discontinued.hh \ scribo/primitive/extract/lines_h_discontinued.hh \ @@ -124,10 +127,12 @@ 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/separators.hh \ +scribo/primitive/extract/separators_nonvisible.hh \ scribo/primitive/extract/vertical_separators.hh \ scribo/primitive/group/all.hh \ scribo/primitive/group/apply.hh \ scribo/primitive/group/from_double_link.hh \ +scribo/primitive/group/from_double_link_any.hh \ scribo/primitive/group/from_graph.hh \ scribo/primitive/group/from_single_link.hh \ scribo/primitive/internal/all.hh \ @@ -165,8 +170,10 @@ scribo/primitive/link/with_single_left_link_dmax_ratio.hh \ scribo/primitive/link/with_single_right_link.hh \ scribo/primitive/link/with_single_right_link_bottom.hh \ scribo/primitive/link/with_single_right_link_dmax_ratio.hh \ +scribo/primitive/link/with_single_right_link_dmax_ratio_aligned.hh \ scribo/primitive/link/with_single_right_link_top.hh \ scribo/primitive/link/with_single_up_link.hh \ +scribo/primitive/merge/components.hh \ scribo/primitive/regroup/from_single_left_link.hh \ scribo/primitive/regroup/from_single_left_link_wrt_h_ratio.hh \ scribo/primitive/remove/separators.hh \ @@ -197,6 +204,7 @@ scribo/text/recognition.hh \ scribo/toolchain/nepomuk/text_extraction.hh \ 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 diff --git a/scribo/tests/unit_test/unit-tests.mk b/scribo/tests/unit_test/unit-tests.mk index 57c3c38..bd8b787 100644 --- a/scribo/tests/unit_test/unit-tests.mk +++ b/scribo/tests/unit_test/unit-tests.mk @@ -48,13 +48,14 @@ scribo_all \ scribo_binarization_all \ scribo_binarization_global_threshold \ scribo_binarization_global_threshold_auto \ +scribo_binarization_internal_compute_sauvola_threshold \ scribo_binarization_internal_first_pass_functor \ +scribo_binarization_internal_sauvola_debug \ scribo_binarization_local_threshold \ scribo_binarization_sauvola \ scribo_binarization_sauvola_ms \ scribo_binarization_sauvola_ms_split \ scribo_binarization_sauvola_threshold_image \ -scribo_binarization_sauvola_threshold_image_debug \ scribo_canvas_integral_browsing \ scribo_core_all \ scribo_core_central_sites \ @@ -63,6 +64,7 @@ scribo_core_component_set \ scribo_core_concept_dmax_functor \ scribo_core_concept_link_functor \ scribo_core_def_lbl_type \ +scribo_core_document \ scribo_core_erase_objects \ scribo_core_init_integral_image \ scribo_core_line_info \ @@ -151,6 +153,7 @@ scribo_primitive_extract_all \ scribo_primitive_extract_canvas \ scribo_primitive_extract_cells \ scribo_primitive_extract_components \ +scribo_primitive_extract_elements \ scribo_primitive_extract_horizontal_separators \ scribo_primitive_extract_lines_discontinued \ scribo_primitive_extract_lines_h_discontinued \ @@ -166,10 +169,12 @@ scribo_primitive_extract_lines_v_single \ scribo_primitive_extract_lines_v_thick \ scribo_primitive_extract_lines_v_thick_and_single \ scribo_primitive_extract_separators \ +scribo_primitive_extract_separators_nonvisible \ scribo_primitive_extract_vertical_separators \ scribo_primitive_group_all \ scribo_primitive_group_apply \ scribo_primitive_group_from_double_link \ +scribo_primitive_group_from_double_link_any \ scribo_primitive_group_from_graph \ scribo_primitive_group_from_single_link \ scribo_primitive_internal_all \ @@ -203,8 +208,10 @@ scribo_primitive_link_with_single_left_link_dmax_ratio \ scribo_primitive_link_with_single_right_link \ scribo_primitive_link_with_single_right_link_bottom \ scribo_primitive_link_with_single_right_link_dmax_ratio \ +scribo_primitive_link_with_single_right_link_dmax_ratio_aligned \ scribo_primitive_link_with_single_right_link_top \ scribo_primitive_link_with_single_up_link \ +scribo_primitive_merge_components \ scribo_primitive_regroup_from_single_left_link \ scribo_primitive_regroup_from_single_left_link_wrt_h_ratio \ scribo_primitive_remove_separators \ @@ -231,6 +238,8 @@ scribo_text_clean_inplace \ scribo_text_extract_lines \ scribo_text_look_like_text_lines \ scribo_text_merging \ +scribo_toolchain_text_in_doc_preprocess \ +scribo_toolchain_text_in_picture \ scribo_upsampling_bs2x \ scribo_upsampling_eagle @@ -238,13 +247,14 @@ scribo_all_SOURCES = scribo_all.cc scribo_binarization_all_SOURCES = scribo_binarization_all.cc scribo_binarization_global_threshold_SOURCES = scribo_binarization_global_threshold.cc scribo_binarization_global_threshold_auto_SOURCES = scribo_binarization_global_threshold_auto.cc +scribo_binarization_internal_compute_sauvola_threshold_SOURCES = scribo_binarization_internal_compute_sauvola_threshold.cc scribo_binarization_internal_first_pass_functor_SOURCES = scribo_binarization_internal_first_pass_functor.cc +scribo_binarization_internal_sauvola_debug_SOURCES = scribo_binarization_internal_sauvola_debug.cc scribo_binarization_local_threshold_SOURCES = scribo_binarization_local_threshold.cc scribo_binarization_sauvola_SOURCES = scribo_binarization_sauvola.cc scribo_binarization_sauvola_ms_SOURCES = scribo_binarization_sauvola_ms.cc scribo_binarization_sauvola_ms_split_SOURCES = scribo_binarization_sauvola_ms_split.cc scribo_binarization_sauvola_threshold_image_SOURCES = scribo_binarization_sauvola_threshold_image.cc -scribo_binarization_sauvola_threshold_image_debug_SOURCES = scribo_binarization_sauvola_threshold_image_debug.cc scribo_canvas_integral_browsing_SOURCES = scribo_canvas_integral_browsing.cc scribo_core_all_SOURCES = scribo_core_all.cc scribo_core_central_sites_SOURCES = scribo_core_central_sites.cc @@ -253,6 +263,7 @@ scribo_core_component_set_SOURCES = scribo_core_component_set.cc scribo_core_concept_dmax_functor_SOURCES = scribo_core_concept_dmax_functor.cc scribo_core_concept_link_functor_SOURCES = scribo_core_concept_link_functor.cc scribo_core_def_lbl_type_SOURCES = scribo_core_def_lbl_type.cc +scribo_core_document_SOURCES = scribo_core_document.cc scribo_core_erase_objects_SOURCES = scribo_core_erase_objects.cc scribo_core_init_integral_image_SOURCES = scribo_core_init_integral_image.cc scribo_core_line_info_SOURCES = scribo_core_line_info.cc @@ -341,6 +352,7 @@ scribo_primitive_extract_all_SOURCES = scribo_primitive_extract_all.cc scribo_primitive_extract_canvas_SOURCES = scribo_primitive_extract_canvas.cc scribo_primitive_extract_cells_SOURCES = scribo_primitive_extract_cells.cc scribo_primitive_extract_components_SOURCES = scribo_primitive_extract_components.cc +scribo_primitive_extract_elements_SOURCES = scribo_primitive_extract_elements.cc scribo_primitive_extract_horizontal_separators_SOURCES = scribo_primitive_extract_horizontal_separators.cc scribo_primitive_extract_lines_discontinued_SOURCES = scribo_primitive_extract_lines_discontinued.cc scribo_primitive_extract_lines_h_discontinued_SOURCES = scribo_primitive_extract_lines_h_discontinued.cc @@ -356,10 +368,12 @@ 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_separators_SOURCES = scribo_primitive_extract_separators.cc +scribo_primitive_extract_separators_nonvisible_SOURCES = scribo_primitive_extract_separators_nonvisible.cc scribo_primitive_extract_vertical_separators_SOURCES = scribo_primitive_extract_vertical_separators.cc scribo_primitive_group_all_SOURCES = scribo_primitive_group_all.cc scribo_primitive_group_apply_SOURCES = scribo_primitive_group_apply.cc scribo_primitive_group_from_double_link_SOURCES = scribo_primitive_group_from_double_link.cc +scribo_primitive_group_from_double_link_any_SOURCES = scribo_primitive_group_from_double_link_any.cc scribo_primitive_group_from_graph_SOURCES = scribo_primitive_group_from_graph.cc scribo_primitive_group_from_single_link_SOURCES = scribo_primitive_group_from_single_link.cc scribo_primitive_internal_all_SOURCES = scribo_primitive_internal_all.cc @@ -393,8 +407,10 @@ scribo_primitive_link_with_single_left_link_dmax_ratio_SOURCES = scribo_primitiv scribo_primitive_link_with_single_right_link_SOURCES = scribo_primitive_link_with_single_right_link.cc scribo_primitive_link_with_single_right_link_bottom_SOURCES = scribo_primitive_link_with_single_right_link_bottom.cc scribo_primitive_link_with_single_right_link_dmax_ratio_SOURCES = scribo_primitive_link_with_single_right_link_dmax_ratio.cc +scribo_primitive_link_with_single_right_link_dmax_ratio_aligned_SOURCES = scribo_primitive_link_with_single_right_link_dmax_ratio_aligned.cc scribo_primitive_link_with_single_right_link_top_SOURCES = scribo_primitive_link_with_single_right_link_top.cc scribo_primitive_link_with_single_up_link_SOURCES = scribo_primitive_link_with_single_up_link.cc +scribo_primitive_merge_components_SOURCES = scribo_primitive_merge_components.cc scribo_primitive_regroup_from_single_left_link_SOURCES = scribo_primitive_regroup_from_single_left_link.cc scribo_primitive_regroup_from_single_left_link_wrt_h_ratio_SOURCES = scribo_primitive_regroup_from_single_left_link_wrt_h_ratio.cc scribo_primitive_remove_separators_SOURCES = scribo_primitive_remove_separators.cc @@ -421,6 +437,8 @@ scribo_text_clean_inplace_SOURCES = scribo_text_clean_inplace.cc scribo_text_extract_lines_SOURCES = scribo_text_extract_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_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 -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-668-g9873b78 Compilation fixes.
by Guillaume Lazzara
* scribo/binarization/sauvola_threshold_image.hh: Fix namespace ambiguity. * scribo/io/xml/save.hh * scribo/primitive/extract/elements.hh * scribo/primitive/merge/components.hh * scribo/toolchain/text_in_doc_preprocess.hh * scribo/toolchain/text_in_picture.hh * src/binarization/ppm_sauvola_ms.cc * src/binarization/ppm_sauvola_ms_fg.cc * src/binarization/ppm_sauvola_ms_split.cc * src/binarization/sauvola_ms.cc * src/binarization/sauvola_ms_fg.cc * src/binarization/sauvola_ms_split.cc * src/contest/hdibco-2010/sauvola_ms_hdibco.cc * src/text_in_picture.cc: Add missing includes. * scribo/primitive/extract/lines_h_pattern.hh, * scribo/primitive/extract/lines_v_pattern.hh: Make sure the rectangle have odd dimensions. * src/Makefile.am: Remove deprecated include path. * src/binarization/ppm_sauvola.cc: Convert to gray level. * src/pbm_text_in_doc.cc: Use doc structure. * src/text_in_picture_neg.cc: Make use of world::rgb::invert. --- scribo/ChangeLog | 33 ++++++++++++ .../scribo/binarization/sauvola_threshold_image.hh | 4 +- scribo/scribo/io/xml/save.hh | 1 + scribo/scribo/primitive/extract/elements.hh | 12 ++++- scribo/scribo/primitive/extract/lines_h_pattern.hh | 10 +++- scribo/scribo/primitive/extract/lines_v_pattern.hh | 10 +++- scribo/scribo/primitive/merge/components.hh | 5 ++ scribo/scribo/toolchain/text_in_doc_preprocess.hh | 2 + scribo/scribo/toolchain/text_in_picture.hh | 55 ++++++++++++++++++-- scribo/src/Makefile.am | 2 - scribo/src/binarization/ppm_sauvola.cc | 10 +++- scribo/src/binarization/ppm_sauvola_ms.cc | 5 ++ scribo/src/binarization/ppm_sauvola_ms_fg.cc | 6 ++ scribo/src/binarization/ppm_sauvola_ms_split.cc | 8 ++- scribo/src/binarization/sauvola_ms.cc | 5 ++ scribo/src/binarization/sauvola_ms_fg.cc | 6 ++ scribo/src/binarization/sauvola_ms_split.cc | 3 +- .../src/contest/hdibco-2010/sauvola_ms_hdibco.cc | 2 + scribo/src/pbm_text_in_doc.cc | 10 +++- scribo/src/text_in_picture.cc | 15 ----- scribo/src/text_in_picture_neg.cc | 5 ++- 21 files changed, 172 insertions(+), 37 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 3db5ad3..8f5a26a 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,38 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + Compilation fixes. + + * scribo/binarization/sauvola_threshold_image.hh: Fix namespace + ambiguity. + + * scribo/io/xml/save.hh + * scribo/primitive/extract/elements.hh + * scribo/primitive/merge/components.hh + * scribo/toolchain/text_in_doc_preprocess.hh + * scribo/toolchain/text_in_picture.hh + * src/binarization/ppm_sauvola_ms.cc + * src/binarization/ppm_sauvola_ms_fg.cc + * src/binarization/ppm_sauvola_ms_split.cc + * src/binarization/sauvola_ms.cc + * src/binarization/sauvola_ms_fg.cc + * src/binarization/sauvola_ms_split.cc + * src/contest/hdibco-2010/sauvola_ms_hdibco.cc + * src/text_in_picture.cc: Add missing includes. + + * scribo/primitive/extract/lines_h_pattern.hh, + * scribo/primitive/extract/lines_v_pattern.hh: Make sure the + rectangle have odd dimensions. + + * src/Makefile.am: Remove deprecated include path. + + * src/binarization/ppm_sauvola.cc: Convert to gray level. + + * src/pbm_text_in_doc.cc: Use doc structure. + + * src/text_in_picture_neg.cc: Make use of world::rgb::invert. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/core/document.hh: Add new methods. 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> diff --git a/scribo/scribo/binarization/sauvola_threshold_image.hh b/scribo/scribo/binarization/sauvola_threshold_image.hh index 05a7064..94cd688 100644 --- a/scribo/scribo/binarization/sauvola_threshold_image.hh +++ b/scribo/scribo/binarization/sauvola_threshold_image.hh @@ -144,8 +144,8 @@ namespace scribo ncols = static_cast<mln::def::coord>(input.ncols()); - for(def::coord row = 0; row < nrows; ++row) - for(def::coord col = 0; col < ncols; ++col) + for(mln::def::coord row = 0; row < nrows; ++row) + for(mln::def::coord col = 0; col < ncols; ++col) { # ifdef SCRIBO_SAUVOLA_DEBUG diff --git a/scribo/scribo/io/xml/save.hh b/scribo/scribo/io/xml/save.hh index 928db17..3c182e7 100644 --- a/scribo/scribo/io/xml/save.hh +++ b/scribo/scribo/io/xml/save.hh @@ -35,6 +35,7 @@ # include <map> +# include <scribo/core/document.hh> # include <scribo/core/line_set.hh> namespace scribo diff --git a/scribo/scribo/primitive/extract/elements.hh b/scribo/scribo/primitive/extract/elements.hh index c083988..2e6a0cb 100644 --- a/scribo/scribo/primitive/extract/elements.hh +++ b/scribo/scribo/primitive/extract/elements.hh @@ -33,6 +33,7 @@ # define SCRIBO_PRIMITIVE_EXTRACT_ELEMENTS_HH # include <mln/core/image/image2d.hh> +# include <mln/core/alias/neighb2d.hh> # include <mln/data/fill.hh> # include <mln/util/array.hh> # include <mln/labeling/compute.hh> @@ -40,16 +41,21 @@ # include <mln/accu/math/count.hh> # include <mln/pw/all.hh> +# include <mln/draw/box_plain.hh> + # include <mln/value/label_8.hh> +# include <mln/value/rgb.hh> # include <mln/value/rgb8.hh> # include <scribo/core/macros.hh> # include <scribo/core/component_set.hh> +# include <scribo/core/document.hh> # include <scribo/core/line_set.hh> +# include <scribo/core/def/lbl_type.hh> # include <scribo/filter/objects_small.hh> -#include <mln/clustering/kmean_rgb.hh> -#include <mln/fun/v2v/rgb8_to_rgbn.hh> +# include <mln/clustering/kmean_rgb.hh> +# include <mln/fun/v2v/rgb8_to_rgbn.hh> namespace scribo { @@ -60,6 +66,8 @@ namespace scribo namespace extract { + using namespace mln; + template <typename L, typename I> component_set<L> diff --git a/scribo/scribo/primitive/extract/lines_h_pattern.hh b/scribo/scribo/primitive/extract/lines_h_pattern.hh index 0da7900..6a1f7f0 100644 --- a/scribo/scribo/primitive/extract/lines_h_pattern.hh +++ b/scribo/scribo/primitive/extract/lines_h_pattern.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -30,6 +31,8 @@ /// /// Extract horizontal lines matching a specific pattern. +# include <cmath> + # include <mln/core/concept/image.hh> # include <mln/core/alias/window2d.hh> # include <mln/win/rectangle2d.hh> @@ -103,9 +106,12 @@ namespace scribo mln_concrete(I) output = lines_pattern(input, length, 1, win); + unsigned new_length = length / 2 + delta; + new_length += 1 - (new_length % 2); // Guaranty that new_length is odd. + mln_concrete(I) output_dil = morpho::dilation(output, - win::rectangle2d(3, length / 2 + delta)); + win::rectangle2d(3, new_length)); output = scribo::primitive::internal::rd(output, input * output_dil); diff --git a/scribo/scribo/primitive/extract/lines_v_pattern.hh b/scribo/scribo/primitive/extract/lines_v_pattern.hh index cbdf080..8a103ac 100644 --- a/scribo/scribo/primitive/extract/lines_v_pattern.hh +++ b/scribo/scribo/primitive/extract/lines_v_pattern.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -30,6 +31,8 @@ /// /// Extract vertical lines matching a specific pattern. +# include <cmath> + # include <mln/core/concept/image.hh> # include <mln/core/alias/window2d.hh> # include <mln/win/rectangle2d.hh> @@ -85,9 +88,12 @@ namespace scribo mln_concrete(I) output = lines_pattern(input, length, 0, win); + unsigned new_length = length / 2 + delta; + new_length += 1 - (new_length % 2); // Guaranty that new_length is odd. + mln_concrete(I) output_dil = morpho::dilation(output, - win::rectangle2d(length / 2 + delta, 3)); + win::rectangle2d(new_length, 3)); output = scribo::primitive::internal::rd(output, input * output_dil); diff --git a/scribo/scribo/primitive/merge/components.hh b/scribo/scribo/primitive/merge/components.hh index 7570d2e..72f3e9d 100644 --- a/scribo/scribo/primitive/merge/components.hh +++ b/scribo/scribo/primitive/merge/components.hh @@ -30,7 +30,12 @@ #ifndef SCRIBO_PRIMITIVE_MERGE_COMPONENTS_HH # define SCRIBO_PRIMITIVE_MERGE_COMPONENTS_HH +# include <mln/core/concept/function.hh> # include <mln/core/image/vmorph/fun_image.hh> +# include <mln/data/fill.hh> +# include <mln/pw/all.hh> + +# include <scribo/core/component_set.hh> namespace scribo diff --git a/scribo/scribo/toolchain/text_in_doc_preprocess.hh b/scribo/scribo/toolchain/text_in_doc_preprocess.hh index 4b7d1e2..00a626e 100644 --- a/scribo/scribo/toolchain/text_in_doc_preprocess.hh +++ b/scribo/scribo/toolchain/text_in_doc_preprocess.hh @@ -32,6 +32,8 @@ #include <mln/core/concept/image.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> diff --git a/scribo/scribo/toolchain/text_in_picture.hh b/scribo/scribo/toolchain/text_in_picture.hh index 7b34114..9746645 100644 --- a/scribo/scribo/toolchain/text_in_picture.hh +++ b/scribo/scribo/toolchain/text_in_picture.hh @@ -33,11 +33,58 @@ /// Localize text in a picture. +# include <libgen.h> +# include <iostream> +# include <mln/core/image/image2d.hh> +# include <mln/core/alias/neighb2d.hh> -#include <src/afp/components.hh> -#include <src/afp/link.hh> -#include <src/afp/regroup.hh> +# include <mln/literal/colors.hh> +# include <mln/value/rgb8.hh> +# include <mln/value/label_16.hh> + +# include <mln/fun/v2v/rgb_to_int_u.hh> + +# include <mln/subsampling/antialiased.hh> + +# include <scribo/draw/bounding_boxes.hh> +# include <scribo/draw/groups_bboxes.hh> + +# include <scribo/binarization/sauvola_ms.hh> +# include <scribo/binarization/sauvola.hh> + +# include <scribo/primitive/extract/components.hh> + +# include <scribo/primitive/link/merge_double_link.hh> +# include <scribo/primitive/link/with_single_left_link.hh> +# include <scribo/primitive/link/with_single_right_link.hh> + +# include <scribo/primitive/group/apply.hh> +# include <scribo/primitive/group/from_double_link.hh> +# include <scribo/primitive/group/from_single_link.hh> + +# include <scribo/primitive/regroup/from_single_left_link.hh> + +# include <scribo/filter/object_groups_with_holes.hh> + +# include <scribo/filter/object_links_bbox_h_ratio.hh> +# 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/debug/decision_image.hh> +# include <scribo/debug/save_linked_bboxes_image.hh> + +# include <scribo/debug/usage.hh> + +# include <scribo/preprocessing/split_bg_fg.hh> + +# include <scribo/make/debug_filename.hh> + +# include <src/afp/components.hh> +# include <src/afp/link.hh> +# include <src/afp/regroup.hh> # include <mln/util/timer.hh> @@ -126,7 +173,7 @@ namespace scribo trace::entering("scribo::toolchain::text_in_picture"); const I& input_rgb_orig = exact(input_rgb_orig_); - mln_precondition(input.is_valid()); + mln_precondition(input_rgb_orig.is_valid()); using namespace scribo; using namespace scribo::primitive; diff --git a/scribo/src/Makefile.am b/scribo/src/Makefile.am index 9efa0da..6cf233c 100644 --- a/scribo/src/Makefile.am +++ b/scribo/src/Makefile.am @@ -99,8 +99,6 @@ if HAVE_TESSERACT utilexec_PROGRAMS += content_in_doc content_in_doc_SOURCES = content_in_doc.cc content_in_doc_CPPFLAGS = $(AM_CPPFLAGS) \ - -I/home/lazzara/git/oln/scribo/sandbox/green/ \ - -I/home/lazzara/git/oln/scribo/sandbox/z/ \ $(TESSERACT_CPPFLAGS) \ $(TIFF_CPPFLAGS) \ $(MAGICKXX_CPPFLAGS) diff --git a/scribo/src/binarization/ppm_sauvola.cc b/scribo/src/binarization/ppm_sauvola.cc index 330af70..f0cd355 100644 --- a/scribo/src/binarization/ppm_sauvola.cc +++ b/scribo/src/binarization/ppm_sauvola.cc @@ -26,6 +26,8 @@ #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola.hh> #include <scribo/debug/usage.hh> @@ -66,10 +68,16 @@ int main(int argc, char *argv[]) std::cout << "Using w=" << w << " and k=" << k << std::endl; + // Load image2d<value::rgb8> input; io::ppm::load(input, argv[1]); - image2d<bool> out = scribo::binarization::sauvola(input, w, k); + // Convert to Gray level image. + image2d<value::int_u8> + input_gl = data::transform(input, mln::fun::v2v::rgb_to_int_u<8>()); + + // Binarize + image2d<bool> out = scribo::binarization::sauvola(input_gl, w, k); io::pbm::save(out, argv[2]); diff --git a/scribo/src/binarization/ppm_sauvola_ms.cc b/scribo/src/binarization/ppm_sauvola_ms.cc index 9e68b0e..eb694c2 100644 --- a/scribo/src/binarization/ppm_sauvola_ms.cc +++ b/scribo/src/binarization/ppm_sauvola_ms.cc @@ -28,6 +28,8 @@ #include <mln/value/int_u8.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> #include <scribo/debug/usage.hh> @@ -99,6 +101,9 @@ int main(int argc, char *argv[]) else k = 0.34f; + std::cout << "Using w_1=" << w_1 << " - s=" << s + << " - k=" << k << std::endl; + // Load image2d<value::rgb8> input_1; io::ppm::load(input_1, argv[1]); diff --git a/scribo/src/binarization/ppm_sauvola_ms_fg.cc b/scribo/src/binarization/ppm_sauvola_ms_fg.cc index 33a11ac..20f237f 100644 --- a/scribo/src/binarization/ppm_sauvola_ms_fg.cc +++ b/scribo/src/binarization/ppm_sauvola_ms_fg.cc @@ -24,10 +24,14 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file + #include <mln/core/image/image2d.hh> #include <mln/value/rgb8.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> #include <scribo/preprocessing/split_bg_fg.hh> @@ -103,6 +107,8 @@ int main(int argc, char *argv[]) else k = 0.34f; + std::cout << "Using w_1=" << w_1 << " - s=" << s + << " - k=" << k << std::endl; // Load image2d<value::rgb8> input_1; diff --git a/scribo/src/binarization/ppm_sauvola_ms_split.cc b/scribo/src/binarization/ppm_sauvola_ms_split.cc index 84e4abf..bb98b38 100644 --- a/scribo/src/binarization/ppm_sauvola_ms_split.cc +++ b/scribo/src/binarization/ppm_sauvola_ms_split.cc @@ -28,6 +28,8 @@ #include <mln/value/rgb8.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms_split.hh> #include <scribo/debug/usage.hh> @@ -113,11 +115,13 @@ int main(int argc, char *argv[]) image2d<value::rgb8> input_1; io::ppm::load(input_1, argv[1]); - std::cout << "Using w=" << w_1 << " - s=" << s << " - min_ntrue=" << min_ntrue << " - k=" << k << std::endl; + std::cout << "Using w=" << w_1 << " - s=" << s + << " - min_ntrue=" << min_ntrue << " - k=" << k << std::endl; // Binarize image2d<bool> - output = scribo::binarization::sauvola_ms_split(input_1, w_1, s, min_ntrue, k); + output = scribo::binarization::sauvola_ms_split(input_1, w_1, s, + min_ntrue, k); io::pbm::save(output, argv[2]); } diff --git a/scribo/src/binarization/sauvola_ms.cc b/scribo/src/binarization/sauvola_ms.cc index 5f07484..7c3bcf0 100644 --- a/scribo/src/binarization/sauvola_ms.cc +++ b/scribo/src/binarization/sauvola_ms.cc @@ -24,6 +24,8 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file + #include <mln/core/image/image2d.hh> #include <mln/value/int_u8.hh> #include <mln/io/magick/load.hh> @@ -102,6 +104,9 @@ int main(int argc, char *argv[]) else k = 0.34f; + std::cout << "Using w_1=" << w_1 << " - s=" << s + << " - k=" << k << std::endl; + // Load image2d<value::rgb8> input_1; io::magick::load(input_1, argv[1]); diff --git a/scribo/src/binarization/sauvola_ms_fg.cc b/scribo/src/binarization/sauvola_ms_fg.cc index cad605f..4227db4 100644 --- a/scribo/src/binarization/sauvola_ms_fg.cc +++ b/scribo/src/binarization/sauvola_ms_fg.cc @@ -24,10 +24,14 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file + #include <mln/core/image/image2d.hh> #include <mln/value/rgb8.hh> #include <mln/io/magick/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> #include <scribo/preprocessing/split_bg_fg.hh> @@ -86,6 +90,8 @@ int main(int argc, char *argv[]) unsigned s = atoi(argv[4]); + std::cout << "Using w_1=" << w_1 << " - s=" << s << std::endl; + // Load image2d<value::rgb8> input_1; io::magick::load(input_1, argv[1]); diff --git a/scribo/src/binarization/sauvola_ms_split.cc b/scribo/src/binarization/sauvola_ms_split.cc index fc9e15c..691bfc9 100644 --- a/scribo/src/binarization/sauvola_ms_split.cc +++ b/scribo/src/binarization/sauvola_ms_split.cc @@ -107,7 +107,8 @@ int main(int argc, char *argv[]) else k = 0.34f; - + std::cout << "Using w_1=" << w_1 << " - s=" << s + << " - k=" << k << std::endl; image2d<value::rgb8> input_1; io::magick::load(input_1, argv[1]); diff --git a/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc b/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc index 68fdaac..7ef2455 100644 --- a/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc +++ b/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc @@ -29,6 +29,8 @@ #include <mln/io/pgm/load.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> #include <scribo/postprocessing/fill_object_holes.hh> diff --git a/scribo/src/pbm_text_in_doc.cc b/scribo/src/pbm_text_in_doc.cc index 23ed9e7..96cb92b 100644 --- a/scribo/src/pbm_text_in_doc.cc +++ b/scribo/src/pbm_text_in_doc.cc @@ -40,6 +40,7 @@ #include <scribo/toolchain/text_in_doc.hh> +#include <scribo/core/document.hh> #include <scribo/core/line_set.hh> #include <scribo/debug/usage.hh> @@ -91,11 +92,11 @@ int main(int argc, char* argv[]) trace::entering("main"); + typedef image2d<scribo::def::lbl_type> L; image2d<bool> input; mln::io::pbm::load(input, argv[1]); - // Optional Cropping point2d crop_shift = literal::origin; if (argc >= 8) @@ -119,12 +120,15 @@ int main(int argc, char* argv[]) // Run document toolchain. - typedef image2d<scribo::def::lbl_type> L; line_set<L> lines = scribo::toolchain::text_in_doc(input, denoise, debug); + scribo::document<L> doc; + doc.set_filename(argv[1]); + doc.set_text(lines); + // Saving results - scribo::io::xml::save(argv[1], lines, "out.xml", true); + scribo::io::xml::save(doc, "out.xml", true); // Specify shift due to potential previous crop. scribo::io::text_boxes::save(lines, argv[2], crop_shift); diff --git a/scribo/src/text_in_picture.cc b/scribo/src/text_in_picture.cc index cdd2749..042b8d3 100644 --- a/scribo/src/text_in_picture.cc +++ b/scribo/src/text_in_picture.cc @@ -28,33 +28,20 @@ #include <iostream> #include <mln/core/image/image2d.hh> -#include <mln/core/image/imorph/tr_image.hh> #include <mln/core/alias/neighb2d.hh> #include <mln/labeling/colorize.hh> -#include <mln/data/stretch.hh> - #include <mln/io/pbm/all.hh> #include <mln/io/ppm/save.hh> #include <mln/io/magick/all.hh> -#include <mln/math/min.hh> - -#include <mln/logical/not.hh> - #include <mln/literal/colors.hh> #include <mln/value/rgb8.hh> #include <mln/value/label_16.hh> #include <mln/fun/v2v/rgb_to_int_u.hh> -#include <mln/data/wrap.hh> - -#include <mln/draw/box.hh> - -#include <mln/geom/translate.hh> - #include <mln/subsampling/antialiased.hh> #include <scribo/draw/bounding_boxes.hh> @@ -81,8 +68,6 @@ #include <scribo/filter/object_links_bbox_h_ratio.hh> #include <scribo/filter/object_links_bbox_overlap.hh> -#include <scribo/filter/common/objects_photo.hh> - #include <scribo/filter/object_groups_small.hh> #include <scribo/filter/object_groups_v_thickness.hh> diff --git a/scribo/src/text_in_picture_neg.cc b/scribo/src/text_in_picture_neg.cc index 2da27a5..7d6694a 100644 --- a/scribo/src/text_in_picture_neg.cc +++ b/scribo/src/text_in_picture_neg.cc @@ -58,6 +58,8 @@ #include <mln/subsampling/antialiased.hh> +#include <mln/world/rgb/invert.hh> + #include <scribo/draw/bounding_boxes.hh> #include <scribo/draw/groups_bboxes.hh> @@ -169,7 +171,8 @@ int main(int argc, char* argv[]) typedef image2d<value::label_16> L; component_set<L> - comps_neg = toolchain::text_in_picture(arith::revert(input_rgb), bg_removal, + comps_neg = toolchain::text_in_picture(world::rgb::invert(input_rgb), + bg_removal, multi_scale_bin, max_dim_size, lambda, out_base_dir); -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-669-gb410ac8 Compilation fixes.
by Guillaume Lazzara
* scribo/binarization/sauvola_threshold_image.hh: Fix namespace ambiguity. * scribo/io/xml/save.hh * scribo/primitive/extract/elements.hh * scribo/primitive/merge/components.hh * scribo/toolchain/text_in_doc_preprocess.hh * scribo/toolchain/text_in_picture.hh * src/binarization/ppm_sauvola_ms.cc * src/binarization/ppm_sauvola_ms_fg.cc * src/binarization/ppm_sauvola_ms_split.cc * src/binarization/sauvola_ms.cc * src/binarization/sauvola_ms_fg.cc * src/binarization/sauvola_ms_split.cc * src/contest/hdibco-2010/sauvola_ms_hdibco.cc * src/text_in_picture.cc: Add missing includes. * scribo/primitive/extract/lines_h_pattern.hh, * scribo/primitive/extract/lines_v_pattern.hh: Make sure the rectangle have odd dimensions. * src/Makefile.am: Remove deprecated include path. * src/binarization/ppm_sauvola.cc: Convert to gray level. * src/pbm_text_in_doc.cc: Use doc structure. * src/text_in_picture_neg.cc: Make use of world::rgb::invert. --- scribo/ChangeLog | 33 ++++++++++++ .../scribo/binarization/sauvola_threshold_image.hh | 4 +- scribo/scribo/io/xml/save.hh | 1 + scribo/scribo/primitive/extract/elements.hh | 12 ++++- scribo/scribo/primitive/extract/lines_h_pattern.hh | 10 +++- scribo/scribo/primitive/extract/lines_v_pattern.hh | 10 +++- scribo/scribo/primitive/merge/components.hh | 5 ++ scribo/scribo/toolchain/text_in_doc_preprocess.hh | 2 + scribo/scribo/toolchain/text_in_picture.hh | 55 ++++++++++++++++++-- scribo/src/Makefile.am | 2 - scribo/src/binarization/ppm_sauvola.cc | 10 +++- scribo/src/binarization/ppm_sauvola_ms.cc | 5 ++ scribo/src/binarization/ppm_sauvola_ms_fg.cc | 6 ++ scribo/src/binarization/ppm_sauvola_ms_split.cc | 8 ++- scribo/src/binarization/sauvola_ms.cc | 5 ++ scribo/src/binarization/sauvola_ms_fg.cc | 6 ++ scribo/src/binarization/sauvola_ms_split.cc | 3 +- .../src/contest/hdibco-2010/sauvola_ms_hdibco.cc | 2 + scribo/src/pbm_text_in_doc.cc | 10 +++- scribo/src/text_in_picture.cc | 15 ----- scribo/src/text_in_picture_neg.cc | 5 ++- 21 files changed, 172 insertions(+), 37 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index f6248fa..9812499 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,38 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + Compilation fixes. + + * scribo/binarization/sauvola_threshold_image.hh: Fix namespace + ambiguity. + + * scribo/io/xml/save.hh + * scribo/primitive/extract/elements.hh + * scribo/primitive/merge/components.hh + * scribo/toolchain/text_in_doc_preprocess.hh + * scribo/toolchain/text_in_picture.hh + * src/binarization/ppm_sauvola_ms.cc + * src/binarization/ppm_sauvola_ms_fg.cc + * src/binarization/ppm_sauvola_ms_split.cc + * src/binarization/sauvola_ms.cc + * src/binarization/sauvola_ms_fg.cc + * src/binarization/sauvola_ms_split.cc + * src/contest/hdibco-2010/sauvola_ms_hdibco.cc + * src/text_in_picture.cc: Add missing includes. + + * scribo/primitive/extract/lines_h_pattern.hh, + * scribo/primitive/extract/lines_v_pattern.hh: Make sure the + rectangle have odd dimensions. + + * src/Makefile.am: Remove deprecated include path. + + * src/binarization/ppm_sauvola.cc: Convert to gray level. + + * src/pbm_text_in_doc.cc: Use doc structure. + + * src/text_in_picture_neg.cc: Make use of world::rgb::invert. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/core/document.hh: Add new methods. 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> diff --git a/scribo/scribo/binarization/sauvola_threshold_image.hh b/scribo/scribo/binarization/sauvola_threshold_image.hh index 05a7064..94cd688 100644 --- a/scribo/scribo/binarization/sauvola_threshold_image.hh +++ b/scribo/scribo/binarization/sauvola_threshold_image.hh @@ -144,8 +144,8 @@ namespace scribo ncols = static_cast<mln::def::coord>(input.ncols()); - for(def::coord row = 0; row < nrows; ++row) - for(def::coord col = 0; col < ncols; ++col) + for(mln::def::coord row = 0; row < nrows; ++row) + for(mln::def::coord col = 0; col < ncols; ++col) { # ifdef SCRIBO_SAUVOLA_DEBUG diff --git a/scribo/scribo/io/xml/save.hh b/scribo/scribo/io/xml/save.hh index 928db17..3c182e7 100644 --- a/scribo/scribo/io/xml/save.hh +++ b/scribo/scribo/io/xml/save.hh @@ -35,6 +35,7 @@ # include <map> +# include <scribo/core/document.hh> # include <scribo/core/line_set.hh> namespace scribo diff --git a/scribo/scribo/primitive/extract/elements.hh b/scribo/scribo/primitive/extract/elements.hh index c083988..2e6a0cb 100644 --- a/scribo/scribo/primitive/extract/elements.hh +++ b/scribo/scribo/primitive/extract/elements.hh @@ -33,6 +33,7 @@ # define SCRIBO_PRIMITIVE_EXTRACT_ELEMENTS_HH # include <mln/core/image/image2d.hh> +# include <mln/core/alias/neighb2d.hh> # include <mln/data/fill.hh> # include <mln/util/array.hh> # include <mln/labeling/compute.hh> @@ -40,16 +41,21 @@ # include <mln/accu/math/count.hh> # include <mln/pw/all.hh> +# include <mln/draw/box_plain.hh> + # include <mln/value/label_8.hh> +# include <mln/value/rgb.hh> # include <mln/value/rgb8.hh> # include <scribo/core/macros.hh> # include <scribo/core/component_set.hh> +# include <scribo/core/document.hh> # include <scribo/core/line_set.hh> +# include <scribo/core/def/lbl_type.hh> # include <scribo/filter/objects_small.hh> -#include <mln/clustering/kmean_rgb.hh> -#include <mln/fun/v2v/rgb8_to_rgbn.hh> +# include <mln/clustering/kmean_rgb.hh> +# include <mln/fun/v2v/rgb8_to_rgbn.hh> namespace scribo { @@ -60,6 +66,8 @@ namespace scribo namespace extract { + using namespace mln; + template <typename L, typename I> component_set<L> diff --git a/scribo/scribo/primitive/extract/lines_h_pattern.hh b/scribo/scribo/primitive/extract/lines_h_pattern.hh index 0da7900..6a1f7f0 100644 --- a/scribo/scribo/primitive/extract/lines_h_pattern.hh +++ b/scribo/scribo/primitive/extract/lines_h_pattern.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -30,6 +31,8 @@ /// /// Extract horizontal lines matching a specific pattern. +# include <cmath> + # include <mln/core/concept/image.hh> # include <mln/core/alias/window2d.hh> # include <mln/win/rectangle2d.hh> @@ -103,9 +106,12 @@ namespace scribo mln_concrete(I) output = lines_pattern(input, length, 1, win); + unsigned new_length = length / 2 + delta; + new_length += 1 - (new_length % 2); // Guaranty that new_length is odd. + mln_concrete(I) output_dil = morpho::dilation(output, - win::rectangle2d(3, length / 2 + delta)); + win::rectangle2d(3, new_length)); output = scribo::primitive::internal::rd(output, input * output_dil); diff --git a/scribo/scribo/primitive/extract/lines_v_pattern.hh b/scribo/scribo/primitive/extract/lines_v_pattern.hh index cbdf080..8a103ac 100644 --- a/scribo/scribo/primitive/extract/lines_v_pattern.hh +++ b/scribo/scribo/primitive/extract/lines_v_pattern.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -30,6 +31,8 @@ /// /// Extract vertical lines matching a specific pattern. +# include <cmath> + # include <mln/core/concept/image.hh> # include <mln/core/alias/window2d.hh> # include <mln/win/rectangle2d.hh> @@ -85,9 +88,12 @@ namespace scribo mln_concrete(I) output = lines_pattern(input, length, 0, win); + unsigned new_length = length / 2 + delta; + new_length += 1 - (new_length % 2); // Guaranty that new_length is odd. + mln_concrete(I) output_dil = morpho::dilation(output, - win::rectangle2d(length / 2 + delta, 3)); + win::rectangle2d(new_length, 3)); output = scribo::primitive::internal::rd(output, input * output_dil); diff --git a/scribo/scribo/primitive/merge/components.hh b/scribo/scribo/primitive/merge/components.hh index 7570d2e..72f3e9d 100644 --- a/scribo/scribo/primitive/merge/components.hh +++ b/scribo/scribo/primitive/merge/components.hh @@ -30,7 +30,12 @@ #ifndef SCRIBO_PRIMITIVE_MERGE_COMPONENTS_HH # define SCRIBO_PRIMITIVE_MERGE_COMPONENTS_HH +# include <mln/core/concept/function.hh> # include <mln/core/image/vmorph/fun_image.hh> +# include <mln/data/fill.hh> +# include <mln/pw/all.hh> + +# include <scribo/core/component_set.hh> namespace scribo diff --git a/scribo/scribo/toolchain/text_in_doc_preprocess.hh b/scribo/scribo/toolchain/text_in_doc_preprocess.hh index 4b7d1e2..00a626e 100644 --- a/scribo/scribo/toolchain/text_in_doc_preprocess.hh +++ b/scribo/scribo/toolchain/text_in_doc_preprocess.hh @@ -32,6 +32,8 @@ #include <mln/core/concept/image.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> diff --git a/scribo/scribo/toolchain/text_in_picture.hh b/scribo/scribo/toolchain/text_in_picture.hh index 7b34114..9746645 100644 --- a/scribo/scribo/toolchain/text_in_picture.hh +++ b/scribo/scribo/toolchain/text_in_picture.hh @@ -33,11 +33,58 @@ /// Localize text in a picture. +# include <libgen.h> +# include <iostream> +# include <mln/core/image/image2d.hh> +# include <mln/core/alias/neighb2d.hh> -#include <src/afp/components.hh> -#include <src/afp/link.hh> -#include <src/afp/regroup.hh> +# include <mln/literal/colors.hh> +# include <mln/value/rgb8.hh> +# include <mln/value/label_16.hh> + +# include <mln/fun/v2v/rgb_to_int_u.hh> + +# include <mln/subsampling/antialiased.hh> + +# include <scribo/draw/bounding_boxes.hh> +# include <scribo/draw/groups_bboxes.hh> + +# include <scribo/binarization/sauvola_ms.hh> +# include <scribo/binarization/sauvola.hh> + +# include <scribo/primitive/extract/components.hh> + +# include <scribo/primitive/link/merge_double_link.hh> +# include <scribo/primitive/link/with_single_left_link.hh> +# include <scribo/primitive/link/with_single_right_link.hh> + +# include <scribo/primitive/group/apply.hh> +# include <scribo/primitive/group/from_double_link.hh> +# include <scribo/primitive/group/from_single_link.hh> + +# include <scribo/primitive/regroup/from_single_left_link.hh> + +# include <scribo/filter/object_groups_with_holes.hh> + +# include <scribo/filter/object_links_bbox_h_ratio.hh> +# 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/debug/decision_image.hh> +# include <scribo/debug/save_linked_bboxes_image.hh> + +# include <scribo/debug/usage.hh> + +# include <scribo/preprocessing/split_bg_fg.hh> + +# include <scribo/make/debug_filename.hh> + +# include <src/afp/components.hh> +# include <src/afp/link.hh> +# include <src/afp/regroup.hh> # include <mln/util/timer.hh> @@ -126,7 +173,7 @@ namespace scribo trace::entering("scribo::toolchain::text_in_picture"); const I& input_rgb_orig = exact(input_rgb_orig_); - mln_precondition(input.is_valid()); + mln_precondition(input_rgb_orig.is_valid()); using namespace scribo; using namespace scribo::primitive; diff --git a/scribo/src/Makefile.am b/scribo/src/Makefile.am index 9efa0da..6cf233c 100644 --- a/scribo/src/Makefile.am +++ b/scribo/src/Makefile.am @@ -99,8 +99,6 @@ if HAVE_TESSERACT utilexec_PROGRAMS += content_in_doc content_in_doc_SOURCES = content_in_doc.cc content_in_doc_CPPFLAGS = $(AM_CPPFLAGS) \ - -I/home/lazzara/git/oln/scribo/sandbox/green/ \ - -I/home/lazzara/git/oln/scribo/sandbox/z/ \ $(TESSERACT_CPPFLAGS) \ $(TIFF_CPPFLAGS) \ $(MAGICKXX_CPPFLAGS) diff --git a/scribo/src/binarization/ppm_sauvola.cc b/scribo/src/binarization/ppm_sauvola.cc index 330af70..f0cd355 100644 --- a/scribo/src/binarization/ppm_sauvola.cc +++ b/scribo/src/binarization/ppm_sauvola.cc @@ -26,6 +26,8 @@ #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola.hh> #include <scribo/debug/usage.hh> @@ -66,10 +68,16 @@ int main(int argc, char *argv[]) std::cout << "Using w=" << w << " and k=" << k << std::endl; + // Load image2d<value::rgb8> input; io::ppm::load(input, argv[1]); - image2d<bool> out = scribo::binarization::sauvola(input, w, k); + // Convert to Gray level image. + image2d<value::int_u8> + input_gl = data::transform(input, mln::fun::v2v::rgb_to_int_u<8>()); + + // Binarize + image2d<bool> out = scribo::binarization::sauvola(input_gl, w, k); io::pbm::save(out, argv[2]); diff --git a/scribo/src/binarization/ppm_sauvola_ms.cc b/scribo/src/binarization/ppm_sauvola_ms.cc index 9e68b0e..eb694c2 100644 --- a/scribo/src/binarization/ppm_sauvola_ms.cc +++ b/scribo/src/binarization/ppm_sauvola_ms.cc @@ -28,6 +28,8 @@ #include <mln/value/int_u8.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> #include <scribo/debug/usage.hh> @@ -99,6 +101,9 @@ int main(int argc, char *argv[]) else k = 0.34f; + std::cout << "Using w_1=" << w_1 << " - s=" << s + << " - k=" << k << std::endl; + // Load image2d<value::rgb8> input_1; io::ppm::load(input_1, argv[1]); diff --git a/scribo/src/binarization/ppm_sauvola_ms_fg.cc b/scribo/src/binarization/ppm_sauvola_ms_fg.cc index 33a11ac..20f237f 100644 --- a/scribo/src/binarization/ppm_sauvola_ms_fg.cc +++ b/scribo/src/binarization/ppm_sauvola_ms_fg.cc @@ -24,10 +24,14 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file + #include <mln/core/image/image2d.hh> #include <mln/value/rgb8.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> #include <scribo/preprocessing/split_bg_fg.hh> @@ -103,6 +107,8 @@ int main(int argc, char *argv[]) else k = 0.34f; + std::cout << "Using w_1=" << w_1 << " - s=" << s + << " - k=" << k << std::endl; // Load image2d<value::rgb8> input_1; diff --git a/scribo/src/binarization/ppm_sauvola_ms_split.cc b/scribo/src/binarization/ppm_sauvola_ms_split.cc index 84e4abf..bb98b38 100644 --- a/scribo/src/binarization/ppm_sauvola_ms_split.cc +++ b/scribo/src/binarization/ppm_sauvola_ms_split.cc @@ -28,6 +28,8 @@ #include <mln/value/rgb8.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms_split.hh> #include <scribo/debug/usage.hh> @@ -113,11 +115,13 @@ int main(int argc, char *argv[]) image2d<value::rgb8> input_1; io::ppm::load(input_1, argv[1]); - std::cout << "Using w=" << w_1 << " - s=" << s << " - min_ntrue=" << min_ntrue << " - k=" << k << std::endl; + std::cout << "Using w=" << w_1 << " - s=" << s + << " - min_ntrue=" << min_ntrue << " - k=" << k << std::endl; // Binarize image2d<bool> - output = scribo::binarization::sauvola_ms_split(input_1, w_1, s, min_ntrue, k); + output = scribo::binarization::sauvola_ms_split(input_1, w_1, s, + min_ntrue, k); io::pbm::save(output, argv[2]); } diff --git a/scribo/src/binarization/sauvola_ms.cc b/scribo/src/binarization/sauvola_ms.cc index 5f07484..7c3bcf0 100644 --- a/scribo/src/binarization/sauvola_ms.cc +++ b/scribo/src/binarization/sauvola_ms.cc @@ -24,6 +24,8 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file + #include <mln/core/image/image2d.hh> #include <mln/value/int_u8.hh> #include <mln/io/magick/load.hh> @@ -102,6 +104,9 @@ int main(int argc, char *argv[]) else k = 0.34f; + std::cout << "Using w_1=" << w_1 << " - s=" << s + << " - k=" << k << std::endl; + // Load image2d<value::rgb8> input_1; io::magick::load(input_1, argv[1]); diff --git a/scribo/src/binarization/sauvola_ms_fg.cc b/scribo/src/binarization/sauvola_ms_fg.cc index cad605f..4227db4 100644 --- a/scribo/src/binarization/sauvola_ms_fg.cc +++ b/scribo/src/binarization/sauvola_ms_fg.cc @@ -24,10 +24,14 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file + #include <mln/core/image/image2d.hh> #include <mln/value/rgb8.hh> #include <mln/io/magick/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> #include <scribo/preprocessing/split_bg_fg.hh> @@ -86,6 +90,8 @@ int main(int argc, char *argv[]) unsigned s = atoi(argv[4]); + std::cout << "Using w_1=" << w_1 << " - s=" << s << std::endl; + // Load image2d<value::rgb8> input_1; io::magick::load(input_1, argv[1]); diff --git a/scribo/src/binarization/sauvola_ms_split.cc b/scribo/src/binarization/sauvola_ms_split.cc index fc9e15c..691bfc9 100644 --- a/scribo/src/binarization/sauvola_ms_split.cc +++ b/scribo/src/binarization/sauvola_ms_split.cc @@ -107,7 +107,8 @@ int main(int argc, char *argv[]) else k = 0.34f; - + std::cout << "Using w_1=" << w_1 << " - s=" << s + << " - k=" << k << std::endl; image2d<value::rgb8> input_1; io::magick::load(input_1, argv[1]); diff --git a/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc b/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc index 68fdaac..7ef2455 100644 --- a/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc +++ b/scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc @@ -29,6 +29,8 @@ #include <mln/io/pgm/load.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pbm/save.hh> +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb_to_int_u.hh> #include <scribo/binarization/sauvola_ms.hh> #include <scribo/postprocessing/fill_object_holes.hh> diff --git a/scribo/src/pbm_text_in_doc.cc b/scribo/src/pbm_text_in_doc.cc index 23ed9e7..96cb92b 100644 --- a/scribo/src/pbm_text_in_doc.cc +++ b/scribo/src/pbm_text_in_doc.cc @@ -40,6 +40,7 @@ #include <scribo/toolchain/text_in_doc.hh> +#include <scribo/core/document.hh> #include <scribo/core/line_set.hh> #include <scribo/debug/usage.hh> @@ -91,11 +92,11 @@ int main(int argc, char* argv[]) trace::entering("main"); + typedef image2d<scribo::def::lbl_type> L; image2d<bool> input; mln::io::pbm::load(input, argv[1]); - // Optional Cropping point2d crop_shift = literal::origin; if (argc >= 8) @@ -119,12 +120,15 @@ int main(int argc, char* argv[]) // Run document toolchain. - typedef image2d<scribo::def::lbl_type> L; line_set<L> lines = scribo::toolchain::text_in_doc(input, denoise, debug); + scribo::document<L> doc; + doc.set_filename(argv[1]); + doc.set_text(lines); + // Saving results - scribo::io::xml::save(argv[1], lines, "out.xml", true); + scribo::io::xml::save(doc, "out.xml", true); // Specify shift due to potential previous crop. scribo::io::text_boxes::save(lines, argv[2], crop_shift); diff --git a/scribo/src/text_in_picture.cc b/scribo/src/text_in_picture.cc index cdd2749..042b8d3 100644 --- a/scribo/src/text_in_picture.cc +++ b/scribo/src/text_in_picture.cc @@ -28,33 +28,20 @@ #include <iostream> #include <mln/core/image/image2d.hh> -#include <mln/core/image/imorph/tr_image.hh> #include <mln/core/alias/neighb2d.hh> #include <mln/labeling/colorize.hh> -#include <mln/data/stretch.hh> - #include <mln/io/pbm/all.hh> #include <mln/io/ppm/save.hh> #include <mln/io/magick/all.hh> -#include <mln/math/min.hh> - -#include <mln/logical/not.hh> - #include <mln/literal/colors.hh> #include <mln/value/rgb8.hh> #include <mln/value/label_16.hh> #include <mln/fun/v2v/rgb_to_int_u.hh> -#include <mln/data/wrap.hh> - -#include <mln/draw/box.hh> - -#include <mln/geom/translate.hh> - #include <mln/subsampling/antialiased.hh> #include <scribo/draw/bounding_boxes.hh> @@ -81,8 +68,6 @@ #include <scribo/filter/object_links_bbox_h_ratio.hh> #include <scribo/filter/object_links_bbox_overlap.hh> -#include <scribo/filter/common/objects_photo.hh> - #include <scribo/filter/object_groups_small.hh> #include <scribo/filter/object_groups_v_thickness.hh> diff --git a/scribo/src/text_in_picture_neg.cc b/scribo/src/text_in_picture_neg.cc index 2da27a5..7d6694a 100644 --- a/scribo/src/text_in_picture_neg.cc +++ b/scribo/src/text_in_picture_neg.cc @@ -58,6 +58,8 @@ #include <mln/subsampling/antialiased.hh> +#include <mln/world/rgb/invert.hh> + #include <scribo/draw/bounding_boxes.hh> #include <scribo/draw/groups_bboxes.hh> @@ -169,7 +171,8 @@ int main(int argc, char* argv[]) typedef image2d<value::label_16> L; component_set<L> - comps_neg = toolchain::text_in_picture(arith::revert(input_rgb), bg_removal, + comps_neg = toolchain::text_in_picture(world::rgb::invert(input_rgb), + bg_removal, multi_scale_bin, max_dim_size, lambda, out_base_dir); -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-667-g92e2d04 scribo/core/document.hh: Add new methods.
by Guillaume Lazzara
--- scribo/ChangeLog | 4 ++++ scribo/scribo/core/document.hh | 31 +++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 240e6a5..3db5ad3 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,9 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/core/document.hh: Add new methods. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/io/xml/save.hh: Add conditions before saving elements and text. diff --git a/scribo/scribo/core/document.hh b/scribo/scribo/core/document.hh index 93d9348..daa0d7b 100644 --- a/scribo/scribo/core/document.hh +++ b/scribo/scribo/core/document.hh @@ -48,21 +48,24 @@ namespace scribo document(); document(const char *filename); + void open(); + const char * filename() const; + void set_filename(const char*name); bool is_valid() const; const line_set<L>& text() const; + bool has_text() const; void set_text(const line_set<L>& line); const component_set<L>& elements() const; + bool has_elements() const; void set_elements(const component_set<L>& elements); const mln::image2d<value::rgb8>& image() const; private: - void open(); - const char *filename_; mln::image2d<mln::value::rgb8> image_; @@ -99,6 +102,14 @@ namespace scribo template <typename L> void + document<L>::set_filename(const char *filename) + { + filename_ = filename; + } + + + template <typename L> + void document<L>::open() { mln::io::magick::load(image_, filename_); @@ -122,6 +133,14 @@ namespace scribo template <typename L> + bool + document<L>::has_text() const + { + return lines_.is_valid(); + } + + + template <typename L> void document<L>::set_text(const line_set<L>& line) { @@ -138,6 +157,14 @@ namespace scribo template <typename L> + bool + document<L>::has_elements() const + { + return elements_.is_valid(); + } + + + template <typename L> void document<L>::set_elements(const component_set<L>& elements) { -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-668-g47b8275 scribo/core/document.hh: Add new methods.
by Guillaume Lazzara
--- scribo/ChangeLog | 4 ++++ scribo/scribo/core/document.hh | 31 +++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index a576dc2..f6248fa 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,9 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/core/document.hh: Add new methods. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/io/xml/save.hh: Add conditions before saving elements and text. diff --git a/scribo/scribo/core/document.hh b/scribo/scribo/core/document.hh index 93d9348..daa0d7b 100644 --- a/scribo/scribo/core/document.hh +++ b/scribo/scribo/core/document.hh @@ -48,21 +48,24 @@ namespace scribo document(); document(const char *filename); + void open(); + const char * filename() const; + void set_filename(const char*name); bool is_valid() const; const line_set<L>& text() const; + bool has_text() const; void set_text(const line_set<L>& line); const component_set<L>& elements() const; + bool has_elements() const; void set_elements(const component_set<L>& elements); const mln::image2d<value::rgb8>& image() const; private: - void open(); - const char *filename_; mln::image2d<mln::value::rgb8> image_; @@ -99,6 +102,14 @@ namespace scribo template <typename L> void + document<L>::set_filename(const char *filename) + { + filename_ = filename; + } + + + template <typename L> + void document<L>::open() { mln::io::magick::load(image_, filename_); @@ -122,6 +133,14 @@ namespace scribo template <typename L> + bool + document<L>::has_text() const + { + return lines_.is_valid(); + } + + + template <typename L> void document<L>::set_text(const line_set<L>& line) { @@ -138,6 +157,14 @@ namespace scribo template <typename L> + bool + document<L>::has_elements() const + { + return elements_.is_valid(); + } + + + template <typename L> void document<L>::set_elements(const component_set<L>& elements) { -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-666-g4c97de4 scribo/io/xml/save.hh: Add conditions before saving elements and text.
by Guillaume Lazzara
--- scribo/ChangeLog | 5 ++ scribo/scribo/io/xml/save.hh | 126 ++++++++++++++++++++++-------------------- 2 files changed, 71 insertions(+), 60 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index afa3d87..240e6a5 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,10 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/io/xml/save.hh: Add conditions before saving elements and + text. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/core/line_set.hh (is_valid()): New method. 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> diff --git a/scribo/scribo/io/xml/save.hh b/scribo/scribo/io/xml/save.hh index c6b416d..928db17 100644 --- a/scribo/scribo/io/xml/save.hh +++ b/scribo/scribo/io/xml/save.hh @@ -155,88 +155,94 @@ namespace scribo << "\" image_height=\"" << lines.components().labeled_image().nrows() << "\">" << std::endl; - for_all_lines(l, lines) + // Text + if (doc.has_text()) { - if (! lines(l).is_valid() - || lines(l).tag() != line::None - || lines(l).type() != line::Text) // Is NOT a text line. - continue; + for_all_lines(l, lines) { - file << " <text_region id=\"" << lines(l).id() - << "\" txt_orientation=\"" << lines(l).orientation() - << "\" txt_reading_orientation=\"" << lines(l).reading_orientation() - << "\" txt_reading_direction=\"" << lines(l).reading_direction() - << "\" txt_text_type=\"" << lines(l).type() - << "\" txt_reverse_video=\"" << (lines(l).reverse_video() ? "true" : "false") - << "\" txt_indented=\"" << (lines(l).indented() ? "true" : "false") - << "\" kerning=\"" << lines(l).char_space(); - - // EXTENSIONS - Not officially supported - if (extended_format) + if (! lines(l).is_valid() + || lines(l).tag() != line::None + || lines(l).type() != line::Text) // Is NOT a text line. + continue; { - file << "\" baseline=\"" << lines(l).baseline() - << "\" meanline=\"" << lines(l).meanline() - << "\" x_height=\"" << lines(l).x_height() - << "\" d_height=\"" << lines(l).d_height() - << "\" a_height=\"" << lines(l).a_height() - << "\" char_width=\"" << lines(l).char_width(); - } - // End of EXTENSIONS - file << "\">" - << std::endl; + file << " <text_region id=\"" << lines(l).id() + << "\" txt_orientation=\"" << lines(l).orientation() + << "\" txt_reading_orientation=\"" << lines(l).reading_orientation() + << "\" txt_reading_direction=\"" << lines(l).reading_direction() + << "\" txt_text_type=\"" << lines(l).type() + << "\" txt_reverse_video=\"" << (lines(l).reverse_video() ? "true" : "false") + << "\" txt_indented=\"" << (lines(l).indented() ? "true" : "false") + << "\" kerning=\"" << lines(l).char_space(); + + // EXTENSIONS - Not officially supported + if (extended_format) + { + file << "\" baseline=\"" << lines(l).baseline() + << "\" meanline=\"" << lines(l).meanline() + << "\" x_height=\"" << lines(l).x_height() + << "\" d_height=\"" << lines(l).d_height() + << "\" a_height=\"" << lines(l).a_height() + << "\" char_width=\"" << lines(l).char_width(); + } + // End of EXTENSIONS + file << "\">" + << std::endl; - internal::print_box_coords(file, lines(l).bbox(), " "); + internal::print_box_coords(file, lines(l).bbox(), " "); - if (extended_format) - { - file << " <paragraph>" << std::endl; + if (extended_format) + { + file << " <paragraph>" << std::endl; - internal::print_box_coords(file, lines(l).bbox(), " "); + internal::print_box_coords(file, lines(l).bbox(), " "); - if (lines(l).has_text()) - { - std::string tmp = lines(l).text(); - tmp = internal::html_markups_replace(tmp, html_map); + if (lines(l).has_text()) + { + std::string tmp = lines(l).text(); + tmp = internal::html_markups_replace(tmp, html_map); - file << " <line text=\"" - << tmp - << "\">" << std::endl; - } - else - file << " <line>" << std::endl; + file << " <line text=\"" + << tmp + << "\">" << std::endl; + } + else + file << " <line>" << std::endl; - internal::print_box_coords(file, lines(l).bbox(), " "); + internal::print_box_coords(file, lines(l).bbox(), " "); - file << " </line>" << std::endl; + file << " </line>" << std::endl; - file << " </paragraph>" << std::endl; - } + file << " </paragraph>" << std::endl; + } - file << " </text_region>" << std::endl; + file << " </text_region>" << std::endl; + } } } + // Page elements (Pictures, ...) + if (doc.has_elements()) + { + const component_set<L>& elts = doc.elements(); + for_all_comps(e, elts) + if (elts(e).is_valid()) + { + file << " <image_region id=\"ir" << elts(e).id() + << "\" img_colour_type=\"24_Bit_Colour\"" + << " img_orientation=\"0.000000\" " + << " img_emb_text=\"No\" " + << " img_bgcolour=\"White\">" << std::endl; - const component_set<L>& elts = doc.elements(); - for_all_comps(e, elts) - if (elts(e).is_valid()) - { - file << " <image_region id=\"ir" << elts(e).id() - << "\" img_colour_type=\"24_Bit_Colour\"" - << " img_orientation=\"0.000000\" " - << " img_emb_text=\"No\" " - << " img_bgcolour=\"White\">" << std::endl; + internal::print_box_coords(file, elts(e).bbox(), " "); - internal::print_box_coords(file, elts(e).bbox(), " "); + file << " </image_region>" << std::endl; + } + } - file << " </image_region>" << std::endl; - } file << " </page>" << std::endl; file << "</pcGts>" << std::endl; - - trace::exiting("scribo::io::xml::save_text_lines"); } -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-667-gb36c24d scribo/io/xml/save.hh: Add conditions before saving elements and text.
by Guillaume Lazzara
--- scribo/ChangeLog | 5 ++ scribo/scribo/io/xml/save.hh | 126 ++++++++++++++++++++++-------------------- 2 files changed, 71 insertions(+), 60 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index cc15e8f..a576dc2 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,10 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/io/xml/save.hh: Add conditions before saving elements and + text. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/core/line_set.hh (is_valid()): New method. 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> diff --git a/scribo/scribo/io/xml/save.hh b/scribo/scribo/io/xml/save.hh index c6b416d..928db17 100644 --- a/scribo/scribo/io/xml/save.hh +++ b/scribo/scribo/io/xml/save.hh @@ -155,88 +155,94 @@ namespace scribo << "\" image_height=\"" << lines.components().labeled_image().nrows() << "\">" << std::endl; - for_all_lines(l, lines) + // Text + if (doc.has_text()) { - if (! lines(l).is_valid() - || lines(l).tag() != line::None - || lines(l).type() != line::Text) // Is NOT a text line. - continue; + for_all_lines(l, lines) { - file << " <text_region id=\"" << lines(l).id() - << "\" txt_orientation=\"" << lines(l).orientation() - << "\" txt_reading_orientation=\"" << lines(l).reading_orientation() - << "\" txt_reading_direction=\"" << lines(l).reading_direction() - << "\" txt_text_type=\"" << lines(l).type() - << "\" txt_reverse_video=\"" << (lines(l).reverse_video() ? "true" : "false") - << "\" txt_indented=\"" << (lines(l).indented() ? "true" : "false") - << "\" kerning=\"" << lines(l).char_space(); - - // EXTENSIONS - Not officially supported - if (extended_format) + if (! lines(l).is_valid() + || lines(l).tag() != line::None + || lines(l).type() != line::Text) // Is NOT a text line. + continue; { - file << "\" baseline=\"" << lines(l).baseline() - << "\" meanline=\"" << lines(l).meanline() - << "\" x_height=\"" << lines(l).x_height() - << "\" d_height=\"" << lines(l).d_height() - << "\" a_height=\"" << lines(l).a_height() - << "\" char_width=\"" << lines(l).char_width(); - } - // End of EXTENSIONS - file << "\">" - << std::endl; + file << " <text_region id=\"" << lines(l).id() + << "\" txt_orientation=\"" << lines(l).orientation() + << "\" txt_reading_orientation=\"" << lines(l).reading_orientation() + << "\" txt_reading_direction=\"" << lines(l).reading_direction() + << "\" txt_text_type=\"" << lines(l).type() + << "\" txt_reverse_video=\"" << (lines(l).reverse_video() ? "true" : "false") + << "\" txt_indented=\"" << (lines(l).indented() ? "true" : "false") + << "\" kerning=\"" << lines(l).char_space(); + + // EXTENSIONS - Not officially supported + if (extended_format) + { + file << "\" baseline=\"" << lines(l).baseline() + << "\" meanline=\"" << lines(l).meanline() + << "\" x_height=\"" << lines(l).x_height() + << "\" d_height=\"" << lines(l).d_height() + << "\" a_height=\"" << lines(l).a_height() + << "\" char_width=\"" << lines(l).char_width(); + } + // End of EXTENSIONS + file << "\">" + << std::endl; - internal::print_box_coords(file, lines(l).bbox(), " "); + internal::print_box_coords(file, lines(l).bbox(), " "); - if (extended_format) - { - file << " <paragraph>" << std::endl; + if (extended_format) + { + file << " <paragraph>" << std::endl; - internal::print_box_coords(file, lines(l).bbox(), " "); + internal::print_box_coords(file, lines(l).bbox(), " "); - if (lines(l).has_text()) - { - std::string tmp = lines(l).text(); - tmp = internal::html_markups_replace(tmp, html_map); + if (lines(l).has_text()) + { + std::string tmp = lines(l).text(); + tmp = internal::html_markups_replace(tmp, html_map); - file << " <line text=\"" - << tmp - << "\">" << std::endl; - } - else - file << " <line>" << std::endl; + file << " <line text=\"" + << tmp + << "\">" << std::endl; + } + else + file << " <line>" << std::endl; - internal::print_box_coords(file, lines(l).bbox(), " "); + internal::print_box_coords(file, lines(l).bbox(), " "); - file << " </line>" << std::endl; + file << " </line>" << std::endl; - file << " </paragraph>" << std::endl; - } + file << " </paragraph>" << std::endl; + } - file << " </text_region>" << std::endl; + file << " </text_region>" << std::endl; + } } } + // Page elements (Pictures, ...) + if (doc.has_elements()) + { + const component_set<L>& elts = doc.elements(); + for_all_comps(e, elts) + if (elts(e).is_valid()) + { + file << " <image_region id=\"ir" << elts(e).id() + << "\" img_colour_type=\"24_Bit_Colour\"" + << " img_orientation=\"0.000000\" " + << " img_emb_text=\"No\" " + << " img_bgcolour=\"White\">" << std::endl; - const component_set<L>& elts = doc.elements(); - for_all_comps(e, elts) - if (elts(e).is_valid()) - { - file << " <image_region id=\"ir" << elts(e).id() - << "\" img_colour_type=\"24_Bit_Colour\"" - << " img_orientation=\"0.000000\" " - << " img_emb_text=\"No\" " - << " img_bgcolour=\"White\">" << std::endl; + internal::print_box_coords(file, elts(e).bbox(), " "); - internal::print_box_coords(file, elts(e).bbox(), " "); + file << " </image_region>" << std::endl; + } + } - file << " </image_region>" << std::endl; - } file << " </page>" << std::endl; file << "</pcGts>" << std::endl; - - trace::exiting("scribo::io::xml::save_text_lines"); } -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-665-g0b29bba scribo/core/line_set.hh (is_valid()): New method.
by Guillaume Lazzara
--- scribo/ChangeLog | 4 ++++ scribo/scribo/core/line_set.hh | 11 +++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index a7f2dc7..afa3d87 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,9 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/core/line_set.hh (is_valid()): New method. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/primitive/group/from_double_link_any.hh: New. 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> diff --git a/scribo/scribo/core/line_set.hh b/scribo/scribo/core/line_set.hh index 6ef3294..29795b2 100644 --- a/scribo/scribo/core/line_set.hh +++ b/scribo/scribo/core/line_set.hh @@ -154,6 +154,9 @@ namespace scribo /// @} + + bool is_valid() const; + private: /// Duplicate the underlying image and create a new line_set. void init_(const line_set<L>& model); @@ -390,6 +393,14 @@ namespace scribo template <typename L> inline + bool + line_set<L>::is_valid() const + { + return data_->links_.is_valid() && data_->groups_.is_valid(); + } + + template <typename L> + inline void line_set<L>::init_(const line_set<L>& set) { -- 1.5.6.5
14 years, 1 month
1
0
0
0
last-svn-commit-666-g75906d4 scribo/core/line_set.hh (is_valid()): New method.
by Guillaume Lazzara
--- scribo/ChangeLog | 4 ++++ scribo/scribo/core/line_set.hh | 11 +++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 69998c0..cc15e8f 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,9 @@ 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/core/line_set.hh (is_valid()): New method. + +2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> + * scribo/primitive/group/from_double_link_any.hh: New. 2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr> diff --git a/scribo/scribo/core/line_set.hh b/scribo/scribo/core/line_set.hh index 6ef3294..29795b2 100644 --- a/scribo/scribo/core/line_set.hh +++ b/scribo/scribo/core/line_set.hh @@ -154,6 +154,9 @@ namespace scribo /// @} + + bool is_valid() const; + private: /// Duplicate the underlying image and create a new line_set. void init_(const line_set<L>& model); @@ -390,6 +393,14 @@ namespace scribo template <typename L> inline + bool + line_set<L>::is_valid() const + { + return data_->links_.is_valid() && data_->groups_.is_valid(); + } + + template <typename L> + inline void line_set<L>::init_(const line_set<L>& set) { -- 1.5.6.5
14 years, 1 month
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
37
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Results per page:
10
25
50
100
200