olena-2.0-430-gc1877f8 Add ICDAR contests related source code.

* src/contest/Makefile.am: Add subdirs. * src/contest/hbr-2013/Makefile.am, * src/contest/hbr-2013/content_in_hdoc_hbr.cc, * src/contest/hnla-2013/Makefile.am, * src/contest/hnla-2013/content_in_hdoc_hnla.cc: New. --- scribo/ChangeLog | 11 +++++++++ scribo/src/contest/Makefile.am | 6 +++- .../contest/{hdlac-2011 => hbr-2013}/Makefile.am | 8 +++--- .../content_in_hdoc_hbr.cc} | 22 ++++++++++++------- .../contest/{hdlac-2011 => hnla-2013}/Makefile.am | 8 +++--- .../content_in_hdoc_hnla.cc} | 23 +++++++++++++------- 6 files changed, 52 insertions(+), 26 deletions(-) copy scribo/src/contest/{hdlac-2011 => hbr-2013}/Makefile.am (76%) copy scribo/src/contest/{hdlac-2011/content_in_hdoc_hdlac.cc => hbr-2013/content_in_hdoc_hbr.cc} (82%) copy scribo/src/contest/{hdlac-2011 => hnla-2013}/Makefile.am (76%) copy scribo/src/contest/{hdlac-2011/content_in_hdoc_hdlac.cc => hnla-2013/content_in_hdoc_hnla.cc} (82%) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 5cb86af..1693340 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,16 @@ 2013-03-25 Guillaume Lazzara <z@lrde.epita.fr> + Add ICDAR contests related source code. + + * src/contest/Makefile.am: Add subdirs. + + * src/contest/hbr-2013/Makefile.am, + * src/contest/hbr-2013/content_in_hdoc_hbr.cc, + * src/contest/hnla-2013/Makefile.am, + * src/contest/hnla-2013/content_in_hdoc_hnla.cc: New. + +2013-03-25 Guillaume Lazzara <z@lrde.epita.fr> + Fix some preconditions. * scribo/core/document.hh: Relax some preconditions. diff --git a/scribo/src/contest/Makefile.am b/scribo/src/contest/Makefile.am index b01804b..b76e512 100644 --- a/scribo/src/contest/Makefile.am +++ b/scribo/src/contest/Makefile.am @@ -1,5 +1,5 @@ -# Copyright (C) 2010, 2011 EPITA Research and Development Laboratory -# (LRDE). +# Copyright (C) 2010, 2011, 2013 EPITA Research and Development +# Laboratory (LRDE). # # This file is part of Olena. # @@ -20,4 +20,6 @@ include $(top_srcdir)/scribo/scribo.mk SUBDIRS = \ hdibco-2010 \ hdlac-2011 \ + hbr-2013 \ + hnla-2013 \ DAE-2011 \ No newline at end of file diff --git a/scribo/src/contest/hdlac-2011/Makefile.am b/scribo/src/contest/hbr-2013/Makefile.am similarity index 76% copy from scribo/src/contest/hdlac-2011/Makefile.am copy to scribo/src/contest/hbr-2013/Makefile.am index 84e3224..7c8e80e 100644 --- a/scribo/src/contest/hdlac-2011/Makefile.am +++ b/scribo/src/contest/hbr-2013/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2011, 2013 EPITA Research and Development Laboratory (LRDE). +# Copyright (C) 2013 EPITA Research and Development Laboratory (LRDE). # # This file is part of Olena. # @@ -21,12 +21,12 @@ noinst_PROGRAMS = if HAVE_MAGICKXX -noinst_PROGRAMS += content_in_hdoc_hdlac +noinst_PROGRAMS += content_in_hdoc_hbr -content_in_hdoc_hdlac_CPPFLAGS = $(AM_CPPFLAGS) \ +content_in_hdoc_hbr_CPPFLAGS = $(AM_CPPFLAGS) \ $(MAGICKXX_CPPFLAGS) \ -I$(top_builddir) -content_in_hdoc_hdlac_LDFLAGS = $(AM_LDFLAGS) \ +content_in_hdoc_hbr_LDFLAGS = $(AM_LDFLAGS) \ -lpthread \ $(MAGICKXX_LDFLAGS) diff --git a/scribo/src/contest/hdlac-2011/content_in_hdoc_hdlac.cc b/scribo/src/contest/hbr-2013/content_in_hdoc_hbr.cc similarity index 82% copy from scribo/src/contest/hdlac-2011/content_in_hdoc_hdlac.cc copy to scribo/src/contest/hbr-2013/content_in_hdoc_hbr.cc index 395dcdc..d20bbab 100644 --- a/scribo/src/contest/hdlac-2011/content_in_hdoc_hdlac.cc +++ b/scribo/src/contest/hbr-2013/content_in_hdoc_hbr.cc @@ -1,5 +1,4 @@ -// Copyright (C) 2010, 2011, 2012, 2013 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2013 EPITA Research and Development Laboratory (LRDE) // // This file is part of Olena. // @@ -59,7 +58,7 @@ const char *args_desc[][2] = { { "input.tif", "An image." }, - { "out.xml", "Result of the document analysis." }, + { "out.xml", "Result of the document analysis (PAGE format)." }, {0, 0} }; @@ -72,7 +71,8 @@ int main(int argc, char* argv[]) if (argc != 3) return scribo::debug::usage(argv, - "Document Image Analysis in Historical Documents", + "Document Image Analysis in Historical Books" + " for Historical Book Recognition Contest 2013", "input.tif out.xml", args_desc); @@ -133,10 +133,16 @@ int main(int argc, char* argv[]) scribo::io::xml::save(doc, argv[2], scribo::io::xml::Page); std::cout << "End of process - " << t << std::endl; - scribo::io::img::save(doc, mln::debug::filename("debug_wo_image.png"), - scribo::io::img::DebugWoImage); - scribo::io::img::save(doc, mln::debug::filename("debug_with_image.png"), - scribo::io::img::DebugWithImage); + // scribo::io::img::save(doc, mln::debug::filename("debug_wo_image.png"), + // scribo::io::img::DebugWoImage); + // scribo::io::img::save(doc, mln::debug::filename("debug_with_image.png"), + // scribo::io::img::DebugWithImage); + // scribo::io::img::internal::reduction_factor = 3; + + // scribo::io::img::save(doc, mln::debug::filename("debug_wo_image_30p.png"), + // scribo::io::img::DebugWoImage); + // scribo::io::img::save(doc, mln::debug::filename("debug_with_image_30p.png"), + // scribo::io::img::DebugWithImage); } diff --git a/scribo/src/contest/hdlac-2011/Makefile.am b/scribo/src/contest/hnla-2013/Makefile.am similarity index 76% copy from scribo/src/contest/hdlac-2011/Makefile.am copy to scribo/src/contest/hnla-2013/Makefile.am index 84e3224..439bfb6 100644 --- a/scribo/src/contest/hdlac-2011/Makefile.am +++ b/scribo/src/contest/hnla-2013/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2011, 2013 EPITA Research and Development Laboratory (LRDE). +# Copyright (C) 2013 EPITA Research and Development Laboratory (LRDE). # # This file is part of Olena. # @@ -21,12 +21,12 @@ noinst_PROGRAMS = if HAVE_MAGICKXX -noinst_PROGRAMS += content_in_hdoc_hdlac +noinst_PROGRAMS += content_in_hdoc_hnla -content_in_hdoc_hdlac_CPPFLAGS = $(AM_CPPFLAGS) \ +content_in_hdoc_hnla_CPPFLAGS = $(AM_CPPFLAGS) \ $(MAGICKXX_CPPFLAGS) \ -I$(top_builddir) -content_in_hdoc_hdlac_LDFLAGS = $(AM_LDFLAGS) \ +content_in_hdoc_hnla_LDFLAGS = $(AM_LDFLAGS) \ -lpthread \ $(MAGICKXX_LDFLAGS) diff --git a/scribo/src/contest/hdlac-2011/content_in_hdoc_hdlac.cc b/scribo/src/contest/hnla-2013/content_in_hdoc_hnla.cc similarity index 82% copy from scribo/src/contest/hdlac-2011/content_in_hdoc_hdlac.cc copy to scribo/src/contest/hnla-2013/content_in_hdoc_hnla.cc index 395dcdc..65e0eee 100644 --- a/scribo/src/contest/hdlac-2011/content_in_hdoc_hdlac.cc +++ b/scribo/src/contest/hnla-2013/content_in_hdoc_hnla.cc @@ -1,5 +1,4 @@ -// Copyright (C) 2010, 2011, 2012, 2013 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2013 EPITA Research and Development Laboratory (LRDE) // // This file is part of Olena. // @@ -59,7 +58,7 @@ const char *args_desc[][2] = { { "input.tif", "An image." }, - { "out.xml", "Result of the document analysis." }, + { "out.xml", "Result of the document analysis. (PAGE format)" }, {0, 0} }; @@ -72,7 +71,8 @@ int main(int argc, char* argv[]) if (argc != 3) return scribo::debug::usage(argv, - "Document Image Analysis in Historical Documents", + "Document Image Analysis in Historical Newspaper" + " for Historical Newspaper Layout Analysis Contest 2013", "input.tif out.xml", args_desc); @@ -133,10 +133,17 @@ int main(int argc, char* argv[]) scribo::io::xml::save(doc, argv[2], scribo::io::xml::Page); std::cout << "End of process - " << t << std::endl; - scribo::io::img::save(doc, mln::debug::filename("debug_wo_image.png"), - scribo::io::img::DebugWoImage); - scribo::io::img::save(doc, mln::debug::filename("debug_with_image.png"), - scribo::io::img::DebugWithImage); + // scribo::io::img::save(doc, mln::debug::filename("debug_wo_image.png"), + // scribo::io::img::DebugWoImage); + // scribo::io::img::save(doc, mln::debug::filename("debug_with_image.png"), + // scribo::io::img::DebugWithImage); + + // scribo::io::img::internal::reduction_factor = 3; + + // scribo::io::img::save(doc, mln::debug::filename("debug_wo_image_30p.png"), + // scribo::io::img::DebugWoImage); + // scribo::io::img::save(doc, mln::debug::filename("debug_with_image_30p.png"), + // scribo::io::img::DebugWithImage); } -- 1.7.2.5
participants (1)
-
Guillaume Lazzara