1. 03 Jun, 2010 40 commits
    • Guillaume Lazzara's avatar
    • Guillaume Lazzara's avatar
      Improve Scribo demo. · 33ffff60
      Guillaume Lazzara authored
      	* demo/demat/demat.pro: Add new flags.
      
      	* demo/demat/src/main.cc: Make use of MLN_WO_GLOBALS_VARS.
      
      	* demo/demat/src/main_window.cc,
      	* demo/demat/src/main_window.hh: Cropping is not required
      	anymore. Improve visualization speed.
      
      	* demo/demat/src/preprocessing_task.hh,
      	* demo/demat/src/runner.cc,
      	* demo/demat/src/runner.hh,
      	* demo/demat/ui/main_window.ui: Add a new task for Sauvola ms
      	split.
      
      	* demo/review/src/main.cc,
      	* demo/review/src/mainwindow.cc,
      	* demo/review/src/mainwindow.hh: Start updating executable names
      	and arguments.
      
      	* demo/shared/src/crop_item.cc,
      	* demo/shared/src/crop_item.hh,
      	* demo/shared/src/image_viewer.cc,
      	* demo/shared/src/image_viewer.hh,
      	* demo/shared/src/image_viewer.hxx,
      	* demo/shared/src/internal/interactive_scene.cc,
      	* demo/shared/src/internal/interactive_scene.hh,
      	* demo/shared/ui/image_viewer.ui: Improve look and feel and
      	drawing speed of these components.
      
      	* demo/wizard/src/load_page.cc,
      	* demo/wizard/src/main_window.cc,
      	* demo/wizard/src/runner.cc: Fix compilation.
      33ffff60
    • Guillaume Lazzara's avatar
      Small fixes. · 31216d34
      Guillaume Lazzara authored
      	* binarization/sauvola_threshold_image.hh: Add ifdefs.
      
      	* core/object_groups.hh: Fix a wrong assertion.
      
      	* postprocessing/fill_object_holes.hh: Disable debug output.
      
      	* preprocessing/denoise_bg.hh: Do not negate the image anymore.
      31216d34
    • Guillaume Lazzara's avatar
      Add the binarization tool submitted to H-DIBCO 2010. · db55e631
      Guillaume Lazzara authored
      	* src/Makefile.am,
      	* src/contest/Makefile.am,
      	* src/contest/hdibco-2010/Makefile.am: New.
      
      	* src/contest/hdibco-2010/sauvola_ms_hdibco.cc: New. Source code
      	of the submitted program for H-DIBCO 2010.
      db55e631
    • Guillaume Lazzara's avatar
      Update tools in scribo/src. · 080134d6
      Guillaume Lazzara authored
      	* src/Makefile.am: Add postprocessing subdir.
      
      	* src/postprocessing/Makefile.am,
      	* src/postprocessing/fill_object_holes.cc: New.
      
      	* src/preprocessing/denoise.cc: Remove.
      
      	* src/preprocessing/denoise_bg.cc,
      	* src/preprocessing/denoise_fg.cc: New.
      080134d6
    • Guillaume Lazzara's avatar
      Add a specific toolchain for Nepomuk integration. · 40d51800
      Guillaume Lazzara authored
      	* convert/from_qimage.hh: New. convert an image2d to a QImage.
      
      	* core/line_info.hh: Add a new member has_text.
      
      	* text/recognition.hh: Remove an invalid precondition.
      
      	* toolchain/nepomuk/text_extraction.hh: New. Specific toolchain
      	for Nepomuk.
      
      	* tests/Makefile.am: Add toolchain/* subdirs.
      
      	* tests/toolchain/Makefile.am,
      	* tests/toolchain/nepomuk/Makefile.am: New.
      
      	* tests/img/wildly.pbm: New. New test image.
      
      	* tests/toolchain/nepomuk/text_extraction.cc: New. New test.
      40d51800
    • Guillaume Lazzara's avatar
      Cleanup sample tools. · cbbdf4e0
      Guillaume Lazzara authored
      	* src/preprocessing/Makefile.am,
      	* src/text/Makefile.am,
      	* src/Makefile.am: Update.
      
      	* src/multi_scale/Makefile.am,
      	* src/multi_scale/find_lines.cc
      	* src/text/pbm_recognition.cc
      	* src/text/recognition.cc
      	* src/text_in_article_preprocess.cc
      	* src/text_in_doc.cc
      	* src/text_in_doc_ppm.cc
      	* src/text_in_photo.cc
      	* src/text_in_photo_invert.cc
      	* src/text_in_photo_pbm_fast.cc
      	* src/text_in_photo_ppm.cc
      	* test.cc: Remove. Deprecated.
      
      	* src/text_in_article_pbm.cc: Rename as...
      	* src/pbm_text_in_doc.cc: ... this. Make use of the new toolchain
      	routines.
      
      	* src/text/pbm_lines_recognition.cc,
      	* src/text_in_doc_preprocess.cc: New.
      
      	* src/text_in_photo_fast.cc: Rename as...
      	* src/text_in_picture.cc: ... this.
      
      	* src/preprocessing/subsample.cc: Make use of io::magick.
      cbbdf4e0
    • Guillaume Lazzara's avatar
    • Guillaume Lazzara's avatar
      12ddb970
    • Guillaume Lazzara's avatar
      Improve line detection. · b8aaebae
      Guillaume Lazzara authored
      	* primitive/extract/lines_h_pattern.hh,
      	* primitive/extract/lines_v_pattern.hh: Use reconstruction
      	algorithm.
      
      	* primitive/extract/lines_pattern.hh: Add a fast implementation.
      b8aaebae
    • Guillaume Lazzara's avatar
    • Guillaume Lazzara's avatar
      Add a new deskew algorithm. · 99e2b8fc
      Guillaume Lazzara authored
      	* preprocessing/deskew.hh,
      	* preprocessing/deskew_crop.hh: New.
      
      	* preprocessing/unskew.hh: Remove. Deprecated.
      
      	* tests/preprocessing/unskew.cc: Rename as...
      	* tests/preprocessing/deskew.cc: ... this.
      
      	* tests/preprocessing/Makefile.am: Update.
      
      	* tests/img/text_to_group.pgm: New test image.
      99e2b8fc
    • Guillaume Lazzara's avatar
      Add crop tools. · 41c82626
      Guillaume Lazzara authored
      	* preprocessing/crop.hh,
      	* preprocessing/crop_without_localization.hh: new routines.
      
      	* tests/preprocessing/Makefile.am,
      	* tests/preprocessing/crop.cc,
      	* tests/preprocessing/crop_without_localization.cc: Associated
      	tests.
      41c82626
    • Guillaume Lazzara's avatar
      Small fixes. · 8c069f07
      Guillaume Lazzara authored
      	* core/object_groups.hh: Fix an invalid size.
      
      	* debug/save_bboxes_image.hh,
      	* filter/object_links_non_aligned_simple.hh,
      	* primitive/group/from_single_link.hh,
      	* subsampling/bilinear.hh,
      	* text/merging.hh,
      	* upsampling/bs2x.hh: Fix namespace ambiguities.
      
      	* primitive/group/from_double_link.hh: Fix comment.
      
      	* primitive/internal/find_root.hh: Fix guards.
      
      	* primitive/link/with_single_right_link_dmax_ratio.hh: Add a
      	missing include.
      
      	* primitive/remove/separators.hh: Improve computation time.
      
      	* preprocessing/rotate_90.hh: Add a fixme.
      8c069f07
    • Guillaume Lazzara's avatar
      Store OCR results in the line_info structure. · ca67a57f
      Guillaume Lazzara authored
      	* core/line_info.hh: Add a new attribute 'text'.
      
      	* text/recognition.hh: Store results in the line_info structure.
      ca67a57f
    • Guillaume Lazzara's avatar
      Improve debug outputs in Sauvola and make binarization tools compile again. · 21af64ad
      Guillaume Lazzara authored
      	* binarization/internal/first_pass_functor.hh,
      	* binarization/sauvola_ms.hh,
      	* binarization/sauvola_threshold_image.hh: Add debug outputs if
      	SCRIBO_SAUVOLA_DEBUG flag is set.
      
      	* binarization/sauvola_ms_split.hh: Remove lambda argument.
      
      	* binarization/sauvola_threshold_image_debug.hh: Add the threshold
      	image as debug output.
      
      	* src/binarization/Makefile.am: Add sauvola_ms_debug.
      	* src/binarization/sauvola_ms_debug.cc: New.
      
      	* src/binarization/fg_sauvola_ms.cc,
      	* src/binarization/pgm_sauvola_ms.cc,
      	* src/binarization/ppm_fg_sauvola_ms.cc,
      	* src/binarization/ppm_sauvola_ms.cc,
      	* src/binarization/ppm_sauvola_ms_split.cc,
      	* src/binarization/sauvola_debug.cc,
      	* src/binarization/sauvola_ms.cc,
      	* src/binarization/sauvola_ms_split.cc: Make compile again.
      21af64ad
    • Guillaume Lazzara's avatar
    • Guillaume Lazzara's avatar
      Small fixes for Nuxeo/XWiki. · 04aef4bf
      Guillaume Lazzara authored
      	* src/text_in_article_preprocess.cc: Fix use of program
      	arguments.
      
      	* core/line_set.hh,
      	* text/clean.hh,
      	* text/merging.hh: Fix compilation.
      
      	* text/recognition.hh: Update output format.
      04aef4bf
    • Guillaume Lazzara's avatar
      text/merging.hh: Disable some debug. · 3b8335a1
      Guillaume Lazzara authored
      3b8335a1
    • Guillaume Lazzara's avatar
      Prepare DIA tools for Nuxeo/XWiki. · ff1e5aae
      Guillaume Lazzara authored
      	* scribo/src/Makefile.am: Add a new target.
      
      	* scribo/src/text_in_article_preprocess.cc: New.
      
      	* scribo/src/text_in_article_pbm.cc: Add optional cropping and
      	makes the debug optionnal.
      
      	* scribo/text/clean.hh: Improve cleanup.
      
      	* scribo/text/recognition.hh: Remove last '\n' in Tesseract's
      	output.
      ff1e5aae
    • Guillaume Lazzara's avatar
      Improve OCR recognition. · c7cb9f3c
      Guillaume Lazzara authored
      	* src/text_in_article_pbm.cc: Update call to text::recognition.
      
      	* text/clean.hh: Resize text lines according to their x_height.
      
      	* text/extract_lines.hh: Update call to extract::components.
      
      	* text/merging.hh: Remove Debug.
      
      	* text/recognition.hh: Update call to text::clean and do
      	recognition only on lines considered as text.
      
      	* subsampling/bilinear.hh,
      	* upsampling/bs2x.hh: New.
      c7cb9f3c
    • Guillaume Lazzara's avatar
      28453cfc
    • Guillaume Lazzara's avatar
      Add new routines to detect separators. · f256a61a
      Guillaume Lazzara authored
      	* scribo/primitive/extract/horizontal_separators.hh,
      	* scribo/primitive/extract/separators.hh,
      	* scribo/primitive/extract/vertical_separators.hh,
      	* scribo/primitive/remove/separators.hh: New.
      f256a61a
    • Guillaume Lazzara's avatar
      Add A first draft of a README in Scribo. · 464d58f9
      Guillaume Lazzara authored
      	* README: New.
      464d58f9
    • Guillaume Lazzara's avatar
      Move AFP's GUI into Scribo's demo directory. · 9c5c4831
      Guillaume Lazzara authored
      	* milena/sandbox/lazzara/afp/photos/gui/gui.pro,
      	* milena/sandbox/lazzara/afp/photos/gui/gui.qrc,
      	* milena/sandbox/lazzara/afp/photos/gui/icons/next.png,
      	* milena/sandbox/lazzara/afp/photos/gui/icons/ok.png,
      	* milena/sandbox/lazzara/afp/photos/gui/icons/photos.png,
      	* milena/sandbox/lazzara/afp/photos/gui/icons/prev.png,
      	* milena/sandbox/lazzara/afp/photos/gui/icons/remove.png,
      	* milena/sandbox/lazzara/afp/photos/gui/src/custom_delegate.cc,
      	* milena/sandbox/lazzara/afp/photos/gui/src/custom_delegate.hh,
      	* milena/sandbox/lazzara/afp/photos/gui/src/launch_dialog.cc,
      	* milena/sandbox/lazzara/afp/photos/gui/src/launch_dialog.hh,
      	* milena/sandbox/lazzara/afp/photos/gui/src/main.cc,
      	* milena/sandbox/lazzara/afp/photos/gui/src/main_window.cc,
      	* milena/sandbox/lazzara/afp/photos/gui/src/main_window.hh,
      	* milena/sandbox/lazzara/afp/photos/gui/ui/launch_dialog.ui,
      	* milena/sandbox/lazzara/afp/photos/gui/ui/main_window.ui: Move...
      
      	* scribo/demo/tip/gui.pro,
      	* scribo/demo/tip/gui.qrc,
      	* scribo/demo/tip/icons/next.png,
      	* scribo/demo/tip/icons/ok.png,
      	* scribo/demo/tip/icons/photos.png,
      	* scribo/demo/tip/icons/prev.png,
      	* scribo/demo/tip/icons/remove.png,
      	* scribo/demo/tip/src/custom_delegate.cc,
      	* scribo/demo/tip/src/custom_delegate.hh,
      	* scribo/demo/tip/src/launch_dialog.cc,
      	* scribo/demo/tip/src/launch_dialog.hh,
      	* scribo/demo/tip/src/main.cc,
      	* scribo/demo/tip/src/main_window.cc,
      	* scribo/demo/tip/src/main_window.hh,
      	* scribo/demo/tip/ui/launch_dialog.ui,
      	* scribo/demo/tip/ui/main_window.ui: ... here.
      9c5c4831
    • Guillaume Lazzara's avatar
      Introduce dmax_functor concept. · 9d7a1cca
      Guillaume Lazzara authored
      	* core/concept/dmax_functor.hh,
      	* primitive/link/internal/dmax_default.hh,
      	* primitive/link/internal/dmax_functor_base.hh,
      	* primitive/link/internal/dmax_width_and_height.hh,
      	* primitive/link/internal/dmax_width_only.hh: New.
      
      	* primitive/link/internal/link_single_dmax_ratio_base.hh,
      	* primitive/link/with_single_left_link_dmax_ratio.hh,
      	* primitive/link/with_single_right_link_dmax_ratio.hh: Make use of
      	the new functors.
      9d7a1cca
    • Guillaume Lazzara's avatar
      Small fixes in Scribo. · a184c810
      Guillaume Lazzara authored
      	* binarization/sauvola_ms.hh,
      	* binarization/sauvola_threshold_image_debug.hh: Update prototypes.
      
      	* primitive/internal/rd.hh,
      	* primitive/group/apply.hh,
      	* debug/save_bboxes_image.hh: Add missing mln:: namespace prefix.
      
      	* filter/objects_large.hh: Split into a routine and a functor.
      
      	* fun/v2b/objects_large_filter.hh: New.
      
      	* io/xml/save_text_lines.hh: Save line type.
      
      	* table/internal/repair_lines.hh,
      	* table/internal/align_lines.hh,
      	* make/text.hh: Update macro name.
      
      	* core/erase_objects.hh,
      	* primitive/extract/lines_discontinued.hh,
      	* primitive/extract/lines_h_discontinued.hh,
      	* primitive/extract/lines_h_pattern.hh,
      	* primitive/extract/lines_h_single.hh,
      	* primitive/extract/lines_h_thick.hh,
      	* primitive/extract/lines_thick.hh,
      	* primitive/extract/lines_v_discontinued.hh,
      	* primitive/extract/lines_v_single.hh,
      	* primitive/extract/lines_v_thick.hh,
      	* primitive/group/from_graph.hh,
      	* primitive/internal/find_graph_link.hh,
      	* primitive/link/with_graph.hh,
      	* primitive/link/with_several_graphes.hh,
      	* primitive/link/with_several_left_links.hh,
      	* primitive/link/with_several_right_links.hh,
      	* table/erase.hh,
      	* table/extract.hh: Remove any references to object_image.
      
      	* table/internal/connect_lines.hh: use
      	influence_zone_geodesic_saturated
      
      	* filter/objects_small.hh: Duplicate component set.
      
      	* primitive/internal/all.hh,
      	* primitive/extract/all.hh,
      	* filter/all.hh,
      	* core/all.hh: Remove non existing includes.
      
      	* core/macros.hh: New macro.
      
      	* core/line_info.hh: Fix stats.
      
      	* filter/object_links_non_aligned.hh,
      	* filter/object_links_non_h_aligned.hh,
      	* filter/object_links_non_v_aligned.hh: Removed.
      a184c810
    • Guillaume Lazzara's avatar
      Fix few bugs. · b826d415
      Guillaume Lazzara authored
      b826d415
    • Guillaume Lazzara's avatar
      Improve the usability of AFP's GUI. · 32401e08
      Guillaume Lazzara authored
      	* lazzara/afp/photos/gui/src/main_window.cc,
      	* lazzara/afp/photos/gui/src/main_window.hh: Add shortcuts to
      	navigate quickly.
      32401e08
    • Guillaume Lazzara's avatar
      Add support for more image types. · 622c2395
      Guillaume Lazzara authored
      	* lazzara/afp/photos/gui/src/main_window.cc,
      	* lazzara/afp/photos/gui/src/main_window.hh: Add support for more
      	image format and handle directories with no image.
      622c2395
    • Guillaume Lazzara's avatar
      Improve options menu and progress dialog. · 752d8cae
      Guillaume Lazzara authored
      	* lazzara/afp/photos/gui/src/launch_dialog.cc,
      	* lazzara/afp/photos/gui/src/launch_dialog.hh,
      	* lazzara/afp/photos/gui/src/main_window.cc,
      	* lazzara/afp/photos/gui/src/main_window.hh,
      	* lazzara/afp/photos/gui/ui/launch_dialog.ui: Improve options menu
      	and progress dialog.
      752d8cae
    • Guillaume Lazzara's avatar
      Add a GUI for AFP's use case. · d02047f7
      Guillaume Lazzara authored
      	* lazzara/afp/photos/gui/gui.pro,
      	* lazzara/afp/photos/gui/gui.qrc,
      	* lazzara/afp/photos/gui/icons/next.png,
      	* lazzara/afp/photos/gui/icons/ok.png,
      	* lazzara/afp/photos/gui/icons/photos.png,
      	* lazzara/afp/photos/gui/icons/prev.png,
      	* lazzara/afp/photos/gui/icons/remove.png,
      	* lazzara/afp/photos/gui/src/custom_delegate.cc,
      	* lazzara/afp/photos/gui/src/custom_delegate.hh,
      	* lazzara/afp/photos/gui/src/launch_dialog.cc,
      	* lazzara/afp/photos/gui/src/launch_dialog.hh,
      	* lazzara/afp/photos/gui/src/main.cc,
      	* lazzara/afp/photos/gui/src/main_window.cc,
      	* lazzara/afp/photos/gui/src/main_window.hh,
      	* lazzara/afp/photos/gui/ui/launch_dialog.ui,
      	* lazzara/afp/photos/gui/ui/main_window.ui: New files. GUI meant
      	to display the results of text finding in pictures.
      d02047f7
    • Guillaume Lazzara's avatar
      Improve dematerialization wizard. · 8d47be15
      Guillaume Lazzara authored
      	* demo/wizard/src/crop_widget.cc,
      	* demo/wizard/src/main.cc,
      	* demo/wizard/src/main_window.cc,
      	* demo/wizard/src/main_window.hh,
      	* demo/wizard/src/preprocessing_widget.cc,
      	* demo/wizard/src/process_page.cc,
      	* demo/wizard/src/result_page.cc,
      	* demo/wizard/src/result_page.hh,
      	* demo/wizard/src/result_widget.cc,
      	* demo/wizard/src/result_widget.hh,
      	* demo/wizard/src/runner.cc,
      	* demo/wizard/ui/preprocessing_widget.ui,
      	* demo/wizard/wizard.pro: Add support for text recognition and
      	display results.
      8d47be15
    • Guillaume Lazzara's avatar
      Add a new demo in Scribo. · 548b72e3
      Guillaume Lazzara authored
      	* demo/demat/demat.pro,
      	* demo/demat/demat.qrc,
      	* demo/demat/src/doc_type.hh,
      	* demo/demat/src/main.cc,
      	* demo/demat/src/main_window.cc,
      	* demo/demat/src/main_window.hh,
      	* demo/demat/src/mln_widgets.cc,
      	* demo/demat/src/preprocessing_task.hh,
      	* demo/demat/src/process_args.hh,
      	* demo/demat/src/runner.cc,
      	* demo/demat/src/runner.hh,
      	* demo/demat/ui/main_window.ui: New.
      
      	* demo/shared/src/crop_item.cc,
      	* demo/shared/src/crop_item.hh,
      	* demo/shared/src/image_viewer.cc,
      	* demo/shared/src/image_viewer.hh,
      	* demo/shared/ui/image_viewer.ui: Update according the needs of
      	this new demo.
      548b72e3
    • Guillaume Lazzara's avatar
      11701a0c
    • Guillaume Lazzara's avatar
    • Guillaume Lazzara's avatar
      Use anchor::Type in alignment routines' dispatch. · b54300a5
      Guillaume Lazzara authored
      	* filter/object_links_bottom_aligned.hh,
      	* filter/object_links_center_aligned.hh,
      	* filter/object_links_left_aligned.hh,
      	* filter/object_links_non_aligned_simple.hh,
      	* filter/object_links_right_aligned.hh,
      	* filter/object_links_top_aligned.hh: Use anchor::Type.
      
      	* filter/internal/alignment_angle.hh,
      	* filter/internal/component_aligned.hh: New.
      b54300a5
    • Guillaume Lazzara's avatar
      Small fixes related to object_groups. · 6143a5ec
      Guillaume Lazzara authored
      	* core/object_groups.hh: Add more preconditions.
      
      	* filter/object_groups_small.hh: Call duplicate().
      6143a5ec
    • Guillaume Lazzara's avatar
      Add init() member to object_links structure. · 2c6947d7
      Guillaume Lazzara authored
      	* core/object_links.hh: New init() member.
      
      	* filter/object_groups_v_thickness.hh,
      	* filter/object_groups_with_holes.hh,
      	* primitive/group/from_double_link.hh,
      	* primitive/link/internal/link_functor_base.hh,
      	* primitive/link/merge_double_link.hh,
      	* src/afp/link.hh,
      	* src/afp/regroup.hh: Call init() on object_links instances.
      
      	* primitive/internal/init_link_array.hh: Remove.
      2c6947d7
    • Guillaume Lazzara's avatar