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

15 Jul '10
#233: Implement reconstructions on sets (logic/binary values)
----------------------+-----------------------------------------------------
Reporter: levill_r | Owner: Olena Team
Type: defect | Status: new
Priority: major | Milestone: Olena 1.1
Component: Milena | Version: 1.0
Keywords: |
----------------------+-----------------------------------------------------
The following routines:
* `mln::morpho::reconstruction::by_dilation::union_find`
* `mln::morpho::reconstruction::by_erosion::union_find`
are not implemented on sets (logic/binary values), and worse, they do not
warn the user of this fact (neither a compile- nor at run-time).
--
Ticket URL: <https://trac.lrde.org/olena/ticket/233>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
1
0

08 Jul '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/scribo-z has been updated
via 128ad1a04f7f6b35a67caf9fa878ab1054bbbfdf (commit)
from 3e12eaa1e4dad3518a09c2adff34f4c223d754b8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
128ad1a XML transform program.
-----------------------------------------------------------------------
Summary of changes:
scribo/ChangeLog | 39 +++
scribo/sandbox/arthur/xml_to_html/README | 25 --
scribo/sandbox/arthur/xml_to_html/main.cc | 58 ----
scribo/sandbox/arthur/xml_to_html/patterns/css.css | 28 --
scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl | 229 ---------------
scribo/sandbox/arthur/xml_to_html/xml_to_html.cc | 292 --------------------
scribo/sandbox/arthur/xml_to_html/xml_to_html.hh | 49 ----
scribo/sandbox/arthur/xml_to_html/xml_to_html.pro | 16 -
scribo/sandbox/arthur/xml_transform/README | 19 ++
.../{xml_to_html => xml_transform}/domitem.cc | 0
.../{xml_to_html => xml_transform}/domitem.hh | 0
.../{xml_to_html => xml_transform}/dommodel.cc | 0
.../{xml_to_html => xml_transform}/dommodel.hh | 0
scribo/sandbox/arthur/xml_transform/image_crop.cc | 184 ++++++++++++
scribo/sandbox/arthur/xml_transform/image_crop.hh | 46 +++
scribo/sandbox/arthur/xml_transform/loader.cc | 162 +++++++++++
scribo/sandbox/arthur/xml_transform/loader.hh | 49 ++++
scribo/sandbox/arthur/xml_transform/main.cc | 30 ++
.../arthur/xml_transform/templates/html/css.css | 31 ++
.../xml_transform/templates/html/html_generator.sh | 3 +
.../arthur/xml_transform/templates/html/xsl.xsl | 224 +++++++++++++++
.../arthur/xml_transform/templates/pdf/line.xsl | 129 +++++++++
.../arthur/xml_transform/templates/pdf/main.xsl | 62 ++++
.../xml_transform/templates/pdf/main_crop.xsl | 42 +++
.../xml_transform/templates/pdf/pdf_generator.sh | 3 +
.../arthur/xml_transform/templates/pdf/regions.xsl | 59 ++++
.../sandbox/arthur/xml_transform/xml_transform.cc | 93 +++++++
.../sandbox/arthur/xml_transform/xml_transform.hh | 48 ++++
.../sandbox/arthur/xml_transform/xml_transform.pro | 20 ++
29 files changed, 1243 insertions(+), 697 deletions(-)
delete mode 100644 scribo/sandbox/arthur/xml_to_html/README
delete mode 100644 scribo/sandbox/arthur/xml_to_html/main.cc
delete mode 100644 scribo/sandbox/arthur/xml_to_html/patterns/css.css
delete mode 100644 scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl
delete mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.cc
delete mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.hh
delete mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.pro
create mode 100644 scribo/sandbox/arthur/xml_transform/README
rename scribo/sandbox/arthur/{xml_to_html => xml_transform}/domitem.cc (100%)
rename scribo/sandbox/arthur/{xml_to_html => xml_transform}/domitem.hh (100%)
rename scribo/sandbox/arthur/{xml_to_html => xml_transform}/dommodel.cc (100%)
rename scribo/sandbox/arthur/{xml_to_html => xml_transform}/dommodel.hh (100%)
create mode 100644 scribo/sandbox/arthur/xml_transform/image_crop.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/image_crop.hh
create mode 100644 scribo/sandbox/arthur/xml_transform/loader.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/loader.hh
create mode 100644 scribo/sandbox/arthur/xml_transform/main.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/html/css.css
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/html/html_generator.sh
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/line.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/main.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/main_crop.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/pdf_generator.sh
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/xml_transform.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/xml_transform.hh
create mode 100644 scribo/sandbox/arthur/xml_transform/xml_transform.pro
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
* sandbox/arthur/xml_to_html/xml_to_html.hh,
* sandbox/arthur/xml_to_html/xml_to_html.cc,
* sandbox/arthur/xml_to_html/xml_to_html.pro: Remove.
* sandbox/arthur/xml_to_html/README,
* sandbox/arthur/xml_to_html/main.cc,
* sandbox/arthur/xml_to_html/domitem.cc,
* sandbox/arthur/xml_to_html/domitem.hh,
* sandbox/arthur/xml_to_html/dommodel.cc,
* sandbox/arthur/xml_to_html/dommodel.hh: Move to...
* sandbox/arthur/xml_transform/README,
* sandbox/arthur/xml_transform/main.cc,
* sandbox/arthur/xml_transform/domitem.cc,
* sandbox/arthur/xml_transform/domitem.hh,
* sandbox/arthur/xml_transform/dommodel.cc,
* sandbox/arthur/xml_transform/dommodel.hh: ...this.
* sandbox/arthur/xml_to_html/patterns/css.css,
* sandbox/arthur/xml_to_html/patterns/xsl.xsl: Move to...
* sandbox/arthur/xml_transform/templates/html/css.css,
* sandbox/arthur/xml_transform/templates/html/xsl.xsl: ...this.
* sandbox/arthur/xml_transform/image_crop.cc,
* sandbox/arthur/xml_transform/loader.cc: New.
* sandbox/arthur/xml_transform/templates/html/html_generator.sh,
* sandbox/arthur/xml_transform/templates/pdf/line.xsl,
* sandbox/arthur/xml_transform/templates/pdf/main.xsl,
* sandbox/arthur/xml_transform/templates/pdf/main_crop.xsl,
* sandbox/arthur/xml_transform/templates/pdf/pdf_generator.sh,
* sandbox/arthur/xml_transform/templates/pdf/regions.xsl,
* sandbox/arthur/xml_transform/xml_transform.pro: New.
---
scribo/ChangeLog | 39 +++
scribo/sandbox/arthur/xml_to_html/README | 25 --
scribo/sandbox/arthur/xml_to_html/main.cc | 58 ----
scribo/sandbox/arthur/xml_to_html/patterns/css.css | 28 --
scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl | 229 ---------------
scribo/sandbox/arthur/xml_to_html/xml_to_html.cc | 292 --------------------
scribo/sandbox/arthur/xml_to_html/xml_to_html.hh | 49 ----
scribo/sandbox/arthur/xml_to_html/xml_to_html.pro | 16 -
scribo/sandbox/arthur/xml_transform/README | 19 ++
.../{xml_to_html => xml_transform}/domitem.cc | 0
.../{xml_to_html => xml_transform}/domitem.hh | 0
.../{xml_to_html => xml_transform}/dommodel.cc | 0
.../{xml_to_html => xml_transform}/dommodel.hh | 0
scribo/sandbox/arthur/xml_transform/image_crop.cc | 184 ++++++++++++
scribo/sandbox/arthur/xml_transform/image_crop.hh | 46 +++
scribo/sandbox/arthur/xml_transform/loader.cc | 162 +++++++++++
scribo/sandbox/arthur/xml_transform/loader.hh | 49 ++++
scribo/sandbox/arthur/xml_transform/main.cc | 30 ++
.../arthur/xml_transform/templates/html/css.css | 31 ++
.../xml_transform/templates/html/html_generator.sh | 3 +
.../arthur/xml_transform/templates/html/xsl.xsl | 224 +++++++++++++++
.../arthur/xml_transform/templates/pdf/line.xsl | 129 +++++++++
.../arthur/xml_transform/templates/pdf/main.xsl | 62 ++++
.../xml_transform/templates/pdf/main_crop.xsl | 42 +++
.../xml_transform/templates/pdf/pdf_generator.sh | 3 +
.../arthur/xml_transform/templates/pdf/regions.xsl | 59 ++++
.../sandbox/arthur/xml_transform/xml_transform.cc | 93 +++++++
.../sandbox/arthur/xml_transform/xml_transform.hh | 48 ++++
.../sandbox/arthur/xml_transform/xml_transform.pro | 20 ++
29 files changed, 1243 insertions(+), 697 deletions(-)
delete mode 100644 scribo/sandbox/arthur/xml_to_html/README
delete mode 100644 scribo/sandbox/arthur/xml_to_html/main.cc
delete mode 100644 scribo/sandbox/arthur/xml_to_html/patterns/css.css
delete mode 100644 scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl
delete mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.cc
delete mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.hh
delete mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.pro
create mode 100644 scribo/sandbox/arthur/xml_transform/README
rename scribo/sandbox/arthur/{xml_to_html => xml_transform}/domitem.cc (100%)
rename scribo/sandbox/arthur/{xml_to_html => xml_transform}/domitem.hh (100%)
rename scribo/sandbox/arthur/{xml_to_html => xml_transform}/dommodel.cc (100%)
rename scribo/sandbox/arthur/{xml_to_html => xml_transform}/dommodel.hh (100%)
create mode 100644 scribo/sandbox/arthur/xml_transform/image_crop.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/image_crop.hh
create mode 100644 scribo/sandbox/arthur/xml_transform/loader.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/loader.hh
create mode 100644 scribo/sandbox/arthur/xml_transform/main.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/html/css.css
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/html/html_generator.sh
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/line.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/main.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/main_crop.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/pdf_generator.sh
create mode 100644 scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl
create mode 100644 scribo/sandbox/arthur/xml_transform/xml_transform.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/xml_transform.hh
create mode 100644 scribo/sandbox/arthur/xml_transform/xml_transform.pro
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 5d742bd..df16c98 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,42 @@
+2010-07-08 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
+
+ XML transform program.
+
+ * sandbox/arthur/xml_to_html/xml_to_html.hh,
+ * sandbox/arthur/xml_to_html/xml_to_html.cc,
+ * sandbox/arthur/xml_to_html/xml_to_html.pro: Remove.
+
+ * sandbox/arthur/xml_to_html/README,
+ * sandbox/arthur/xml_to_html/main.cc,
+ * sandbox/arthur/xml_to_html/domitem.cc,
+ * sandbox/arthur/xml_to_html/domitem.hh,
+ * sandbox/arthur/xml_to_html/dommodel.cc,
+ * sandbox/arthur/xml_to_html/dommodel.hh: Move to...
+
+ * sandbox/arthur/xml_transform/README,
+ * sandbox/arthur/xml_transform/main.cc,
+ * sandbox/arthur/xml_transform/domitem.cc,
+ * sandbox/arthur/xml_transform/domitem.hh,
+ * sandbox/arthur/xml_transform/dommodel.cc,
+ * sandbox/arthur/xml_transform/dommodel.hh: ...this.
+
+ * sandbox/arthur/xml_to_html/patterns/css.css,
+ * sandbox/arthur/xml_to_html/patterns/xsl.xsl: Move to...
+
+ * sandbox/arthur/xml_transform/templates/html/css.css,
+ * sandbox/arthur/xml_transform/templates/html/xsl.xsl: ...this.
+
+ * sandbox/arthur/xml_transform/image_crop.cc,
+ * sandbox/arthur/xml_transform/loader.cc: New.
+
+ * sandbox/arthur/xml_transform/templates/html/html_generator.sh,
+ * sandbox/arthur/xml_transform/templates/pdf/line.xsl,
+ * sandbox/arthur/xml_transform/templates/pdf/main.xsl,
+ * sandbox/arthur/xml_transform/templates/pdf/main_crop.xsl,
+ * sandbox/arthur/xml_transform/templates/pdf/pdf_generator.sh,
+ * sandbox/arthur/xml_transform/templates/pdf/regions.xsl,
+ * sandbox/arthur/xml_transform/xml_transform.pro: New.
+
2010-07-05 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
Small fix in Qt interface.
diff --git a/scribo/sandbox/arthur/xml_to_html/README b/scribo/sandbox/arthur/xml_to_html/README
deleted file mode 100644
index f16f472..0000000
--- a/scribo/sandbox/arthur/xml_to_html/README
+++ /dev/null
@@ -1,25 +0,0 @@
-xml_to_html
-
-Produce HTML view from ICDAR (or LRDE extended) XML.
-
-*Compilation:
-
- Just change the paths to olena and milena in xml_to_html.pro
-
-*Usage:
-
- -m, --merge: Merge an XML with an other XML
- args: <xml_file_1> <xml_file_2> [xml_output]
-
-Useful to merge LRDE XML extended mode files with ICDAR XML files to combine both images and recognized text.
-
-
- -c, --create-html: Crop images (if exist) from the ppm file using the XML file and produce an html output.
- args: <xml_file> [ppm_file] [output dir]
-
-If no PPM file is given, the program will only produce an HTML output without images.
-If a PPM file is given, the program will crop image_region, separator_region, graphic_regions, chart_region and table_region to output_dir/img/id.png
-
-*Result:
-
-To view the result run your internet browser on output_dir/output.xml (Does not work with Chrome on local, use a LAMPP server to fix this ;-) ).
\ No newline at end of file
diff --git a/scribo/sandbox/arthur/xml_to_html/main.cc b/scribo/sandbox/arthur/xml_to_html/main.cc
deleted file mode 100644
index 9ec705a..0000000
--- a/scribo/sandbox/arthur/xml_to_html/main.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <iostream>
-#include "xml_to_html.hh"
-
-int main(int argc, char **argv)
-{
-
- std::string man;
- man = "xml_to_html: ...usage\n -m, --merge: Merge an XML with an other XML\n \targs: <xml_file_1> <xml_file_2> [xml_output]\n\n -c, --create-html: Crop images (if exist) from the ppm file using the XML file and produce an html output.\n \targs: <xml_file> [ppm_file] [output dir]\n";
-
- if (argc > 2)
- {
- new QApplication::QApplication(argc, argv, false);
- ImageCrop crop;
-
- std::string merge = "--merge";
- std::string m = "-m";
- std::string scrop = "--create-html";
- std::string c = "-c";
-
- if (argc == 3 && (scrop.compare(argv[1]) == 0 || c.compare(argv[1]) == 0))
- {
- bool b = false;
- b = crop.load_xml(argv[2], QString::Null());
-
- if (b)
- crop.find_image_regions();
- }
- else if (argc > 3)
- {
- if (merge.compare(argv[1]) == 0 || m.compare(argv[1]) == 0)
- {
- if (argc > 4)
- crop.merge(argv[2], argv[3], argv[4]);
- else
- crop.merge(argv[2], argv[3]);
- }
- else if (scrop.compare(argv[1]) == 0 || c.compare(argv[1]) == 0)
- {
- bool b = false;
- if (argc > 4)
- b = crop.load_xml(argv[2], argv[3], argv[4]);
- else
- b = crop.load_xml(argv[2], argv[3]);
-
- if (b)
- crop.find_image_regions();
- }
- else
- std::cout << man;
- }
- else
- std::cout << man;
- }
- else
- std::cout << man;
-
- return 0;
-}
diff --git a/scribo/sandbox/arthur/xml_to_html/patterns/css.css b/scribo/sandbox/arthur/xml_to_html/patterns/css.css
deleted file mode 100644
index 7171754..0000000
--- a/scribo/sandbox/arthur/xml_to_html/patterns/css.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.line
-{
- position:absolute;
- background-color:white;
- z-index:7;
- display:inline;
- white-space:pre;
- letter-spacing:-2px;
- padding:0px;
- margin:0px;
- filter:alpha(opacity=100);
- font-family:"Times New Roman", Times, serif;
-}
-.para
-{
- position:absolute;
- z-index:6;
-}
-.region
-{
- position:absolute;
- z-index:5;
-}
-.image
-{
- position:absolute;
- border:0;
-}
\ No newline at end of file
diff --git a/scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl b/scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl
deleted file mode 100644
index aa5a078..0000000
--- a/scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:template match="/"> <!-- "/" means the whole document (root) -->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Fooooooo !</title>
- <link rel="stylesheet" type="text/css" href="css.css" />
- </head>
- <body>
-
- <div class="image" style="top:0px;left:0px;">
- <img src="../../ppm/mp00076.png" />
- </div>
-
- <!-- BEGIN IMAGE REGION -->
- <xsl:for-each select="pcGts/page/graphic_region|
- pcGts/page/image_region|
- pcGts/page/chart_region|
- pcGts/page/table_region|
- pcGts/page/separator_region|
- pcGts/page/text_region|
- pcGts/page/text_region/paragraph|
- pcGts/page/text_region/paragraph/line">
-
- <!-- y1 -->
- <xsl:variable name="y1">
- <xsl:for-each select="coords/point">
- <xsl:sort select="@y" order="ascending" data-type="number"/>
- <xsl:if test="position() = 1">
- <xsl:value-of select="@y" />
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
-
- <!-- x2 -->
- <xsl:variable name="x2">
- <xsl:for-each select="coords/point">
- <xsl:sort select="@x" order="descending" data-type="number"/>
- <xsl:if test="position() = 1">
- <xsl:value-of select="@x" />
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
-
- <!-- y2 -->
- <xsl:variable name="y2">
- <xsl:for-each select="coords/point">
- <xsl:sort select="@y" order="descending" data-type="number"/>
- <xsl:if test="position() = 1">
- <xsl:value-of select="@y" />
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
-
- <!-- x1 -->
- <xsl:variable name="x1">
- <xsl:for-each select="coords/point">
- <xsl:sort select="@x" order="ascending" data-type="number"/>
- <xsl:if test="position() = 1">
- <xsl:value-of select="@x" />
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
-
- <!-- TEXT LINE-->
- <xsl:if test="name() = 'line'">
-
- <xsl:variable name="x_height">
- <xsl:value-of select="../../@x_height" />
- </xsl:variable>
-
- <xsl:variable name="a_height">
- <xsl:value-of select="../../@a_height" />
- </xsl:variable>
-
- <xsl:variable name="colour">
- <xsl:choose>
- <xsl:when test="../../@txt_colour != ''">
- <xsl:value-of select="../../@txt_colour" />
- </xsl:when>
- <xsl:otherwise>
- Black
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="d_height_tmp">
- <xsl:value-of select="../../@d_height" />
- </xsl:variable>
-
- <xsl:variable name="d_height">
- <xsl:choose>
- <xsl:when test="$d_height_tmp < 0">
- <xsl:value-of select="-$d_height_tmp" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$d_height_tmp" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="a">
- <xsl:choose>
- <xsl:when test="($a_height - $x_height) < $d_height">
- <xsl:value-of select="$x_height + $d_height" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$a_height" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="d">
- <xsl:choose>
- <xsl:when test="($a_height - $x_height) > $d_height">
- <xsl:value-of select="-($a_height - $x_height)" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$d_height" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="d_f">
- <xsl:choose>
- <xsl:when test="$d < 0">
- <xsl:value-of select="-$d" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$d" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <div class="line" onmouseover="this.style.opacity=0.2;this.filters.alpha.opacity=20"
- onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100">
- <xsl:attribute name="style">
- opacity:1;
- height:auto;
- font-size:<xsl:value-of select="$a+$d_f" />px;
- width:<xsl:value-of select="$x2 - $x1" />px;
- left:<xsl:value-of select="$x1 " />px;
- top:<xsl:value-of select="$y1 " />px;
- color:<xsl:value-of select="$colour" />;
- </xsl:attribute>
- <xsl:value-of select="@text"/>
- </div>
- </xsl:if>
- <!-- ENF OF TEXT LINE -->
-
- <!-- TEXT REGION -->
- <xsl:if test="name() = 'text_region'">
- <div class="region">
- <xsl:attribute name="style">
- height:<xsl:value-of select="$y2 - $y1" />px;
- width:<xsl:value-of select="$x2 - $x1" />px;
- left:<xsl:value-of select="$x1" />px;
- top:<xsl:value-of select="$y1" />px;
- </xsl:attribute>
- </div>
- </xsl:if>
- <!-- ENF OF TEXT REGION -->
-
- <!-- PARAGRAPH -->
- <xsl:if test="name() = 'paragraph'">
- <div class="para">
- <xsl:attribute name="style">
- height:<xsl:value-of select="$y2 - $y1" />px;
- width:<xsl:value-of select="$x2 - $x1" />px;
- left:<xsl:value-of select="$x1" />px;
- top:<xsl:value-of select="$y1" />px;
- </xsl:attribute>
- </div>
- </xsl:if>
- <!-- ENF OF PARAGRAPH -->
-
- <!-- NON-TEXT REGIONS -->
- <xsl:if test="name() = 'image_region' or name() = 'separator_region' or name() = 'graphic_region' or name() = 'chart_region' or name() = 'table_region'">
-
- <!-- id -->
- <xsl:variable name="id">
- <xsl:value-of select="@id" />
- </xsl:variable>
-
- <!-- depth -->
- <xsl:variable name="depth">
- <xsl:choose>
- <xsl:when test="name() = 'separator_region'">
- 1
- </xsl:when>
- <xsl:otherwise>
- 4
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <div class="image">
- <xsl:attribute name="style">
- top:<xsl:value-of select="$y1" />px;
- left:<xsl:value-of select="$x1" />px;
- width:<xsl:value-of select="$x2 - $x1"/>px;
- height:<xsl:value-of select="$y2 - $y1"/>px;
- z-index:<xsl:value-of select="$depth"/>;
- </xsl:attribute>
- <img>
- <xsl:attribute name="alt">
- <xsl:value-of select="name()" />
- </xsl:attribute>
- <xsl:attribute name="width">
- <xsl:value-of select="$x2 - $x1" />
- </xsl:attribute>
- <xsl:attribute name="height">
- <xsl:value-of select="$y2 - $y1" />
- </xsl:attribute>
- <xsl:attribute name="src">
- img/<xsl:value-of select="$id"/>.png</xsl:attribute>
- </img>
- </div>
-
- </xsl:if>
- <!-- END NON-TEXT REGIONS -->
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/scribo/sandbox/arthur/xml_to_html/xml_to_html.cc b/scribo/sandbox/arthur/xml_to_html/xml_to_html.cc
deleted file mode 100644
index 8267466..0000000
--- a/scribo/sandbox/arthur/xml_to_html/xml_to_html.cc
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-# include "xml_to_html.hh"
-# include "dommodel.hh"
-# include <limits.h>
-
-#include <scribo/preprocessing/crop.hh>
-#include <mln/value/rgb8.hh>
-#include <mln/core/alias/box2d.hh>
-#include <mln/core/image/image2d.hh>
-#include <mln/io/magick/save.hh>
-#include <mln/io/ppm/all.hh>
-
-ImageCrop::ImageCrop():
- regions_(false)
-{
-}
-
-ImageCrop::~ImageCrop()
-{
-}
-
-void ImageCrop::merge(QString in, QString other, QString output)
-{
- if (in.endsWith(".xml") && other.endsWith(".xml") && output.endsWith(".xml"))
- {
- QFile f_in(in);
- QFile f_other(other);
- QFile f_output(output);
-
- qDebug() << "Merging to " << output << "...";
-
- f_in.open(QIODevice::ReadOnly);
- f_other.open(QIODevice::ReadOnly);
- f_output.open(QIODevice::ReadWrite);
-
- QTextStream stream_in(&f_in);
- QTextStream stream_other(&f_other);
- QTextStream output_stream(&f_output);
-
- QString line = stream_in.readLine();
- output_stream << line;
- line = stream_in.readLine();
-
- while (!line.contains("</page>"))
- {
- output_stream << "\n" << line;
- line = stream_in.readLine();
- }
-
- line = stream_other.readLine();
-
- while (!line.contains("<page"))
- line = stream_other.readLine();
-
- line = stream_other.readLine();
-
- while (!line.contains("</pcGts>"))
- {
- output_stream << "\n" << line;
- line = stream_other.readLine();
- }
-
- output_stream << "\n" << line;
-
- f_in.close();
- f_other.close();
- f_output.close();
- }
- else
- std::cout << "merge : error, only xml files are needed." << std::endl;
-}
-
-bool ImageCrop::load_xml(QString xml_file, QString image_file, QString path)
-{
- if (xml_file.endsWith(".xml") && (image_file.endsWith(".ppm") || image_file == QString::Null()) )
- {
- image_file_ = image_file;
- regions_ = (image_file != QString::Null());
-
- path_ = path;
- if (!path_.endsWith("/"))
- path_.append("/");
-
- QDir dir(path_);
-
- if (!dir.mkpath("img"))
- {
- path_ = "output/";
- dir.mkpath(path_);
- dir.setPath(path_);
- dir.mkpath("img");
- }
-
- if (QFile::exists(xml_file))
- {
- QFile file(xml_file);
- QFile output(path_ + "output.xml");
- QFile xsl("patterns/xsl.xsl");
- QFile css("patterns/css.css");
- xsl.copy(path_ + "xsl.xsl");
- css.copy(path_ + "css.css");
-
- if (QFile::exists(path_ + "output.xml"))
- output.remove();
-
- output.open(QIODevice::ReadWrite);
- file.open(QIODevice::ReadOnly);
-
- QTextStream stream_in(&file);
- QTextStream stream_out(&output);
- stream_in.setCodec("UTF-8");
- stream_out.setCodec("UTF-8");
-
- QString line = stream_in.readLine();
- stream_out << line;
- stream_out << "\n<?xml-stylesheet type=\"text/xsl\" href=\"xsl.xsl\" ?>";
-
- // /!\ attributes of ICDAR PcGts removed.
- line = stream_in.readLine();
- stream_out << "\n<pcGts>";
-
- line = stream_in.readLine();
-
- while (!line.contains("</pcGts>"))
- {
- stream_out << "\n" << line;
- line = stream_in.readLine();
- }
-
- stream_out << "\n" << line;
-
- output.close();
- file.close();
-
- qDebug() << "Output saved to " + path_;
-
- if (file.open(QIODevice::ReadOnly))
- {
- QDomDocument document;
- if (document.setContent(&file))
- {
- layout_ = new DomModel(document, this);
- }
- else
- qDebug() << "Error while loading the XML file, please choose another.";
-
- file.close();
- }
- }
- return true;
- }
- else
- {
- std::cout << "Wrong files format !" << std::endl;
- return false;
- }
-}
-
-void ImageCrop::find_image_regions()
-{
- if (layout_ && regions_)
- {
- QModelIndex pgGts = layout_->index(1, 0);
- QModelIndex page = layout_->index(1, 0, pgGts);
- QModelIndex region;
- QModelIndex attributes;
- QModelIndex coords;
- QModelIndex point;
- bool regions_found = false;
- for (int i = 0; true; ++i)
- {
- region = layout_->index(i, 0, page);
- attributes = layout_->index(i, 1, page);
- QString name = layout_->data(region, Qt::DisplayRole).toString();
- coords = layout_->index(0, 0, region);
-
- bool is_image_region = name == QString("image_region")
- || name == QString("graphic_region")
- || name == QString("separator_region")
- || name == QString("chart_region")
- || name == QString("table_region") ;
-
- if (!region.isValid() || !coords.isValid())
- break;
-
- if (is_image_region)
- {
-
- regions_found = true;
- QMap<QString, QVariant> data =
- layout_->data(attributes, Qt::UserRole).toMap();
-
- QString id;
- QMap<QString, QVariant>::iterator it = data.find("id");
-
- if (it == data.end() || it.key() != "id")
- qDebug() << "No image region.";
-
- while (it != data.end() && it.key() == "id")
- {
- qDebug() << name;
- id = it.value().toString();
- qDebug() << it.key() + " = " + it.value().toString();
- ++it;
- }
-
- int x_max = 0;
- int y_max = 0;
- int x_min = INT_MAX;
- int y_min = INT_MAX;
-
- // QVector<QMap<QString, QVariant> > vect;
- for (int j = 0; true; ++j)
- {
- // Navigate to the coordinate list
- point = layout_->index(j, 1, coords);
- if (!point.isValid())
- break;
-
- QMap<QString, QVariant> data =
- layout_->data(point, Qt::UserRole).toMap();
- int x = data["x"].toInt();
- int y = data["y"].toInt();
-
- // vect << data;
-
- if (x < x_min)
- x_min = x;
- if (x > x_max)
- x_max = x;
-
- if (y < y_min)
- y_min = y;
- if (y > y_max)
- y_max = y;
-
- }
-
- using namespace mln;
-
- box2d box = make::box2d(y_min, x_min, y_max, x_max);
-
- image2d<value::rgb8> ima;
- io::ppm::load(ima, image_file_.toStdString());
- ima = scribo::preprocessing::crop(ima, box);
-
- // image2d<bool> mask = make::box2d(y_min, x_min, y_max, x_max);
- // data::fill(mask, true);
-
- /*for (int a = 1; a < vect.size(); ++a)
- {
- int x = vect[a]["x"].toInt();
- int y = vect[a]["y"].toInt();
-
- data::fill((mask | make::box2d(y, x, y, x)).rw(), false);
- }*/
-
-
- // io::pbm::save(mask, "output/img/mask_" + id.toStdString());
- io::magick::save(ima, path_.toStdString() + "img/" + id.toStdString() + ".png");
-
- }
- }
-
- if (!regions_found)
- qDebug() << "No regions found.";
- }
-}
diff --git a/scribo/sandbox/arthur/xml_to_html/xml_to_html.hh b/scribo/sandbox/arthur/xml_to_html/xml_to_html.hh
deleted file mode 100644
index 27a271e..0000000
--- a/scribo/sandbox/arthur/xml_to_html/xml_to_html.hh
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef IMAGE_CROP_HH
-# define IMAGE_CROP_HH
-
-# include <QtGui>
-
-class DomModel;
-
-class ImageCrop : public QObject
-{
- Q_OBJECT
- public:
- ImageCrop();
- ~ImageCrop();
- void merge(QString in, QString other, QString output = "output.xml");
- bool load_xml(QString xml_file, QString image_file = "", QString path = "output");
- void find_image_regions();
- private:
- DomModel* layout_;
- QString image_file_;
- QString path_;
- bool regions_;
-};
-
-#endif /* !IMAGE_CROP_HH */
diff --git a/scribo/sandbox/arthur/xml_to_html/xml_to_html.pro b/scribo/sandbox/arthur/xml_to_html/xml_to_html.pro
deleted file mode 100644
index b43b527..0000000
--- a/scribo/sandbox/arthur/xml_to_html/xml_to_html.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-######################################################################
-# Automatically generated by qmake (2.01a) lun. juil. 5 16:53:31 2010
-######################################################################
-
-TEMPLATE = app
-TARGET =
-DEPENDPATH += .
-INCLUDEPATH += .
-QMAKE_CXXFLAGS += -I/amd/beyrouth/home/lrde/stage/crepin/olena/milena -I/amd/beyrouth/home/lrde/stage/crepin/olena/
-QT += xml
-LIBS += `Magick++-config --libs`
-
-
-# Input
-HEADERS += domitem.hh dommodel.hh xml_to_html.hh
-SOURCES += domitem.cc dommodel.cc main.cc xml_to_html.cc
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
new file mode 100644
index 0000000..e0bfbc8
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -0,0 +1,19 @@
+xml_transform <option> <xml_file> <ppm_file> <output_dir>
+
+Transforms an ICDAR XML file to different kind of output.
+
+OPTIONS:
+
+ --html: Produce a HTML output
+
+Once process is finished, open output.xml with your internet browser. If this one supports XSLT, there is no problem to display the result but if it does not support it (like Konqueror or Chrome in local), you should run `sh html_generator.sh` (xsltproc package required) to generate a HTML file readable by all browsers.
+
+ --pdf: Produce a PDF output, regions will be cropped as follows in the XML file.
+ --pdf-no-crop: Produce a PDF output without cropping regions, the entire picture will be displayed.
+
+PDF is not directly created once the process is finished, to produce it, go to the output_dir and run `sh pdf_generator.sh` (fop >= 0.95 required).
+
+
+BUILD:
+
+Chnage the environment variable QMAKE_CXXFLAGS to indicate the correct paths to milena and olena then, just type qmake and make.
\ No newline at end of file
diff --git a/scribo/sandbox/arthur/xml_to_html/domitem.cc b/scribo/sandbox/arthur/xml_transform/domitem.cc
similarity index 100%
rename from scribo/sandbox/arthur/xml_to_html/domitem.cc
rename to scribo/sandbox/arthur/xml_transform/domitem.cc
diff --git a/scribo/sandbox/arthur/xml_to_html/domitem.hh b/scribo/sandbox/arthur/xml_transform/domitem.hh
similarity index 100%
rename from scribo/sandbox/arthur/xml_to_html/domitem.hh
rename to scribo/sandbox/arthur/xml_transform/domitem.hh
diff --git a/scribo/sandbox/arthur/xml_to_html/dommodel.cc b/scribo/sandbox/arthur/xml_transform/dommodel.cc
similarity index 100%
rename from scribo/sandbox/arthur/xml_to_html/dommodel.cc
rename to scribo/sandbox/arthur/xml_transform/dommodel.cc
diff --git a/scribo/sandbox/arthur/xml_to_html/dommodel.hh b/scribo/sandbox/arthur/xml_transform/dommodel.hh
similarity index 100%
rename from scribo/sandbox/arthur/xml_to_html/dommodel.hh
rename to scribo/sandbox/arthur/xml_transform/dommodel.hh
diff --git a/scribo/sandbox/arthur/xml_transform/image_crop.cc b/scribo/sandbox/arthur/xml_transform/image_crop.cc
new file mode 100644
index 0000000..aa17c31
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/image_crop.cc
@@ -0,0 +1,184 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+# include "image_crop.hh"
+# include "loader.hh"
+# include "dommodel.hh"
+
+# include <limits.h>
+
+#include <scribo/preprocessing/crop.hh>
+#include <mln/value/rgb8.hh>
+#include <mln/core/alias/box2d.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/io/magick/save.hh>
+#include <mln/io/ppm/all.hh>
+
+ImageCrop::ImageCrop()
+{
+}
+
+ImageCrop::~ImageCrop()
+{
+}
+
+void ImageCrop::save_image(QString image, QString output)
+{
+ using namespace mln;
+
+ image2d<value::rgb8> ima;
+ io::ppm::load(ima, image.toStdString());
+
+ io::magick::save(ima, output.toStdString() + "img/image.png");
+}
+
+void ImageCrop::crop_regions(QString xml_file, QString image_file, QString output)
+{
+ Loader loader;
+
+ QFile f(image_file);
+
+ if (!f.exists())
+ {
+ qDebug() << "Image doesn't exist !";
+ abort();
+ }
+ DomModel* layout = loader.xml_to_dom(xml_file);
+ if (layout)
+ {
+ QModelIndex pcGts = layout->index(1, 0);
+ QModelIndex page = layout->index(1, 0, pcGts);
+ QModelIndex region;
+ QModelIndex attributes;
+ QModelIndex coords;
+ QModelIndex point;
+ bool regions_found = false;
+
+ for (int i = 0; true; ++i)
+ {
+ region = layout->index(i, 0, page);
+ attributes = layout->index(i, 1, page);
+
+ QString name = layout->data(region, Qt::DisplayRole).toString();
+ coords = layout->index(0, 0, region);
+
+ bool is_region =
+ name == QString("image_region")
+ || name == QString("graphic_region")
+ || name == QString("separator_region")
+ || name == QString("chart_region")
+ || name == QString("table_region") ;
+
+ if (!region.isValid() || !coords.isValid())
+ break;
+
+ if (is_region)
+ {
+ regions_found = true;
+ QMap<QString, QVariant> data =
+ layout->data(attributes, Qt::UserRole).toMap();
+
+ QString id;
+ QMap<QString, QVariant>::iterator it = data.find("id");
+
+ if (it == data.end() || it.key() != "id")
+ qDebug() << "WTF_Error : No image region.";
+
+ while (it != data.end() && it.key() == "id")
+ {
+ qDebug() << name;
+ id = it.value().toString();
+ qDebug() << it.key() + " = " + it.value().toString();
+ ++it;
+ }
+
+ int x_max = 0;
+ int y_max = 0;
+ int x_min = INT_MAX;
+ int y_min = INT_MAX;
+
+ // QVector<QMap<QString, QVariant> > vect;
+ for (int j = 0; true; ++j)
+ {
+ // Navigate to the coordinate list
+ point = layout->index(j, 1, coords);
+ if (!point.isValid())
+ break;
+
+ QMap<QString, QVariant> data =
+ layout->data(point, Qt::UserRole).toMap();
+ int x = data["x"].toInt();
+ int y = data["y"].toInt();
+
+ // vect << data;
+
+ if (x < x_min)
+ x_min = x;
+ if (x > x_max)
+ x_max = x;
+
+ if (y < y_min)
+ y_min = y;
+ if (y > y_max)
+ y_max = y;
+
+ }
+
+ using namespace mln;
+
+ box2d box = make::box2d(y_min, x_min, y_max, x_max);
+
+ image2d<value::rgb8> ima;
+ io::ppm::load(ima, image_file.toStdString());
+ ima = scribo::preprocessing::crop(ima, box);
+
+ // image2d<bool> mask = make::box2d(y_min, x_min, y_max, x_max);
+ // data::fill(mask, true);
+
+ /*for (int a = 1; a < vect.size(); ++a)
+ {
+ int x = vect[a]["x"].toInt();
+ int y = vect[a]["y"].toInt();
+
+ data::fill((mask | make::box2d(y, x, y, x)).rw(), false);
+ }*/
+
+ // io::pbm::save(mask, "output/img/mask_" + id.toStdString());
+ io::magick::save(ima, output.toStdString() + "img/" + id.toStdString() + ".png");
+
+ }
+ }
+
+ if (!regions_found)
+ qDebug() << "No regions found.";
+
+ }
+ else
+ {
+ qDebug() << "Error with XML file.";
+ }
+
+
+}
diff --git a/scribo/sandbox/arthur/xml_transform/image_crop.hh b/scribo/sandbox/arthur/xml_transform/image_crop.hh
new file mode 100644
index 0000000..e4b0a38
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/image_crop.hh
@@ -0,0 +1,46 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#ifndef IMAGE_CROP_HH
+# define IMAGE_CROP_HH
+
+# include <QtGui>
+
+class DomModel;
+
+class ImageCrop : public QObject
+{
+ Q_OBJECT
+ public:
+
+ ImageCrop();
+ ~ImageCrop();
+
+ void save_image(QString image, QString output);
+ void crop_regions(QString xml_file, QString image_file, QString output);
+
+};
+
+#endif /* !IMAGE_CROP_HH */
diff --git a/scribo/sandbox/arthur/xml_transform/loader.cc b/scribo/sandbox/arthur/xml_transform/loader.cc
new file mode 100644
index 0000000..5623928
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/loader.cc
@@ -0,0 +1,162 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+# include "loader.hh"
+# include "dommodel.hh"
+# include "xml_transform.hh"
+
+Loader::Loader()
+{
+}
+
+Loader::~Loader()
+{
+}
+
+DomModel* Loader::xml_to_dom(QString output)
+{
+ QString file_path = output;
+
+ QFile file(file_path);
+
+ if (file.open(QIODevice::ReadOnly))
+ {
+ QDomDocument document;
+ if (document.setContent(&file))
+ {
+ return new DomModel(document);
+ }
+ }
+
+ return 0;
+}
+
+bool Loader::set_output(QString& output)
+{
+ QDir dir(output);
+
+ if (!output.endsWith("/"))
+ output.append("/");
+
+ if (!dir.exists())
+ {
+ return dir.mkpath(".");
+ }
+ else
+ {
+ QStringList list = dir.entryList(QDir::Writable | QDir::AllDirs);
+ return list.size() != 0;
+ }
+}
+
+
+void Loader::add_html_templates(QString output)
+{
+
+ QFile gen("templates/html/html_generator.sh");
+ gen.copy(output + "html_generator.sh");
+
+ QFile css("templates/html/css.css");
+ css.copy(output + "css.css");
+
+ QFile xsl("templates/html/xsl.xsl");
+ xsl.copy(output + "xsl.xsl");
+
+}
+
+void Loader::add_pdf_templates(bool crop, QString output)
+{
+
+ QFile regions("templates/pdf/regions.xsl");
+ regions.copy(output + "regions.xsl");
+
+ QFile gen("templates/pdf/pdf_generator.sh");
+ gen.copy(output + "pdf_generator.sh");
+
+ QFile line("templates/pdf/line.xsl");
+ line.copy(output + "line.xsl");
+ if (crop)
+ {
+ QFile xsl("templates/pdf/main_crop.xsl");
+ xsl.copy(output + "main.xsl");
+ }
+ else
+ {
+ QFile xsl("templates/pdf/main.xsl");
+ xsl.copy(output + "main.xsl");
+ }
+}
+
+bool Loader::load_xml(QString xml_file, bool html, QString output)
+{
+ QFile file(xml_file);
+
+ if (file.exists())
+ {
+ file.open(QIODevice::ReadOnly);
+ set_output(output);
+
+ QFile out_file(output + "output.xml");
+ out_file.open(QIODevice::ReadWrite);
+
+ QTextStream stream_in(&file);
+ QTextStream stream_out(&out_file);
+
+ QString line = stream_in.readLine();
+
+ while(!line.contains("<?xml"))
+ line = stream_in.readLine();
+
+ stream_out << line;
+
+ if (html)
+ stream_out << "\n<?xml-stylesheet type=\"text/xsl\" href=\"xsl.xsl\" ?>";
+
+ // /!\ attributes of ICDAR PcGts removed.
+ while(!line.contains("<pcGts"))
+ line = stream_in.readLine();
+
+ line = stream_in.readLine();
+ stream_out << "\n<pcGts>";
+
+ while (!line.contains("</pcGts>"))
+ {
+ stream_out << "\n" << line;
+ line = stream_in.readLine();
+ }
+
+ stream_out << "\n" << line;
+
+ file.close();
+ out_file.close();
+
+ return true;
+ }
+ else
+ {
+ qDebug() << xml_file + " doesn't exist";
+ return false;
+ }
+}
diff --git a/scribo/sandbox/arthur/xml_transform/loader.hh b/scribo/sandbox/arthur/xml_transform/loader.hh
new file mode 100644
index 0000000..7d24254
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/loader.hh
@@ -0,0 +1,49 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#ifndef LOADER_HH
+# define LOADER_HH
+
+//# include <QtGui>
+# include "xml_transform.hh"
+
+class DomModel;
+
+class Loader
+{
+ public:
+
+ Loader();
+ ~Loader();
+
+ // void merge(QString in, QString other, QString output = "output.xml");
+ bool load_xml(QString xml_file, bool html, QString output);
+ DomModel* xml_to_dom(QString output);
+ bool set_output(QString& output);
+ void add_pdf_templates(bool crop, QString output);
+ void add_html_templates(QString output);
+};
+
+#endif /* !LOADER_HH */
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
new file mode 100644
index 0000000..9e18cff
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -0,0 +1,30 @@
+#include <iostream>
+#include "xml_transform.hh"
+
+int main(int argc, char **argv)
+{
+
+ std::string man = "xml_transform <option> <xml_file> <ppm_file> <output_dir>\nOPTIONS:\n\t--html: Produce a HTML output\n\t--pdf: Produce a PDF output, regions will be croped as follows in the XML file.\n\t--pdf-no-crop: Produce a PDF output without croping regions, the entire picture will be displayed.";
+
+ if (argc > 4)
+ {
+ std::string html = "--html";
+ std::string pdf = "--pdf";
+ std::string pdf_no_crop = "--pdf-no-crop";
+
+ XmlTransform xmlt(argv[4], argv[2]);
+
+ if (html.compare(argv[1]) == 0)
+ xmlt.createHTML(argv[3]);
+ else if (pdf.compare(argv[1]) == 0)
+ xmlt.createPDF(argv[3], true);
+ else if (pdf_no_crop.compare(argv[1]) == 0)
+ xmlt.createPDF(argv[3], false);
+ else
+ std::cout << man << std::endl;
+ }
+ else
+ std::cout << man << std::endl;
+
+ return 0;
+}
diff --git a/scribo/sandbox/arthur/xml_transform/templates/html/css.css b/scribo/sandbox/arthur/xml_transform/templates/html/css.css
new file mode 100644
index 0000000..0443390
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/templates/html/css.css
@@ -0,0 +1,31 @@
+.line
+{
+ position:absolute;
+ background-color:white;
+ z-index:7;
+ display:inline;
+ white-space:pre;
+
+ /* FIXME */
+ letter-spacing:-2px;
+
+ padding:0px;
+ margin:0px;
+ filter:alpha(opacity=100);
+ font-family:"Times New Roman", Times, serif;
+}
+.para
+{
+ position:absolute;
+ z-index:6;
+}
+.region
+{
+ position:absolute;
+ z-index:5;
+}
+.image
+{
+ position:absolute;
+ border:0;
+}
\ No newline at end of file
diff --git a/scribo/sandbox/arthur/xml_transform/templates/html/html_generator.sh b/scribo/sandbox/arthur/xml_transform/templates/html/html_generator.sh
new file mode 100644
index 0000000..bb24305
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/templates/html/html_generator.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+xsltproc xsl.xsl output.xml > output.html
\ No newline at end of file
diff --git a/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl b/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
new file mode 100644
index 0000000..3d6a1c5
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
@@ -0,0 +1,224 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:template match="/"> <!-- "/" means the whole document (root) -->
+ <html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>SCRIBO</title>
+ <link rel="stylesheet" type="text/css" href="css.css" />
+ </head>
+ <body>
+
+ <xsl:for-each select="pcGts/page/graphic_region|
+ pcGts/page/image_region|
+ pcGts/page/chart_region|
+ pcGts/page/table_region|
+ pcGts/page/separator_region|
+ pcGts/page/text_region|
+ pcGts/page/text_region/paragraph|
+ pcGts/page/text_region/paragraph/line">
+
+ <!-- Regions Coordinates -->
+
+ <!-- y1 -->
+ <xsl:variable name="y1">
+ <xsl:for-each select="coords/point">
+ <xsl:sort select="@y" order="ascending" data-type="number"/>
+ <xsl:if test="position() = 1">
+ <xsl:value-of select="@y" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <!-- x2 -->
+ <xsl:variable name="x2">
+ <xsl:for-each select="coords/point">
+ <xsl:sort select="@x" order="descending" data-type="number"/>
+ <xsl:if test="position() = 1">
+ <xsl:value-of select="@x" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <!-- y2 -->
+ <xsl:variable name="y2">
+ <xsl:for-each select="coords/point">
+ <xsl:sort select="@y" order="descending" data-type="number"/>
+ <xsl:if test="position() = 1">
+ <xsl:value-of select="@y" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <!-- x1 -->
+ <xsl:variable name="x1">
+ <xsl:for-each select="coords/point">
+ <xsl:sort select="@x" order="ascending" data-type="number"/>
+ <xsl:if test="position() = 1">
+ <xsl:value-of select="@x" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <!-- END OF Regions Coordinates -->
+
+ <!-- TEXT LINE-->
+ <xsl:if test="name() = 'line'">
+
+ <xsl:variable name="colour">
+ <xsl:choose>
+ <xsl:when test="../../@txt_colour != ''">
+ <xsl:value-of select="../../@txt_colour" />
+ </xsl:when>
+ <xsl:otherwise>
+ Black
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- x_height -->
+ <xsl:variable name="x_height">
+ <xsl:value-of select="../../@x_height" />
+ </xsl:variable>
+
+ <!-- a_height -->
+ <xsl:variable name="a_height">
+ <xsl:value-of select="../../@a_height" />
+ </xsl:variable>
+
+ <!-- ABS(d_height) -->
+ <xsl:variable name="d_height_abs">
+ <xsl:choose>
+ <xsl:when test="../../@d_height < 0">
+ <xsl:value-of select="-../../@d_height" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="../../@d_height" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- a_height computed, i.e>
+ if (A - X < |D|)
+ A = X + |D|
+ -->
+ <xsl:variable name="a">
+ <xsl:choose>
+ <xsl:when test="($a_height - $x_height) < $d_height_abs">
+ <xsl:value-of select="$x_height + $d_height_abs" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$a_height" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- d_height computed, i.e>
+ if (A - A > |D|)
+ |D| = A - X
+ -->
+ <xsl:variable name="d">
+ <xsl:choose>
+ <xsl:when test="($a_height - $x_height) > $d_height_abs">
+ <xsl:value-of select="$a_height - $x_height" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$d_height_abs" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <div class="line" onmouseover="this.style.opacity=0.2;this.filters.alpha.opacity=20"
+ onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100">
+ <xsl:attribute name="style">
+ opacity:1;
+ height:auto;
+ font-size:<xsl:value-of select="$a+$d" />px;
+ width:<xsl:value-of select="$x2 - $x1" />px;
+ left:<xsl:value-of select="$x1 " />px;
+ top:<xsl:value-of select="$y1 " />px;
+ color:<xsl:value-of select="$colour" />;
+ </xsl:attribute>
+ <xsl:value-of select="@text"/>
+ </div>
+ </xsl:if>
+ <!-- ENF OF TEXT LINE -->
+
+ <!-- TEXT REGION -->
+ <xsl:if test="name() = 'text_region'">
+ <div class="region">
+ <xsl:attribute name="style">
+ height:<xsl:value-of select="$y2 - $y1" />px;
+ width:<xsl:value-of select="$x2 - $x1" />px;
+ left:<xsl:value-of select="$x1" />px;
+ top:<xsl:value-of select="$y1" />px;
+ </xsl:attribute>
+ </div>
+ </xsl:if>
+ <!-- ENF OF TEXT REGION -->
+
+ <!-- PARAGRAPH -->
+ <xsl:if test="name() = 'paragraph'">
+ <div class="para">
+ <xsl:attribute name="style">
+ height:<xsl:value-of select="$y2 - $y1" />px;
+ width:<xsl:value-of select="$x2 - $x1" />px;
+ left:<xsl:value-of select="$x1" />px;
+ top:<xsl:value-of select="$y1" />px;
+ </xsl:attribute>
+ </div>
+ </xsl:if>
+ <!-- ENF OF PARAGRAPH -->
+
+ <!-- NON-TEXT REGIONS -->
+ <xsl:if test="name() = 'image_region' or name() = 'separator_region' or name() = 'graphic_region' or name() = 'chart_region' or name() = 'table_region'">
+
+ <!-- id -->
+ <xsl:variable name="id">
+ <xsl:value-of select="@id" />
+ </xsl:variable>
+
+ <!-- depth -->
+ <xsl:variable name="depth">
+ <xsl:choose>
+ <xsl:when test="name() = 'separator_region'">
+ 1
+ </xsl:when>
+ <xsl:otherwise>
+ 4
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <div class="image">
+ <xsl:attribute name="style">
+ top:<xsl:value-of select="$y1" />px;
+ left:<xsl:value-of select="$x1" />px;
+ width:<xsl:value-of select="$x2 - $x1"/>px;
+ height:<xsl:value-of select="$y2 - $y1"/>px;
+ z-index:<xsl:value-of select="$depth"/>;
+ </xsl:attribute>
+ <img>
+ <xsl:attribute name="alt">
+ <xsl:value-of select="name()" />
+ </xsl:attribute>
+ <xsl:attribute name="width">
+ <xsl:value-of select="$x2 - $x1" />
+ </xsl:attribute>
+ <xsl:attribute name="height">
+ <xsl:value-of select="$y2 - $y1" />
+ </xsl:attribute>
+ <xsl:attribute name="src">
+ img/<xsl:value-of select="$id"/>.png</xsl:attribute>
+ </img>
+ </div>
+
+ </xsl:if>
+ <!-- END NON-TEXT REGIONS -->
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/scribo/sandbox/arthur/xml_transform/templates/pdf/line.xsl b/scribo/sandbox/arthur/xml_transform/templates/pdf/line.xsl
new file mode 100644
index 0000000..b143502
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/templates/pdf/line.xsl
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+
+ <!-- FILE: line.xsl
+ DESCRIPTION: match all pcGts/page/text_region/paragraph/line in order to display the "text" attributes
+ -->
+
+ <xsl:template match="pcGts/page/text_region/paragraph/line">
+
+ <!-- x_height -->
+ <xsl:variable name="x_height">
+ <xsl:value-of select="../../@x_height" />
+ </xsl:variable>
+
+ <!-- a_height -->
+ <xsl:variable name="a_height">
+ <xsl:value-of select="../../@a_height" />
+ </xsl:variable>
+
+
+ <!-- ABS(d_height) -->
+ <xsl:variable name="d_height_abs">
+ <xsl:choose>
+ <xsl:when test="../../@d_height < 0">
+ <xsl:value-of select="-../../@d_height" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="../../@d_height" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- a_height computed, i.e>
+ if (A - X < |D|)
+ A = X + |D|
+ -->
+ <xsl:variable name="a">
+ <xsl:choose>
+ <xsl:when test="($a_height - $x_height) < $d_height_abs">
+ <xsl:value-of select="$x_height + $d_height_abs" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$a_height" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- d_height computed, i.e>
+ if (A - A > |D|)
+ |D| = A - X
+ -->
+ <xsl:variable name="d">
+ <xsl:choose>
+ <xsl:when test="($a_height - $x_height) > $d_height_abs">
+ <xsl:value-of select="$a_height - $x_height" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$d_height_abs" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Text lines coordinates -->
+ <xsl:variable name="y1">
+ <xsl:for-each select="coords/point">
+ <xsl:sort select="@y" order="ascending" data-type="number"/>
+ <xsl:if test="position() = 1">
+ <xsl:value-of select="@y" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="x1">
+ <xsl:for-each select="coords/point">
+ <xsl:sort select="@x" order="ascending" data-type="number"/>
+ <xsl:if test="position() = 1">
+ <xsl:value-of select="@x" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <!-- END OF lines coordinates -->
+
+ <!-- WTF !?, Necessary to do a lower-case ! -->
+ <xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
+ <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
+
+ <!-- Text Colour -->
+ <xsl:variable name="colour">
+ <xsl:choose>
+ <xsl:when test="../../@txt_colour != ''">
+ <xsl:value-of select="translate(../../@txt_colour, $smallcase, $uppercase)" />
+ </xsl:when>
+ <xsl:otherwise>
+ black
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+
+ <fo:block-container position="absolute">
+
+ <xsl:attribute name="left">
+ <xsl:value-of select="$x1" />px
+ </xsl:attribute>
+ <xsl:attribute name="top">
+ <xsl:value-of select="$y1" />px
+ </xsl:attribute>
+
+ <xsl:attribute name="color">
+ <xsl:value-of select="$colour" />
+ </xsl:attribute>
+
+ <!-- if necessary, put letter-spacing="-Npt" ~ -3 <= N <= -1
+ in fo:block-->
+
+ <fo:block font-family="Times">
+
+ <xsl:attribute name="font-size">
+ <xsl:value-of select="$a + $d" />px
+ </xsl:attribute>
+
+ <xsl:value-of select="@text"/>
+ </fo:block>
+
+ </fo:block-container>
+
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/scribo/sandbox/arthur/xml_transform/templates/pdf/main.xsl b/scribo/sandbox/arthur/xml_transform/templates/pdf/main.xsl
new file mode 100644
index 0000000..065831e
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/templates/pdf/main.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+
+ <!-- FILE: main.xsl
+ DESCRIPTION: produce pdf output -->
+
+ <xsl:import href="line.xsl"/>
+
+ <xsl:template match="/">
+ <fo:root>
+
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page" margin-left="0cm" margin-right="0cm" margin-bottom="0cm" margin-top="0cm">
+
+ <!-- Output will be sized with image size -->
+ <xsl:attribute name="page-width">
+ <xsl:value-of select="pcGts/page/@image_width" />px
+ </xsl:attribute>
+ <xsl:attribute name="page-height">
+ <xsl:value-of select="pcGts/page/@image_height" />px
+ </xsl:attribute>
+
+ <fo:region-body
+ margin-top="0mm" margin-bottom="0mm"
+ margin-left="0mm" margin-right="0mm"/>
+ <fo:region-after extent="0mm"/>
+
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+
+ <fo:flow flow-name="xsl-region-body">
+
+ <xsl:apply-imports />
+
+ <fo:block-container position="absolute" z-index="-3">
+
+ <xsl:attribute name="left">
+ 0px
+ </xsl:attribute>
+ <xsl:attribute name="top">
+ 0px
+ </xsl:attribute>
+
+ <fo:block>
+ <fo:external-graphic>
+ <xsl:attribute name="src">
+ url('img/image.png')
+ </xsl:attribute>
+ </fo:external-graphic>
+ </fo:block>
+
+ </fo:block-container>
+
+ </fo:flow>
+
+ </fo:page-sequence>
+ </fo:root>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/scribo/sandbox/arthur/xml_transform/templates/pdf/main_crop.xsl b/scribo/sandbox/arthur/xml_transform/templates/pdf/main_crop.xsl
new file mode 100644
index 0000000..0dbb673
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/templates/pdf/main_crop.xsl
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+
+ <!-- FILE: main.xsl
+ DESCRIPTION: produce pdf output -->
+
+ <xsl:import href="regions.xsl"/>
+ <xsl:import href="line.xsl"/>
+
+ <xsl:template match="/">
+ <fo:root>
+
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page" margin-left="0cm" margin-right="0cm" margin-bottom="0cm" margin-top="0cm">
+
+ <!-- Output will be sized with image size -->
+ <xsl:attribute name="page-width">
+ <xsl:value-of select="pcGts/page/@image_width" />px
+ </xsl:attribute>
+ <xsl:attribute name="page-height">
+ <xsl:value-of select="pcGts/page/@image_height" />px
+ </xsl:attribute>
+
+ <fo:region-body
+ margin-top="0mm" margin-bottom="0mm"
+ margin-left="0mm" margin-right="0mm"/>
+ <fo:region-after extent="0mm"/>
+
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+
+ <fo:flow flow-name="xsl-region-body">
+ <xsl:apply-imports />
+ </fo:flow>
+
+ </fo:page-sequence>
+ </fo:root>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/scribo/sandbox/arthur/xml_transform/templates/pdf/pdf_generator.sh b/scribo/sandbox/arthur/xml_transform/templates/pdf/pdf_generator.sh
new file mode 100644
index 0000000..c6339a5
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/templates/pdf/pdf_generator.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+fop -xsl main.xsl -xml output.xml -pdf output.pdf
\ No newline at end of file
diff --git a/scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl b/scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl
new file mode 100644
index 0000000..65a8c79
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+
+ <!-- FILE: regions.xsl
+ DESCRIPTION: Match all regions that are not text to display them -->
+
+ <xsl:template match="pcGts/page/image_region|
+ pcGts/page/graphic_region|
+ pcGts/page/chart_region|
+ pcGts/page/table_region|
+ pcGts/page/separator_region">
+
+ <!-- ID of the region, used to display id.png -->
+ <xsl:variable name="id">
+ <xsl:value-of select="@id" />
+ </xsl:variable>
+
+ <!-- Regions coordinates -->
+ <xsl:variable name="y1">
+ <xsl:for-each select="coords/point">
+ <xsl:sort select="@y" order="ascending" data-type="number"/>
+ <xsl:if test="position() = 1">
+ <xsl:value-of select="@y" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="x1">
+ <xsl:for-each select="coords/point">
+ <xsl:sort select="@x" order="ascending" data-type="number"/>
+ <xsl:if test="position() = 1">
+ <xsl:value-of select="@x" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <!-- END OF regions coordinates -->
+
+ <fo:block-container position="absolute">
+
+ <xsl:attribute name="left">
+ <xsl:value-of select="$x1" />px
+ </xsl:attribute>
+ <xsl:attribute name="top">
+ <xsl:value-of select="$y1" />px
+ </xsl:attribute>
+
+ <fo:block>
+ <fo:external-graphic>
+ <xsl:attribute name="src">
+ url('img/<xsl:value-of select="$id" />.png')
+ </xsl:attribute>
+ </fo:external-graphic>
+ </fo:block>
+
+ </fo:block-container>
+
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/scribo/sandbox/arthur/xml_transform/xml_transform.cc b/scribo/sandbox/arthur/xml_transform/xml_transform.cc
new file mode 100644
index 0000000..dd35aff
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/xml_transform.cc
@@ -0,0 +1,93 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+# include "image_crop.hh"
+# include "loader.hh"
+# include "xml_transform.hh"
+
+XmlTransform::XmlTransform(QString output, QString xml_file) :
+ output_dir_(output),
+ xml_file_(xml_file)
+{
+ Loader loader;
+ if (!loader.set_output(output_dir_))
+ abort();
+}
+
+XmlTransform::~XmlTransform()
+{
+}
+
+void XmlTransform::createPDF (QString img, bool crop)
+{
+ Loader loader;
+
+ QString output = output_dir_;
+ output.append("img");
+
+ if (loader.set_output(output))
+ {
+ if (loader.load_xml(xml_file_, false, output_dir_))
+ {
+
+ ImageCrop Crop;
+
+ if (crop)
+ Crop.crop_regions(xml_file_, img, output_dir_);
+ else
+ Crop.save_image(img, output_dir_);
+
+ loader.add_pdf_templates(crop, output_dir_);
+ }
+ else
+ abort();
+ }
+ else
+ abort();
+}
+
+void XmlTransform::createHTML(QString img)
+{
+ Loader loader;
+
+ QString output = output_dir_;
+ output.append("img");
+
+ if (loader.set_output(output))
+ {
+ if (loader.load_xml(xml_file_, true, output_dir_))
+ {
+ ImageCrop Crop;
+
+ Crop.crop_regions(xml_file_, img, output_dir_);
+ loader.add_html_templates(output_dir_);
+ }
+ else
+ abort();
+ }
+ else
+ abort();
+}
+
diff --git a/scribo/sandbox/arthur/xml_transform/xml_transform.hh b/scribo/sandbox/arthur/xml_transform/xml_transform.hh
new file mode 100644
index 0000000..808c108
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/xml_transform.hh
@@ -0,0 +1,48 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#ifndef XML_TRANFORM_HH
+# define XML_TRANFORM_HH
+
+# include <QtGui>
+
+class XmlTransform : public QObject
+{
+ Q_OBJECT
+ public:
+
+ XmlTransform(QString output, QString xml_file);
+ ~XmlTransform();
+
+ void createHTML(QString img);
+ void createPDF(QString img, bool crop);
+
+protected:
+ QString output_dir_;
+ QString xml_file_;
+};
+
+#endif // !XML_TRANFORM_HH
+
diff --git a/scribo/sandbox/arthur/xml_transform/xml_transform.pro b/scribo/sandbox/arthur/xml_transform/xml_transform.pro
new file mode 100644
index 0000000..161a7f4
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/xml_transform.pro
@@ -0,0 +1,20 @@
+######################################################################
+# Automatically generated by qmake (2.01a) jeu. juil. 8 16:33:27 2010
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QMAKE_CXXFLAGS += -I/amd/beyrouth/home/lrde/stage/crepin/git/olena/milena -I/amd/beyrouth/home/lrde/stage/crepin/git/olena/
+QT += xml
+LIBS += `Magick++-config --libs`
+
+# Input
+HEADERS += domitem.hh dommodel.hh image_crop.hh loader.hh xml_transform.hh
+SOURCES += domitem.cc \
+ dommodel.cc \
+ image_crop.cc \
+ loader.cc \
+ main.cc \
+ xml_transform.cc
--
1.5.6.5
1
0

06 Jul '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/next has been updated
via d8c4e9470b3f962e8a97894431e7d5abc8772f53 (commit)
via 984412efeef78be23eb0f83ce6eb50bb36031a6e (commit)
via d4ca44ab91728099a70f29b73f5eb3f83a487736 (commit)
via 2ae99ffe384a9bdf63e59305fe1a77063a7a1c22 (commit)
via e31b70169c431b1196afb6ae2b9eda6b94ec4e26 (commit)
via 9e66b0bc8e1df4154fc7a4c6834a8db7b6c3af46 (commit)
via ee180d60723b0718fa53cd7d936b8260acb93af2 (commit)
via 4d14a475db1082c1096ed71973e2daa2793e2cf1 (commit)
via fd16f7ee48f964437406d385b54ebb912e92ea25 (commit)
via 092bb0461eb91af6bca23e29bda4bdbac316d3ec (commit)
via 460f059870e591b8da8363f9905a8331352c81ff (commit)
via 1a16089f970043d54c716705e22f87cde43ce263 (commit)
via 7b2111843120f318b696b1b79bd2e900a7eeac4b (commit)
via 58e82cd9f7d25b6aafb2085c4ace86d1819b5e1f (commit)
via 218a6951a1b0d51f35faf440a0938ffc57e6fc69 (commit)
via 2290b5c217d1aff34973686b4ca20ac907b088b1 (commit)
via 3586ef11c3c314352893a9239f16679657d12d5f (commit)
via 681f2578cf36e5d15de8744b5a7dd92bfdc4fc4c (commit)
via 1307e9db8d14cfc6dff52604e561b71388e44f58 (commit)
via 71f26fd56cb0b4ce501d5b268110a7cba2580c26 (commit)
via ad5614ea5041d342b336310eb72fc632e85d92fe (commit)
via 125df33ea1757903b9ae2078ff37cda45ab1fc0c (commit)
via b9a5b97f58655d268aea57a5b3d625f8fedae6ee (commit)
via d169338813844bac2932789235e76482922b0d5e (commit)
via 241c2467d08dc42b87d25a93f2606c1d46d835d2 (commit)
via f5c0ae5a9385033e13a8f7d639f26f7c3114854e (commit)
via 7e1a2f88f9f363580adf64244448a04b2fed8588 (commit)
via 31925d2882a55285b496a5efb040875eeceee85e (commit)
via b15c1b6b4c6eb9cb7dda58a28bb93695feb7c463 (commit)
via 288d44d51e20f1d602c0b6b2f2d3cadb5cc4ba1d (commit)
via 4d87541b98ba8e496d125c80c83ad20fbfbb8fb3 (commit)
via b57d26e949bf2f7993b86a1df34d12c0e27f581d (commit)
via 17304c0d1e2e0f089a7fba4a319c85c401b78a71 (commit)
via 5179913a9ef7ad087e49b617e185ea77bef3bd4e (commit)
via 7c558b5f8ddad2675f221439e6cc05c131c41306 (commit)
via fe92959d0b991dc4af32354a5aaecebe4a2496e7 (commit)
via 5fa09b417ceab47852ce77832d504474b37911c0 (commit)
via b4195d21051065f1793d03ac2fc8473979eb3d85 (commit)
via f3987ed3d3aa9063ae36e632d59f56c0fed6ef71 (commit)
via 7570d066d5b6867ec467c65577b856552eb7959f (commit)
via b98887a266675d0408c9a5e206e01e8c05141350 (commit)
via 07b0d845a4695de07897a0550f3cf88e90bf71ba (commit)
via e9bf3efcc6957e3e0d0b37228e0060cee5315c66 (commit)
via 26fd960b08963a21dcc2b55b6618bc0fb03f1721 (commit)
via f8c67ca6812d33f6e758d02b52306be5337357ec (commit)
via 34bcc24494086059cddc9563bfc74d7d41c92062 (commit)
via 00152b7b89d4690e7e1fe0ac252096d834360917 (commit)
via 53630924d3586513a4979ad9ba76ec975a7d4d6f (commit)
via 65586d1b604614ab2072306198b2418b222901e6 (commit)
via 8adc20194128cd40b88e9d531541067d9c07f90a (commit)
via e6a836cee6c68ad1fb50e38754ac5c0a0a7c6236 (commit)
via 993461bf6f0e721d96fd483df3c461a7f37c7ea5 (commit)
via 60fefaa2e97f9a9dac00d2404fa4ce730cd171b0 (commit)
via 4b0e1fb92f24d116e8df227786eae369f1b8f615 (commit)
via 2f0e11309514214cd1be0c8c565183bd001cc1b6 (commit)
via 224e84a64d1844494f71173a154fbec87927da4b (commit)
via 81d685024b4321859625cf173903e176cbf6ecbe (commit)
via 543d805e7b099357ba92802493be73e39a71687c (commit)
via 2f5f4a438accd7aa52c3ac8d3550b70cef778c0e (commit)
via 6b6d1440369b9cb9fc31c4453723e179d91ba842 (commit)
via 55a5c879876aa4d7e2b2326f426a3e048b386044 (commit)
via 15c7c9c6fc5f10005d6965cd819f9d13dac7a8f7 (commit)
via 79001a91319044fdabf9504d8a4b745824e3e91b (commit)
via ff4fcc5ac88a15114fa027286af119fb49ae5a08 (commit)
via 033b24976414aed9461ea4cb7e60e29fe95ff5b3 (commit)
via ef48505d020f4fd2ba1e89482bf3a2e3a69d2b7c (commit)
via be8a9483d08855d6475aafbcf6d7b99b4c2e7546 (commit)
via 76ed491e0693668ef068eef740ea697eb17e9017 (commit)
via 5d3b9dacc3b50f37a4fb09dd53d45c53dcdd59c4 (commit)
via 5824c18c8dc04d028fac6a873aeaed17ae00ed07 (commit)
via d7850dbc2fb6879dceacc355cf5f37f460e09313 (commit)
via f8b5117d9ebdbb13855bdb4d4dcc1581e7bc82b1 (commit)
via 9f19274a760e12dc9b2cbe7bdf5bfc9c466af5b8 (commit)
via 5ca84d197b8742460dfda8b9435a02a79603ab0a (commit)
via d12e77e06b9cfdb409a36b3f4fb65b09327acfdb (commit)
via b3416b2f45e4e3ab0e853c2e73f1c670891e5d8d (commit)
via 3591f2a690fbd20c6caaf51283ba96505e87c0c0 (commit)
via 76dd7c37346ba9280d586e31b0ff558af2a44d90 (commit)
via 91b205927506a09d3c921c4980da3b114617775d (commit)
via 966f8d64839b0d13bdc608ef7f4c4247e984391a (commit)
via f89278cf5b12300abe45d7bf8eb464c7bdb7fba7 (commit)
via 3ca05868e71d080d12c18329019b2addbf83bec9 (commit)
via f819edfc8980df439b1920cadc3893a2f8b4eee6 (commit)
via ef51cf7f9dc8e6c3f1c064f881cc3b6b429e1c76 (commit)
via a2d98b12b61ffbd0a4e7addb440888d86d5be8d5 (commit)
via f5d28e908b41e8003fd401989b74b8c995a93192 (commit)
via ab515db441e4825dcfb9601c6ac024c614ce1e45 (commit)
via 6fb53567c35855b2ba1b61b1f9da6aba108a0471 (commit)
via c7c49e9d4611785b6c4086e7098d684fefd690b8 (commit)
via 0c7c2800580a76a371845addb361bd20498c396d (commit)
via 0832aee891ff1c8f78abf0b6f3ce22cda88a258a (commit)
via 6d82d878bff6d80604a7554a348ef8c1d06464ad (commit)
via 999e60c6f834a03d4ad636052aca1a785501f673 (commit)
via d3888a39df55beccc974bf4f556eb50e3b7057cb (commit)
via 06903f8517a4560f544ccb343f011548011fa95f (commit)
via ed6a220ec78c88954f73cee7258595b1a697a242 (commit)
via 7fd561dd32cd4d3a32aa974642da054078513355 (commit)
via 5c627b019540ecc6dbf4cb21630354289adf6f6b (commit)
via 85cda080414cc6e05d8ee49246a2171eb7f4fbae (commit)
via e8373a069ad3b882f9a927c8d318643645069c1e (commit)
via 4bf89fb72cfe41e98d7df23be2cc79bb37173c39 (commit)
via a6a8d2a44d746824876f24c53af69f83036ddaf3 (commit)
via 810f0413346986f6e7fc86f513ee1df28f142418 (commit)
via 33ffff60e3846bf4499c3eafaa2dfd37791fb4e2 (commit)
via 31216d34c0c51609cbe6921cd0d285701d583e3b (commit)
via db55e631a5d4be26186cf58f23d63c9ae8a1a88e (commit)
via 080134d6115e902c66ee0eb866008d7ad8e161f8 (commit)
via 40d518005c478e2b5640a04019fdbf84c6858d27 (commit)
via cbbdf4e015a418723730e0173ae88377ab365f1e (commit)
via ff15d075512aadb2cfa4e99d36d3fa080809822f (commit)
via 12ddb9702902e9c12be67d23fad1053e320f151e (commit)
via b8aaebae9a034fa3b39de284bd2677801bc15471 (commit)
via cbbbffd5c0c474d94fdab9e79c90e0ea92ec185c (commit)
via 99e2b8fc744f5ab029cee5c4fa8eb465750101af (commit)
via 41c82626a63b343f4d54e620c3055c1db6bf91de (commit)
via 8c069f07986676a26ea14a1daa4e623d75302cbc (commit)
via ca67a57fcb8149672ea524e5d20cab138c9147d6 (commit)
via 21af64ad3a6645b7c1e7afa3347ba545911affa1 (commit)
via 24e4f689ffc6598a646431b8344fe3c7b6c73da5 (commit)
via 04aef4bf80daa8b02650ad3b2479dfea0bfa666c (commit)
via 3b8335a122ff4d071759346847666d62c702f2b4 (commit)
via ff1e5aae555fb905fa33369c85c94b0b0108feaf (commit)
via c7cb9f3cfb759b353cb92e62c9154c0607b9faa8 (commit)
via 28453cfc46940eb2fa4e6bf993d0378a97b396a3 (commit)
via f256a61a4a6aaabab1806c9f644bfd0005c3e857 (commit)
via 464d58f97a427e842a704e17a6c50ca6a88e11f5 (commit)
via 9c5c48319714b54f41adc49d4b5417294e8b6079 (commit)
via 9d7a1cca8578a712714a94258d081b1a4e3d5d95 (commit)
via a184c8106407ea7b3ce30dc14b1d548ac93813f2 (commit)
via b826d4152097bfcb1138f05f647862c69f739769 (commit)
via 32401e08eb7edab00e58069690e7371af8346fdd (commit)
via 622c2395fcf4ecd00991ba4dfda4eddc49604ba1 (commit)
via 752d8cae10e26fae6500a073893aa6aad2c85403 (commit)
via d02047f7f328aa892cb80f57374f3c6ba6a3fdc1 (commit)
via 8d47be1577e975889b17016f2fda968d79780b57 (commit)
via 548b72e33fc2b5352a5ca511693a5ae43fd94cba (commit)
via 11701a0cb30bfb85d57a07a94e88485ebd7c0c4a (commit)
via 53a98117e4a7985a38bf6b708d99069ba17353aa (commit)
via b54300a5ba958e308a8ff9edb32f685247999e2a (commit)
via 6143a5ecb90ebfec07d7f7e4605e086f7bc61f83 (commit)
via 2c6947d729838521895b4ef091210d1f82ad66fa (commit)
via 4dad6c9aa0df1dddd07a4fa53cecc05b7287ff4a (commit)
via d10f1a65daf8af9a90af3c937226f5c4d5b4750a (commit)
via b1a4d275224ac708a9b05dae7915a27109886cc9 (commit)
via 9f724b07283be1b79455a1b1a80c87205db7415d (commit)
via 6adbc43e3b823f9eeb385911e3a47e5ec8c963e9 (commit)
via 4a19598794bc2ebec9d40f2bdd02afe17e9c4f85 (commit)
from 98eedea5d6dcf8b4bfc9dfa309b57ce5dcbfd192 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
d8c4e94 INSTALL: Update. Automagically updated by autoconf.
984412e Small fixes in milena.
d4ca44a Compilation related fixes in Scribo.
2ae99ff Add new debug routines.
e31b701 Disable some debug output.
9e66b0b Add a tool for text recognition in natural pictures.
ee180d6 Add text::look_like_text_lines.
4d14a47 Merge branch 'exp/scribo-z' into exp/next
fd16f7e Fix a few tests.
092bb04 Update generated images included in the doc.
460f059 Add from_to overloads for conversions from algebra::vec to point.
1a16089 m4/autotroll.m4: Fix invalid configuration when Qt is missing.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 24 +
INSTALL | 200 +---
configure.ac | 15 +-
m4/autotroll.m4 | 2 +
milena/ChangeLog | 114 ++
milena/doc/figures/fill-subdomain-2.ppm | Bin 206 -> 206 bytes
milena/doc/figures/fill-subdomain-3.ppm | Bin 206 -> 206 bytes
milena/doc/figures/labeling-compute-2.ppm | Bin 206 -> 206 bytes
milena/doc/figures/tuto3_colorize-2.ppm | Bin 191 -> 191 bytes
.../figures/tuto4_genericity_and_algorithms-5.ppm | Bin 12406 -> 12406 bytes
milena/headers.mk | 2 +-
milena/img/BUG_lean_ascii.pgm.gz | Bin 75726 -> 0 bytes
milena/mln/accu/count_value.hh | 26 +-
milena/mln/canvas/labeling/video.hh | 8 +-
milena/mln/convert/from_to.hxx | 14 +
milena/mln/convert/impl/from_unsigned_to_value.hh | 10 +
milena/mln/convert/to_qimage.hh | 53 +-
milena/mln/convert/to_qimage_nocopy.hh | 2 +-
milena/mln/core/alias/window2d.hh | 3 +-
milena/mln/core/concept/gpoint.hh | 2 +-
milena/mln/core/image/image1d.hh | 6 +-
milena/mln/core/point.hh | 189 ++-
milena/mln/io/magick/load.hh | 42 +-
milena/mln/io/magick/save.hh | 33 +-
milena/mln/labeling/value.hh | 16 +-
milena/mln/labeling/value_and_compute.hh | 241 ++++
milena/mln/linear/ch_convolve.hh | 9 +-
milena/sandbox/ChangeLog | 578 +++++++++
milena/sandbox/bench/fastest.cc | 351 +++++
.../green/bench/transform/distance/Makefile.am | 150 +++
.../green/bench/transform/distance/distance.cc | 775 +++++++++++
.../sandbox/green/demo/annotating/bic/Makefile.am | 150 +++
milena/sandbox/green/demo/annotating/bic/bic.cc | 87 ++
.../sandbox/green/demo/annotating/hsv/Makefile.am | 152 +++
milena/sandbox/green/demo/annotating/hsv/hsv.cc | 607 +++++++++
.../sandbox/green/demo/annotating/lep/Makefile.am | 150 +++
milena/sandbox/green/demo/annotating/lep/lep.cc | 92 ++
.../green/demo/annotating/nb_color/Makefile.am | 150 +++
.../green/demo/annotating/nb_color/nb_color.cc | 101 ++
.../green/demo/annotating/project/Makefile.am | 150 +++
.../green/demo/annotating/project/project.cc | 210 +++
.../green/demo/annotating/rgb_64/Makefile.am | 150 +++
.../sandbox/green/demo/annotating/rgb_64/rgb_64.cc | 47 +
.../green/demo/annotating/rgb_64_9/Makefile.am | 150 +++
.../green/demo/annotating/rgb_64_9/rgb_64_9.cc | 97 ++
.../green/demo/annotating/stddev_color/Makefile.am | 150 +++
.../demo/annotating/stddev_color/stddev_color.cc | 124 ++
.../demo/annotating/stddev_color_16/Makefile.am | 150 +++
.../annotating/stddev_color_16/stddev_color_16.cc | 178 +++
.../histo2d => clustering/kmean_rgb}/Makefile.am | 0
.../green/demo/clustering/kmean_rgb/kmean_rgb.cc | 91 ++
.../demo/labeling/regional_maxima/Makefile.am | 2 +
.../labeling/regional_maxima/regional_maxima.cc | 906 ++++++++++---
.../demo/labeling/regional_maxima/thresholds.txt | 42 +
milena/sandbox/green/doc/annotating/class.txt | 42 +
.../green/doc/annotating/syntheseMillet2008.txt | 283 ++++
milena/sandbox/green/doc/annotating/testMillet2008 | 69 +
.../doc/regional_maxima/cmp_method/h0_input.pgm.gz | Bin 0 -> 18078 bytes
.../doc/regional_maxima/cmp_method/h2_mean.pgm.gz | Bin 0 -> 374 bytes
.../doc/regional_maxima/cmp_method/h2_merge.pgm.gz | Bin 0 -> 4491 bytes
.../doc/regional_maxima/cmp_method/h3_mean.pgm.gz | Bin 0 -> 391 bytes
.../doc/regional_maxima/cmp_method/h3_merge.pgm.gz | Bin 0 -> 10188 bytes
.../doc/regional_maxima/cmp_method/h4_mean.pgm.gz | Bin 0 -> 367 bytes
.../doc/regional_maxima/cmp_method/h4_merge.pgm.gz | Bin 0 -> 18078 bytes
.../doc/regional_maxima/cmp_method/h5_mean.pgm.gz | Bin 0 -> 372 bytes
.../doc/regional_maxima/cmp_method/h5_merge.pgm.gz | Bin 0 -> 12777 bytes
.../doc/regional_maxima/cmp_method/i2_mean.ppm.gz | Bin 0 -> 566650 bytes
.../doc/regional_maxima/cmp_method/i2_merge.ppm.gz | Bin 0 -> 1586150 bytes
.../doc/regional_maxima/cmp_method/i3_mean.ppm.gz | Bin 0 -> 573407 bytes
.../doc/regional_maxima/cmp_method/i3_merge.ppm.gz | Bin 0 -> 3050979 bytes
.../doc/regional_maxima/cmp_method/i4_mean.ppm.gz | Bin 0 -> 663621 bytes
.../doc/regional_maxima/cmp_method/i4_merge.ppm.gz | Bin 0 -> 3387044 bytes
.../doc/regional_maxima/cmp_method/i5_mean.ppm.gz | Bin 0 -> 653140 bytes
.../doc/regional_maxima/cmp_method/i5_merge.ppm.gz | Bin 0 -> 3217839 bytes
.../doc/regional_maxima/cmp_method/l2_input.pgm.gz | Bin 0 -> 423612 bytes
.../doc/regional_maxima/cmp_method/l3_input.pgm.gz | Bin 0 -> 420801 bytes
.../doc/regional_maxima/cmp_method/l4_input.pgm.gz | Bin 0 -> 486206 bytes
.../doc/regional_maxima/cmp_method/l5_input.pgm.gz | Bin 0 -> 479055 bytes
.../regional_maxima/cmp_method/reponse_theo.eml | 106 ++
.../doc/regional_maxima/cmp_method/s2_histo.txt | 31 +
.../doc/regional_maxima/cmp_method/s3_histo.txt | 31 +
.../doc/regional_maxima/cmp_method/s4_histo.txt | 31 +
.../doc/regional_maxima/cmp_method/s5_histo.txt | 31 +
.../doc/regional_maxima/cmp_method/synthese.txt | 223 ++++
.../doc/regional_maxima/cmp_quant/h0_input.pgm.gz | Bin 0 -> 18078 bytes
.../regional_maxima/cmp_quant/h5_mean_q2.pgm.gz | Bin 0 -> 247 bytes
.../regional_maxima/cmp_quant/h5_mean_q3.pgm.gz | Bin 0 -> 280 bytes
.../regional_maxima/cmp_quant/h5_mean_q4.pgm.gz | Bin 0 -> 319 bytes
.../regional_maxima/cmp_quant/h5_mean_q5.pgm.gz | Bin 0 -> 375 bytes
.../regional_maxima/cmp_quant/h5_mean_q6.pgm.gz | Bin 0 -> 392 bytes
.../regional_maxima/cmp_quant/h5_mean_q7.pgm.gz | Bin 0 -> 383 bytes
.../regional_maxima/cmp_quant/h5_mean_q8.pgm.gz | Bin 0 -> 470 bytes
.../regional_maxima/cmp_quant/h5_merge_q2.pgm.gz | Bin 0 -> 18081 bytes
.../regional_maxima/cmp_quant/h5_merge_q3.pgm.gz | Bin 0 -> 18081 bytes
.../regional_maxima/cmp_quant/h5_merge_q4.pgm.gz | Bin 0 -> 16358 bytes
.../regional_maxima/cmp_quant/h5_merge_q5.pgm.gz | Bin 0 -> 12780 bytes
.../regional_maxima/cmp_quant/h5_merge_q6.pgm.gz | Bin 0 -> 9694 bytes
.../regional_maxima/cmp_quant/h5_merge_q7.pgm.gz | Bin 0 -> 6211 bytes
.../regional_maxima/cmp_quant/h5_merge_q8.pgm.gz | Bin 0 -> 1564 bytes
.../regional_maxima/cmp_quant/i5_mean_q2.ppm.gz | Bin 0 -> 112779 bytes
.../regional_maxima/cmp_quant/i5_mean_q3.ppm.gz | Bin 0 -> 191264 bytes
.../regional_maxima/cmp_quant/i5_mean_q4.ppm.gz | Bin 0 -> 298062 bytes
.../regional_maxima/cmp_quant/i5_mean_q5.ppm.gz | Bin 0 -> 653143 bytes
.../regional_maxima/cmp_quant/i5_mean_q6.ppm.gz | Bin 0 -> 807617 bytes
.../regional_maxima/cmp_quant/i5_mean_q7.ppm.gz | Bin 0 -> 813222 bytes
.../regional_maxima/cmp_quant/i5_mean_q8.ppm.gz | Bin 0 -> 861711 bytes
.../regional_maxima/cmp_quant/i5_merge_q2.ppm.gz | Bin 0 -> 3387047 bytes
.../regional_maxima/cmp_quant/i5_merge_q3.ppm.gz | Bin 0 -> 3387047 bytes
.../regional_maxima/cmp_quant/i5_merge_q4.ppm.gz | Bin 0 -> 3355365 bytes
.../regional_maxima/cmp_quant/i5_merge_q5.ppm.gz | Bin 0 -> 3217842 bytes
.../regional_maxima/cmp_quant/i5_merge_q6.ppm.gz | Bin 0 -> 3033730 bytes
.../regional_maxima/cmp_quant/i5_merge_q7.ppm.gz | Bin 0 -> 2295150 bytes
.../regional_maxima/cmp_quant/i5_merge_q8.ppm.gz | Bin 0 -> 1319396 bytes
.../regional_maxima/cmp_quant/l5_input_q2.pgm.gz | Bin 0 -> 83951 bytes
.../regional_maxima/cmp_quant/l5_input_q3.pgm.gz | Bin 0 -> 143817 bytes
.../regional_maxima/cmp_quant/l5_input_q4.pgm.gz | Bin 0 -> 220346 bytes
.../regional_maxima/cmp_quant/l5_input_q5.pgm.gz | Bin 0 -> 479058 bytes
.../regional_maxima/cmp_quant/l5_input_q6.pgm.gz | Bin 0 -> 593359 bytes
.../regional_maxima/cmp_quant/l5_input_q7.pgm.gz | Bin 0 -> 600121 bytes
.../regional_maxima/cmp_quant/l5_input_q8.pgm.gz | Bin 0 -> 630760 bytes
.../doc/regional_maxima/cmp_quant/s5_histo_q2.txt | 3 +
.../doc/regional_maxima/cmp_quant/s5_histo_q3.txt | 8 +
.../doc/regional_maxima/cmp_quant/s5_histo_q4.txt | 18 +
.../doc/regional_maxima/cmp_quant/s5_histo_q5.txt | 33 +
.../doc/regional_maxima/cmp_quant/s5_histo_q6.txt | 33 +
.../doc/regional_maxima/cmp_quant/s5_histo_q7.txt | 32 +
.../doc/regional_maxima/cmp_quant/s5_histo_q8.txt | 75 ++
.../doc/regional_maxima/cmp_quant/synthese.txt | 205 +++
.../mp00411c/colormap_all_q4.txt.gz | Bin 0 -> 187 bytes
.../mp00411c/colormap_all_q5.txt.gz | Bin 0 -> 420 bytes
.../mp00411c/colormap_thick_q4.txt.gz | Bin 0 -> 159 bytes
.../mp00411c/colormap_thick_q5.txt.gz | Bin 0 -> 352 bytes
.../mp00411c/colormap_thin_q4.txt.gz | Bin 0 -> 173 bytes
.../mp00411c/colormap_thin_q5.txt.gz | Bin 0 -> 366 bytes
.../regional_maxima/mp00411c/histo_all_q4.dump.gz | Bin 0 -> 1233 bytes
.../regional_maxima/mp00411c/histo_all_q5.dump.gz | Bin 0 -> 4779 bytes
.../mp00411c/histo_thick_q4.dump.gz | Bin 0 -> 781 bytes
.../mp00411c/histo_thick_q5.dump.gz | Bin 0 -> 2532 bytes
.../regional_maxima/mp00411c/histo_thin_q4.dump.gz | Bin 0 -> 901 bytes
.../regional_maxima/mp00411c/histo_thin_q5.dump.gz | Bin 0 -> 2976 bytes
.../doc/regional_maxima/mp00411c/iz_all_q4.dump.gz | Bin 0 -> 659040 bytes
.../doc/regional_maxima/mp00411c/iz_all_q5.dump.gz | Bin 0 -> 1505619 bytes
.../regional_maxima/mp00411c/iz_thick_q4.dump.gz | Bin 0 -> 482831 bytes
.../regional_maxima/mp00411c/iz_thick_q5.dump.gz | Bin 0 -> 1414258 bytes
.../regional_maxima/mp00411c/iz_thin_q4.dump.gz | Bin 0 -> 647722 bytes
.../regional_maxima/mp00411c/iz_thin_q5.dump.gz | Bin 0 -> 1458415 bytes
.../mp00411c/labeled_all_q4.dump.gz | Bin 0 -> 149 bytes
.../mp00411c/labeled_all_q5.dump.gz | Bin 0 -> 343 bytes
.../mp00411c/labeled_thick_q4.dump.gz | Bin 0 -> 149 bytes
.../mp00411c/labeled_thick_q5.dump.gz | Bin 0 -> 309 bytes
.../mp00411c/labeled_thin_q4.dump.gz | Bin 0 -> 149 bytes
.../mp00411c/labeled_thin_q5.dump.gz | Bin 0 -> 308 bytes
.../regional_maxima/mp00411c/mean3_all_q4.ppm.gz | Bin 0 -> 985276 bytes
.../regional_maxima/mp00411c/mean3_all_q5.ppm.gz | Bin 0 -> 1961577 bytes
.../regional_maxima/mp00411c/mean3_thick_q4.ppm.gz | Bin 0 -> 865034 bytes
.../regional_maxima/mp00411c/mean3_thick_q5.ppm.gz | Bin 0 -> 1831699 bytes
.../regional_maxima/mp00411c/mean3_thin_q4.ppm.gz | Bin 0 -> 958289 bytes
.../regional_maxima/mp00411c/mean3_thin_q5.ppm.gz | Bin 0 -> 1872271 bytes
.../regional_maxima/mp00411c/mean4_all_q4.ppm.gz | Bin 0 -> 772605 bytes
.../regional_maxima/mp00411c/mean4_all_q5.ppm.gz | Bin 0 -> 1852455 bytes
.../regional_maxima/mp00411c/mean4_thick_q4.ppm.gz | Bin 0 -> 559850 bytes
.../regional_maxima/mp00411c/mean4_thick_q5.ppm.gz | Bin 0 -> 1727247 bytes
.../regional_maxima/mp00411c/mean4_thin_q4.ppm.gz | Bin 0 -> 760428 bytes
.../regional_maxima/mp00411c/mean4_thin_q5.ppm.gz | Bin 0 -> 1781495 bytes
.../doc/regional_maxima/mp00411c/mp00411c.ppm.gz | Bin 0 -> 5316204 bytes
.../doc/regional_maxima/mp00411c/mp00411c.sh.gz | Bin 0 -> 636 bytes
.../regional_maxima/mp00411c/mp00411c_thick.pbm.gz | Bin 0 -> 190478 bytes
.../regional_maxima/mp00411c/mp00411c_thin.pbm.gz | Bin 0 -> 248730 bytes
.../regional_maxima/mp00411c/opened_all_q4.dump.gz | Bin 0 -> 1159 bytes
.../regional_maxima/mp00411c/opened_all_q5.dump.gz | Bin 0 -> 4531 bytes
.../mp00411c/opened_thick_q4.dump.gz | Bin 0 -> 747 bytes
.../mp00411c/opened_thick_q5.dump.gz | Bin 0 -> 2351 bytes
.../mp00411c/opened_thin_q4.dump.gz | Bin 0 -> 848 bytes
.../mp00411c/opened_thin_q5.dump.gz | Bin 0 -> 2772 bytes
.../regional_maxima/mp00411c/proj1_all_q4.pgm.gz | Bin 0 -> 343 bytes
.../regional_maxima/mp00411c/proj1_all_q5.pgm.gz | Bin 0 -> 779 bytes
.../regional_maxima/mp00411c/proj1_thick_q4.pgm.gz | Bin 0 -> 312 bytes
.../regional_maxima/mp00411c/proj1_thick_q5.pgm.gz | Bin 0 -> 612 bytes
.../regional_maxima/mp00411c/proj1_thin_q4.pgm.gz | Bin 0 -> 339 bytes
.../regional_maxima/mp00411c/proj1_thin_q5.pgm.gz | Bin 0 -> 718 bytes
.../regional_maxima/mp00411c/proj2_all_q4.pgm.gz | Bin 0 -> 338 bytes
.../regional_maxima/mp00411c/proj2_all_q5.pgm.gz | Bin 0 -> 750 bytes
.../regional_maxima/mp00411c/proj2_thick_q4.pgm.gz | Bin 0 -> 315 bytes
.../regional_maxima/mp00411c/proj2_thick_q5.pgm.gz | Bin 0 -> 606 bytes
.../regional_maxima/mp00411c/proj2_thin_q4.pgm.gz | Bin 0 -> 331 bytes
.../regional_maxima/mp00411c/proj2_thin_q5.pgm.gz | Bin 0 -> 693 bytes
.../regional_maxima/mp00411c/proj3_all_q4.ppm.gz | Bin 0 -> 230 bytes
.../regional_maxima/mp00411c/proj3_all_q5.ppm.gz | Bin 0 -> 401 bytes
.../regional_maxima/mp00411c/proj3_thick_q4.ppm.gz | Bin 0 -> 224 bytes
.../regional_maxima/mp00411c/proj3_thick_q5.ppm.gz | Bin 0 -> 343 bytes
.../regional_maxima/mp00411c/proj3_thin_q4.ppm.gz | Bin 0 -> 229 bytes
.../regional_maxima/mp00411c/proj3_thin_q5.ppm.gz | Bin 0 -> 359 bytes
.../regional_maxima/mp00411c/proj4_all_q4.ppm.gz | Bin 0 -> 252 bytes
.../regional_maxima/mp00411c/proj4_all_q5.ppm.gz | Bin 0 -> 447 bytes
.../regional_maxima/mp00411c/proj4_thick_q4.ppm.gz | Bin 0 -> 221 bytes
.../regional_maxima/mp00411c/proj4_thick_q5.ppm.gz | Bin 0 -> 369 bytes
.../regional_maxima/mp00411c/proj4_thin_q4.ppm.gz | Bin 0 -> 234 bytes
.../regional_maxima/mp00411c/proj4_thin_q5.ppm.gz | Bin 0 -> 415 bytes
.../doc/regional_maxima/mp00411c/quant_q4.ppm.gz | Bin 0 -> 2590062 bytes
.../doc/regional_maxima/mp00411c/quant_q5.ppm.gz | Bin 0 -> 3775184 bytes
.../regional_maxima/mp00411c/stats3_all_q4.txt.gz | Bin 0 -> 292 bytes
.../regional_maxima/mp00411c/stats3_all_q5.txt.gz | Bin 0 -> 701 bytes
.../mp00411c/stats3_thick_q4.txt.gz | Bin 0 -> 244 bytes
.../mp00411c/stats3_thick_q5.txt.gz | Bin 0 -> 584 bytes
.../regional_maxima/mp00411c/stats3_thin_q4.txt.gz | Bin 0 -> 262 bytes
.../regional_maxima/mp00411c/stats3_thin_q5.txt.gz | Bin 0 -> 606 bytes
.../regional_maxima/mp00411c/stats4_all_q4.txt.gz | Bin 0 -> 284 bytes
.../regional_maxima/mp00411c/stats4_all_q5.txt.gz | Bin 0 -> 704 bytes
.../mp00411c/stats4_thick_q4.txt.gz | Bin 0 -> 234 bytes
.../mp00411c/stats4_thick_q5.txt.gz | Bin 0 -> 580 bytes
.../regional_maxima/mp00411c/stats4_thin_q4.txt.gz | Bin 0 -> 255 bytes
.../regional_maxima/mp00411c/stats4_thin_q5.txt.gz | Bin 0 -> 591 bytes
.../doc/regional_maxima/mp00411c/synthese.txt.gz | Bin 0 -> 4062 bytes
.../green/exp/annotating/achromastism/Makefile.am | 153 +++
.../exp/annotating/achromastism/achromastism.cc | 113 ++
.../exp/annotating/achromastism/text-color.txt | 15 +
.../green/exp/annotating/achromastism/text-img.txt | 40 +
.../exp/annotating/achromastism/text-only.txt | 8 +
.../sandbox/green/exp/annotating/bench/Makefile.am | 153 +++
milena/sandbox/green/exp/annotating/bench/bench.cc | 1213 ++++++++++++++++++
.../sandbox/green/exp/annotating/error/Makefile.am | 153 +++
milena/sandbox/green/exp/annotating/error/error.cc | 700 ++++++++++
.../sandbox/green/exp/annotating/histo/Makefile.am | 153 +++
milena/sandbox/green/exp/annotating/histo/histo.cc | 306 +++++
.../sandbox/green/exp/annotating/hsv/Makefile.am | 153 +++
milena/sandbox/green/exp/annotating/hsv/hsv.cc | 652 ++++++++++
.../sandbox/green/exp/annotating/hue/Makefile.am | 153 +++
milena/sandbox/green/exp/annotating/hue/hue.cc | 291 +++++
.../green/exp/annotating/hue/text-color.txt | 15 +
.../sandbox/green/exp/annotating/hue/text-img.txt | 40 +
.../sandbox/green/exp/annotating/hue/text-only.txt | 8 +
.../green/exp/annotating/nb_color/Makefile.am | 151 +++
.../green/exp/annotating/nb_color/nb_color.cc | 131 ++
.../green/exp/annotating/saturation/Makefile.am | 153 +++
.../green/exp/annotating/saturation/saturation.cc | 119 ++
.../green/exp/annotating/saturation/text-color.txt | 15 +
.../green/exp/annotating/saturation/text-img.txt | 40 +
.../green/exp/annotating/saturation/text-only.txt | 8 +
.../green/exp/annotating/stddev_color/Makefile.am | 151 +++
.../exp/annotating/stddev_color/stddev_color.cc | 153 +++
.../exp/annotating/stddev_color_16/Makefile.am | 151 +++
.../annotating/stddev_color_16/stddev_color_16.cc | 195 +++
.../sandbox/green/exp/annotating/value/Makefile.am | 153 +++
.../green/exp/annotating/value/text-color.txt | 15 +
.../green/exp/annotating/value/text-img.txt | 40 +
.../green/exp/annotating/value/text-only.txt | 8 +
milena/sandbox/green/exp/annotating/value/value.cc | 316 +++++
.../green/exp/labeling/regional_maxima/Makefile.am | 151 +++
.../labeling/regional_maxima/regional_maxima.cc | 156 +++
milena/sandbox/green/mln/accu/stat/histo1d.hh | 66 +-
milena/sandbox/green/mln/clustering/kmean_rgb.hh | 973 ++++++++++++++
milena/sandbox/green/mln/display/display_histo.hh | 98 ++-
milena/sandbox/green/mln/display/project_histo.hh | 443 +++++++-
milena/sandbox/green/mln/fun/p2b/achromatic.hh | 112 ++
.../sandbox/green/mln/fun/p2b/component_equals.hh | 99 ++
milena/sandbox/green/mln/fun/v2v/achromatism.hh | 64 +
.../sandbox/green/mln/fun/v2v/hue_concentration.hh | 100 ++
milena/sandbox/green/mln/fun/v2v/rgb8_to_int_u8.hh | 71 +
.../green/mln/fun/v2v/rgb_to_achromatism_map.hh | 77 ++
milena/sandbox/green/mln/fun/v2v/rgb_to_hsv.hh | 149 +++
milena/sandbox/green/mln/fun/v2v/rgb_to_hue_map.hh | 96 ++
.../green/mln/fun/v2v/rgb_to_saturation_map.hh | 83 ++
.../sandbox/green/mln/fun/v2v/rgb_to_value_map.hh | 75 ++
milena/sandbox/green/mln/img_path.hh | 221 +++-
milena/sandbox/green/mln/math/ceil.hh | 64 +
milena/sandbox/green/mln/math/floor.hh | 64 +
milena/sandbox/green/mln/value/hsv.hh | 424 ++++++
.../green/tools/annotating/histo/Makefile.am | 150 +++
.../sandbox/green/tools/annotating/histo/histo.cc | 143 +++
.../sandbox/green/tools/annotating/iz/Makefile.am | 150 +++
milena/sandbox/green/tools/annotating/iz/iz.cc | 373 ++++++
.../green/tools/annotating/opening/Makefile.am | 150 +++
.../green/tools/annotating/opening/opening.cc | 111 ++
.../green/tools/annotating/regmax/Makefile.am | 150 +++
.../green/tools/annotating/regmax/regmax.cc | 328 +++++
milena/tests/convert/Makefile.am | 25 +-
milena/tests/convert/to_qimage.cc | 76 ++
milena/tests/convert/to_qimage_nocopy.cc | 56 +
milena/tests/core/other/box_runstart_piter.cc | 5 +-
milena/tests/geom/translate.cc | 5 +-
milena/tests/io/magick/save.cc | 9 +-
milena/tests/subsampling/Makefile.am | 12 +-
milena/tests/subsampling/antialiased.cc | 74 ++
milena/tests/unit_test/unit-tests.mk | 58 +-
scribo/ChangeLog | 814 ++++++++++++
scribo/Makefile.am | 5 +-
scribo/README | 51 +
scribo/binarization/internal/first_pass_functor.hh | 47 +-
scribo/binarization/local_threshold.hh | 3 -
scribo/binarization/sauvola.hh | 61 +-
scribo/binarization/sauvola_ms.hh | 207 ++--
scribo/binarization/sauvola_ms_split.hh | 38 +-
scribo/binarization/sauvola_threshold_image.hh | 240 +++-
.../binarization/sauvola_threshold_image_debug.hh | 420 ++++++
scribo/canvas/integral_browsing.hh | 13 -
scribo/convert/from_qimage.hh | 92 ++
scribo/core/all.hh | 4 +-
scribo/core/component_set.hh | 16 +
scribo/core/concept/dmax_functor.hh | 50 +
scribo/core/def/lbl_type.hh | 48 +
scribo/core/erase_objects.hh | 13 +-
scribo/core/line_info.hh | 48 +-
scribo/core/line_set.hh | 3 +
scribo/core/macros.hh | 3 +
scribo/core/object_groups.hh | 16 +-
scribo/core/object_links.hh | 49 +-
scribo/debug/char_space_image.hh | 113 ++
scribo/debug/decision_image.hh | 24 +-
scribo/debug/highlight_text_area.hh | 255 ++++
scribo/debug/line_info_image.hh | 123 ++
scribo/debug/links_decision_image.hh | 68 +-
scribo/debug/save_bboxes_image.hh | 9 +-
scribo/debug/save_linked_bboxes_image.hh | 8 +-
scribo/debug/usage.hh | 13 +-
scribo/demo/Makefile.am | 9 +-
scribo/demo/demat/demat.pro | 42 +
scribo/demo/demat/demat.qrc | 4 +
scribo/demo/{wizard => demat}/src/doc_type.hh | 0
scribo/demo/demat/src/main.cc | 31 +
scribo/demo/demat/src/main_window.cc | 266 ++++
scribo/demo/demat/src/main_window.hh | 96 ++
scribo/demo/demat/src/mln_widgets.cc | 11 +
scribo/demo/demat/src/preprocessing_task.hh | 62 +
scribo/demo/demat/src/process_args.hh | 47 +
scribo/demo/demat/src/runner.cc | 327 +++++
scribo/demo/demat/src/runner.hh | 94 ++
scribo/demo/demat/ui/main_window.ui | 381 ++++++
scribo/demo/review/src/main.cc | 13 +-
scribo/demo/review/src/mainwindow.cc | 58 +-
scribo/demo/review/src/mainwindow.hh | 2 +-
scribo/demo/shared/src/crop_item.cc | 129 ++-
scribo/demo/shared/src/crop_item.hh | 20 +-
scribo/demo/shared/src/image_viewer.cc | 116 ++-
scribo/demo/shared/src/image_viewer.hh | 19 +-
scribo/demo/shared/src/image_viewer.hxx | 31 +
.../demo/shared/src/internal/interactive_scene.cc | 11 +-
.../demo/shared/src/internal/interactive_scene.hh | 1 +
scribo/demo/shared/ui/image_viewer.ui | 20 +-
scribo/demo/tip/gui.pro | 19 +
scribo/demo/tip/gui.qrc | 9 +
scribo/demo/tip/icons/next.png | Bin 0 -> 3337 bytes
scribo/demo/tip/icons/ok.png | Bin 0 -> 3953 bytes
scribo/demo/tip/icons/photos.png | Bin 0 -> 3750 bytes
scribo/demo/tip/icons/prev.png | Bin 0 -> 3334 bytes
.../icons/remove.png} | Bin 3704 -> 3704 bytes
scribo/demo/tip/src/custom_delegate.cc | 105 ++
scribo/demo/tip/src/custom_delegate.hh | 81 ++
scribo/demo/tip/src/launch_dialog.cc | 94 ++
scribo/demo/tip/src/launch_dialog.hh | 63 +
scribo/demo/tip/src/main.cc | 46 +
scribo/demo/tip/src/main_window.cc | 526 ++++++++
scribo/demo/tip/src/main_window.hh | 119 ++
scribo/demo/tip/ui/launch_dialog.ui | 117 ++
scribo/demo/tip/ui/main_window.ui | 656 ++++++++++
scribo/demo/viewer/Makefile.am | 70 +
scribo/demo/viewer/README | 33 +
scribo/demo/viewer/browser_widget.cc | 78 ++
scribo/demo/viewer/browser_widget.hh | 42 +
scribo/demo/viewer/common.hh | 38 +
scribo/demo/viewer/domitem.cc | 98 ++
scribo/demo/viewer/domitem.hh | 75 ++
scribo/demo/viewer/dommodel.cc | 198 +++
scribo/demo/viewer/dommodel.hh | 85 ++
scribo/demo/viewer/help_dialog.cc | 55 +
scribo/demo/viewer/help_dialog.hh | 32 +
scribo/demo/viewer/image_region.cc | 139 ++
scribo/demo/viewer/image_region.hh | 76 ++
scribo/demo/viewer/image_region.hxx | 100 ++
scribo/demo/viewer/image_scene.cc | 90 ++
scribo/demo/viewer/image_scene.hh | 44 +
scribo/demo/viewer/image_view.cc | 78 ++
scribo/demo/viewer/image_view.hh | 40 +
scribo/demo/viewer/image_widget.cc | 48 +
scribo/demo/viewer/image_widget.hh | 41 +
scribo/demo/viewer/key_widget.cc | 90 ++
scribo/demo/viewer/key_widget.hh | 45 +
scribo/demo/viewer/main.cc | 37 +
scribo/demo/viewer/property_widget.cc | 73 ++
scribo/demo/viewer/property_widget.hh | 41 +
scribo/demo/viewer/step_widget.cc | 122 ++
scribo/demo/viewer/step_widget.hh | 57 +
scribo/demo/viewer/viewer.cc | 504 ++++++++
scribo/demo/viewer/viewer.hh | 88 ++
scribo/demo/viewer/viewer.hxx | 31 +
scribo/demo/viewer/xml_widget.cc | 53 +
scribo/demo/viewer/xml_widget.hh | 41 +
scribo/demo/wizard/src/crop_widget.cc | 2 +-
scribo/demo/wizard/src/load_page.cc | 1 +
scribo/demo/wizard/src/main.cc | 13 +
scribo/demo/wizard/src/main_window.cc | 31 +-
scribo/demo/wizard/src/main_window.hh | 2 +
scribo/demo/wizard/src/preprocessing_widget.cc | 10 +-
scribo/demo/wizard/src/process_page.cc | 5 -
scribo/demo/wizard/src/result_page.cc | 43 +
scribo/demo/wizard/src/result_page.hh | 60 +
scribo/demo/wizard/src/result_widget.cc | 43 +
scribo/demo/wizard/src/result_widget.hh | 58 +
scribo/demo/wizard/src/runner.cc | 59 +-
scribo/demo/wizard/ui/preprocessing_widget.ui | 4 +-
scribo/demo/wizard/wizard.pro | 48 +-
scribo/filter/all.hh | 3 -
scribo/filter/internal/alignment_angle.hh | 156 +++
scribo/filter/internal/component_aligned.hh | 114 ++
scribo/filter/object_groups_small.hh | 5 +-
scribo/filter/object_groups_v_thickness.hh | 5 +-
scribo/filter/object_groups_with_holes.hh | 24 +-
scribo/filter/object_links_bbox_ratio.hh | 2 +-
scribo/filter/object_links_bottom_aligned.hh | 2 +-
scribo/filter/object_links_center_aligned.hh | 2 +-
scribo/filter/object_links_left_aligned.hh | 2 +-
scribo/filter/object_links_non_aligned.hh | 138 --
scribo/filter/object_links_non_aligned_simple.hh | 111 +--
scribo/filter/object_links_non_h_aligned.hh | 109 --
scribo/filter/object_links_non_v_aligned.hh | 122 --
scribo/filter/object_links_right_aligned.hh | 2 +-
scribo/filter/object_links_top_aligned.hh | 2 +-
scribo/filter/objects_large.hh | 130 +--
scribo/filter/objects_small.hh | 2 +-
scribo/fun/v2b/objects_large_filter.hh | 128 ++
scribo/io/text_boxes/save.hh | 102 ++
scribo/io/xml/save.hh | 249 ++++
scribo/io/xml/save_text_lines.hh | 154 ---
scribo/make/text.hh | 2 +-
scribo/postprocessing/fill_object_holes.hh | 408 ++++++
scribo/preprocessing/crop.hh | 84 ++
scribo/preprocessing/crop_without_localization.hh | 97 ++
scribo/preprocessing/denoise_bg.hh | 6 +-
scribo/preprocessing/deskew.hh | 437 +++++++
scribo/preprocessing/deskew_crop.hh | 187 +++
scribo/preprocessing/rotate_90.hh | 1 +
scribo/preprocessing/split_bg_fg.hh | 2 +-
scribo/preprocessing/unskew.hh | 115 --
scribo/primitive/extract/all.hh | 5 +-
scribo/primitive/extract/components.hh | 12 +-
scribo/primitive/extract/horizontal_separators.hh | 95 ++
scribo/primitive/extract/lines_discontinued.hh | 14 +-
scribo/primitive/extract/lines_h_discontinued.hh | 10 +-
scribo/primitive/extract/lines_h_pattern.hh | 79 +-
scribo/primitive/extract/lines_h_single.hh | 47 +-
scribo/primitive/extract/lines_h_thick.hh | 8 +-
scribo/primitive/extract/lines_pattern.hh | 227 +++-
scribo/primitive/extract/lines_thick.hh | 11 +-
scribo/primitive/extract/lines_v_discontinued.hh | 10 +-
scribo/primitive/extract/lines_v_pattern.hh | 39 +-
scribo/primitive/extract/lines_v_single.hh | 47 +-
scribo/primitive/extract/lines_v_thick.hh | 14 +-
scribo/primitive/extract/separators.hh | 98 ++
scribo/primitive/extract/vertical_separators.hh | 95 ++
scribo/primitive/group/apply.hh | 4 +-
scribo/primitive/group/from_double_link.hh | 4 +-
scribo/primitive/group/from_graph.hh | 1 -
scribo/primitive/group/from_single_link.hh | 8 +-
scribo/primitive/internal/all.hh | 3 -
scribo/primitive/internal/find_graph_link.hh | 1 -
scribo/primitive/internal/find_root.hh | 9 +-
scribo/primitive/internal/init_link_array.hh | 78 --
scribo/primitive/internal/rd.hh | 2 +-
scribo/primitive/link/internal/dmax_default.hh | 83 ++
.../primitive/link/internal/dmax_functor_base.hh | 100 ++
.../link/internal/dmax_width_and_height.hh | 98 ++
scribo/primitive/link/internal/dmax_width_only.hh | 95 ++
.../primitive/link/internal/link_functor_base.hh | 5 +-
.../link/internal/link_single_dmax_ratio_base.hh | 69 +-
scribo/primitive/link/merge_double_link.hh | 1 -
scribo/primitive/link/with_graph.hh | 2 -
scribo/primitive/link/with_several_graphes.hh | 6 +-
scribo/primitive/link/with_several_left_links.hh | 2 -
scribo/primitive/link/with_several_right_links.hh | 3 -
.../link/with_single_left_link_dmax_ratio.hh | 100 ++-
.../link/with_single_right_link_dmax_ratio.hh | 66 +-
scribo/primitive/remove/separators.hh | 112 ++
scribo/sandbox/ChangeLog | 9 +
scribo/sandbox/green/ChangeLog | 264 ++++
scribo/sandbox/green/README | 219 ++++
scribo/sandbox/green/README.green | 416 ++++++
scribo/sandbox/green/README.img | 124 ++
scribo/sandbox/green/README.result | 143 +++
.../green/bench/clustering/distance/Makefile.am | 153 +++
.../green/bench/clustering/distance/distance.cc | 842 ++++++++++++
.../green/demo/clustering/kmean1d/Makefile.am | 153 +++
.../green/demo/clustering/kmean1d/kmean1d.cc | 258 ++++
.../green/demo/clustering/kmean2d/Makefile.am | 153 +++
.../green/demo/clustering/kmean2d/kmean2d.cc | 278 ++++
.../green/demo/clustering/kmean3d/Makefile.am | 153 +++
.../green/demo/clustering/kmean3d/kmean3d.cc | 265 ++++
.../green/demo/clustering/kmean_rgb/Makefile.am | 153 +++
.../green/demo/clustering/kmean_rgb/kmean_rgb.cc | 239 ++++
.../histo1d => scribo/sandbox/green}/gaussian.sh | 0
.../histo2d => scribo/sandbox/green}/gaussian2d.sh | 0
scribo/sandbox/green/mln/accu/stat/histo1d.hh | 337 +++++
scribo/sandbox/green/mln/accu/stat/histo2d.hh | 346 +++++
scribo/sandbox/green/mln/accu/stat/histo3d_hsl.hh | 388 ++++++
scribo/sandbox/green/mln/accu/stat/histo3d_rgb.hh | 345 +++++
scribo/sandbox/green/mln/clustering/k_mean.hh | 785 ++++++++++++
scribo/sandbox/green/mln/clustering/kmean1d.hh | 1082 ++++++++++++++++
scribo/sandbox/green/mln/clustering/kmean2d.hh | 1344 +++++++++++++++++++
scribo/sandbox/green/mln/clustering/kmean3d.hh | 1345 ++++++++++++++++++++
scribo/sandbox/green/mln/clustering/kmean_rgb.hh | 1042 +++++++++++++++
scribo/sandbox/green/mln/display/display_histo.hh | 180 +++
scribo/sandbox/green/mln/display/project_histo.hh | 536 ++++++++
scribo/sandbox/green/mln/fun/p2b/achromatic.hh | 112 ++
.../sandbox/green/mln/fun/p2b/component_equals.hh | 99 ++
scribo/sandbox/green/mln/fun/v2v/achromatism.hh | 64 +
.../sandbox/green/mln/fun/v2v/hue_concentration.hh | 100 ++
.../green/mln/fun/v2v/int_u16_to_int_u14.hh | 0
.../sandbox/green/mln/fun/v2v/log.hh | 0
scribo/sandbox/green/mln/fun/v2v/rg_to_rgb.hh | 119 ++
scribo/sandbox/green/mln/fun/v2v/rgb8_to_int_u8.hh | 71 +
scribo/sandbox/green/mln/fun/v2v/rgb8_to_rgbn.hh | 119 ++
.../green/mln/fun/v2v/rgb_to_achromatism_map.hh | 77 ++
scribo/sandbox/green/mln/fun/v2v/rgb_to_hsv.hh | 149 +++
scribo/sandbox/green/mln/fun/v2v/rgb_to_hue_map.hh | 96 ++
scribo/sandbox/green/mln/fun/v2v/rgb_to_rg.hh | 109 ++
.../green/mln/fun/v2v/rgb_to_saturation_map.hh | 83 ++
.../sandbox/green/mln/fun/v2v/rgb_to_value_map.hh | 75 ++
scribo/sandbox/green/mln/img_path.hh | 239 ++++
scribo/sandbox/green/mln/io/plot/save_image_sh.hh | 1090 ++++++++++++++++
scribo/sandbox/green/mln/math/ceil.hh | 64 +
scribo/sandbox/green/mln/math/floor.hh | 64 +
scribo/sandbox/green/mln/value/hsv.hh | 424 ++++++
scribo/sandbox/green/mln/value/rg.hh | 175 +++
scribo/sandbox/green/ok/mln/accu/histo/histo1d.hh | 334 +++++
.../sandbox/green/ok/mln/accu/histo}/histo2d.hh | 0
.../sandbox/green/ok/mln/accu/histo/histo3d.hh | 0
scribo/sandbox/green/ok/mln/img_path.hh | 239 ++++
.../sandbox/green/ok/test/accu/histo}/gaussian.sh | 0
scribo/sandbox/green/ok/test/accu/histo/histo1d | Bin 0 -> 802920 bytes
scribo/sandbox/green/ok/test/accu/histo/histo1d.cc | 726 +++++++++++
scribo/sandbox/green/test_labelling.cc | 336 +++++
scribo/sandbox/green/test_labelling_2.cc | 342 +++++
scribo/sandbox/green/test_labelling_3.cc | 463 +++++++
.../green/tests/accu/stat/histo1d/Makefile.am | 153 +++
.../green/tests/accu/stat/histo1d/histo1d.cc | 507 ++++++++
.../green/tests/accu/stat/histo3d_hsl/Makefile.am | 153 +++
.../tests/accu/stat/histo3d_hsl/histo3d_hsl.cc | 391 ++++++
.../green/tests/accu/stat/histo3d_rgb/Makefile.am | 153 +++
.../tests/accu/stat/histo3d_rgb/histo3d_rgb.cc | 397 ++++++
.../green/tests/clustering/k_mean/Makefile.am | 153 +++
.../green/tests/clustering/k_mean/k_mean.cc | 547 ++++++++
.../green/tests/clustering/kmean1d/Makefile.am | 0
.../green/tests/clustering/kmean1d/kmean1d.cc | 0
.../green/tests/io/plot/save_image_sh/Makefile.am | 153 +++
.../tests/io/plot/save_image_sh/save_image_sh.cc | 774 +++++++++++
.../green/use/accu/stat/histo1d/Makefile.am | 153 +++
.../sandbox/green/use/accu/stat/histo1d/histo1d.cc | 49 +
.../green/use/accu/stat/histo2d/Makefile.am | 153 +++
.../sandbox/green/use/accu/stat/histo2d/histo2d.cc | 58 +
.../green/use/accu/stat/histo3d_hsl/Makefile.am | 153 +++
.../green/use/accu/stat/histo3d_hsl/histo3d_hsl.cc | 59 +
.../green/use/accu/stat/histo3d_rgb/Makefile.am | 153 +++
.../green/use/accu/stat/histo3d_rgb/histo3d_rgb.cc | 57 +
.../green/use/clustering/k_mean/Makefile.am | 153 +++
.../sandbox/green/use/clustering/k_mean/k_mean.cc | 55 +
.../green/use/clustering/kmean1d/Makefile.am | 153 +++
.../green/use/clustering/kmean1d/kmean1d.cc | 50 +
.../green/use/clustering/kmean2d/Makefile.am | 153 +++
.../green/use/clustering/kmean2d/kmean2d.cc | 61 +
.../green/use/clustering/kmean3d/Makefile.am | 153 +++
.../green/use/clustering/kmean3d/kmean3d.cc | 63 +
.../green/use/clustering/kmean_rgb/Makefile.am | 153 +++
.../green/use/clustering/kmean_rgb/kmean_rgb.cc | 63 +
.../green/use/fun/v2v/rg_to_rgb/Makefile.am | 153 +++
.../green/use/fun/v2v/rg_to_rgb/rg_to_rgb.cc | 68 +
.../green/use/fun/v2v/rgb8_to_rgbn/Makefile.am | 153 +++
.../green/use/fun/v2v/rgb8_to_rgbn/rgb8_to_rgbn.cc | 57 +
.../green/use/fun/v2v/rgb_to_rg/Makefile.am | 153 +++
.../green/use/fun/v2v/rgb_to_rg/rgb_to_rg.cc | 58 +
.../green/use/io/plot/save_image_sh/Makefile.am | 153 +++
.../use/io/plot/save_image_sh/save_image_sh.cc | 53 +
scribo/sandbox/green/use/value/rg/Makefile.am | 153 +++
scribo/sandbox/green/use/value/rg/rg.cc | 58 +
scribo/sandbox/z/white_spaces/hom_sep.cc | 133 ++
.../sandbox/z/white_spaces/white_space_closing.cc | 123 ++
scribo/sandbox/z/white_spaces/white_spaces.cc | 842 ++++++++++++
scribo/src/Makefile.am | 99 +-
scribo/src/README | 13 +
scribo/src/afp/link.hh | 13 +-
scribo/src/afp/regroup.hh | 1 -
scribo/src/binarization/Makefile.am | 8 +-
scribo/src/binarization/fg_sauvola_ms.cc | 108 ++
.../src/binarization/pgm_global_threshold_auto.cc | 3 +-
scribo/src/binarization/pgm_sauvola.cc | 28 +-
scribo/src/binarization/pgm_sauvola_ms.cc | 54 +-
scribo/src/binarization/ppm_fg_sauvola_ms.cc | 64 +-
scribo/src/binarization/ppm_sauvola.cc | 38 +-
scribo/src/binarization/ppm_sauvola_ms.cc | 66 +-
scribo/src/binarization/ppm_sauvola_ms_split.cc | 65 +-
scribo/src/binarization/sauvola.cc | 79 ++
scribo/src/binarization/sauvola_debug.cc | 116 ++
scribo/src/binarization/sauvola_ms.cc | 398 +-----
scribo/src/binarization/sauvola_ms_debug.cc | 147 +++
scribo/src/binarization/sauvola_ms_split.cc | 123 ++
scribo/src/contest/Makefile.am | 23 +
scribo/src/contest/hdibco-2010/Makefile.am | 27 +
.../src/contest/hdibco-2010/sauvola_ms_hdibco.cc | 85 ++
scribo/src/debug/Makefile.am | 13 +-
scribo/src/debug/highlight_text_area.cc | 97 ++
.../src/debug/show_info_median_inter_characters.cc | 194 +---
scribo/src/debug/show_info_x_height.cc | 224 +---
scribo/src/debug/show_links_bbox_h_ratio.cc | 26 +-
.../show_links_left_right_links_validation.cc | 34 +-
scribo/src/multi_scale/Makefile.am | 22 -
scribo/src/multi_scale/find_lines.cc | 180 ---
scribo/src/pbm_text_in_doc.cc | 130 ++
scribo/src/postprocessing/Makefile.am | 26 +
scribo/src/postprocessing/fill_object_holes.cc | 67 +
scribo/src/preprocessing/Makefile.am | 42 +-
scribo/src/preprocessing/denoise.cc | 69 -
scribo/src/preprocessing/denoise_bg.cc | 67 +
scribo/src/preprocessing/denoise_fg.cc | 66 +
scribo/src/preprocessing/rotate_90.cc | 51 +
scribo/src/preprocessing/subsample.cc | 16 +-
scribo/src/preprocessing/to_pgm.cc | 46 +
scribo/src/text/Makefile.am | 18 +-
scribo/src/text/pbm_lines_recognition.cc | 107 ++
scribo/src/text/pbm_recognition.cc | 20 +-
scribo/src/text/recognition.cc | 101 --
scribo/src/text_in_article.cc | 331 -----
scribo/src/text_in_doc.cc | 304 -----
scribo/src/text_in_doc_ppm.cc | 322 -----
scribo/src/text_in_doc_preprocess.cc | 103 ++
scribo/src/text_in_photo.cc | 250 ----
scribo/src/text_in_photo_invert.cc | 245 ----
scribo/src/text_in_photo_pbm_fast.cc | 441 -------
scribo/src/text_in_photo_ppm.cc | 532 --------
scribo/src/text_in_photo_ppm_fast.cc | 635 ---------
scribo/src/text_in_picture.cc | 659 ++++++++++
scribo/src/text_recognition_in_picture.cc | 383 ++++++
scribo/subsampling/bilinear.hh | 114 ++
scribo/table/erase.hh | 10 +-
scribo/table/extract.hh | 3 +-
scribo/table/internal/align_lines.hh | 2 +-
scribo/table/internal/connect_lines.hh | 2 +-
scribo/table/internal/repair_lines.hh | 2 +-
scribo/tests/Makefile.am | 1 +
scribo/tests/img/text_to_group.pgm | Bin 0 -> 3053 bytes
scribo/tests/img/wildly.pbm | Bin 0 -> 2208 bytes
scribo/tests/preprocessing/Makefile.am | 10 +-
scribo/tests/preprocessing/crop.cc | 51 +
.../preprocessing/crop_without_localization.cc | 55 +
scribo/tests/preprocessing/deskew.cc | 52 +
scribo/tests/preprocessing/unskew.cc | 44 -
scribo/tests/toolchain/Makefile.am | 20 +
scribo/tests/toolchain/nepomuk/Makefile.am | 45 +
scribo/tests/toolchain/nepomuk/text_extraction.cc | 44 +
scribo/tests/unit_test/unit-tests.mk | 406 ++++++-
scribo/text/clean.hh | 65 +-
scribo/text/clean_inplace.hh | 147 +++
scribo/text/extract_lines.hh | 111 +-
scribo/text/look_like_text_lines.hh | 116 ++
scribo/text/merging.hh | 63 +-
scribo/text/recognition.hh | 102 +-
scribo/toolchain/nepomuk/text_extraction.hh | 160 +++
scribo/toolchain/text_in_doc.hh | 294 +++++
scribo/upsampling/bs2x.hh | 147 +++
scribo/upsampling/eagle.hh | 145 +++
scribo/util/all.hh | 46 -
scribo/util/text.hh | 278 ----
658 files changed, 61083 insertions(+), 7282 deletions(-)
delete mode 100644 milena/img/BUG_lean_ascii.pgm.gz
create mode 100644 milena/mln/labeling/value_and_compute.hh
create mode 100644 milena/sandbox/bench/fastest.cc
create mode 100644 milena/sandbox/green/bench/transform/distance/Makefile.am
create mode 100644 milena/sandbox/green/bench/transform/distance/distance.cc
create mode 100644 milena/sandbox/green/demo/annotating/bic/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/bic/bic.cc
create mode 100644 milena/sandbox/green/demo/annotating/hsv/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/hsv/hsv.cc
create mode 100644 milena/sandbox/green/demo/annotating/lep/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/lep/lep.cc
create mode 100644 milena/sandbox/green/demo/annotating/nb_color/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/nb_color/nb_color.cc
create mode 100644 milena/sandbox/green/demo/annotating/project/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/project/project.cc
create mode 100644 milena/sandbox/green/demo/annotating/rgb_64/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/rgb_64/rgb_64.cc
create mode 100644 milena/sandbox/green/demo/annotating/rgb_64_9/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/rgb_64_9/rgb_64_9.cc
create mode 100644 milena/sandbox/green/demo/annotating/stddev_color/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/stddev_color/stddev_color.cc
create mode 100644 milena/sandbox/green/demo/annotating/stddev_color_16/Makefile.am
create mode 100644 milena/sandbox/green/demo/annotating/stddev_color_16/stddev_color_16.cc
copy milena/sandbox/green/demo/{accu/stat/histo2d => clustering/kmean_rgb}/Makefile.am (100%)
create mode 100644 milena/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc
create mode 100644 milena/sandbox/green/demo/labeling/regional_maxima/thresholds.txt
create mode 100644 milena/sandbox/green/doc/annotating/class.txt
create mode 100644 milena/sandbox/green/doc/annotating/syntheseMillet2008.txt
create mode 100644 milena/sandbox/green/doc/annotating/testMillet2008
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h0_input.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h2_mean.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h2_merge.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h3_mean.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h3_merge.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h4_mean.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h4_merge.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h5_mean.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h5_merge.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i2_mean.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i2_merge.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i3_mean.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i3_merge.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i4_mean.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i4_merge.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i5_mean.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i5_merge.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/l2_input.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/l3_input.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/l4_input.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/l5_input.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/reponse_theo.eml
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/s2_histo.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/s3_histo.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/s4_histo.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/s5_histo.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/synthese.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h0_input.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q2.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q3.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q6.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q7.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q8.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q2.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q3.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q6.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q7.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q8.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q2.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q3.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q6.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q7.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q8.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q2.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q3.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q6.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q7.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q8.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q2.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q3.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q6.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q7.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q8.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q2.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q3.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q4.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q5.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q6.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q7.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q8.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/synthese.txt
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_all_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_all_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_thick_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_thick_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_thin_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_thin_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_all_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_all_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_thick_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_thick_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_thin_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_thin_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_all_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_all_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_thick_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_thick_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_thin_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_thin_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_all_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_all_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_thick_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_thick_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_thin_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_thin_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_all_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_all_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_thick_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_thick_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_thin_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_thin_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_all_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_all_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_thick_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_thick_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_thin_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_thin_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mp00411c.ppm.gz
create mode 100755 milena/sandbox/green/doc/regional_maxima/mp00411c/mp00411c.sh.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mp00411c_thick.pbm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mp00411c_thin.pbm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_all_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_all_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_thick_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_thick_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_thin_q4.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_thin_q5.dump.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_all_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_all_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_thick_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_thick_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_thin_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_thin_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_all_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_all_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_thick_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_thick_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_thin_q4.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_thin_q5.pgm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_all_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_all_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_thick_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_thick_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_thin_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_thin_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_all_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_all_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_thick_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_thick_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_thin_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_thin_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/quant_q4.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/quant_q5.ppm.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_all_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_all_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_thick_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_thick_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_thin_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_thin_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_all_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_all_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_thick_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_thick_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_thin_q4.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_thin_q5.txt.gz
create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/synthese.txt.gz
create mode 100644 milena/sandbox/green/exp/annotating/achromastism/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/achromastism/achromastism.cc
create mode 100644 milena/sandbox/green/exp/annotating/achromastism/text-color.txt
create mode 100644 milena/sandbox/green/exp/annotating/achromastism/text-img.txt
create mode 100644 milena/sandbox/green/exp/annotating/achromastism/text-only.txt
create mode 100644 milena/sandbox/green/exp/annotating/bench/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/bench/bench.cc
create mode 100644 milena/sandbox/green/exp/annotating/error/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/error/error.cc
create mode 100644 milena/sandbox/green/exp/annotating/histo/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/histo/histo.cc
create mode 100644 milena/sandbox/green/exp/annotating/hsv/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/hsv/hsv.cc
create mode 100644 milena/sandbox/green/exp/annotating/hue/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/hue/hue.cc
create mode 100644 milena/sandbox/green/exp/annotating/hue/text-color.txt
create mode 100644 milena/sandbox/green/exp/annotating/hue/text-img.txt
create mode 100644 milena/sandbox/green/exp/annotating/hue/text-only.txt
create mode 100644 milena/sandbox/green/exp/annotating/nb_color/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/nb_color/nb_color.cc
create mode 100644 milena/sandbox/green/exp/annotating/saturation/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/saturation/saturation.cc
create mode 100644 milena/sandbox/green/exp/annotating/saturation/text-color.txt
create mode 100644 milena/sandbox/green/exp/annotating/saturation/text-img.txt
create mode 100644 milena/sandbox/green/exp/annotating/saturation/text-only.txt
create mode 100644 milena/sandbox/green/exp/annotating/stddev_color/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/stddev_color/stddev_color.cc
create mode 100644 milena/sandbox/green/exp/annotating/stddev_color_16/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/stddev_color_16/stddev_color_16.cc
create mode 100644 milena/sandbox/green/exp/annotating/value/Makefile.am
create mode 100644 milena/sandbox/green/exp/annotating/value/text-color.txt
create mode 100644 milena/sandbox/green/exp/annotating/value/text-img.txt
create mode 100644 milena/sandbox/green/exp/annotating/value/text-only.txt
create mode 100644 milena/sandbox/green/exp/annotating/value/value.cc
create mode 100644 milena/sandbox/green/exp/labeling/regional_maxima/Makefile.am
create mode 100644 milena/sandbox/green/exp/labeling/regional_maxima/regional_maxima.cc
create mode 100644 milena/sandbox/green/mln/clustering/kmean_rgb.hh
create mode 100644 milena/sandbox/green/mln/fun/p2b/achromatic.hh
create mode 100644 milena/sandbox/green/mln/fun/p2b/component_equals.hh
create mode 100644 milena/sandbox/green/mln/fun/v2v/achromatism.hh
create mode 100644 milena/sandbox/green/mln/fun/v2v/hue_concentration.hh
create mode 100644 milena/sandbox/green/mln/fun/v2v/rgb8_to_int_u8.hh
create mode 100644 milena/sandbox/green/mln/fun/v2v/rgb_to_achromatism_map.hh
create mode 100644 milena/sandbox/green/mln/fun/v2v/rgb_to_hsv.hh
create mode 100644 milena/sandbox/green/mln/fun/v2v/rgb_to_hue_map.hh
create mode 100644 milena/sandbox/green/mln/fun/v2v/rgb_to_saturation_map.hh
create mode 100644 milena/sandbox/green/mln/fun/v2v/rgb_to_value_map.hh
create mode 100644 milena/sandbox/green/mln/math/ceil.hh
create mode 100644 milena/sandbox/green/mln/math/floor.hh
create mode 100644 milena/sandbox/green/mln/value/hsv.hh
create mode 100644 milena/sandbox/green/tools/annotating/histo/Makefile.am
create mode 100644 milena/sandbox/green/tools/annotating/histo/histo.cc
create mode 100644 milena/sandbox/green/tools/annotating/iz/Makefile.am
create mode 100644 milena/sandbox/green/tools/annotating/iz/iz.cc
create mode 100644 milena/sandbox/green/tools/annotating/opening/Makefile.am
create mode 100644 milena/sandbox/green/tools/annotating/opening/opening.cc
create mode 100644 milena/sandbox/green/tools/annotating/regmax/Makefile.am
create mode 100644 milena/sandbox/green/tools/annotating/regmax/regmax.cc
create mode 100644 milena/tests/convert/to_qimage.cc
create mode 100644 milena/tests/convert/to_qimage_nocopy.cc
create mode 100644 milena/tests/subsampling/antialiased.cc
create mode 100644 scribo/README
create mode 100644 scribo/binarization/sauvola_threshold_image_debug.hh
create mode 100644 scribo/convert/from_qimage.hh
create mode 100644 scribo/core/concept/dmax_functor.hh
create mode 100644 scribo/core/def/lbl_type.hh
create mode 100644 scribo/debug/char_space_image.hh
create mode 100644 scribo/debug/highlight_text_area.hh
create mode 100644 scribo/debug/line_info_image.hh
create mode 100644 scribo/demo/demat/demat.pro
create mode 100644 scribo/demo/demat/demat.qrc
copy scribo/demo/{wizard => demat}/src/doc_type.hh (100%)
create mode 100644 scribo/demo/demat/src/main.cc
create mode 100644 scribo/demo/demat/src/main_window.cc
create mode 100644 scribo/demo/demat/src/main_window.hh
create mode 100644 scribo/demo/demat/src/mln_widgets.cc
create mode 100644 scribo/demo/demat/src/preprocessing_task.hh
create mode 100644 scribo/demo/demat/src/process_args.hh
create mode 100644 scribo/demo/demat/src/runner.cc
create mode 100644 scribo/demo/demat/src/runner.hh
create mode 100644 scribo/demo/demat/ui/main_window.ui
create mode 100644 scribo/demo/shared/src/image_viewer.hxx
create mode 100644 scribo/demo/tip/gui.pro
create mode 100644 scribo/demo/tip/gui.qrc
create mode 100644 scribo/demo/tip/icons/next.png
create mode 100644 scribo/demo/tip/icons/ok.png
create mode 100644 scribo/demo/tip/icons/photos.png
create mode 100644 scribo/demo/tip/icons/prev.png
copy scribo/demo/{shared/icons/Symbols-Delete-icon.png => tip/icons/remove.png} (100%)
create mode 100644 scribo/demo/tip/src/custom_delegate.cc
create mode 100644 scribo/demo/tip/src/custom_delegate.hh
create mode 100644 scribo/demo/tip/src/launch_dialog.cc
create mode 100644 scribo/demo/tip/src/launch_dialog.hh
create mode 100644 scribo/demo/tip/src/main.cc
create mode 100644 scribo/demo/tip/src/main_window.cc
create mode 100644 scribo/demo/tip/src/main_window.hh
create mode 100644 scribo/demo/tip/ui/launch_dialog.ui
create mode 100644 scribo/demo/tip/ui/main_window.ui
create mode 100644 scribo/demo/viewer/Makefile.am
create mode 100644 scribo/demo/viewer/README
create mode 100644 scribo/demo/viewer/browser_widget.cc
create mode 100644 scribo/demo/viewer/browser_widget.hh
create mode 100644 scribo/demo/viewer/common.hh
create mode 100644 scribo/demo/viewer/domitem.cc
create mode 100644 scribo/demo/viewer/domitem.hh
create mode 100644 scribo/demo/viewer/dommodel.cc
create mode 100644 scribo/demo/viewer/dommodel.hh
create mode 100644 scribo/demo/viewer/help_dialog.cc
create mode 100644 scribo/demo/viewer/help_dialog.hh
create mode 100644 scribo/demo/viewer/image_region.cc
create mode 100644 scribo/demo/viewer/image_region.hh
create mode 100644 scribo/demo/viewer/image_region.hxx
create mode 100644 scribo/demo/viewer/image_scene.cc
create mode 100644 scribo/demo/viewer/image_scene.hh
create mode 100644 scribo/demo/viewer/image_view.cc
create mode 100644 scribo/demo/viewer/image_view.hh
create mode 100644 scribo/demo/viewer/image_widget.cc
create mode 100644 scribo/demo/viewer/image_widget.hh
create mode 100644 scribo/demo/viewer/key_widget.cc
create mode 100644 scribo/demo/viewer/key_widget.hh
create mode 100644 scribo/demo/viewer/main.cc
create mode 100644 scribo/demo/viewer/property_widget.cc
create mode 100644 scribo/demo/viewer/property_widget.hh
create mode 100644 scribo/demo/viewer/step_widget.cc
create mode 100644 scribo/demo/viewer/step_widget.hh
create mode 100644 scribo/demo/viewer/viewer.cc
create mode 100644 scribo/demo/viewer/viewer.hh
create mode 100644 scribo/demo/viewer/viewer.hxx
create mode 100644 scribo/demo/viewer/xml_widget.cc
create mode 100644 scribo/demo/viewer/xml_widget.hh
create mode 100644 scribo/demo/wizard/src/result_page.cc
create mode 100644 scribo/demo/wizard/src/result_page.hh
create mode 100644 scribo/demo/wizard/src/result_widget.cc
create mode 100644 scribo/demo/wizard/src/result_widget.hh
create mode 100644 scribo/filter/internal/alignment_angle.hh
create mode 100644 scribo/filter/internal/component_aligned.hh
delete mode 100644 scribo/filter/object_links_non_aligned.hh
delete mode 100644 scribo/filter/object_links_non_h_aligned.hh
delete mode 100644 scribo/filter/object_links_non_v_aligned.hh
create mode 100644 scribo/fun/v2b/objects_large_filter.hh
create mode 100644 scribo/io/text_boxes/save.hh
create mode 100644 scribo/io/xml/save.hh
delete mode 100644 scribo/io/xml/save_text_lines.hh
create mode 100644 scribo/postprocessing/fill_object_holes.hh
create mode 100644 scribo/preprocessing/crop.hh
create mode 100644 scribo/preprocessing/crop_without_localization.hh
create mode 100644 scribo/preprocessing/deskew.hh
create mode 100644 scribo/preprocessing/deskew_crop.hh
delete mode 100644 scribo/preprocessing/unskew.hh
create mode 100644 scribo/primitive/extract/horizontal_separators.hh
create mode 100644 scribo/primitive/extract/separators.hh
create mode 100644 scribo/primitive/extract/vertical_separators.hh
delete mode 100644 scribo/primitive/internal/init_link_array.hh
create mode 100644 scribo/primitive/link/internal/dmax_default.hh
create mode 100644 scribo/primitive/link/internal/dmax_functor_base.hh
create mode 100644 scribo/primitive/link/internal/dmax_width_and_height.hh
create mode 100644 scribo/primitive/link/internal/dmax_width_only.hh
create mode 100644 scribo/primitive/remove/separators.hh
create mode 100644 scribo/sandbox/ChangeLog
create mode 100644 scribo/sandbox/green/ChangeLog
create mode 100644 scribo/sandbox/green/README
create mode 100644 scribo/sandbox/green/README.green
create mode 100644 scribo/sandbox/green/README.img
create mode 100644 scribo/sandbox/green/README.result
create mode 100644 scribo/sandbox/green/bench/clustering/distance/Makefile.am
create mode 100644 scribo/sandbox/green/bench/clustering/distance/distance.cc
create mode 100644 scribo/sandbox/green/demo/clustering/kmean1d/Makefile.am
create mode 100644 scribo/sandbox/green/demo/clustering/kmean1d/kmean1d.cc
create mode 100644 scribo/sandbox/green/demo/clustering/kmean2d/Makefile.am
create mode 100644 scribo/sandbox/green/demo/clustering/kmean2d/kmean2d.cc
create mode 100644 scribo/sandbox/green/demo/clustering/kmean3d/Makefile.am
create mode 100644 scribo/sandbox/green/demo/clustering/kmean3d/kmean3d.cc
create mode 100644 scribo/sandbox/green/demo/clustering/kmean_rgb/Makefile.am
create mode 100644 scribo/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc
copy {milena/sandbox/green/tests/accu/stat/histo1d => scribo/sandbox/green}/gaussian.sh (100%)
copy {milena/sandbox/green/tests/accu/stat/histo2d => scribo/sandbox/green}/gaussian2d.sh (100%)
create mode 100644 scribo/sandbox/green/mln/accu/stat/histo1d.hh
create mode 100644 scribo/sandbox/green/mln/accu/stat/histo2d.hh
create mode 100644 scribo/sandbox/green/mln/accu/stat/histo3d_hsl.hh
create mode 100644 scribo/sandbox/green/mln/accu/stat/histo3d_rgb.hh
create mode 100644 scribo/sandbox/green/mln/clustering/k_mean.hh
create mode 100644 scribo/sandbox/green/mln/clustering/kmean1d.hh
create mode 100644 scribo/sandbox/green/mln/clustering/kmean2d.hh
create mode 100644 scribo/sandbox/green/mln/clustering/kmean3d.hh
create mode 100644 scribo/sandbox/green/mln/clustering/kmean_rgb.hh
create mode 100644 scribo/sandbox/green/mln/display/display_histo.hh
create mode 100644 scribo/sandbox/green/mln/display/project_histo.hh
create mode 100644 scribo/sandbox/green/mln/fun/p2b/achromatic.hh
create mode 100644 scribo/sandbox/green/mln/fun/p2b/component_equals.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/achromatism.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/hue_concentration.hh
copy {milena => scribo}/sandbox/green/mln/fun/v2v/int_u16_to_int_u14.hh (100%)
copy {milena => scribo}/sandbox/green/mln/fun/v2v/log.hh (100%)
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rg_to_rgb.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rgb8_to_int_u8.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rgb8_to_rgbn.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rgb_to_achromatism_map.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rgb_to_hsv.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rgb_to_hue_map.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rgb_to_rg.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rgb_to_saturation_map.hh
create mode 100644 scribo/sandbox/green/mln/fun/v2v/rgb_to_value_map.hh
create mode 100644 scribo/sandbox/green/mln/img_path.hh
create mode 100644 scribo/sandbox/green/mln/io/plot/save_image_sh.hh
create mode 100644 scribo/sandbox/green/mln/math/ceil.hh
create mode 100644 scribo/sandbox/green/mln/math/floor.hh
create mode 100644 scribo/sandbox/green/mln/value/hsv.hh
create mode 100644 scribo/sandbox/green/mln/value/rg.hh
create mode 100644 scribo/sandbox/green/ok/mln/accu/histo/histo1d.hh
copy {milena/sandbox/green/mln/accu/stat => scribo/sandbox/green/ok/mln/accu/histo}/histo2d.hh (100%)
copy milena/sandbox/green/mln/accu/stat/histo3d_rgb.hh => scribo/sandbox/green/ok/mln/accu/histo/histo3d.hh (100%)
create mode 100644 scribo/sandbox/green/ok/mln/img_path.hh
copy {milena/sandbox/green/tests/accu/stat/histo1d => scribo/sandbox/green/ok/test/accu/histo}/gaussian.sh (100%)
create mode 100755 scribo/sandbox/green/ok/test/accu/histo/histo1d
create mode 100644 scribo/sandbox/green/ok/test/accu/histo/histo1d.cc
create mode 100644 scribo/sandbox/green/test_labelling.cc
create mode 100644 scribo/sandbox/green/test_labelling_2.cc
create mode 100644 scribo/sandbox/green/test_labelling_3.cc
create mode 100644 scribo/sandbox/green/tests/accu/stat/histo1d/Makefile.am
create mode 100644 scribo/sandbox/green/tests/accu/stat/histo1d/histo1d.cc
create mode 100644 scribo/sandbox/green/tests/accu/stat/histo3d_hsl/Makefile.am
create mode 100644 scribo/sandbox/green/tests/accu/stat/histo3d_hsl/histo3d_hsl.cc
create mode 100644 scribo/sandbox/green/tests/accu/stat/histo3d_rgb/Makefile.am
create mode 100644 scribo/sandbox/green/tests/accu/stat/histo3d_rgb/histo3d_rgb.cc
create mode 100644 scribo/sandbox/green/tests/clustering/k_mean/Makefile.am
create mode 100644 scribo/sandbox/green/tests/clustering/k_mean/k_mean.cc
copy {milena => scribo}/sandbox/green/tests/clustering/kmean1d/Makefile.am (100%)
copy {milena => scribo}/sandbox/green/tests/clustering/kmean1d/kmean1d.cc (100%)
create mode 100644 scribo/sandbox/green/tests/io/plot/save_image_sh/Makefile.am
create mode 100644 scribo/sandbox/green/tests/io/plot/save_image_sh/save_image_sh.cc
create mode 100644 scribo/sandbox/green/use/accu/stat/histo1d/Makefile.am
create mode 100644 scribo/sandbox/green/use/accu/stat/histo1d/histo1d.cc
create mode 100644 scribo/sandbox/green/use/accu/stat/histo2d/Makefile.am
create mode 100644 scribo/sandbox/green/use/accu/stat/histo2d/histo2d.cc
create mode 100644 scribo/sandbox/green/use/accu/stat/histo3d_hsl/Makefile.am
create mode 100644 scribo/sandbox/green/use/accu/stat/histo3d_hsl/histo3d_hsl.cc
create mode 100644 scribo/sandbox/green/use/accu/stat/histo3d_rgb/Makefile.am
create mode 100644 scribo/sandbox/green/use/accu/stat/histo3d_rgb/histo3d_rgb.cc
create mode 100644 scribo/sandbox/green/use/clustering/k_mean/Makefile.am
create mode 100644 scribo/sandbox/green/use/clustering/k_mean/k_mean.cc
create mode 100644 scribo/sandbox/green/use/clustering/kmean1d/Makefile.am
create mode 100644 scribo/sandbox/green/use/clustering/kmean1d/kmean1d.cc
create mode 100644 scribo/sandbox/green/use/clustering/kmean2d/Makefile.am
create mode 100644 scribo/sandbox/green/use/clustering/kmean2d/kmean2d.cc
create mode 100644 scribo/sandbox/green/use/clustering/kmean3d/Makefile.am
create mode 100644 scribo/sandbox/green/use/clustering/kmean3d/kmean3d.cc
create mode 100644 scribo/sandbox/green/use/clustering/kmean_rgb/Makefile.am
create mode 100644 scribo/sandbox/green/use/clustering/kmean_rgb/kmean_rgb.cc
create mode 100644 scribo/sandbox/green/use/fun/v2v/rg_to_rgb/Makefile.am
create mode 100644 scribo/sandbox/green/use/fun/v2v/rg_to_rgb/rg_to_rgb.cc
create mode 100644 scribo/sandbox/green/use/fun/v2v/rgb8_to_rgbn/Makefile.am
create mode 100644 scribo/sandbox/green/use/fun/v2v/rgb8_to_rgbn/rgb8_to_rgbn.cc
create mode 100644 scribo/sandbox/green/use/fun/v2v/rgb_to_rg/Makefile.am
create mode 100644 scribo/sandbox/green/use/fun/v2v/rgb_to_rg/rgb_to_rg.cc
create mode 100644 scribo/sandbox/green/use/io/plot/save_image_sh/Makefile.am
create mode 100644 scribo/sandbox/green/use/io/plot/save_image_sh/save_image_sh.cc
create mode 100644 scribo/sandbox/green/use/value/rg/Makefile.am
create mode 100644 scribo/sandbox/green/use/value/rg/rg.cc
create mode 100644 scribo/sandbox/z/white_spaces/hom_sep.cc
create mode 100644 scribo/sandbox/z/white_spaces/white_space_closing.cc
create mode 100644 scribo/sandbox/z/white_spaces/white_spaces.cc
create mode 100644 scribo/src/README
create mode 100644 scribo/src/binarization/fg_sauvola_ms.cc
create mode 100644 scribo/src/binarization/sauvola.cc
create mode 100644 scribo/src/binarization/sauvola_debug.cc
create mode 100644 scribo/src/binarization/sauvola_ms_debug.cc
create mode 100644 scribo/src/binarization/sauvola_ms_split.cc
create mode 100644 scribo/src/contest/Makefile.am
create mode 100644 scribo/src/contest/hdibco-2010/Makefile.am
create mode 100644 scribo/src/contest/hdibco-2010/sauvola_ms_hdibco.cc
create mode 100644 scribo/src/debug/highlight_text_area.cc
delete mode 100644 scribo/src/multi_scale/Makefile.am
delete mode 100644 scribo/src/multi_scale/find_lines.cc
create mode 100644 scribo/src/pbm_text_in_doc.cc
create mode 100644 scribo/src/postprocessing/Makefile.am
create mode 100644 scribo/src/postprocessing/fill_object_holes.cc
delete mode 100644 scribo/src/preprocessing/denoise.cc
create mode 100644 scribo/src/preprocessing/denoise_bg.cc
create mode 100644 scribo/src/preprocessing/denoise_fg.cc
create mode 100644 scribo/src/preprocessing/rotate_90.cc
create mode 100644 scribo/src/preprocessing/to_pgm.cc
create mode 100644 scribo/src/text/pbm_lines_recognition.cc
delete mode 100644 scribo/src/text/recognition.cc
delete mode 100644 scribo/src/text_in_article.cc
delete mode 100644 scribo/src/text_in_doc.cc
delete mode 100644 scribo/src/text_in_doc_ppm.cc
create mode 100644 scribo/src/text_in_doc_preprocess.cc
delete mode 100644 scribo/src/text_in_photo.cc
delete mode 100644 scribo/src/text_in_photo_invert.cc
delete mode 100644 scribo/src/text_in_photo_pbm_fast.cc
delete mode 100644 scribo/src/text_in_photo_ppm.cc
delete mode 100644 scribo/src/text_in_photo_ppm_fast.cc
create mode 100644 scribo/src/text_in_picture.cc
create mode 100644 scribo/src/text_recognition_in_picture.cc
create mode 100644 scribo/subsampling/bilinear.hh
create mode 100644 scribo/tests/img/text_to_group.pgm
create mode 100644 scribo/tests/img/wildly.pbm
create mode 100644 scribo/tests/preprocessing/crop.cc
create mode 100644 scribo/tests/preprocessing/crop_without_localization.cc
create mode 100644 scribo/tests/preprocessing/deskew.cc
delete mode 100644 scribo/tests/preprocessing/unskew.cc
create mode 100644 scribo/tests/toolchain/Makefile.am
create mode 100644 scribo/tests/toolchain/nepomuk/Makefile.am
create mode 100644 scribo/tests/toolchain/nepomuk/text_extraction.cc
create mode 100644 scribo/text/clean_inplace.hh
create mode 100644 scribo/text/look_like_text_lines.hh
create mode 100644 scribo/toolchain/nepomuk/text_extraction.hh
create mode 100644 scribo/toolchain/text_in_doc.hh
create mode 100644 scribo/upsampling/bs2x.hh
create mode 100644 scribo/upsampling/eagle.hh
delete mode 100644 scribo/util/all.hh
delete mode 100644 scribo/util/text.hh
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
* doc/figures/ima2d-rot-2.ppm: Update generated output.
* mln/core/alias/window2d.hh: Aesthetic changes in the header.
* mln/core/point.hh: Add mln:: prefix.
* headers.mk,
* tests/unit_test/unit-tests.mk: Regen.
---
milena/ChangeLog | 13 +++++++
milena/doc/figures/ima2d-rot-2.ppm | Bin 235320 -> 235320 bytes
milena/headers.mk | 2 +-
milena/mln/core/alias/window2d.hh | 3 +-
milena/mln/core/point.hh | 40 ++++++++++++------------
milena/tests/unit_test/unit-tests.mk | 58 ++++++++++++++++++++++++++++++++-
6 files changed, 92 insertions(+), 24 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 7705ca4..877da7c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,16 @@
+2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Small fixes in milena.
+
+ * doc/figures/ima2d-rot-2.ppm: Update generated output.
+
+ * mln/core/alias/window2d.hh: Aesthetic changes in the header.
+
+ * mln/core/point.hh: Add mln:: prefix.
+
+ * headers.mk,
+ * tests/unit_test/unit-tests.mk: Regen.
+
2010-06-21 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
Fix the way to convert unsigned to float.
diff --git a/milena/doc/figures/ima2d-rot-2.ppm b/milena/doc/figures/ima2d-rot-2.ppm
index 0d7d601d1411f2354054e1c088d23958a273d363..c46713d24fdf6898ab821f6945fcab91780063de 100644
GIT binary patch
literal 235320
zcmeI5+iDy~6h-~)uNcTn@*+D1hmf~`O$az(OnyL)C)nV~MiBvjy;JIzW=7+gzEqv6
zI=gCt0%J$&KE2LfwMUARy#DF&cbng~SKI5$o9(;J+b^3xK78C>U2cB7c)HoVzq$GR
z%abRcZhz<E<Mq4k#rE@uo6C#8uftcpeEs{Mzi!@a|J`0*|Mh-zdG&7dV*B6r<EPL6
zY_D!MuP)zy3K#u!{blq0t2ZxR{_yzO&rdhuugA}xKY#r7>mxoO009U<00Izz00bZa
z0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z
z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=
z5P$##AOHafKmY;|fB*y_a7*A39}sXxK=J>sGI+%Q6$S!M2;3g*vL1!uHK$i3&dgH;
z@CXwjkWN6@qi{U%?oRT}#MHr_9_cDqz@sYIxoKkrv^}Dd=p!El@Tjqak;kb*K;9!N
z$;W|QCB1%b+KflxLHtl<lHLfk;1QKXCDkU-l1EfhZ!O^Gc^mPFN~(Pz`-yawNgDHr
zN~)3~ZrYAVR1%d`k3dr%p;EmdbzVt$)Oi4Sd=mn#c|;{qNi_)Ik;!qyMLH+Yphr|v
zjRP5vB&kpTA)w*kOA1Fs=gZ~sixFtEkEkTc!!fK)^`mW%s3hHFYE9m(M^uvR*{)^K
zIBoMDQAvuil$*I_kEkRnsT6_6Jwl~YL6U0_+kx@OmM2&1lR*0(QAt!%egb&Z=lRJ~
z+Y;!)BPuEXfovN~xvO>MQFvIn1u?J$fnGeKlBlGd1bXv`N|HF<<%aCYBPuE9fh?DN
z+krduh)S}J5LXKX`tpcMqLT6u=*}Zl$`ho{TM3Uk4*-vELZC;Fs3a=MngAY|97kNF
za{`@uL?u}t$ao}4H2n|w@ZS`YTzohIJ%04tM^uu_K>E~Vb}Bpy1ZFAm2@sej(6vWY
z5|v~`0FQ17P)SB{nm)7}{=2<<L?vO61pz#|rAQ@NWU1l0nSC@o!lT)c@Cma7@aXO&
zrjn?n1Oj+;=ux0Cd-CuJ5crk=9_<eyDrwImeACFs3Icev&&%Kum4rbN1n_9@5kI(l
zz+%N|91*<6z66gRWQR(6fCH7562PP5;P742F_EQNYOG>bJq{inr-n*8CW1%v1n}rY
zYN(_WQ0B9=>Hu%-lkw<uWKiie7i>CB0FO@R1&>a1Ih~@$$|d4)@aSw_Q0XihY&s@@
zM`yz_cog_VoKAd6Zv^n@tViL<p^~QP9G}U(xpVlucr=w1Drt%i9_<O>(M(dPq!~c_
zEFGTDy}ibxnV3*XGl1~umH-~j$An6nXVkk*c(f=ZsI&-Ezc%5~qJZGhB20Ls_I+Up
zcHyO=QfcCa7o2oE`e<o7@MtNiq(BxwA8n?^qZR2ur4_Jj@~NT~9<7MR;87r^vRvjY
zMgWgicodFUDrp_BURnu{*5!gqTE`2IidACNjVivkqLNVQ8v^vvH%R8Zrjk}8YrmE7
zC?*tCQVg}0ZNj6-M4(b6xHfIVqsTbmQ6xA#n)}9~B%u)FlD9i~FI1|(gOiJ?@SF5e
zd=~I1o?V5gXFYlGC@Bl5l!UJxoA4+p2!ls~Vb-&bi~A>lM@b%q1C>fjCD=kM;ZbS|
zsH9YacvP=%UA>c{lDb!kJ~D^^m1F=>yOr?BCIVEF4M$a*@W^ccsAPsx&n7%FTRt9{
zp~Rz7KY0kDbqE`kJZ_~#Q0ODe&Et_J%@X;yI*#$kc=M=a3{=A=JThMU;8CDzb<lAg
z2?BUz>`^#AsU&-*-dhQe>~~Hj*)zqXJhklneG`?`nM(9gmW5MES+M$TB|OTta4IPm
zS&ug1QO0efQbxGGY{H|AtHz^@aPi3ECl4W_zCfOt2bDDTlo}@bDDR%}C@<gC{GU1g
zR$ms6vhNv{vLjv{dn<i**TJLgOCCH5oOjH5(H;Rj%I;A(EUBatlxwyU9+lWIl~jT<
z9<A?rxpzraQqwBYM}^i)B^3f)r<L%i+<K{`a;!_+ghxepi%Latm$M0viY^w9isHtj
zxt~0QK$e4KdM{K`-P}~*=%dnG#iP>1r}A%gMB-6}t)fx|=y`3zqY5h>JPPEk4nwX}
zod6zH@F*OOR8k%8xmpR2>g<zBs>2<R9#(e)?}@0ShE$@Dsx6aBs)pXamGG$MGO47R
z^et_|qsp5^rOFGiu?deVuMv+bF944o{^Y@iM~!QulD<mxQT-j_QT-jHp2B$KVuz^Y
zVh!;&;gO344jzSF)OcGNA0DRN5x^rC9)&DZNnSP)bFko%m+etWUN(V8yPDN}K_zLb
zG`^RRoW05KB&Z~{Eba{w4W#JUvu_y&l{DLQ_Su^HguOxIV~GY*bnGQjLM7j=bZihF
zElG9x&%q<F9-TG_kIFl;@Q$eDOr<G<@MvMG%YPakdGcspqL7fVvhq1ezoY2b%O4z-
z9OQD5LE}zE11UQ8N{_-GHIKRF&*}6tR~UpxPIq{(4wY1+l2#jpM+zQMN%zM}_H9KP
zgh$yolN<pmsYoRy8H7h79#Kij=h4)r4I~Pe7yU+7bnK~po(T(;l&z9%3>tST8c5Nx
zBRm?<I(~3xYLlfwcodiF@?S+I*-2z?5FV8`BKnS~l&n%NgYYOi)#bksj}kn}YY-ll
z*CFMOs1&7A35mj5!*)`ZTkC5@$4<dDcog=fxv-QckNny~2948+u0?e0$VA+$GpKa`
zi^OZS{N+Ur!XvpT4IWWR6DLUpgYZbsqcAX)bmsezY6jtvtVdMRVI@^I2#*v!3Nuql
z2bJVPqH!sTaSB;d9NTJURQekB@9C$_qJb108;>lGKVJroI~5J2=-5^sh3f<Y{r$5f
zj|Sn9VXDhtYVfEZmHZlnN9DtBd&fR1>CPbM??9Z7cP@CMW1oARxZfW<YP*uW*U)Zp
zqJb10dxzcX#h_A?Kf9DMXk4XeAVtTv(r0&_!K211Nz5QT+NDwYMMIS&X%HSs>vK4~
zzDmLd;n86frC%$1bZ1a_1oagt&aaN$oVlh-@-?*Eqi7&S$KGK#f1&14I|hxb6b+>4
z*yj2iUQk4()(pa<!w@#`dhjTu)a`c~Z5o6}4Y+gk2wp3xWrOhOD1;6C(qARr8RWMl
zjoMrE0Y%3ypz5HKQ8-e^ZNG+gghT@=I`$5Gz88Z>A;5K2>d2sRm6dtNZd-KheEJ+-
zc~B{q?BRuCUUz5E2uU=MqGQJdGfIdWDs^fQ9u-S<`5Tq>sB44psC>Lj-m!>EcLwqH
zK$L*!*ll@44ekGIt!N-c$1dqnxL2T*=LdHfv^Qwnsc0ZY$FAX#tx6blY!Dt5PIZ;r
z*;Nt-oi+%Mssy|6O$Uz>D+z<948o(rk*;;Sgi5+Ih<DMmyAwquI`-^3a(u$zQA8zC
zL-RGX+m~n{MaSM@FZ^OqY55<Fz@QZdjjI$5r0Cd%^*OxVGL<lBwLy4v7_;VI&v}GF
zkp|&W^X?oy;2D)LD9Io^I*M8IzdYp;5*bJok`ve}=0|kw>ZlJ?!XV4!iw073Y#$zB
zkflN6PDKMLI(BuB!T_Mlu?118qGRXSAlLLjKs1n|V|&;*Gvpv38c5Nxb8L`ndLSSg
zNYSx9Y@8W#5D*Qd=-4?n$Td9>5Dld0*d8{{3^@ph22ynF92?}C9temAQgmz&8)t?b
z1VjTVI(Ci?a!n5eL<1>0wug-~Lk<F>ffOA(#|F8k2Lhsj6dl{c#+e}p0ntE;j-6wJ
zT+;&q(Ljoh?P250kb{6|AVtT{u|clsfq-ZrMaTBAac0OtKs1n|W9Qf)*YrR@G?1cW
zd)PQL<RBm#NYSx#Y>;buARrn@(Xl;joEdTu5Dld0*f}=HH9Zgz4W#JU9yZPlIS7ab
zQgrMb8|0cE2#5w!bZieBXNDXEL<1>0c8(2lO%DV_0~yBV0|KrHc+i;{AOHafKmY;|
zfB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<
z00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa
b0SG_<0uX=z1Rwwb2tWV=5P$##91!>)W)sP>
delta 2900
zcmZ{le@xVM7{`5{<Bn+@xL7Wki_`ftMKUp(KLV#P9ppI~{lY?;Q*qi+POQe#B+Fkr
zz%#E>f=VkLlOJb&NR2Z?YoY_xr6TT_j#iU-j*X^iUZ3aleZJrGzH<NE?)ALhpXYO*
z=lkQD563qjj&HbJ?5kXnZGn&v-0x#m!{got2gZ0ZN{{+1?sp$9_<dG)sVpSu2~(lH
z>?9}Rw8SHY!tzs`7^)J!!t%#rjGb*-Ex0W{#<Q%%s*>K0bhsdYNS1|5^DI@hHd$DY
z+8#C4oiezNDRuuvNhO1l|Ij7r*0S>->XPSP&E#zCk}gcwq+7`@Ag;>&iVf<K$>oER
ztL27tMeHIe)cU6{-#<?~27S?v@wyiFRkWq*hkk|E*Iy3GZux^!MxbB1CF~-py>~!5
zC%Z^0?7JgfF1tty_TQ6kA-iDz1G+DmHr{>UJ8)b7(OFvc(*$|x<fYN*hXjZL*&uUJ
z6g4)8B|S&ek8r9ThLNAi-pu|)u#-<`FF8-2SQ^&?4oIZTv?%PF03$#QjD`gk`pnkv
zsmYuVrNBs9uX9Bjj3S=M-pt9fAesC)_L9edoZ1-X`nli$Iiay(9!L4)D4ekXCXye;
z-puWbU^4lU?9E)54^zpHU~lGN0Zb#G$X@aWeTKuimQW1ol(9$Q8W+qYKa9PZQ%hkE
z`B?U5_Lo5>`55++=h4i7*;!6(bw9+}<R5@~-bG*=%m-ol0J8WA`Y$XN(!zVpu1d%y
zz7vH*d%#J4fW4V3s$mKFe)f_-(}xx0TJnC_tJnItmeB|WwC?XH+%Dh^5c&0>y$iH&
z+RLDqmlU=@5w*C%9BhT<#64kNNi(^|ys-@=Tip-wYVuv|6VAgbx(~a<yq5BpqHxV+
zC?S85y_r)3u#S8udo%lcp%lb{9_@%W--+gPoOJfVd$h7G%zk}<zjMuX7dBGnR1^+{
zU^DrX?9E(Z!!6|f?9H5P$F1a#vzNSsru9>pKL-A{`4PO120Z4SorI#Q_9@?Df0IhZ
zdUx%^qg);>M_Z@LcJJwHC{)>-c^${gUA|HxQOFLvY1h4qM~br!^b+p^@9-Q<Hh8Dv
zaboEN{DOQr@3$o##~Q^=Dl}E}rC>FMHYiRbj<-<1nW8KWYe}tADpSPG!f%KR6=xg#
zD)*o94rYmcbMadW<*AU<;1?C=izy56Ao=-<3k-fiagjK_2<yntP-9zZ@Ux0ni`;yy
zCqGGX32_sR-l4cubQcg?-ARhe#F{tJM>lSw;>`xz6>lYOro2`04vjrlcZjZ9mAJnO
zkAcL02)zd0Cae}aUDyJ``WAiy-c8$$tGUQyao?cCK{2Wnf1&kP3F`>=Abo8Tb!FH}
z<}6{em|c#)5&lZpV&Kn&t>Wx9JVW*f;TZ!P3D1e8m3WTq_k<S={F?BJ=-Y!GWIrbi
z80aDF6=l_Uf$Vm|n}mOWr*g$dgttW8e!K`GuLj?aIAF0n;08+kONlGA-u0bC5c>{c
zH{l8)(H7=q^y-Zj1E<jnVoD<hDD)bI;vzb`WapQ(a#ih6aa`baO6KUL1f!Itm!1&0
zE!az`+1#&Z4W8!*YrSW&|9NBY@gTZe@h{3gqh*DB#_T9Jous#WTC8cqn-m$%?Hu(m
zU4%Nd;*)yrIdQ)eZ^?I52fiF}gb#7Z5K(jjrvo)lM8d`n%mLv@vdI6S%sjA(JEw7q
W@?Sc=8A*7gv9?S8wiL_K;{O3iNgHwi
diff --git a/milena/headers.mk b/milena/headers.mk
index 110caa6..6ee6d7f 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -603,7 +603,7 @@ mln/geom/ncols.hh \
mln/geom/ninds.hh \
mln/geom/nrows.hh \
mln/geom/nsites.hh \
-mln/geom/nslis.hh \
+mln/geom/nslices.hh \
mln/geom/pmin_pmax.hh \
mln/geom/rotate.hh \
mln/geom/seeds2tiling.hh \
diff --git a/milena/mln/core/alias/window2d.hh b/milena/mln/core/alias/window2d.hh
index a5b4442..5b8fe31 100644
--- a/milena/mln/core/alias/window2d.hh
+++ b/milena/mln/core/alias/window2d.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/core/point.hh b/milena/mln/core/point.hh
index e4b37ef..1b9efc8 100644
--- a/milena/mln/core/point.hh
+++ b/milena/mln/core/point.hh
@@ -76,11 +76,11 @@ namespace mln
template <unsigned n, typename C1, typename G, typename C2>
void
- from_to_(const algebra::vec<n,C1>& from, point<G,C2>& to);
+ from_to_(const mln::algebra::vec<n,C1>& from, point<G,C2>& to);
template <unsigned n, typename C1, typename G>
void
- from_to_(const algebra::vec<n,C1>& from, point<G,C1>& to);
+ from_to_(const mln::algebra::vec<n,C1>& from, point<G,C1>& to);
} // end of namespace mln::convert::over_load
@@ -95,7 +95,7 @@ namespace mln
template <typename G, typename C>
struct vec_of_point
{
- typedef algebra::vec<G::dim, float> ret;
+ typedef mln::algebra::vec<G::dim, float> ret;
};
}
@@ -131,10 +131,10 @@ namespace mln
typedef C coord;
/// Algebra vector (vec) associated type.
- typedef algebra::vec<G::dim, float> vec;
+ typedef mln::algebra::vec<G::dim, float> vec;
/// Algebra hexagonal vector (hvec) associated type.
- typedef algebra::h_vec<G::dim, float> h_vec;
+ typedef mln::algebra::h_vec<G::dim, float> h_vec;
/// Read-only access to the \p i-th coordinate value.
/// \param[in] i The coordinate index.
@@ -159,9 +159,9 @@ namespace mln
/// Constructor from an algebra vector.
template <typename C2>
- point(const algebra::vec<dim,C2>& v);
+ point(const mln::algebra::vec<dim,C2>& v);
- point(const algebra::vec<dim,C>& v);
+ point(const mln::algebra::vec<dim,C>& v);
/// \{ Constructors with different numbers of arguments
@@ -218,10 +218,10 @@ namespace mln
static const point<G,C>& minus_infty();
/// Return the underlying vector storing the coordinates.
- algebra::vec<G::dim, C>& hook_coord_();
+ mln::algebra::vec<G::dim, C>& hook_coord_();
protected:
- algebra::vec<G::dim, C> coord_;
+ mln::algebra::vec<G::dim, C> coord_;
};
namespace internal
@@ -250,7 +250,7 @@ namespace mln
/// FIXME...
template <typename G, typename C>
- const algebra::vec<point<G,C>::dim - 1, C>& cut_(const point<G,C>& p);
+ const mln::algebra::vec<point<G,C>::dim - 1, C>& cut_(const point<G,C>& p);
template <typename C>
const util::yes& cut_(const point<grid::tick,C>& p);
@@ -293,7 +293,7 @@ namespace mln
mlc_and(mlc_is_not(C,float),
mlc_is_not(C,double)),
mlc_or(mlc_is(C2,float),
- mlc_is(C2, double)))::check_t(), v);
+ mlc_is(C2, double)))::eval(), v);
}
@@ -324,7 +324,7 @@ namespace mln
template <unsigned n, typename C1, typename G, typename C2>
inline
void
- from_to_(const algebra::vec<n,C1>& from, point<G,C2>& to)
+ from_to_(const mln::algebra::vec<n,C1>& from, point<G,C2>& to)
{
mlc_converts_to(C1, C2)::check();
enum { dim = G::dim };
@@ -346,7 +346,7 @@ namespace mln
template <unsigned n, typename C1, typename G>
inline
void
- from_to_(const algebra::vec<n,C1>& from, point<G,C1>& to)
+ from_to_(const mln::algebra::vec<n,C1>& from, point<G,C1>& to)
{
enum { dim = G::dim };
mlc_bool(G::dim == n)::check();
@@ -414,7 +414,7 @@ namespace mln
template <typename G, typename C>
template <typename C2>
inline
- point<G,C>::point(const algebra::vec<dim,C2>& v)
+ point<G,C>::point(const mln::algebra::vec<dim,C2>& v)
{
convert::over_load::from_to_(v, *this);
}
@@ -422,7 +422,7 @@ namespace mln
template <typename G, typename C>
inline
- point<G,C>::point(const algebra::vec<dim,C>& v)
+ point<G,C>::point(const mln::algebra::vec<dim,C>& v)
{
convert::over_load::from_to_(v, *this);
}
@@ -563,7 +563,7 @@ namespace mln
//FIXME: to be improved.
if (dim > 2)
{
- algebra::vec<G::dim, float> tmp;
+ mln::algebra::vec<G::dim, float> tmp;
unsigned j = 0;
for (unsigned i = dim - 2; i < dim; ++i)
tmp[j++] = coord_[i];
@@ -581,7 +581,7 @@ namespace mln
typename point<G,C>::h_vec
point<G,C>::to_h_vec() const
{
- algebra::h_vec<G::dim, float> tmp;
+ mln::algebra::h_vec<G::dim, float> tmp;
//FIXME: to be improved.
if (dim == 1)
@@ -622,7 +622,7 @@ namespace mln
template <typename G, typename C>
inline
- algebra::vec<G::dim, C>&
+ mln::algebra::vec<G::dim, C>&
point<G,C>::hook_coord_()
{
return coord_;
@@ -658,10 +658,10 @@ namespace mln
template <typename G, typename C>
inline
- const algebra::vec<point<G,C>::dim - 1, C>&
+ const mln::algebra::vec<point<G,C>::dim - 1, C>&
cut_(const point<G,C>& p)
{
- return *(algebra::vec<point<G,C>::dim - 1, C>*)(& p.to_vec());
+ return *(mln::algebra::vec<point<G,C>::dim - 1, C>*)(& p.to_vec());
}
template <typename C>
diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk
index 6a9d5d5..332c90b 100644
--- a/milena/tests/unit_test/unit-tests.mk
+++ b/milena/tests/unit_test/unit-tests.mk
@@ -1,6 +1,7 @@
## Generated by ./build-aux/build_unit_test.sh, do not modify.
check_PROGRAMS = \
+mln_+trash_erosion_tolerant \
mln_accu_all \
mln_accu_center \
mln_accu_compute \
@@ -156,6 +157,8 @@ mln_convert_to_fun \
mln_convert_to_image \
mln_convert_to_p_array \
mln_convert_to_p_set \
+mln_convert_to_qimage \
+mln_convert_to_qimage_nocopy \
mln_convert_to_upper_window \
mln_convert_to_window \
mln_core_a_point_of \
@@ -423,6 +426,7 @@ mln_data_replace \
mln_data_saturate \
mln_data_sort_offsets \
mln_data_sort_psites \
+mln_data_split \
mln_data_stretch \
mln_data_to_enc \
mln_data_transform \
@@ -437,16 +441,20 @@ mln_debug_filename \
mln_debug_format \
mln_debug_histo \
mln_debug_iota \
+mln_debug_mosaic \
mln_debug_println \
mln_debug_println_with_border \
mln_debug_put_word \
mln_debug_quiet \
mln_debug_slices_2d \
mln_debug_superpose \
+mln_debug_z_order \
mln_display_all \
mln_display_essential \
mln_draw_all \
mln_draw_box \
+mln_draw_box_plain \
+mln_draw_dashed_line \
mln_draw_essential \
mln_draw_line \
mln_draw_plot \
@@ -521,6 +529,8 @@ mln_fun_meta_red \
mln_fun_meta_sat \
mln_fun_meta_second \
mln_fun_meta_to_enc \
+mln_fun_n2v_all \
+mln_fun_n2v_white_gaussian \
mln_fun_ops \
mln_fun_p2b_all \
mln_fun_p2b_antilogy \
@@ -570,8 +580,10 @@ mln_fun_v2v_inc \
mln_fun_v2v_linear \
mln_fun_v2v_norm \
mln_fun_v2v_projection \
+mln_fun_v2v_qt_rgb_to_int_u \
mln_fun_v2v_rgb_to_hsi \
mln_fun_v2v_rgb_to_hsl \
+mln_fun_v2v_rgb_to_int_u \
mln_fun_v2v_saturate \
mln_fun_v2v_wrap \
mln_fun_v2w2v_all \
@@ -617,6 +629,7 @@ mln_geom_chamfer \
mln_geom_complex_geometry \
mln_geom_delta \
mln_geom_essential \
+mln_geom_horizontal_symmetry \
mln_geom_max_col \
mln_geom_max_ind \
mln_geom_max_row \
@@ -629,7 +642,7 @@ mln_geom_ncols \
mln_geom_ninds \
mln_geom_nrows \
mln_geom_nsites \
-mln_geom_nslis \
+mln_geom_nslices \
mln_geom_pmin_pmax \
mln_geom_rotate \
mln_geom_seeds2tiling \
@@ -638,6 +651,7 @@ mln_geom_size1d \
mln_geom_size2d \
mln_geom_size3d \
mln_geom_translate \
+mln_geom_vertical_symmetry \
mln_graph_all \
mln_graph_attribute_card \
mln_graph_attribute_representative \
@@ -649,6 +663,7 @@ mln_graph_to_win \
mln_histo_all \
mln_histo_array \
mln_histo_compute \
+mln_histo_equalize \
mln_histo_essential \
mln_histo_point_from_value \
mln_io_abort \
@@ -656,7 +671,9 @@ mln_io_all \
mln_io_cloud_all \
mln_io_cloud_load \
mln_io_cloud_save \
+mln_io_dicom_get_header \
mln_io_dump_all \
+mln_io_dump_get_header \
mln_io_dump_load \
mln_io_dump_save \
mln_io_essential \
@@ -700,6 +717,10 @@ mln_io_ppm_load \
mln_io_ppm_save \
mln_io_ppms_all \
mln_io_ppms_load \
+mln_io_raw_all \
+mln_io_raw_get_header \
+mln_io_raw_load \
+mln_io_raw_save \
mln_io_txt_all \
mln_io_txt_save \
mln_labeling_all \
@@ -721,6 +742,7 @@ mln_labeling_regional_minima \
mln_labeling_relabel \
mln_labeling_superpose \
mln_labeling_value \
+mln_labeling_value_and_compute \
mln_labeling_wrap \
mln_linear_all \
mln_linear_ch_convolve \
@@ -999,6 +1021,7 @@ mln_set_sym_diff \
mln_set_uni \
mln_set_unique \
mln_subsampling_all \
+mln_subsampling_antialiased \
mln_subsampling_essential \
mln_subsampling_gaussian_subsampling \
mln_subsampling_subsampling \
@@ -1235,6 +1258,7 @@ mln_value_internal_gray_f \
mln_value_internal_integer \
mln_value_internal_iterable_set \
mln_value_internal_limits \
+mln_value_internal_make_generic_name \
mln_value_internal_value_like \
mln_value_interval \
mln_value_label \
@@ -1246,6 +1270,7 @@ mln_value_mixin \
mln_value_ops \
mln_value_other \
mln_value_proxy \
+mln_value_qt_rgb32 \
mln_value_rgb \
mln_value_rgb16 \
mln_value_rgb8 \
@@ -1275,6 +1300,7 @@ mln_win_octagon2d \
mln_win_rectangle2d \
mln_win_segment1d \
mln_win_shift \
+mln_win_sline3d \
mln_win_sphere3d \
mln_win_sym \
mln_win_vline2d \
@@ -1282,6 +1308,7 @@ mln_world_all \
mln_world_binary_2d_all \
mln_world_binary_2d_enlarge \
mln_world_binary_2d_projected_histo \
+mln_world_binary_2d_reduce \
mln_world_binary_2d_subsample \
mln_world_inter_pixel_all \
mln_world_inter_pixel_compute \
@@ -1299,6 +1326,7 @@ mln_world_inter_pixel_is_separator \
mln_world_inter_pixel_neighb2d \
mln_world_inter_pixel_separator_to_pixels
+mln_+trash_erosion_tolerant_SOURCES = mln_+trash_erosion_tolerant.cc
mln_accu_all_SOURCES = mln_accu_all.cc
mln_accu_center_SOURCES = mln_accu_center.cc
mln_accu_compute_SOURCES = mln_accu_compute.cc
@@ -1454,6 +1482,8 @@ mln_convert_to_fun_SOURCES = mln_convert_to_fun.cc
mln_convert_to_image_SOURCES = mln_convert_to_image.cc
mln_convert_to_p_array_SOURCES = mln_convert_to_p_array.cc
mln_convert_to_p_set_SOURCES = mln_convert_to_p_set.cc
+mln_convert_to_qimage_SOURCES = mln_convert_to_qimage.cc
+mln_convert_to_qimage_nocopy_SOURCES = mln_convert_to_qimage_nocopy.cc
mln_convert_to_upper_window_SOURCES = mln_convert_to_upper_window.cc
mln_convert_to_window_SOURCES = mln_convert_to_window.cc
mln_core_a_point_of_SOURCES = mln_core_a_point_of.cc
@@ -1721,6 +1751,7 @@ mln_data_replace_SOURCES = mln_data_replace.cc
mln_data_saturate_SOURCES = mln_data_saturate.cc
mln_data_sort_offsets_SOURCES = mln_data_sort_offsets.cc
mln_data_sort_psites_SOURCES = mln_data_sort_psites.cc
+mln_data_split_SOURCES = mln_data_split.cc
mln_data_stretch_SOURCES = mln_data_stretch.cc
mln_data_to_enc_SOURCES = mln_data_to_enc.cc
mln_data_transform_SOURCES = mln_data_transform.cc
@@ -1735,16 +1766,20 @@ mln_debug_filename_SOURCES = mln_debug_filename.cc
mln_debug_format_SOURCES = mln_debug_format.cc
mln_debug_histo_SOURCES = mln_debug_histo.cc
mln_debug_iota_SOURCES = mln_debug_iota.cc
+mln_debug_mosaic_SOURCES = mln_debug_mosaic.cc
mln_debug_println_SOURCES = mln_debug_println.cc
mln_debug_println_with_border_SOURCES = mln_debug_println_with_border.cc
mln_debug_put_word_SOURCES = mln_debug_put_word.cc
mln_debug_quiet_SOURCES = mln_debug_quiet.cc
mln_debug_slices_2d_SOURCES = mln_debug_slices_2d.cc
mln_debug_superpose_SOURCES = mln_debug_superpose.cc
+mln_debug_z_order_SOURCES = mln_debug_z_order.cc
mln_display_all_SOURCES = mln_display_all.cc
mln_display_essential_SOURCES = mln_display_essential.cc
mln_draw_all_SOURCES = mln_draw_all.cc
mln_draw_box_SOURCES = mln_draw_box.cc
+mln_draw_box_plain_SOURCES = mln_draw_box_plain.cc
+mln_draw_dashed_line_SOURCES = mln_draw_dashed_line.cc
mln_draw_essential_SOURCES = mln_draw_essential.cc
mln_draw_line_SOURCES = mln_draw_line.cc
mln_draw_plot_SOURCES = mln_draw_plot.cc
@@ -1819,6 +1854,8 @@ mln_fun_meta_red_SOURCES = mln_fun_meta_red.cc
mln_fun_meta_sat_SOURCES = mln_fun_meta_sat.cc
mln_fun_meta_second_SOURCES = mln_fun_meta_second.cc
mln_fun_meta_to_enc_SOURCES = mln_fun_meta_to_enc.cc
+mln_fun_n2v_all_SOURCES = mln_fun_n2v_all.cc
+mln_fun_n2v_white_gaussian_SOURCES = mln_fun_n2v_white_gaussian.cc
mln_fun_ops_SOURCES = mln_fun_ops.cc
mln_fun_p2b_all_SOURCES = mln_fun_p2b_all.cc
mln_fun_p2b_antilogy_SOURCES = mln_fun_p2b_antilogy.cc
@@ -1868,8 +1905,10 @@ mln_fun_v2v_inc_SOURCES = mln_fun_v2v_inc.cc
mln_fun_v2v_linear_SOURCES = mln_fun_v2v_linear.cc
mln_fun_v2v_norm_SOURCES = mln_fun_v2v_norm.cc
mln_fun_v2v_projection_SOURCES = mln_fun_v2v_projection.cc
+mln_fun_v2v_qt_rgb_to_int_u_SOURCES = mln_fun_v2v_qt_rgb_to_int_u.cc
mln_fun_v2v_rgb_to_hsi_SOURCES = mln_fun_v2v_rgb_to_hsi.cc
mln_fun_v2v_rgb_to_hsl_SOURCES = mln_fun_v2v_rgb_to_hsl.cc
+mln_fun_v2v_rgb_to_int_u_SOURCES = mln_fun_v2v_rgb_to_int_u.cc
mln_fun_v2v_saturate_SOURCES = mln_fun_v2v_saturate.cc
mln_fun_v2v_wrap_SOURCES = mln_fun_v2v_wrap.cc
mln_fun_v2w2v_all_SOURCES = mln_fun_v2w2v_all.cc
@@ -1915,6 +1954,7 @@ mln_geom_chamfer_SOURCES = mln_geom_chamfer.cc
mln_geom_complex_geometry_SOURCES = mln_geom_complex_geometry.cc
mln_geom_delta_SOURCES = mln_geom_delta.cc
mln_geom_essential_SOURCES = mln_geom_essential.cc
+mln_geom_horizontal_symmetry_SOURCES = mln_geom_horizontal_symmetry.cc
mln_geom_max_col_SOURCES = mln_geom_max_col.cc
mln_geom_max_ind_SOURCES = mln_geom_max_ind.cc
mln_geom_max_row_SOURCES = mln_geom_max_row.cc
@@ -1927,7 +1967,7 @@ mln_geom_ncols_SOURCES = mln_geom_ncols.cc
mln_geom_ninds_SOURCES = mln_geom_ninds.cc
mln_geom_nrows_SOURCES = mln_geom_nrows.cc
mln_geom_nsites_SOURCES = mln_geom_nsites.cc
-mln_geom_nslis_SOURCES = mln_geom_nslis.cc
+mln_geom_nslices_SOURCES = mln_geom_nslices.cc
mln_geom_pmin_pmax_SOURCES = mln_geom_pmin_pmax.cc
mln_geom_rotate_SOURCES = mln_geom_rotate.cc
mln_geom_seeds2tiling_SOURCES = mln_geom_seeds2tiling.cc
@@ -1936,6 +1976,7 @@ mln_geom_size1d_SOURCES = mln_geom_size1d.cc
mln_geom_size2d_SOURCES = mln_geom_size2d.cc
mln_geom_size3d_SOURCES = mln_geom_size3d.cc
mln_geom_translate_SOURCES = mln_geom_translate.cc
+mln_geom_vertical_symmetry_SOURCES = mln_geom_vertical_symmetry.cc
mln_graph_all_SOURCES = mln_graph_all.cc
mln_graph_attribute_card_SOURCES = mln_graph_attribute_card.cc
mln_graph_attribute_representative_SOURCES = mln_graph_attribute_representative.cc
@@ -1947,6 +1988,7 @@ mln_graph_to_win_SOURCES = mln_graph_to_win.cc
mln_histo_all_SOURCES = mln_histo_all.cc
mln_histo_array_SOURCES = mln_histo_array.cc
mln_histo_compute_SOURCES = mln_histo_compute.cc
+mln_histo_equalize_SOURCES = mln_histo_equalize.cc
mln_histo_essential_SOURCES = mln_histo_essential.cc
mln_histo_point_from_value_SOURCES = mln_histo_point_from_value.cc
mln_io_abort_SOURCES = mln_io_abort.cc
@@ -1954,7 +1996,9 @@ mln_io_all_SOURCES = mln_io_all.cc
mln_io_cloud_all_SOURCES = mln_io_cloud_all.cc
mln_io_cloud_load_SOURCES = mln_io_cloud_load.cc
mln_io_cloud_save_SOURCES = mln_io_cloud_save.cc
+mln_io_dicom_get_header_SOURCES = mln_io_dicom_get_header.cc
mln_io_dump_all_SOURCES = mln_io_dump_all.cc
+mln_io_dump_get_header_SOURCES = mln_io_dump_get_header.cc
mln_io_dump_load_SOURCES = mln_io_dump_load.cc
mln_io_dump_save_SOURCES = mln_io_dump_save.cc
mln_io_essential_SOURCES = mln_io_essential.cc
@@ -1998,6 +2042,10 @@ mln_io_ppm_load_SOURCES = mln_io_ppm_load.cc
mln_io_ppm_save_SOURCES = mln_io_ppm_save.cc
mln_io_ppms_all_SOURCES = mln_io_ppms_all.cc
mln_io_ppms_load_SOURCES = mln_io_ppms_load.cc
+mln_io_raw_all_SOURCES = mln_io_raw_all.cc
+mln_io_raw_get_header_SOURCES = mln_io_raw_get_header.cc
+mln_io_raw_load_SOURCES = mln_io_raw_load.cc
+mln_io_raw_save_SOURCES = mln_io_raw_save.cc
mln_io_txt_all_SOURCES = mln_io_txt_all.cc
mln_io_txt_save_SOURCES = mln_io_txt_save.cc
mln_labeling_all_SOURCES = mln_labeling_all.cc
@@ -2019,6 +2067,7 @@ mln_labeling_regional_minima_SOURCES = mln_labeling_regional_minima.cc
mln_labeling_relabel_SOURCES = mln_labeling_relabel.cc
mln_labeling_superpose_SOURCES = mln_labeling_superpose.cc
mln_labeling_value_SOURCES = mln_labeling_value.cc
+mln_labeling_value_and_compute_SOURCES = mln_labeling_value_and_compute.cc
mln_labeling_wrap_SOURCES = mln_labeling_wrap.cc
mln_linear_all_SOURCES = mln_linear_all.cc
mln_linear_ch_convolve_SOURCES = mln_linear_ch_convolve.cc
@@ -2297,6 +2346,7 @@ mln_set_sym_diff_SOURCES = mln_set_sym_diff.cc
mln_set_uni_SOURCES = mln_set_uni.cc
mln_set_unique_SOURCES = mln_set_unique.cc
mln_subsampling_all_SOURCES = mln_subsampling_all.cc
+mln_subsampling_antialiased_SOURCES = mln_subsampling_antialiased.cc
mln_subsampling_essential_SOURCES = mln_subsampling_essential.cc
mln_subsampling_gaussian_subsampling_SOURCES = mln_subsampling_gaussian_subsampling.cc
mln_subsampling_subsampling_SOURCES = mln_subsampling_subsampling.cc
@@ -2533,6 +2583,7 @@ mln_value_internal_gray_f_SOURCES = mln_value_internal_gray_f.cc
mln_value_internal_integer_SOURCES = mln_value_internal_integer.cc
mln_value_internal_iterable_set_SOURCES = mln_value_internal_iterable_set.cc
mln_value_internal_limits_SOURCES = mln_value_internal_limits.cc
+mln_value_internal_make_generic_name_SOURCES = mln_value_internal_make_generic_name.cc
mln_value_internal_value_like_SOURCES = mln_value_internal_value_like.cc
mln_value_interval_SOURCES = mln_value_interval.cc
mln_value_label_SOURCES = mln_value_label.cc
@@ -2544,6 +2595,7 @@ mln_value_mixin_SOURCES = mln_value_mixin.cc
mln_value_ops_SOURCES = mln_value_ops.cc
mln_value_other_SOURCES = mln_value_other.cc
mln_value_proxy_SOURCES = mln_value_proxy.cc
+mln_value_qt_rgb32_SOURCES = mln_value_qt_rgb32.cc
mln_value_rgb_SOURCES = mln_value_rgb.cc
mln_value_rgb16_SOURCES = mln_value_rgb16.cc
mln_value_rgb8_SOURCES = mln_value_rgb8.cc
@@ -2573,6 +2625,7 @@ mln_win_octagon2d_SOURCES = mln_win_octagon2d.cc
mln_win_rectangle2d_SOURCES = mln_win_rectangle2d.cc
mln_win_segment1d_SOURCES = mln_win_segment1d.cc
mln_win_shift_SOURCES = mln_win_shift.cc
+mln_win_sline3d_SOURCES = mln_win_sline3d.cc
mln_win_sphere3d_SOURCES = mln_win_sphere3d.cc
mln_win_sym_SOURCES = mln_win_sym.cc
mln_win_vline2d_SOURCES = mln_win_vline2d.cc
@@ -2580,6 +2633,7 @@ mln_world_all_SOURCES = mln_world_all.cc
mln_world_binary_2d_all_SOURCES = mln_world_binary_2d_all.cc
mln_world_binary_2d_enlarge_SOURCES = mln_world_binary_2d_enlarge.cc
mln_world_binary_2d_projected_histo_SOURCES = mln_world_binary_2d_projected_histo.cc
+mln_world_binary_2d_reduce_SOURCES = mln_world_binary_2d_reduce.cc
mln_world_binary_2d_subsample_SOURCES = mln_world_binary_2d_subsample.cc
mln_world_inter_pixel_all_SOURCES = mln_world_inter_pixel_all.cc
mln_world_inter_pixel_compute_SOURCES = mln_world_inter_pixel_compute.cc
--
1.5.6.5
1
0

06 Jul '10
* core/line_info.hh: Rename hidden as is_hidden.
* core/object_links.hh: Add duplicate().
* filter/object_links_bbox_ratio.hh: Use object_links::duplicate.
* debug/links_decision_image.hh,
* src/debug/show_info_median_inter_characters.cc,
* src/debug/show_info_x_height.cc,
* src/debug/show_links_bbox_h_ratio.cc,
* src/debug/show_links_left_right_links_validation.cc: Make
compile again.
* tests/unit_test/unit-tests.mk: Regen.
* text/extract_lines.hh: Update with latest changes.
* text/recognition.hh: Check whether a line is hidden or not.
---
scribo/ChangeLog | 23 ++
scribo/core/line_info.hh | 10 +-
scribo/core/object_links.hh | 14 +
scribo/debug/links_decision_image.hh | 68 +---
scribo/filter/object_links_bbox_ratio.hh | 2 +-
.../src/debug/show_info_median_inter_characters.cc | 194 +---------
scribo/src/debug/show_info_x_height.cc | 224 +----------
scribo/src/debug/show_links_bbox_h_ratio.cc | 26 +-
.../show_links_left_right_links_validation.cc | 34 +-
scribo/tests/unit_test/unit-tests.mk | 406 ++++++++++++++++++--
scribo/text/extract_lines.hh | 111 +++---
scribo/text/recognition.hh | 2 +-
12 files changed, 533 insertions(+), 581 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 0f88d85..bd3f45d 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,28 @@
2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Compilation related fixes in Scribo.
+
+ * core/line_info.hh: Rename hidden as is_hidden.
+
+ * core/object_links.hh: Add duplicate().
+
+ * filter/object_links_bbox_ratio.hh: Use object_links::duplicate.
+
+ * debug/links_decision_image.hh,
+ * src/debug/show_info_median_inter_characters.cc,
+ * src/debug/show_info_x_height.cc,
+ * src/debug/show_links_bbox_h_ratio.cc,
+ * src/debug/show_links_left_right_links_validation.cc: Make
+ compile again.
+
+ * tests/unit_test/unit-tests.mk: Regen.
+
+ * text/extract_lines.hh: Update with latest changes.
+
+ * text/recognition.hh: Check whether a line is hidden or not.
+
+2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add new debug routines.
* debug/char_space_image.hh,
diff --git a/scribo/core/line_info.hh b/scribo/core/line_info.hh
index 55d1430..d4031b0 100644
--- a/scribo/core/line_info.hh
+++ b/scribo/core/line_info.hh
@@ -138,7 +138,7 @@ namespace scribo
/// computing data over lines.
///
/// @{
- bool hidden() const;
+ bool is_hidden() const;
void set_hidden(bool b);
/// @}
@@ -268,10 +268,9 @@ namespace scribo
{
// Id MUST NOT change except if this instance have no id.
if (! is_valid())
- {
id_ = other.id();
- hidden_ = other.hidden_;
- }
+
+ hidden_ = other.hidden_;
tag_ = other.tag();
bbox_ = other.bbox();
@@ -620,7 +619,7 @@ namespace scribo
template <typename L>
bool
- line_info<L>::hidden() const
+ line_info<L>::is_hidden() const
{
return hidden_;
}
@@ -923,6 +922,7 @@ namespace scribo
<< ", orientation=" << info.orientation()
<< ", reading_orientation=" << info.reading_orientation()
<< ", indented=" << info.indented()
+ << ", hidden=" << info.is_hidden()
<< ", text=" << info.text()
<< ")" << std::endl;
}
diff --git a/scribo/core/object_links.hh b/scribo/core/object_links.hh
index c10cae6..09e1cfe 100644
--- a/scribo/core/object_links.hh
+++ b/scribo/core/object_links.hh
@@ -92,6 +92,8 @@ namespace scribo
void init();
+ object_links<L> duplicate() const;
+
private:
mln::util::tracked_ptr<data_t> data_;
};
@@ -219,6 +221,18 @@ namespace scribo
data_->comp_to_link_(i) = i;
}
+ template <typename L>
+ inline
+ object_links<L>
+ object_links<L>::duplicate() const
+ {
+ object_links<L> output;
+ output.data_ = new data_t();
+
+ *(output.data_.ptr_) = *(data_.ptr_);
+ return output;
+ }
+
template <typename L>
std::ostream&
diff --git a/scribo/debug/links_decision_image.hh b/scribo/debug/links_decision_image.hh
index e1cf766..944d17e 100644
--- a/scribo/debug/links_decision_image.hh
+++ b/scribo/debug/links_decision_image.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.
//
@@ -31,15 +32,11 @@
/// Save a color image showing the difference between to object groups.
# include <mln/core/concept/image.hh>
-# include <mln/accu/center.hh>
# include <mln/data/convert.hh>
# include <mln/value/rgb8.hh>
# include <mln/literal/colors.hh>
-# include <mln/util/array.hh>
-# include <mln/norm/l1.hh>
-# include <scribo/core/object_groups.hh>
-# include <scribo/draw/bounding_boxes.hh>
+# include <scribo/core/object_links.hh>
namespace scribo
@@ -55,14 +52,6 @@ namespace scribo
mln_ch_value(I,value::rgb8)
links_decision_image(const Image<I>& input_,
const object_links<L>& links,
- const object_links<L>& filtered_links,
- unsigned max_link_length);
-
- /// \overload
- template <typename I, typename L>
- mln_ch_value(I,value::rgb8)
- links_decision_image(const Image<I>& input_,
- const object_links<L>& links,
const object_links<L>& filtered_links);
# ifndef MLN_INCLUDE_ONLY
@@ -71,74 +60,45 @@ namespace scribo
mln_ch_value(I,value::rgb8)
links_decision_image(const Image<I>& input_,
const object_links<L>& links,
- const object_links<L>& filtered_links,
- unsigned max_link_length)
+ const object_links<L>& filtered_links)
{
trace::entering("scribo::debug::links_decision_image");
const I& input = exact(input_);
- const object_image(L)& objects = links.object_image_();
+ const component_set<L>& comps = links.components();
mln_precondition(input.is_valid());
- mln_precondition(objects.is_valid());
+ mln_precondition(comps.is_valid());
mln_precondition(links.is_valid());
mln_precondition(filtered_links.is_valid());
mln_precondition(links.size() == filtered_links.size());
- mln_precondition(links.object_image_() != filtered_links.object_image_());
/// Fixme: check that objects has been computed from input.
image2d<value::rgb8>
links_decision_image = data::convert(value::rgb8(), input);
- for_all_components(i, objects.bboxes())
- mln::draw::box(links_decision_image, objects.bbox(i), literal::blue);
-
- // Computing mass centers.
- mln::util::array<mln_result(accu::center<mln_psite(I)>)>
- mass_centers = labeling::compute(accu::meta::center(),
- objects, objects.nlabels());
+ for_all_comps(i, comps)
+ mln::draw::box(links_decision_image, comps(i).bbox(), literal::blue);
- for (unsigned i = 1; i < links.size(); ++i)
- {
-
- if (links[i] != i)
+ for_all_links(i, links)
+ if (links(i) != i)
{
value::rgb8 value = literal::green;
- if (links[i] != filtered_links[i])
+ if (links(i) != filtered_links(i))
value = literal::red;
mln_site(I)
- p1 = mass_centers[i],
- p2 = p1 + mln::right; // FIXME: not generic
-
- while (objects(p2) != links[i] && objects.domain().has(p2))
- ++p2.col();
+ p1 = comps(i).mass_center(),
+ p2 = comps(links(i)).mass_center();
- if (norm::l1_distance(p2.to_vec(), p1.to_vec()) < max_link_length)
- mln::draw::line(links_decision_image,
- p1,
- p2,
- value);
+ mln::draw::line(links_decision_image, p1, p2, value);
}
- }
trace::exiting("scribo::debug::links_decision_image");
return links_decision_image;
}
- template <typename I, typename L>
- mln_ch_value(I,value::rgb8)
- links_decision_image(const Image<I>& input_,
- const object_links<L>& links,
- const object_links<L>& filtered_links)
- {
- return links_decision_image(input_,
- links,
- filtered_links,
- mln_max(unsigned));
- }
-
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace scribo::debug
diff --git a/scribo/filter/object_links_bbox_ratio.hh b/scribo/filter/object_links_bbox_ratio.hh
index d1c01dd..e5d41c6 100644
--- a/scribo/filter/object_links_bbox_ratio.hh
+++ b/scribo/filter/object_links_bbox_ratio.hh
@@ -78,7 +78,7 @@ namespace scribo
const component_set<L>& components = links.components();
- object_links<L> output(links);
+ object_links<L> output = links.duplicate();
for (unsigned i = 1; i < links.nelements(); ++i)
if (links(i) != i)
{
diff --git a/scribo/src/debug/show_info_median_inter_characters.cc b/scribo/src/debug/show_info_median_inter_characters.cc
index e28ad96..b55079d 100644
--- a/scribo/src/debug/show_info_median_inter_characters.cc
+++ b/scribo/src/debug/show_info_median_inter_characters.cc
@@ -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,58 +31,26 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
-#include <mln/io/pbm/all.hh>
+#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/math/min.hh>
-
-#include <mln/literal/colors.hh>
#include <mln/value/rgb8.hh>
#include <mln/value/label_16.hh>
-#include <mln/value/int_u16.hh>
#include <mln/draw/box.hh>
#include <mln/draw/line.hh>
-#include <mln/extension/adjust.hh>
-
-#include <mln/accu/stat/median_h.hh>
-
-#include <scribo/draw/bounding_boxes.hh>
-
-#include <scribo/primitive/extract/objects.hh>
-
-#include <scribo/primitive/link/merge_double_link.hh>
-#include <scribo/primitive/link/with_single_left_link_dmax_ratio.hh>
-#include <scribo/primitive/link/with_single_right_link_dmax_ratio.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/filter/object_links_bbox_h_ratio.hh>
-
-#include <scribo/filter/objects_small.hh>
-#include <scribo/filter/objects_thin.hh>
-#include <scribo/filter/objects_thick.hh>
-
-#include <scribo/filter/object_groups_small.hh>
-
-#include <scribo/debug/decision_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_linked_bboxes_image.hh>
+#include <scribo/text/extract_lines.hh>
+#include <scribo/debug/char_space_image.hh>
#include <scribo/debug/usage.hh>
-#include <scribo/make/debug_filename.hh>
const char *args_desc[][2] =
{
{ "input.pbm", "A binary image. 'False' for objects, 'True'\
for the background." },
- { "debug_dir", "Output directory for debug image" },
{0, 0}
};
@@ -91,15 +60,12 @@ int main(int argc, char* argv[])
using namespace scribo;
using namespace mln;
- if (argc != 3 && argc != 4)
+ if (argc != 3)
return scribo::debug::usage(argv,
"Find text lines using left/right validation and display x-height in a binarized article.",
- "input.pbm out.ppm <debug_dir>",
- args_desc,
- "A color image. The following colors are used : dark blue for object bboxes, orange for single object bboxes, purple for group bboxes and light blue for x-height.");
+ "input.pbm out.ppm",
+ args_desc);
- if (argc == 4)
- scribo::make::internal::debug_filename_prefix = argv[3];
trace::entering("main");
@@ -109,148 +75,10 @@ int main(int argc, char* argv[])
typedef image2d<value::label_16> L;
- /// Finding objects.
- std::cout << "Finding objects..." << std::endl;
- value::label_16 nobjects;
- object_image(L)
- objects = scribo::primitive::extract::objects(input,
- c8(),
- nobjects);
-
-
- /// First filtering.
- std::cout << "Filtering objects..." << std::endl;
- object_image(L) filtered_objects
- = scribo::filter::objects_small(objects, 6);
-
- /// Linking potential objects
- std::cout << "Linking objects..." << std::endl;
- object_links<L> left_link
- = primitive::link::with_single_left_link_dmax_ratio(filtered_objects);
- object_links<L> right_link
- = primitive::link::with_single_right_link_dmax_ratio(filtered_objects);
-
-
- // Validating left and right links.
- object_links<L>
- merged_links = primitive::link::merge_double_link(filtered_objects,
- left_link,
- right_link);
-
-#ifndef NOUT
- if (argc == 4)
- {
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
- scribo::draw::bounding_box_links(output,
- merged_links,
- literal::green);
-
- util::array<bool> drawn(objects.nlabels(), 0);
- for_all_components(i, objects.bboxes())
- if (merged_links[i] == i && ! drawn(i))
- {
- mln::draw::box(output, objects.bbox(i), literal::orange);
- drawn[i] = true;
- }
- else
- {
- mln::draw::box(output, objects.bbox(i), literal::blue);
- mln::draw::box(output, objects.bbox(merged_links[i]), literal::blue);
- drawn[i] = true;
- drawn[merged_links[i]] = true;
- }
-
- io::ppm::save(output, scribo::make::debug_filename("links.ppm"));
- }
-#endif
-
-
- // Remove links if bboxes have too different sizes.
- object_links<L> hratio_filtered_links
- = filter::object_links_bbox_h_ratio(filtered_objects,
- merged_links,
- 2.0f);
-
-
-
-
-#ifndef NOUT
- if (argc == 4)
- {
- image2d<value::rgb8>
- hratio_decision_image = scribo::debug::decision_image(input,
- merged_links,
- hratio_filtered_links);
- io::ppm::save(hratio_decision_image,
- scribo::make::debug_filename("hratio_links_decision_image.ppm"));
- }
-#endif
-
-
-
- // FIXME: from_single_link should return a packed object_groups?
- //
- //######
- object_groups<L>
- groups = primitive::group::from_single_link(filtered_objects,
- hratio_filtered_links);
- value::label_16 n_groups;
- mln::fun::i2v::array<value::label_16>
- groups_packed = mln::make::relabelfun(groups,
- filtered_objects.nlabels(),
- n_groups);
- //######
-
-
- std::cout << "Grouping objects..." << std::endl;
- object_image(L)
- grouped_objects = primitive::group::apply(filtered_objects, groups);
-
-
-
- // Display median character space.
- {
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
- typedef mln::value::int_u<8> median_t;
- typedef mln::accu::stat::median_h<median_t> accu_t;
- util::array<accu_t>
- lspace_med(static_cast<unsigned>(grouped_objects.nlabels()) + 1);
-
- for_all_components(i, filtered_objects.bboxes())
- if (groups_packed(i) != 0)
- {
- if (hratio_filtered_links(i) != i)
- {
- unsigned
- space = filtered_objects.bbox(i).pmin().col() - filtered_objects.bbox(hratio_filtered_links(i)).pmax().col();
-
- lspace_med(groups_packed(i)).take(space);
-
- }
- }
-
- for_all_components(i, filtered_objects.bboxes())
- if (groups_packed(i) != 0 && lspace_med(groups_packed(i)).card() > 1)
- {
- unsigned med = lspace_med(groups_packed(i)).to_result();
-
- mln::draw::box(output, grouped_objects.bbox(groups_packed(i)),
- literal::purple);
-
- point2d
- beg = filtered_objects.bbox(i).pmax(),
- end = beg;
- beg.row() = filtered_objects.bbox(i).pmin().row();
- mln::draw::line(output, beg, end, literal::cyan);
- beg.col() += med;
- end.col() += med;
- mln::draw::line(output, beg, end, literal::cyan);
-
- }
-
- io::ppm::save(output, argv[2]);
+ line_set<L> line = scribo::text::extract_lines(input, c8());
- }
+ image2d<value::rgb8> output = scribo::debug::char_space_image(input, line);
+ io::ppm::save(output, argv[2]);
trace::exiting("main");
}
diff --git a/scribo/src/debug/show_info_x_height.cc b/scribo/src/debug/show_info_x_height.cc
index e0c84a6..e5ff8d2 100644
--- a/scribo/src/debug/show_info_x_height.cc
+++ b/scribo/src/debug/show_info_x_height.cc
@@ -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,58 +31,22 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
-#include <mln/io/pbm/all.hh>
+#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/math/min.hh>
-
-#include <mln/literal/colors.hh>
#include <mln/value/rgb8.hh>
#include <mln/value/label_16.hh>
-#include <mln/value/int_u16.hh>
-
-#include <mln/draw/box.hh>
-#include <mln/draw/line.hh>
-
-#include <mln/extension/adjust.hh>
-
-#include <mln/accu/stat/median_h.hh>
-
-#include <scribo/draw/bounding_boxes.hh>
-
-#include <scribo/primitive/extract/objects.hh>
-
-#include <scribo/primitive/link/merge_double_link.hh>
-#include <scribo/primitive/link/with_single_left_link_dmax_ratio.hh>
-#include <scribo/primitive/link/with_single_right_link_dmax_ratio.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/filter/object_links_bbox_h_ratio.hh>
-
-#include <scribo/filter/objects_small.hh>
-#include <scribo/filter/objects_thin.hh>
-#include <scribo/filter/objects_thick.hh>
-
-#include <scribo/filter/object_groups_small.hh>
-
-#include <scribo/debug/decision_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_linked_bboxes_image.hh>
+#include <scribo/text/extract_lines.hh>
+#include <scribo/debug/line_info_image.hh>
#include <scribo/debug/usage.hh>
-#include <scribo/make/debug_filename.hh>
const char *args_desc[][2] =
{
{ "input.pbm", "A binary image. 'False' for objects, 'True'\
for the background." },
- { "debug_dir", "Output directory for debug image" },
{0, 0}
};
@@ -91,15 +56,11 @@ int main(int argc, char* argv[])
using namespace scribo;
using namespace mln;
- if (argc != 3 && argc != 4)
+ if (argc != 3)
return scribo::debug::usage(argv,
"Find text lines using left/right validation and display x-height in a binarized article.",
- "input.pbm out.ppm <debug_dir>",
- args_desc,
- "A color image. The following colors are used : dark blue for object bboxes, orange for single object bboxes, purple for group bboxes and light blue for x-height.");
-
- if (argc == 4)
- scribo::make::internal::debug_filename_prefix = argv[3];
+ "input.pbm out.ppm",
+ args_desc);
trace::entering("main");
@@ -109,173 +70,10 @@ int main(int argc, char* argv[])
typedef image2d<value::label_16> L;
- /// Finding objects.
- std::cout << "Finding objects..." << std::endl;
- value::label_16 nobjects;
- object_image(L)
- objects = scribo::primitive::extract::objects(input,
- c8(),
- nobjects);
-
-
- /// First filtering.
- std::cout << "Filtering objects..." << std::endl;
- object_image(L) filtered_objects
- = scribo::filter::objects_small(objects, 6);
-
- /// Linking potential objects
- std::cout << "Linking objects..." << std::endl;
- object_links<L> left_link
- = primitive::link::with_single_left_link_dmax_ratio(filtered_objects);
- object_links<L> right_link
- = primitive::link::with_single_right_link_dmax_ratio(filtered_objects);
-
-
- // Validating left and right links.
- object_links<L>
- merged_links = primitive::link::merge_double_link(filtered_objects,
- left_link,
- right_link);
-
-#ifndef NOUT
- if (argc == 4)
- {
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
- scribo::draw::bounding_box_links(output,
- filtered_objects.bboxes(),
- merged_links,
- literal::green);
-
- util::array<bool> drawn(objects.nlabels(), 0);
- for_all_components(i, objects.bboxes())
- if (merged_links[i] == i && ! drawn(i))
- {
- mln::draw::box(output, objects.bbox(i), literal::orange);
- drawn[i] = true;
- }
- else
- {
- mln::draw::box(output, objects.bbox(i), literal::blue);
- mln::draw::box(output, objects.bbox(merged_links[i]), literal::blue);
- drawn[i] = true;
- drawn[merged_links[i]] = true;
- }
-
- io::ppm::save(output, scribo::make::debug_filename("links.ppm"));
- }
-#endif
-
-
- // Remove links if bboxes have too different sizes.
- object_links<L> hratio_filtered_links
- = filter::object_links_bbox_h_ratio(filtered_objects,
- merged_links,
- 2.0f);
-
-
-
-
-#ifndef NOUT
- if (argc == 4)
- {
- image2d<value::rgb8>
- hratio_decision_image = scribo::debug::decision_image(input,
- merged_links,
- hratio_filtered_links);
- io::ppm::save(hratio_decision_image,
- scribo::make::debug_filename("hratio_links_decision_image.ppm"));
- }
-#endif
-
-
-
- // FIXME: from_single_link should return a packed object_groups?
- //
- //######
- object_groups<L>
- groups = primitive::group::from_single_link(filtered_objects,
- hratio_filtered_links);
- value::label_16 n_groups;
- mln::fun::i2v::array<value::label_16>
- groups_packed = mln::make::relabelfun(groups,
- filtered_objects.nlabels(),
- n_groups);
- //######
-
-
- std::cout << "Grouping objects..." << std::endl;
- object_image(L)
- grouped_objects = primitive::group::apply(filtered_objects, groups);
-
-
-
- // Compute min_row/max_row median
- std::cout << "Preparing output" << std::endl;
- {
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
-
-// scribo::draw::bounding_box_links(output,
-// filtered_objects.bboxes(),
-// hratio_filtered_links,
-// literal::green);
-
- typedef mln::value::int_u<10> median_t;
- typedef mln::accu::stat::median_h<median_t> accu_t;
- util::array<accu_t>
- med_min_row(static_cast<unsigned>(grouped_objects.nlabels()) + 1),
- med_max_row(static_cast<unsigned>(grouped_objects.nlabels()) + 1);
-
-// std::cout << "Find median min/max rows" << std::endl;
- for_all_components(i, filtered_objects.bboxes())
- {
- if (groups_packed(i) != 0)
- {
- med_min_row(groups_packed(i)).take(filtered_objects.bbox(i).pmin().row() - grouped_objects.bbox(groups_packed(i)).pmin().row());
-
- med_max_row(groups_packed(i)).take(grouped_objects.bbox(groups_packed(i)).pmax().row() - filtered_objects.bbox(i).pmax().row());
- }
- }
-
- // Output
- std::cout << "Drawing bboxes" << std::endl;
- util::array<bool> drawn(static_cast<unsigned>(filtered_objects.nlabels()) + 1, 0);
- util::array<bool> single(static_cast<unsigned>(grouped_objects.nlabels()) + 1);
- for_all_components(i, filtered_objects.bboxes())
- if (hratio_filtered_links[i] == i && ! drawn(i))
- {
- mln::draw::box(output, filtered_objects.bbox(i), literal::orange);
- drawn[i] = true;
- single(groups_packed(i)) = true;
- }
- else
- {
- mln::draw::box(output, filtered_objects.bbox(i), literal::blue);
- mln::draw::box(output, filtered_objects.bbox(hratio_filtered_links[i]),
- literal::blue);
- drawn[i] = true;
- drawn[hratio_filtered_links[i]] = true;
- single(groups_packed(i)) = false;
- }
-
-// std::cout << "Drawing median lines" << std::endl;
- for_all_components(i, grouped_objects.bboxes())
- {
- if (! single(i))
- {
- point2d
- b_top(grouped_objects.bbox(i).pmin().row() + med_min_row(i).to_result(), grouped_objects.bbox(i).pmin().col()),
- e_top(grouped_objects.bbox(i).pmin().row() + med_min_row(i).to_result(), grouped_objects.bbox(i).pmax().col()),
- b_bot(grouped_objects.bbox(i).pmax().row() - med_max_row(i).to_result(), grouped_objects.bbox(i).pmin().col()),
- e_bot(grouped_objects.bbox(i).pmax().row() - med_max_row(i).to_result(), grouped_objects.bbox(i).pmax().col());
-
- mln::draw::box(output, grouped_objects.bbox(i), literal::purple);
- mln::draw::line(output, b_top, e_top, literal::cyan);
- mln::draw::line(output, b_bot, e_bot, literal::cyan);
- }
- }
+ line_set<L> line = scribo::text::extract_lines(input, c8());
- io::ppm::save(output, argv[2]);
- }
+ image2d<value::rgb8> output = scribo::debug::line_info_image(input, line);
+ io::ppm::save(output, argv[2]);
trace::exiting("main");
}
diff --git a/scribo/src/debug/show_links_bbox_h_ratio.cc b/scribo/src/debug/show_links_bbox_h_ratio.cc
index 4377b41..7c5756f 100644
--- a/scribo/src/debug/show_links_bbox_h_ratio.cc
+++ b/scribo/src/debug/show_links_bbox_h_ratio.cc
@@ -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.
//
@@ -37,7 +38,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <scribo/primitive/extract/objects.hh>
+#include <scribo/primitive/extract/components.hh>
#include <scribo/primitive/link/with_single_right_link.hh>
#include <scribo/primitive/link/with_single_left_link.hh>
#include <scribo/filter/object_links_bbox_h_ratio.hh>
@@ -52,6 +53,7 @@ const char *args_desc[][2] =
{
{ "input.pbm", "A binary image. True for objects and False for the background." },
{ "height_ratio", "Min height ratio between two bboxes. (common value : 2)" },
+ { "max_dist", "Max neighborhood lookup distance (default 30)" },
{0, 0}
};
@@ -62,12 +64,11 @@ int main(int argc, char* argv[])
using namespace scribo::primitive::internal;
using namespace mln;
- if (argc != 4)
+ if (argc != 4 && argc != 5)
return scribo::debug::usage(argv,
"Show valid or invalid links according the bboxes height ratio.",
- "input.pbm height_ratio output.ppm",
- args_desc,
- "A color image. Valid links are drawn in green, invalid ones in red.");
+ "input.pbm height_ratio output.ppm <max_dist>",
+ args_desc);
image2d<bool> input;
io::pbm::load(input, argv[1]);
@@ -75,24 +76,27 @@ int main(int argc, char* argv[])
// Finding objects.
value::label_16 nbboxes;
typedef image2d<value::label_16> L;
- object_image(L) objects
- = scribo::primitive::extract::objects(input, c8(), nbboxes);
+ component_set<L> comps
+ = scribo::primitive::extract::components(input, c8(), nbboxes);
+ unsigned max_dist = 30;
+ if (argc == 5)
+ max_dist = atoi(argv[4]);
// Finding right links.
object_links<L> right_links
- = primitive::link::with_single_right_link(objects);
+ = primitive::link::with_single_right_link(comps, max_dist);
// Filtering.
object_links<L> hratio_filtered_links
- = filter::object_links_bbox_h_ratio(objects, right_links, atof(argv[2]));
+ = filter::object_links_bbox_h_ratio(right_links, atof(argv[2]));
// Debug image.
image2d<value::rgb8> hratio_decision_image
= scribo::debug::links_decision_image(input,
right_links,
- hratio_filtered_links, 200);
+ hratio_filtered_links);
io::ppm::save(hratio_decision_image, argv[3]);
}
diff --git a/scribo/src/debug/show_links_left_right_links_validation.cc b/scribo/src/debug/show_links_left_right_links_validation.cc
index 3c5d1bf..e022fa5 100644
--- a/scribo/src/debug/show_links_left_right_links_validation.cc
+++ b/scribo/src/debug/show_links_left_right_links_validation.cc
@@ -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.
//
@@ -39,7 +40,7 @@
#include <scribo/core/object_links.hh>
#include <scribo/core/object_image.hh>
-#include <scribo/primitive/extract/objects.hh>
+#include <scribo/primitive/extract/components.hh>
#include <scribo/primitive/link/with_single_left_link.hh>
#include <scribo/primitive/link/with_single_right_link.hh>
@@ -70,8 +71,7 @@ int main(int argc, char *argv[])
return scribo::debug::usage(argv,
"Display double validated (left and right) links between objects",
"<input.pbm> <hlmax> <hrmax> <output.ppm>",
- args_desc,
- "A color image. Validated links are drawn in green.");
+ args_desc);
image2d<bool> input;
io::pbm::load(input, argv[1]);
@@ -79,43 +79,41 @@ int main(int argc, char *argv[])
// Finding objects.
value::label_16 nbboxes;
typedef image2d<value::label_16> L;
- object_image(L) objects = primitive::extract::objects(input, c8(), nbboxes);
+ component_set<L> comps = primitive::extract::components(input, c8(), nbboxes);
// Left links.
object_links<L> left_link
- = primitive::link::with_single_left_link(objects, atoi(argv[2]));
+ = primitive::link::with_single_left_link(comps, atoi(argv[2]));
// Right links.
object_links<L> right_link
- = primitive::link::with_single_right_link(objects, atoi(argv[3]));
+ = primitive::link::with_single_right_link(comps, atoi(argv[3]));
// Validation.
object_links<L>
- links = primitive::link::merge_double_link(objects, left_link, right_link);
+ links = primitive::link::merge_double_link(left_link, right_link);
// Saving result.
image2d<value::rgb8> output = data::convert(value::rgb8(), input);
-// scribo::draw::bounding_boxes(output, objects, literal::blue);
scribo::draw::bounding_box_links(output,
- objects.bboxes(),
links,
- literal::green);
+ literal::green, anchor::MassCenter);
- util::array<bool> drawn(static_cast<unsigned>(objects.nlabels()) + 1, 0);
- for_all_components(i, objects.bboxes())
- if (links[i] == i && ! drawn(i))
+ util::array<bool> drawn(unsigned(comps.nelements()) + 1, 0);
+ for_all_comps(i, comps)
+ if (links(i) == i && ! drawn(i))
{
- mln::draw::box(output, objects.bbox(i), literal::orange);
+ mln::draw::box(output, comps(i).bbox(), literal::orange);
drawn[i] = true;
}
else
{
- mln::draw::box(output, objects.bbox(i), literal::blue);
- mln::draw::box(output, objects.bbox(links[i]), literal::blue);
+ mln::draw::box(output, comps(i).bbox(), literal::blue);
+ mln::draw::box(output, comps(links(i)).bbox(), literal::blue);
drawn[i] = true;
- drawn[links[i]] = true;
+ drawn[links(i)] = true;
}
io::ppm::save(output, argv[4]);
diff --git a/scribo/tests/unit_test/unit-tests.mk b/scribo/tests/unit_test/unit-tests.mk
index 055b90e..a37db3b 100644
--- a/scribo/tests/unit_test/unit-tests.mk
+++ b/scribo/tests/unit_test/unit-tests.mk
@@ -2,23 +2,45 @@
check_PROGRAMS = \
scribo_all \
-scribo_binarization_binarize \
+scribo_binarization_global_threshold \
+scribo_binarization_global_threshold_auto \
+scribo_binarization_internal_first_pass_functor \
+scribo_binarization_internal_min_mean_max_stddev \
+scribo_binarization_local_threshold \
scribo_binarization_sauvola \
-scribo_binarization_sauvola_threshold \
-scribo_binarization_simple \
+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_convert_from_qimage \
scribo_core_all \
scribo_core_central_sites \
+scribo_core_component_info \
+scribo_core_component_set \
+scribo_core_concept_dmax_functor \
scribo_core_concept_link_functor \
+scribo_core_def_lbl_type \
scribo_core_erase_objects \
+scribo_core_init_integral_image \
scribo_core_internal_link_functor_base \
+scribo_core_line_info \
+scribo_core_line_set \
scribo_core_macros \
scribo_core_object_groups \
scribo_core_object_image \
scribo_core_object_links \
+scribo_core_tag_anchor \
+scribo_core_tag_component \
+scribo_core_tag_line \
scribo_debug_alignment_decision_image \
scribo_debug_all \
+scribo_debug_bboxes_enlarged_image \
scribo_debug_decision_image \
+scribo_debug_highlight_text_area \
scribo_debug_links_decision_image \
+scribo_debug_looks_like_a_text_line_image \
+scribo_debug_mean_and_base_lines_image \
scribo_debug_save_bboxes_image \
scribo_debug_save_label_image \
scribo_debug_save_linked_bboxes_image \
@@ -26,26 +48,83 @@ scribo_debug_save_object_diff \
scribo_debug_save_table_image \
scribo_debug_several_links_decision_image \
scribo_debug_usage \
+scribo_demo_demat_src_doc_type \
+scribo_demo_demat_src_main_window \
+scribo_demo_demat_src_preprocessing_task \
+scribo_demo_demat_src_process_args \
+scribo_demo_demat_src_runner \
+scribo_demo_review_src_mainwindow \
+scribo_demo_shared_src_bak_crop_item \
+scribo_demo_shared_src_bak_image_viewer \
+scribo_demo_shared_src_bak_types \
+scribo_demo_shared_src_browse_widget \
+scribo_demo_shared_src_crop_item \
+scribo_demo_shared_src_image_viewer \
+scribo_demo_shared_src_internal_bak_interactive_scene \
+scribo_demo_shared_src_internal_bak_selection_rectangle \
+scribo_demo_shared_src_internal_interactive_scene \
+scribo_demo_shared_src_internal_selection_rectangle \
+scribo_demo_shared_src_to_mln_image \
+scribo_demo_shared_src_types \
+scribo_demo_shared_ui_interactive_scene \
+scribo_demo_tip_src_custom_delegate \
+scribo_demo_tip_src_launch_dialog \
+scribo_demo_tip_src_main_window \
+scribo_demo_viewer_browser_widget \
+scribo_demo_viewer_common \
+scribo_demo_viewer_domitem \
+scribo_demo_viewer_dommodel \
+scribo_demo_viewer_help_dialog \
+scribo_demo_viewer_image_region \
+scribo_demo_viewer_image_scene \
+scribo_demo_viewer_image_view \
+scribo_demo_viewer_image_widget \
+scribo_demo_viewer_key_widget \
+scribo_demo_viewer_property_widget \
+scribo_demo_viewer_step_widget \
+scribo_demo_viewer_viewer \
+scribo_demo_viewer_xml_widget \
+scribo_demo_wizard_src_crop_page \
+scribo_demo_wizard_src_crop_widget \
+scribo_demo_wizard_src_doc_type \
+scribo_demo_wizard_src_doc_type_page \
+scribo_demo_wizard_src_doc_type_widget \
+scribo_demo_wizard_src_load_page \
+scribo_demo_wizard_src_load_widget \
+scribo_demo_wizard_src_main_window \
+scribo_demo_wizard_src_preprocessing_page \
+scribo_demo_wizard_src_preprocessing_task \
+scribo_demo_wizard_src_preprocessing_widget \
+scribo_demo_wizard_src_process_page \
+scribo_demo_wizard_src_process_widget \
+scribo_demo_wizard_src_result_page \
+scribo_demo_wizard_src_result_widget \
+scribo_demo_wizard_src_rotate_page \
+scribo_demo_wizard_src_rotate_widget \
+scribo_demo_wizard_src_runner \
scribo_draw_all \
scribo_draw_bounding_box_links \
scribo_draw_bounding_boxes \
+scribo_draw_groups_bboxes \
scribo_estim_object_groups_v_thickness \
scribo_filter_all \
scribo_filter_common_objects_photo \
+scribo_filter_internal_alignment_angle \
+scribo_filter_internal_component_aligned \
scribo_filter_internal_compute \
scribo_filter_object_groups_size_ratio \
scribo_filter_object_groups_small \
scribo_filter_object_groups_v_thickness \
+scribo_filter_object_groups_with_holes \
scribo_filter_object_links_bbox_h_ratio \
scribo_filter_object_links_bbox_overlap \
scribo_filter_object_links_bbox_ratio \
scribo_filter_object_links_bbox_w_ratio \
scribo_filter_object_links_bottom_aligned \
scribo_filter_object_links_center_aligned \
-scribo_filter_object_links_non_aligned \
+scribo_filter_object_links_left_aligned \
scribo_filter_object_links_non_aligned_simple \
-scribo_filter_object_links_non_h_aligned \
-scribo_filter_object_links_non_v_aligned \
+scribo_filter_object_links_right_aligned \
scribo_filter_object_links_top_aligned \
scribo_filter_objects_h_thick \
scribo_filter_objects_h_thin \
@@ -56,18 +135,34 @@ scribo_filter_objects_thick \
scribo_filter_objects_thin \
scribo_filter_objects_v_thick \
scribo_filter_objects_v_thin \
+scribo_filter_objects_with_holes \
+scribo_fun_v2b_label_to_bool \
+scribo_fun_v2b_objects_large_filter \
scribo_fun_v2b_objects_small_filter \
+scribo_io_text_boxes_save \
+scribo_io_xml_save \
scribo_make_all \
scribo_make_debug_filename \
scribo_make_influence_zone_graph \
scribo_make_text \
+scribo_postprocessing_fill_object_holes \
scribo_preprocessing_all \
+scribo_preprocessing_crop \
+scribo_preprocessing_crop_without_localization \
+scribo_preprocessing_denoise \
+scribo_preprocessing_denoise_bg \
+scribo_preprocessing_denoise_fg \
+scribo_preprocessing_deskew \
+scribo_preprocessing_deskew_crop \
+scribo_preprocessing_homogeneous_contrast \
+scribo_preprocessing_rotate_90 \
scribo_preprocessing_split_bg_fg \
-scribo_preprocessing_unskew \
scribo_primitive_all \
scribo_primitive_extract_all \
scribo_primitive_extract_canvas \
scribo_primitive_extract_cells \
+scribo_primitive_extract_components \
+scribo_primitive_extract_horizontal_separators \
scribo_primitive_extract_lines_discontinued \
scribo_primitive_extract_lines_h_discontinued \
scribo_primitive_extract_lines_h_pattern \
@@ -81,32 +176,39 @@ scribo_primitive_extract_lines_v_pattern \
scribo_primitive_extract_lines_v_single \
scribo_primitive_extract_lines_v_thick \
scribo_primitive_extract_lines_v_thick_and_single \
-scribo_primitive_extract_objects \
+scribo_primitive_extract_separators \
+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_group_from_single_link_robust \
scribo_primitive_internal_all \
scribo_primitive_internal_find_graph_link \
-scribo_primitive_internal_find_left_link \
-scribo_primitive_internal_find_right_link \
scribo_primitive_internal_find_root \
+scribo_primitive_internal_find_root_robust \
scribo_primitive_internal_have_link_valid \
-scribo_primitive_internal_init_link_array \
-scribo_primitive_internal_is_invalid_link \
scribo_primitive_internal_is_link_valid \
+scribo_primitive_internal_rd \
scribo_primitive_internal_update_graph_link \
scribo_primitive_internal_update_link_array \
scribo_primitive_link_all \
scribo_primitive_link_compute \
scribo_primitive_link_internal_anchors_3 \
+scribo_primitive_link_internal_compute_anchor \
+scribo_primitive_link_internal_dmax_default \
+scribo_primitive_link_internal_dmax_functor_base \
+scribo_primitive_link_internal_dmax_width_and_height \
+scribo_primitive_link_internal_dmax_width_only \
scribo_primitive_link_internal_find_link \
-scribo_primitive_link_internal_link_center_dmax_base \
-scribo_primitive_link_internal_link_center_dmax_ratio_base \
scribo_primitive_link_internal_link_functor_base \
scribo_primitive_link_internal_link_ms_dmax_base \
scribo_primitive_link_internal_link_ms_dmax_ratio_base \
+scribo_primitive_link_internal_link_several_dmax_base \
+scribo_primitive_link_internal_link_single_dmax_base \
+scribo_primitive_link_internal_link_single_dmax_ratio_base \
scribo_primitive_link_merge_double_link \
scribo_primitive_link_with_graph \
scribo_primitive_link_with_rag \
@@ -114,12 +216,76 @@ scribo_primitive_link_with_several_graphes \
scribo_primitive_link_with_several_left_links \
scribo_primitive_link_with_several_right_closest_links \
scribo_primitive_link_with_several_right_links \
+scribo_primitive_link_with_single_down_link \
scribo_primitive_link_with_single_left_link \
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_regroup_from_single_left_link \
+scribo_primitive_remove_separators \
+scribo_sandbox__julien_hough_hough_hough_pgm \
+scribo_sandbox__julien_hough_hough_hough_v1 \
+scribo_sandbox__julien_hough_hough_hough_v2 \
+scribo_sandbox__julien_hough_hough_hough_v3 \
+scribo_sandbox__julien_hough_hough_hough_v4 \
+scribo_sandbox__julien_hough_kht_buffer_2d \
+scribo_sandbox__julien_hough_kht_closing \
+scribo_sandbox__julien_hough_kht_eigen \
+scribo_sandbox__julien_hough_kht_filter \
+scribo_sandbox__julien_hough_kht_kht \
+scribo_sandbox__julien_hough_kht_linking \
+scribo_sandbox__julien_hough_kht_peak_detection \
+scribo_sandbox__julien_hough_kht_subdivision \
+scribo_sandbox__julien_hough_kht_types \
+scribo_sandbox__julien_hough_kht_voting \
+scribo_sandbox__julien_upsampling_eagle \
+scribo_sandbox__julien_upsampling_pyxies \
+scribo_sandbox_green_mln_accu_stat_histo1d \
+scribo_sandbox_green_mln_accu_stat_histo2d \
+scribo_sandbox_green_mln_accu_stat_histo3d_hsl \
+scribo_sandbox_green_mln_accu_stat_histo3d_rgb \
+scribo_sandbox_green_mln_clustering_k_mean \
+scribo_sandbox_green_mln_clustering_kmean1d \
+scribo_sandbox_green_mln_clustering_kmean2d \
+scribo_sandbox_green_mln_clustering_kmean3d \
+scribo_sandbox_green_mln_clustering_kmean_rgb \
+scribo_sandbox_green_mln_display_display_histo \
+scribo_sandbox_green_mln_display_project_histo \
+scribo_sandbox_green_mln_fun_p2b_achromatic \
+scribo_sandbox_green_mln_fun_p2b_component_equals \
+scribo_sandbox_green_mln_fun_v2v_achromatism \
+scribo_sandbox_green_mln_fun_v2v_hue_concentration \
+scribo_sandbox_green_mln_fun_v2v_int_u16_to_int_u14 \
+scribo_sandbox_green_mln_fun_v2v_log \
+scribo_sandbox_green_mln_fun_v2v_rg_to_rgb \
+scribo_sandbox_green_mln_fun_v2v_rgb8_to_int_u8 \
+scribo_sandbox_green_mln_fun_v2v_rgb8_to_rgbn \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_achromatism_map \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_hsv \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_hue_map \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_rg \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_saturation_map \
+scribo_sandbox_green_mln_fun_v2v_rgb_to_value_map \
+scribo_sandbox_green_mln_img_path \
+scribo_sandbox_green_mln_io_plot_save_image_sh \
+scribo_sandbox_green_mln_math_ceil \
+scribo_sandbox_green_mln_math_floor \
+scribo_sandbox_green_mln_value_hsv \
+scribo_sandbox_green_mln_value_rg \
+scribo_sandbox_green_ok_mln_accu_histo_histo1d \
+scribo_sandbox_green_ok_mln_accu_histo_histo2d \
+scribo_sandbox_green_ok_mln_accu_histo_histo3d \
+scribo_sandbox_green_ok_mln_img_path \
+scribo_src_afp_components \
+scribo_src_afp_link \
+scribo_src_afp_regroup \
+scribo_subsampling_bilinear \
+scribo_subsampling_integral \
+scribo_subsampling_integral_single_image \
scribo_table_align_lines_horizontaly \
scribo_table_align_lines_verticaly \
scribo_table_all \
@@ -136,28 +302,55 @@ scribo_table_repair_horizontal_lines \
scribo_table_repair_vertical_lines \
scribo_text_all \
scribo_text_clean \
+scribo_text_clean_inplace \
scribo_text_extract_lines \
-scribo_util_all \
-scribo_util_text
+scribo_text_look_like_text_lines \
+scribo_text_merging \
+scribo_toolchain_nepomuk_text_extraction \
+scribo_toolchain_text_in_doc \
+scribo_upsampling_bs2x \
+scribo_upsampling_eagle
scribo_all_SOURCES = scribo_all.cc
-scribo_binarization_binarize_SOURCES = scribo_binarization_binarize.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_first_pass_functor_SOURCES = scribo_binarization_internal_first_pass_functor.cc
+scribo_binarization_internal_min_mean_max_stddev_SOURCES = scribo_binarization_internal_min_mean_max_stddev.cc
+scribo_binarization_local_threshold_SOURCES = scribo_binarization_local_threshold.cc
scribo_binarization_sauvola_SOURCES = scribo_binarization_sauvola.cc
-scribo_binarization_sauvola_threshold_SOURCES = scribo_binarization_sauvola_threshold.cc
-scribo_binarization_simple_SOURCES = scribo_binarization_simple.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_convert_from_qimage_SOURCES = scribo_convert_from_qimage.cc
scribo_core_all_SOURCES = scribo_core_all.cc
scribo_core_central_sites_SOURCES = scribo_core_central_sites.cc
+scribo_core_component_info_SOURCES = scribo_core_component_info.cc
+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_erase_objects_SOURCES = scribo_core_erase_objects.cc
+scribo_core_init_integral_image_SOURCES = scribo_core_init_integral_image.cc
scribo_core_internal_link_functor_base_SOURCES = scribo_core_internal_link_functor_base.cc
+scribo_core_line_info_SOURCES = scribo_core_line_info.cc
+scribo_core_line_set_SOURCES = scribo_core_line_set.cc
scribo_core_macros_SOURCES = scribo_core_macros.cc
scribo_core_object_groups_SOURCES = scribo_core_object_groups.cc
scribo_core_object_image_SOURCES = scribo_core_object_image.cc
scribo_core_object_links_SOURCES = scribo_core_object_links.cc
+scribo_core_tag_anchor_SOURCES = scribo_core_tag_anchor.cc
+scribo_core_tag_component_SOURCES = scribo_core_tag_component.cc
+scribo_core_tag_line_SOURCES = scribo_core_tag_line.cc
scribo_debug_alignment_decision_image_SOURCES = scribo_debug_alignment_decision_image.cc
scribo_debug_all_SOURCES = scribo_debug_all.cc
+scribo_debug_bboxes_enlarged_image_SOURCES = scribo_debug_bboxes_enlarged_image.cc
scribo_debug_decision_image_SOURCES = scribo_debug_decision_image.cc
+scribo_debug_highlight_text_area_SOURCES = scribo_debug_highlight_text_area.cc
scribo_debug_links_decision_image_SOURCES = scribo_debug_links_decision_image.cc
+scribo_debug_looks_like_a_text_line_image_SOURCES = scribo_debug_looks_like_a_text_line_image.cc
+scribo_debug_mean_and_base_lines_image_SOURCES = scribo_debug_mean_and_base_lines_image.cc
scribo_debug_save_bboxes_image_SOURCES = scribo_debug_save_bboxes_image.cc
scribo_debug_save_label_image_SOURCES = scribo_debug_save_label_image.cc
scribo_debug_save_linked_bboxes_image_SOURCES = scribo_debug_save_linked_bboxes_image.cc
@@ -165,26 +358,83 @@ scribo_debug_save_object_diff_SOURCES = scribo_debug_save_object_diff.cc
scribo_debug_save_table_image_SOURCES = scribo_debug_save_table_image.cc
scribo_debug_several_links_decision_image_SOURCES = scribo_debug_several_links_decision_image.cc
scribo_debug_usage_SOURCES = scribo_debug_usage.cc
+scribo_demo_demat_src_doc_type_SOURCES = scribo_demo_demat_src_doc_type.cc
+scribo_demo_demat_src_main_window_SOURCES = scribo_demo_demat_src_main_window.cc
+scribo_demo_demat_src_preprocessing_task_SOURCES = scribo_demo_demat_src_preprocessing_task.cc
+scribo_demo_demat_src_process_args_SOURCES = scribo_demo_demat_src_process_args.cc
+scribo_demo_demat_src_runner_SOURCES = scribo_demo_demat_src_runner.cc
+scribo_demo_review_src_mainwindow_SOURCES = scribo_demo_review_src_mainwindow.cc
+scribo_demo_shared_src_bak_crop_item_SOURCES = scribo_demo_shared_src_bak_crop_item.cc
+scribo_demo_shared_src_bak_image_viewer_SOURCES = scribo_demo_shared_src_bak_image_viewer.cc
+scribo_demo_shared_src_bak_types_SOURCES = scribo_demo_shared_src_bak_types.cc
+scribo_demo_shared_src_browse_widget_SOURCES = scribo_demo_shared_src_browse_widget.cc
+scribo_demo_shared_src_crop_item_SOURCES = scribo_demo_shared_src_crop_item.cc
+scribo_demo_shared_src_image_viewer_SOURCES = scribo_demo_shared_src_image_viewer.cc
+scribo_demo_shared_src_internal_bak_interactive_scene_SOURCES = scribo_demo_shared_src_internal_bak_interactive_scene.cc
+scribo_demo_shared_src_internal_bak_selection_rectangle_SOURCES = scribo_demo_shared_src_internal_bak_selection_rectangle.cc
+scribo_demo_shared_src_internal_interactive_scene_SOURCES = scribo_demo_shared_src_internal_interactive_scene.cc
+scribo_demo_shared_src_internal_selection_rectangle_SOURCES = scribo_demo_shared_src_internal_selection_rectangle.cc
+scribo_demo_shared_src_to_mln_image_SOURCES = scribo_demo_shared_src_to_mln_image.cc
+scribo_demo_shared_src_types_SOURCES = scribo_demo_shared_src_types.cc
+scribo_demo_shared_ui_interactive_scene_SOURCES = scribo_demo_shared_ui_interactive_scene.cc
+scribo_demo_tip_src_custom_delegate_SOURCES = scribo_demo_tip_src_custom_delegate.cc
+scribo_demo_tip_src_launch_dialog_SOURCES = scribo_demo_tip_src_launch_dialog.cc
+scribo_demo_tip_src_main_window_SOURCES = scribo_demo_tip_src_main_window.cc
+scribo_demo_viewer_browser_widget_SOURCES = scribo_demo_viewer_browser_widget.cc
+scribo_demo_viewer_common_SOURCES = scribo_demo_viewer_common.cc
+scribo_demo_viewer_domitem_SOURCES = scribo_demo_viewer_domitem.cc
+scribo_demo_viewer_dommodel_SOURCES = scribo_demo_viewer_dommodel.cc
+scribo_demo_viewer_help_dialog_SOURCES = scribo_demo_viewer_help_dialog.cc
+scribo_demo_viewer_image_region_SOURCES = scribo_demo_viewer_image_region.cc
+scribo_demo_viewer_image_scene_SOURCES = scribo_demo_viewer_image_scene.cc
+scribo_demo_viewer_image_view_SOURCES = scribo_demo_viewer_image_view.cc
+scribo_demo_viewer_image_widget_SOURCES = scribo_demo_viewer_image_widget.cc
+scribo_demo_viewer_key_widget_SOURCES = scribo_demo_viewer_key_widget.cc
+scribo_demo_viewer_property_widget_SOURCES = scribo_demo_viewer_property_widget.cc
+scribo_demo_viewer_step_widget_SOURCES = scribo_demo_viewer_step_widget.cc
+scribo_demo_viewer_viewer_SOURCES = scribo_demo_viewer_viewer.cc
+scribo_demo_viewer_xml_widget_SOURCES = scribo_demo_viewer_xml_widget.cc
+scribo_demo_wizard_src_crop_page_SOURCES = scribo_demo_wizard_src_crop_page.cc
+scribo_demo_wizard_src_crop_widget_SOURCES = scribo_demo_wizard_src_crop_widget.cc
+scribo_demo_wizard_src_doc_type_SOURCES = scribo_demo_wizard_src_doc_type.cc
+scribo_demo_wizard_src_doc_type_page_SOURCES = scribo_demo_wizard_src_doc_type_page.cc
+scribo_demo_wizard_src_doc_type_widget_SOURCES = scribo_demo_wizard_src_doc_type_widget.cc
+scribo_demo_wizard_src_load_page_SOURCES = scribo_demo_wizard_src_load_page.cc
+scribo_demo_wizard_src_load_widget_SOURCES = scribo_demo_wizard_src_load_widget.cc
+scribo_demo_wizard_src_main_window_SOURCES = scribo_demo_wizard_src_main_window.cc
+scribo_demo_wizard_src_preprocessing_page_SOURCES = scribo_demo_wizard_src_preprocessing_page.cc
+scribo_demo_wizard_src_preprocessing_task_SOURCES = scribo_demo_wizard_src_preprocessing_task.cc
+scribo_demo_wizard_src_preprocessing_widget_SOURCES = scribo_demo_wizard_src_preprocessing_widget.cc
+scribo_demo_wizard_src_process_page_SOURCES = scribo_demo_wizard_src_process_page.cc
+scribo_demo_wizard_src_process_widget_SOURCES = scribo_demo_wizard_src_process_widget.cc
+scribo_demo_wizard_src_result_page_SOURCES = scribo_demo_wizard_src_result_page.cc
+scribo_demo_wizard_src_result_widget_SOURCES = scribo_demo_wizard_src_result_widget.cc
+scribo_demo_wizard_src_rotate_page_SOURCES = scribo_demo_wizard_src_rotate_page.cc
+scribo_demo_wizard_src_rotate_widget_SOURCES = scribo_demo_wizard_src_rotate_widget.cc
+scribo_demo_wizard_src_runner_SOURCES = scribo_demo_wizard_src_runner.cc
scribo_draw_all_SOURCES = scribo_draw_all.cc
scribo_draw_bounding_box_links_SOURCES = scribo_draw_bounding_box_links.cc
scribo_draw_bounding_boxes_SOURCES = scribo_draw_bounding_boxes.cc
+scribo_draw_groups_bboxes_SOURCES = scribo_draw_groups_bboxes.cc
scribo_estim_object_groups_v_thickness_SOURCES = scribo_estim_object_groups_v_thickness.cc
scribo_filter_all_SOURCES = scribo_filter_all.cc
scribo_filter_common_objects_photo_SOURCES = scribo_filter_common_objects_photo.cc
+scribo_filter_internal_alignment_angle_SOURCES = scribo_filter_internal_alignment_angle.cc
+scribo_filter_internal_component_aligned_SOURCES = scribo_filter_internal_component_aligned.cc
scribo_filter_internal_compute_SOURCES = scribo_filter_internal_compute.cc
scribo_filter_object_groups_size_ratio_SOURCES = scribo_filter_object_groups_size_ratio.cc
scribo_filter_object_groups_small_SOURCES = scribo_filter_object_groups_small.cc
scribo_filter_object_groups_v_thickness_SOURCES = scribo_filter_object_groups_v_thickness.cc
+scribo_filter_object_groups_with_holes_SOURCES = scribo_filter_object_groups_with_holes.cc
scribo_filter_object_links_bbox_h_ratio_SOURCES = scribo_filter_object_links_bbox_h_ratio.cc
scribo_filter_object_links_bbox_overlap_SOURCES = scribo_filter_object_links_bbox_overlap.cc
scribo_filter_object_links_bbox_ratio_SOURCES = scribo_filter_object_links_bbox_ratio.cc
scribo_filter_object_links_bbox_w_ratio_SOURCES = scribo_filter_object_links_bbox_w_ratio.cc
scribo_filter_object_links_bottom_aligned_SOURCES = scribo_filter_object_links_bottom_aligned.cc
scribo_filter_object_links_center_aligned_SOURCES = scribo_filter_object_links_center_aligned.cc
-scribo_filter_object_links_non_aligned_SOURCES = scribo_filter_object_links_non_aligned.cc
+scribo_filter_object_links_left_aligned_SOURCES = scribo_filter_object_links_left_aligned.cc
scribo_filter_object_links_non_aligned_simple_SOURCES = scribo_filter_object_links_non_aligned_simple.cc
-scribo_filter_object_links_non_h_aligned_SOURCES = scribo_filter_object_links_non_h_aligned.cc
-scribo_filter_object_links_non_v_aligned_SOURCES = scribo_filter_object_links_non_v_aligned.cc
+scribo_filter_object_links_right_aligned_SOURCES = scribo_filter_object_links_right_aligned.cc
scribo_filter_object_links_top_aligned_SOURCES = scribo_filter_object_links_top_aligned.cc
scribo_filter_objects_h_thick_SOURCES = scribo_filter_objects_h_thick.cc
scribo_filter_objects_h_thin_SOURCES = scribo_filter_objects_h_thin.cc
@@ -195,18 +445,34 @@ scribo_filter_objects_thick_SOURCES = scribo_filter_objects_thick.cc
scribo_filter_objects_thin_SOURCES = scribo_filter_objects_thin.cc
scribo_filter_objects_v_thick_SOURCES = scribo_filter_objects_v_thick.cc
scribo_filter_objects_v_thin_SOURCES = scribo_filter_objects_v_thin.cc
+scribo_filter_objects_with_holes_SOURCES = scribo_filter_objects_with_holes.cc
+scribo_fun_v2b_label_to_bool_SOURCES = scribo_fun_v2b_label_to_bool.cc
+scribo_fun_v2b_objects_large_filter_SOURCES = scribo_fun_v2b_objects_large_filter.cc
scribo_fun_v2b_objects_small_filter_SOURCES = scribo_fun_v2b_objects_small_filter.cc
+scribo_io_text_boxes_save_SOURCES = scribo_io_text_boxes_save.cc
+scribo_io_xml_save_SOURCES = scribo_io_xml_save.cc
scribo_make_all_SOURCES = scribo_make_all.cc
scribo_make_debug_filename_SOURCES = scribo_make_debug_filename.cc
scribo_make_influence_zone_graph_SOURCES = scribo_make_influence_zone_graph.cc
scribo_make_text_SOURCES = scribo_make_text.cc
+scribo_postprocessing_fill_object_holes_SOURCES = scribo_postprocessing_fill_object_holes.cc
scribo_preprocessing_all_SOURCES = scribo_preprocessing_all.cc
+scribo_preprocessing_crop_SOURCES = scribo_preprocessing_crop.cc
+scribo_preprocessing_crop_without_localization_SOURCES = scribo_preprocessing_crop_without_localization.cc
+scribo_preprocessing_denoise_SOURCES = scribo_preprocessing_denoise.cc
+scribo_preprocessing_denoise_bg_SOURCES = scribo_preprocessing_denoise_bg.cc
+scribo_preprocessing_denoise_fg_SOURCES = scribo_preprocessing_denoise_fg.cc
+scribo_preprocessing_deskew_SOURCES = scribo_preprocessing_deskew.cc
+scribo_preprocessing_deskew_crop_SOURCES = scribo_preprocessing_deskew_crop.cc
+scribo_preprocessing_homogeneous_contrast_SOURCES = scribo_preprocessing_homogeneous_contrast.cc
+scribo_preprocessing_rotate_90_SOURCES = scribo_preprocessing_rotate_90.cc
scribo_preprocessing_split_bg_fg_SOURCES = scribo_preprocessing_split_bg_fg.cc
-scribo_preprocessing_unskew_SOURCES = scribo_preprocessing_unskew.cc
scribo_primitive_all_SOURCES = scribo_primitive_all.cc
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_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
scribo_primitive_extract_lines_h_pattern_SOURCES = scribo_primitive_extract_lines_h_pattern.cc
@@ -220,32 +486,39 @@ scribo_primitive_extract_lines_v_pattern_SOURCES = scribo_primitive_extract_line
scribo_primitive_extract_lines_v_single_SOURCES = scribo_primitive_extract_lines_v_single.cc
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_objects_SOURCES = scribo_primitive_extract_objects.cc
+scribo_primitive_extract_separators_SOURCES = scribo_primitive_extract_separators.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_group_from_single_link_robust_SOURCES = scribo_primitive_group_from_single_link_robust.cc
scribo_primitive_internal_all_SOURCES = scribo_primitive_internal_all.cc
scribo_primitive_internal_find_graph_link_SOURCES = scribo_primitive_internal_find_graph_link.cc
-scribo_primitive_internal_find_left_link_SOURCES = scribo_primitive_internal_find_left_link.cc
-scribo_primitive_internal_find_right_link_SOURCES = scribo_primitive_internal_find_right_link.cc
scribo_primitive_internal_find_root_SOURCES = scribo_primitive_internal_find_root.cc
+scribo_primitive_internal_find_root_robust_SOURCES = scribo_primitive_internal_find_root_robust.cc
scribo_primitive_internal_have_link_valid_SOURCES = scribo_primitive_internal_have_link_valid.cc
-scribo_primitive_internal_init_link_array_SOURCES = scribo_primitive_internal_init_link_array.cc
-scribo_primitive_internal_is_invalid_link_SOURCES = scribo_primitive_internal_is_invalid_link.cc
scribo_primitive_internal_is_link_valid_SOURCES = scribo_primitive_internal_is_link_valid.cc
+scribo_primitive_internal_rd_SOURCES = scribo_primitive_internal_rd.cc
scribo_primitive_internal_update_graph_link_SOURCES = scribo_primitive_internal_update_graph_link.cc
scribo_primitive_internal_update_link_array_SOURCES = scribo_primitive_internal_update_link_array.cc
scribo_primitive_link_all_SOURCES = scribo_primitive_link_all.cc
scribo_primitive_link_compute_SOURCES = scribo_primitive_link_compute.cc
scribo_primitive_link_internal_anchors_3_SOURCES = scribo_primitive_link_internal_anchors_3.cc
+scribo_primitive_link_internal_compute_anchor_SOURCES = scribo_primitive_link_internal_compute_anchor.cc
+scribo_primitive_link_internal_dmax_default_SOURCES = scribo_primitive_link_internal_dmax_default.cc
+scribo_primitive_link_internal_dmax_functor_base_SOURCES = scribo_primitive_link_internal_dmax_functor_base.cc
+scribo_primitive_link_internal_dmax_width_and_height_SOURCES = scribo_primitive_link_internal_dmax_width_and_height.cc
+scribo_primitive_link_internal_dmax_width_only_SOURCES = scribo_primitive_link_internal_dmax_width_only.cc
scribo_primitive_link_internal_find_link_SOURCES = scribo_primitive_link_internal_find_link.cc
-scribo_primitive_link_internal_link_center_dmax_base_SOURCES = scribo_primitive_link_internal_link_center_dmax_base.cc
-scribo_primitive_link_internal_link_center_dmax_ratio_base_SOURCES = scribo_primitive_link_internal_link_center_dmax_ratio_base.cc
scribo_primitive_link_internal_link_functor_base_SOURCES = scribo_primitive_link_internal_link_functor_base.cc
scribo_primitive_link_internal_link_ms_dmax_base_SOURCES = scribo_primitive_link_internal_link_ms_dmax_base.cc
scribo_primitive_link_internal_link_ms_dmax_ratio_base_SOURCES = scribo_primitive_link_internal_link_ms_dmax_ratio_base.cc
+scribo_primitive_link_internal_link_several_dmax_base_SOURCES = scribo_primitive_link_internal_link_several_dmax_base.cc
+scribo_primitive_link_internal_link_single_dmax_base_SOURCES = scribo_primitive_link_internal_link_single_dmax_base.cc
+scribo_primitive_link_internal_link_single_dmax_ratio_base_SOURCES = scribo_primitive_link_internal_link_single_dmax_ratio_base.cc
scribo_primitive_link_merge_double_link_SOURCES = scribo_primitive_link_merge_double_link.cc
scribo_primitive_link_with_graph_SOURCES = scribo_primitive_link_with_graph.cc
scribo_primitive_link_with_rag_SOURCES = scribo_primitive_link_with_rag.cc
@@ -253,12 +526,76 @@ scribo_primitive_link_with_several_graphes_SOURCES = scribo_primitive_link_with_
scribo_primitive_link_with_several_left_links_SOURCES = scribo_primitive_link_with_several_left_links.cc
scribo_primitive_link_with_several_right_closest_links_SOURCES = scribo_primitive_link_with_several_right_closest_links.cc
scribo_primitive_link_with_several_right_links_SOURCES = scribo_primitive_link_with_several_right_links.cc
+scribo_primitive_link_with_single_down_link_SOURCES = scribo_primitive_link_with_single_down_link.cc
scribo_primitive_link_with_single_left_link_SOURCES = scribo_primitive_link_with_single_left_link.cc
scribo_primitive_link_with_single_left_link_dmax_ratio_SOURCES = scribo_primitive_link_with_single_left_link_dmax_ratio.cc
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_regroup_from_single_left_link_SOURCES = scribo_primitive_regroup_from_single_left_link.cc
+scribo_primitive_remove_separators_SOURCES = scribo_primitive_remove_separators.cc
+scribo_sandbox__julien_hough_hough_hough_pgm_SOURCES = scribo_sandbox__julien_hough_hough_hough_pgm.cc
+scribo_sandbox__julien_hough_hough_hough_v1_SOURCES = scribo_sandbox__julien_hough_hough_hough_v1.cc
+scribo_sandbox__julien_hough_hough_hough_v2_SOURCES = scribo_sandbox__julien_hough_hough_hough_v2.cc
+scribo_sandbox__julien_hough_hough_hough_v3_SOURCES = scribo_sandbox__julien_hough_hough_hough_v3.cc
+scribo_sandbox__julien_hough_hough_hough_v4_SOURCES = scribo_sandbox__julien_hough_hough_hough_v4.cc
+scribo_sandbox__julien_hough_kht_buffer_2d_SOURCES = scribo_sandbox__julien_hough_kht_buffer_2d.cc
+scribo_sandbox__julien_hough_kht_closing_SOURCES = scribo_sandbox__julien_hough_kht_closing.cc
+scribo_sandbox__julien_hough_kht_eigen_SOURCES = scribo_sandbox__julien_hough_kht_eigen.cc
+scribo_sandbox__julien_hough_kht_filter_SOURCES = scribo_sandbox__julien_hough_kht_filter.cc
+scribo_sandbox__julien_hough_kht_kht_SOURCES = scribo_sandbox__julien_hough_kht_kht.cc
+scribo_sandbox__julien_hough_kht_linking_SOURCES = scribo_sandbox__julien_hough_kht_linking.cc
+scribo_sandbox__julien_hough_kht_peak_detection_SOURCES = scribo_sandbox__julien_hough_kht_peak_detection.cc
+scribo_sandbox__julien_hough_kht_subdivision_SOURCES = scribo_sandbox__julien_hough_kht_subdivision.cc
+scribo_sandbox__julien_hough_kht_types_SOURCES = scribo_sandbox__julien_hough_kht_types.cc
+scribo_sandbox__julien_hough_kht_voting_SOURCES = scribo_sandbox__julien_hough_kht_voting.cc
+scribo_sandbox__julien_upsampling_eagle_SOURCES = scribo_sandbox__julien_upsampling_eagle.cc
+scribo_sandbox__julien_upsampling_pyxies_SOURCES = scribo_sandbox__julien_upsampling_pyxies.cc
+scribo_sandbox_green_mln_accu_stat_histo1d_SOURCES = scribo_sandbox_green_mln_accu_stat_histo1d.cc
+scribo_sandbox_green_mln_accu_stat_histo2d_SOURCES = scribo_sandbox_green_mln_accu_stat_histo2d.cc
+scribo_sandbox_green_mln_accu_stat_histo3d_hsl_SOURCES = scribo_sandbox_green_mln_accu_stat_histo3d_hsl.cc
+scribo_sandbox_green_mln_accu_stat_histo3d_rgb_SOURCES = scribo_sandbox_green_mln_accu_stat_histo3d_rgb.cc
+scribo_sandbox_green_mln_clustering_k_mean_SOURCES = scribo_sandbox_green_mln_clustering_k_mean.cc
+scribo_sandbox_green_mln_clustering_kmean1d_SOURCES = scribo_sandbox_green_mln_clustering_kmean1d.cc
+scribo_sandbox_green_mln_clustering_kmean2d_SOURCES = scribo_sandbox_green_mln_clustering_kmean2d.cc
+scribo_sandbox_green_mln_clustering_kmean3d_SOURCES = scribo_sandbox_green_mln_clustering_kmean3d.cc
+scribo_sandbox_green_mln_clustering_kmean_rgb_SOURCES = scribo_sandbox_green_mln_clustering_kmean_rgb.cc
+scribo_sandbox_green_mln_display_display_histo_SOURCES = scribo_sandbox_green_mln_display_display_histo.cc
+scribo_sandbox_green_mln_display_project_histo_SOURCES = scribo_sandbox_green_mln_display_project_histo.cc
+scribo_sandbox_green_mln_fun_p2b_achromatic_SOURCES = scribo_sandbox_green_mln_fun_p2b_achromatic.cc
+scribo_sandbox_green_mln_fun_p2b_component_equals_SOURCES = scribo_sandbox_green_mln_fun_p2b_component_equals.cc
+scribo_sandbox_green_mln_fun_v2v_achromatism_SOURCES = scribo_sandbox_green_mln_fun_v2v_achromatism.cc
+scribo_sandbox_green_mln_fun_v2v_hue_concentration_SOURCES = scribo_sandbox_green_mln_fun_v2v_hue_concentration.cc
+scribo_sandbox_green_mln_fun_v2v_int_u16_to_int_u14_SOURCES = scribo_sandbox_green_mln_fun_v2v_int_u16_to_int_u14.cc
+scribo_sandbox_green_mln_fun_v2v_log_SOURCES = scribo_sandbox_green_mln_fun_v2v_log.cc
+scribo_sandbox_green_mln_fun_v2v_rg_to_rgb_SOURCES = scribo_sandbox_green_mln_fun_v2v_rg_to_rgb.cc
+scribo_sandbox_green_mln_fun_v2v_rgb8_to_int_u8_SOURCES = scribo_sandbox_green_mln_fun_v2v_rgb8_to_int_u8.cc
+scribo_sandbox_green_mln_fun_v2v_rgb8_to_rgbn_SOURCES = scribo_sandbox_green_mln_fun_v2v_rgb8_to_rgbn.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_achromatism_map_SOURCES = scribo_sandbox_green_mln_fun_v2v_rgb_to_achromatism_map.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_hsv_SOURCES = scribo_sandbox_green_mln_fun_v2v_rgb_to_hsv.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_hue_map_SOURCES = scribo_sandbox_green_mln_fun_v2v_rgb_to_hue_map.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_rg_SOURCES = scribo_sandbox_green_mln_fun_v2v_rgb_to_rg.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_saturation_map_SOURCES = scribo_sandbox_green_mln_fun_v2v_rgb_to_saturation_map.cc
+scribo_sandbox_green_mln_fun_v2v_rgb_to_value_map_SOURCES = scribo_sandbox_green_mln_fun_v2v_rgb_to_value_map.cc
+scribo_sandbox_green_mln_img_path_SOURCES = scribo_sandbox_green_mln_img_path.cc
+scribo_sandbox_green_mln_io_plot_save_image_sh_SOURCES = scribo_sandbox_green_mln_io_plot_save_image_sh.cc
+scribo_sandbox_green_mln_math_ceil_SOURCES = scribo_sandbox_green_mln_math_ceil.cc
+scribo_sandbox_green_mln_math_floor_SOURCES = scribo_sandbox_green_mln_math_floor.cc
+scribo_sandbox_green_mln_value_hsv_SOURCES = scribo_sandbox_green_mln_value_hsv.cc
+scribo_sandbox_green_mln_value_rg_SOURCES = scribo_sandbox_green_mln_value_rg.cc
+scribo_sandbox_green_ok_mln_accu_histo_histo1d_SOURCES = scribo_sandbox_green_ok_mln_accu_histo_histo1d.cc
+scribo_sandbox_green_ok_mln_accu_histo_histo2d_SOURCES = scribo_sandbox_green_ok_mln_accu_histo_histo2d.cc
+scribo_sandbox_green_ok_mln_accu_histo_histo3d_SOURCES = scribo_sandbox_green_ok_mln_accu_histo_histo3d.cc
+scribo_sandbox_green_ok_mln_img_path_SOURCES = scribo_sandbox_green_ok_mln_img_path.cc
+scribo_src_afp_components_SOURCES = scribo_src_afp_components.cc
+scribo_src_afp_link_SOURCES = scribo_src_afp_link.cc
+scribo_src_afp_regroup_SOURCES = scribo_src_afp_regroup.cc
+scribo_subsampling_bilinear_SOURCES = scribo_subsampling_bilinear.cc
+scribo_subsampling_integral_SOURCES = scribo_subsampling_integral.cc
+scribo_subsampling_integral_single_image_SOURCES = scribo_subsampling_integral_single_image.cc
scribo_table_align_lines_horizontaly_SOURCES = scribo_table_align_lines_horizontaly.cc
scribo_table_align_lines_verticaly_SOURCES = scribo_table_align_lines_verticaly.cc
scribo_table_all_SOURCES = scribo_table_all.cc
@@ -275,6 +612,11 @@ scribo_table_repair_horizontal_lines_SOURCES = scribo_table_repair_horizontal_li
scribo_table_repair_vertical_lines_SOURCES = scribo_table_repair_vertical_lines.cc
scribo_text_all_SOURCES = scribo_text_all.cc
scribo_text_clean_SOURCES = scribo_text_clean.cc
+scribo_text_clean_inplace_SOURCES = scribo_text_clean_inplace.cc
scribo_text_extract_lines_SOURCES = scribo_text_extract_lines.cc
-scribo_util_all_SOURCES = scribo_util_all.cc
-scribo_util_text_SOURCES = scribo_util_text.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_nepomuk_text_extraction_SOURCES = scribo_toolchain_nepomuk_text_extraction.cc
+scribo_toolchain_text_in_doc_SOURCES = scribo_toolchain_text_in_doc.cc
+scribo_upsampling_bs2x_SOURCES = scribo_upsampling_bs2x.cc
+scribo_upsampling_eagle_SOURCES = scribo_upsampling_eagle.cc
diff --git a/scribo/text/extract_lines.hh b/scribo/text/extract_lines.hh
index c720d70..1a25cc8 100644
--- a/scribo/text/extract_lines.hh
+++ b/scribo/text/extract_lines.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.
//
@@ -32,33 +33,25 @@
# include <mln/core/concept/image.hh>
-# include <mln/core/site_set/box.hh>
+# include <mln/value/label_16.hh>
-# include <mln/data/fill.hh>
+# include <scribo/core/line_set.hh>
-# include <mln/accu/shape/bbox.hh>
+# include <scribo/primitive/extract/components.hh>
-# include <mln/draw/box.hh>
+# include <scribo/primitive/link/merge_double_link.hh>
+# include <scribo/primitive/link/with_single_left_link_dmax_ratio.hh>
+# include <scribo/primitive/link/with_single_right_link_dmax_ratio.hh>
-# include <mln/labeling/blobs.hh>
-# include <mln/labeling/compute.hh>
+# include <scribo/filter/objects_small.hh>
-# include <mln/util/array.hh>
-# include <mln/util/graph.hh>
-# include <mln/value/label_16.hh>
-
-# include <scribo/primitive/extract/components.hh>
# include <scribo/primitive/group/apply.hh>
-# include <scribo/primitive/link/with_several_left_links.hh>
-# include <scribo/primitive/link/with_several_right_links.hh>
-# include <scribo/primitive/group/from_double_link.hh>
+# include <scribo/primitive/group/from_single_link.hh>
+
+# include <scribo/filter/object_links_bbox_h_ratio.hh>
+
+# include <scribo/text/merging.hh>
-# ifndef SCRIBO_NDEBUG
-# include <mln/literal/colors.hh>
-# include <scribo/make/debug_filename.hh>
-# include <scribo/debug/save_bboxes_image.hh>
-# include <scribo/debug/save_linked_bboxes_image.hh>
-# endif // SCRIBO_NDEBUG
namespace scribo
{
@@ -70,28 +63,22 @@ namespace scribo
/// Extract lines of text in a binary image.
/*!
- ** \param[in] input_ A binary image.
- ** \param[in] nbh_ A neighborhood used for labeling.
- ** \param[in,out] nbboxes Will hold the number of bounding boxes
- ** at the end of the routine.
+ ** \param[in] input A binary image.
+ ** \param[in] nbh A neighborhood used for labeling.
**
- ** \return An object image with grouped potential text components.
+ ** \return A set of lines.
*/
- template <typename I, typename N, typename V>
- object_image(mln_ch_value(I,V))
- extract_lines(const Image<I>& input_,
- const Neighborhood<N>& nbh_,
- V& nbboxes);
+ template <typename I, typename N>
+ line_set<mln_ch_value(I,value::label_16)>
+ extract_lines(const Image<I>& input, const Neighborhood<N>& nbh);
# ifndef MLN_INCLUDE_ONLY
- template <typename I, typename N, typename V>
- object_image(mln_ch_value(I,V))
- extract_lines(const Image<I>& input_,
- const Neighborhood<N>& nbh_,
- V& nbboxes)
+ template <typename I, typename N>
+ line_set<mln_ch_value(I,value::label_16)>
+ extract_lines(const Image<I>& input_, const Neighborhood<N>& nbh_)
{
trace::entering("scribo::text::extract_lines");
@@ -101,46 +88,44 @@ namespace scribo
mln_precondition(input.is_valid());
mln_precondition(nbh.is_valid());
- typedef mln_ch_value(I,V) L;
- typedef object_image(L) text_t;
- text_t text = scribo::primitive::extract::components(input, nbh, nbboxes);
+ typedef mln_ch_value(I,value::label_16) L;
+
+ /// Finding comps.
+ value::label_16 ncomps;
+ component_set<L>
+ comps = scribo::primitive::extract::components(input, nbh, ncomps);
-# ifndef SCRIBO_NDEBUG
- debug::save_bboxes_image(input, text.bboxes(), literal::red,
- scribo::make::debug_filename("character-bboxes.ppm"));
-# endif // ! SCRIBO_NDEBUG
+ /// First filtering.
+ component_set<L> filtered_comps
+ = scribo::filter::components_small(comps, 6);
- //Link character bboxes to their left neighboor if possible.
+ /// Linking potential comps
object_links<L> left_link
- = primitive::link::with_several_left_links(text, 30);
+ = primitive::link::with_single_left_link_dmax_ratio(filtered_comps);
object_links<L> right_link
- = primitive::link::with_several_right_links(text, 30);
+ = primitive::link::with_single_right_link_dmax_ratio(filtered_comps);
+
+
+ // Validating left and right links.
+ object_links<L>
+ merged_links = primitive::link::merge_double_link(left_link,
+ right_link);
-# ifndef SCRIBO_NDEBUG
- scribo::debug::save_linked_bboxes_image(input,
- text, left_link, right_link,
- literal::red, literal::cyan,
- literal::yellow, literal::green,
- scribo::make::debug_filename("links.ppm"));
-# endif // ! SCRIBO_NDEBUG
+ // Remove links if bboxes have too different sizes.
+ object_links<L> hratio_filtered_links
+ = filter::object_links_bbox_h_ratio(merged_links, 2.0f);
- //Merge character bboxes through a graph.
object_groups<L>
- groups = primitive::group::from_double_link(text,
- left_link, right_link);
+ groups = primitive::group::from_single_link(hratio_filtered_links);
- text_t grouped_text = primitive::group::apply(text, groups);
-# ifndef SCRIBO_NDEBUG
- debug::save_bboxes_image(input, grouped_text.bboxes(),
- literal::red,
- scribo::make::debug_filename("multiple_links_grouped_text.ppm"));
-# endif // ! SCRIBO_NDEBUG
+ line_set<L> line = scribo::make::line_set(groups);
+ line = text::merging(line);
trace::exiting("scribo::text::extract_lines");
- return grouped_text;
+ return line;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/scribo/text/recognition.hh b/scribo/text/recognition.hh
index 80208cd..8cb0e96 100644
--- a/scribo/text/recognition.hh
+++ b/scribo/text/recognition.hh
@@ -118,7 +118,7 @@ namespace scribo
/// Use text bboxes with Tesseract
for_all_lines(i, lines)
{
- if (! lines(i).is_valid() || lines(i).tag() != line::None || lines(i).type() != line::Text)
+ if (! lines(i).is_valid() || lines(i).is_hidden() || lines(i).type() != line::Text)
continue;
// std::cout << "Text recognition... ("
--
1.5.6.5
1
0
* debug/char_space_image.hh,
* debug/line_info_image.hh: New.
---
scribo/ChangeLog | 7 ++
scribo/debug/char_space_image.hh | 113 ++++++++++++++++++++++++++++++++++
scribo/debug/line_info_image.hh | 123 ++++++++++++++++++++++++++++++++++++++
3 files changed, 243 insertions(+), 0 deletions(-)
create mode 100644 scribo/debug/char_space_image.hh
create mode 100644 scribo/debug/line_info_image.hh
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index b48eaff..0f88d85 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,12 @@
2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add new debug routines.
+
+ * debug/char_space_image.hh,
+ * debug/line_info_image.hh: New.
+
+2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Disable some debug output.
* text/clean_inplace.hh,
diff --git a/scribo/debug/char_space_image.hh b/scribo/debug/char_space_image.hh
new file mode 100644
index 0000000..6dc6f8f
--- /dev/null
+++ b/scribo/debug/char_space_image.hh
@@ -0,0 +1,113 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#ifndef SCRIBO_DEBUG_CHAR_SPACE_IMAGE_HH
+# define SCRIBO_DEBUG_CHAR_SPACE_IMAGE_HH
+
+/// \file
+///
+/// \brief Draw inter character space.
+
+# include <mln/core/concept/image.hh>
+# include <mln/core/alias/point2d.hh>
+# include <mln/value/rgb8.hh>
+# include <mln/data/convert.hh>
+
+# include <mln/draw/box.hh>
+# include <mln/draw/line.hh>
+
+# include <mln/literal/colors.hh>
+
+# include <scribo/core/line_set.hh>
+
+
+namespace scribo
+{
+
+ namespace debug
+ {
+
+ using namespace mln;
+
+
+ /// \brief Draw inter character space.
+ //
+ template <typename I, typename L>
+ mln_ch_value(I,value::rgb8)
+ char_space_image(const Image<I>& input, const line_set<L>& line,
+ const value::rgb8& v = literal::cyan);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ template <typename I, typename L>
+ mln_ch_value(I,value::rgb8)
+ char_space_image(const Image<I>& input, const line_set<L>& line,
+ const value::rgb8& v)
+ {
+ trace::entering("scribo::debug::char_space_image");
+
+ mln_ch_value(I,value::rgb8) output = data::convert(value::rgb8(), input);
+
+ const component_set<L>& comps = line.components();
+ for_all_lines(l, line)
+ {
+ if (! line(l).is_valid() || line(l).is_hidden()
+ || line(l).components().size() < 2)
+ continue;
+
+
+ for_all_elements(i, line(l).components())
+ {
+ if (i == line(l).components().nelements() - 1)
+ continue;
+
+ unsigned c = line(l).components()[i];
+
+ point2d
+ beg = comps(c).bbox().pmax(),
+ end = beg;
+ beg.row() = comps(c).bbox().pmin().row();
+ mln::draw::line(output, beg, end, v);
+ beg.col() += line(l).char_space();
+ end.col() += line(l).char_space();
+ mln::draw::line(output, beg, end, v);
+ }
+
+ }
+
+ trace::exiting("scribo::debug::char_space_image");
+ return output;
+ }
+
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace scribo::debug
+
+} // end of namespace scribo
+
+#endif // ! SCRIBO_DEBUG_CHAR_SPACE_IMAGE_HH
diff --git a/scribo/debug/line_info_image.hh b/scribo/debug/line_info_image.hh
new file mode 100644
index 0000000..1b6532b
--- /dev/null
+++ b/scribo/debug/line_info_image.hh
@@ -0,0 +1,123 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#ifndef SCRIBO_DEBUG_LINE_INFO_IMAGE_HH
+# define SCRIBO_DEBUG_LINE_INFO_IMAGE_HH
+
+/// \file
+///
+/// Draw typographic information from lines.
+
+# include <mln/core/concept/image.hh>
+# include <mln/core/alias/point2d.hh>
+# include <mln/value/rgb8.hh>
+# include <mln/data/convert.hh>
+
+# include <mln/draw/box.hh>
+# include <mln/draw/line.hh>
+
+# include <mln/literal/colors.hh>
+
+# include <scribo/core/line_set.hh>
+
+
+namespace scribo
+{
+
+ namespace debug
+ {
+
+ using namespace mln;
+
+
+ template <typename I, typename L>
+ mln_ch_value(I,value::rgb8)
+ line_info_image(const Image<I>& input, const line_set<L>& line);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ template <typename I, typename L>
+ mln_ch_value(I,value::rgb8)
+ line_info_image(const Image<I>& input, const line_set<L>& line)
+ {
+ trace::entering("scribo::debug::line_info_image");
+
+ mln_ch_value(I,value::rgb8) output = data::convert(value::rgb8(), input);
+
+ for_all_lines(l, line)
+ {
+ if (! line(l).is_valid() || line(l).is_hidden())
+ continue;
+
+ // Bounding box.
+ mln::draw::box(output, line(l).bbox(), literal::green);
+
+ // baseline
+ mln::draw::line(output,
+ point2d(line(l).baseline(),
+ line(l).bbox().pmin().col()),
+ point2d(line(l).baseline(),
+ line(l).bbox().pmax().col()),
+ literal::red);
+
+ // baseline
+ mln::draw::line(output,
+ point2d(line(l).meanline(),
+ line(l).bbox().pmin().col()),
+ point2d(line(l).meanline(),
+ line(l).bbox().pmax().col()),
+ literal::cyan);
+
+ // Ascent
+ mln::draw::line(output,
+ point2d(line(l).baseline() - line(l).a_height() + 1,
+ line(l).bbox().pmin().col()),
+ point2d(line(l).baseline() - line(l).a_height() + 1,
+ line(l).bbox().pmax().col()),
+ literal::violet);
+
+ // Descent
+ mln::draw::line(output,
+ point2d(line(l).baseline() - line(l).d_height() + 1,
+ line(l).bbox().pmin().col()),
+ point2d(line(l).baseline() - line(l).d_height() + 1,
+ line(l).bbox().pmax().col()),
+ literal::orange);
+ }
+
+ trace::exiting("scribo::debug::line_info_image");
+ return output;
+ }
+
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace scribo::debug
+
+} // end of namespace scribo
+
+#endif // ! SCRIBO_DEBUG_LINE_INFO_IMAGE_HH
--
1.5.6.5
1
0
* text/clean_inplace.hh,
* text/recognition.hh: Disable some debug output.
---
scribo/ChangeLog | 15 +++++++++++----
scribo/text/clean_inplace.hh | 14 +++++++-------
scribo/text/recognition.hh | 10 +++++-----
3 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 82ffb7b..b48eaff 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,18 +1,25 @@
2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Disable some debug output.
+
+ * text/clean_inplace.hh,
+ * text/recognition.hh: Disable some debug output.
+
+2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add a tool for text recognition in natural pictures.
- scribo/src/Makefile.am: Add a new rule.
+ * src/Makefile.am: Add a new rule.
- scribo/src/text_recognition_in_picture.cc: New.
+ * src/text_recognition_in_picture.cc: New.
2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
Add text::look_like_text_lines.
- * scribo/text/look_like_text_lines.hh: New.
+ * text/look_like_text_lines.hh: New.
- * scribo/text/merging.hh: Make use of
+ * text/merging.hh: Make use of
text::look_like_text_lines.
2010-06-30 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
diff --git a/scribo/text/clean_inplace.hh b/scribo/text/clean_inplace.hh
index 2db3b73..4be4c29 100644
--- a/scribo/text/clean_inplace.hh
+++ b/scribo/text/clean_inplace.hh
@@ -111,11 +111,11 @@ namespace scribo
return;
float fact = line.x_height() / 40.0f;
- std::cout << fact << " - " << input.domain() << std::endl;
+// std::cout << fact << " - " << input.domain() << std::endl;
if (fact < 1)
{
- std::cout << "Upsampling..." << " - "
- << fact << std::endl;
+// std::cout << "Upsampling..." << " - "
+// << fact << std::endl;
while (fact < 0.90)
{
input = scribo::upsampling::eagle(input); // 2x upsampling
@@ -127,13 +127,13 @@ namespace scribo
}
else if (fact > 2.5f)
{
- std::cout << "subsampling::bilinear" << " - "
- << std::ceil(fact) << std::endl;
+// std::cout << "subsampling::bilinear" << " - "
+// << std::ceil(fact) << std::endl;
input = subsampling::bilinear(input, std::ceil(fact - 0.5)); // math::floor instead?
}
- else
- std::cout << "not clean_inplaceing text. Seems ok." << std::endl;
+// else
+// std::cout << "not clean_inplaceing text. Seems ok." << std::endl;
trace::exiting("scribo::text::clean_inplace");
}
diff --git a/scribo/text/recognition.hh b/scribo/text/recognition.hh
index 506ed66..80208cd 100644
--- a/scribo/text/recognition.hh
+++ b/scribo/text/recognition.hh
@@ -121,9 +121,9 @@ namespace scribo
if (! lines(i).is_valid() || lines(i).tag() != line::None || lines(i).type() != line::Text)
continue;
- std::cout << "Text recognition... ("
- << i << "/" << lines.nelements() << ")" << std::endl;
- std::cout << "x_height = " << lines(i).x_height() << std::endl;
+// std::cout << "Text recognition... ("
+// << i << "/" << lines.nelements() << ")" << std::endl;
+// std::cout << "x_height = " << lines(i).x_height() << std::endl;
mln_domain(I) box = lines(i).bbox();
@@ -175,7 +175,7 @@ namespace scribo
if (s != 0)
{
- std::cerr << s << std::endl;
+// std::cerr << s << std::endl;
std::string str(s);
str = str.substr(0, str.length() - 2);
lines(i).update_text(str);
@@ -232,7 +232,7 @@ namespace scribo
if (s != 0)
{
- std::cout << s << std::endl;
+// std::cout << s << std::endl;
if (!output_file.empty())
{
std::string str(s);
--
1.5.6.5
1
0

last-svn-commit-416-g9e66b0b Add a tool for text recognition in natural pictures.
by Guillaume Lazzara 06 Jul '10
by Guillaume Lazzara 06 Jul '10
06 Jul '10
scribo/src/Makefile.am: Add a new rule.
scribo/src/text_recognition_in_picture.cc: New.
---
scribo/ChangeLog | 8 +
scribo/src/Makefile.am | 16 ++
scribo/src/text_recognition_in_picture.cc | 383 +++++++++++++++++++++++++++++
3 files changed, 407 insertions(+), 0 deletions(-)
create mode 100644 scribo/src/text_recognition_in_picture.cc
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index ebab20e..82ffb7b 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,13 @@
2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add a tool for text recognition in natural pictures.
+
+ scribo/src/Makefile.am: Add a new rule.
+
+ scribo/src/text_recognition_in_picture.cc: New.
+
+2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add text::look_like_text_lines.
* scribo/text/look_like_text_lines.hh: New.
diff --git a/scribo/src/Makefile.am b/scribo/src/Makefile.am
index 1f92533..a7dd7bc 100644
--- a/scribo/src/Makefile.am
+++ b/scribo/src/Makefile.am
@@ -73,4 +73,20 @@ if HAVE_MAGICKXX
-lpthread \
$(MAGICKXX_LDFLAGS)
+if HAVE_TESSERACT
+
+ bin_PROGRAMS += text_recognition_in_picture
+ text_recognition_in_picture_SOURCES = text_recognition_in_picture.cc
+ text_recognition_in_picture_CPPFLAGS = $(AM_CPPFLAGS) \
+ $(TESSERACT_CPPFLAGS) \
+ $(TIFF_CPPFLAGS) \
+ $(MAGICKXX_CPPFLAGS)
+ text_recognition_in_picture_LDFLAGS = $(AM_LDFLAGS) \
+ -lpthread \
+ $(TESSERACT_LDFLAGS) \
+ $(TIFF_LDFLAGS) \
+ $(MAGICKXX_LDFLAGS)
+
+endif HAVE_TESSERACT
+
endif HAVE_MAGICKXX
diff --git a/scribo/src/text_recognition_in_picture.cc b/scribo/src/text_recognition_in_picture.cc
new file mode 100644
index 0000000..119f757
--- /dev/null
+++ b/scribo/src/text_recognition_in_picture.cc
@@ -0,0 +1,383 @@
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#include <libgen.h>
+#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>
+#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/objects_with_holes.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/common/objects_photo.hh>
+
+#include <scribo/filter/object_groups_small.hh>
+#include <scribo/filter/object_groups_v_thickness.hh>
+
+#include <scribo/debug/highlight_text_area.hh>
+
+#include <scribo/debug/decision_image.hh>
+#include <scribo/debug/save_bboxes_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 <mln/util/timer.hh>
+#include <mln/core/var.hh>
+
+
+#include <scribo/src/afp/components.hh>
+#include <scribo/src/afp/link.hh>
+#include <scribo/src/afp/regroup.hh>
+
+#include <scribo/core/line_set.hh>
+#include <scribo/text/recognition.hh>
+#include <scribo/text/look_like_text_lines.hh>
+
+
+#include <scribo/io/text_boxes/save.hh>
+
+
+const char *args_desc[][2] =
+{
+ { "input.ppm", "A color image." },
+ { "ouput.ppm", "A color image where the text is highlighted." },
+ { "out.txt", "Text recognized text with its position." },
+ { "max_dim_size", "The highest dimension size of the image used for computation. It is used to find a resize factor and impacts on the performance. (1024 by default)" },
+ { "lbl.ppm", "A color image with the labeled text components. (Considered as optional debug)" },
+ {0, 0}
+};
+
+
+namespace mln
+{
+
+ struct config
+ {
+ config()
+ {
+ max_dim_size = 1024;
+
+ sauvola_s = 2u; // 3?
+ sauvola_min_w = 51u;
+
+ // Group Filtering
+ bbox_h_ratio = 1.60f;
+ bbox_overlap = 0.80f;
+ small_groups = 3;
+ v_thickness = 8;
+ regroup_dmax = 30;
+ group_min_holes = 3;
+ }
+
+ // Image resizing factor
+ unsigned max_dim_size;
+
+ // Sauvola ms
+ unsigned sauvola_s;
+ unsigned sauvola_min_w;
+
+ // Group Filtering
+ float bbox_h_ratio;
+ float bbox_overlap;
+ unsigned small_groups;
+ unsigned v_thickness;
+ unsigned regroup_dmax;
+ unsigned group_min_holes;
+ };
+
+} // end of namespace mln
+
+
+// Global config variable.
+mln::config conf;
+
+
+
+namespace mln
+{
+
+ template <typename I, typename L>
+ mln_concrete(I)
+ compute_text_image(const I& input_rgb,
+ const scribo::component_set<L>& grouped_objects)
+ {
+ unsigned shift = 5;
+ float height = 1, width = 0;
+ for_all_comps(i, grouped_objects)
+ if (grouped_objects(i).is_valid())
+ {
+ height += grouped_objects(i).bbox().nrows() + shift;
+ width = math::max(static_cast<float>(grouped_objects(i).bbox().ncols()),
+ width);
+ }
+ if (width == 0)
+ width = 1;
+
+ I output(height, width);
+ data::fill(output, literal::black);
+
+ algebra::vec<2, float> dv;
+ dv[0] = 0;
+ dv[1] = 0;
+ for_all_comps(i, grouped_objects)
+ if (grouped_objects(i).is_valid())
+ {
+ mln_VAR(tmp, duplicate(input_rgb | grouped_objects(i).bbox()));
+
+ typedef fun::x2x::translation<mln_site_(I)::dim, float> trans_t;
+ trans_t trans(dv - grouped_objects(i).bbox().pmin().to_vec());
+
+ mln_domain(I)
+ tr_box(grouped_objects(i).bbox().pmin().to_vec() + trans.t(),
+ grouped_objects(i).bbox().pmax().to_vec() + trans.t());
+
+ tr_image<mln_domain(I), tmp_t, trans_t> tr_ima(tr_box, tmp, trans);
+
+ data::paste(tr_ima, output);
+ dv[0] += grouped_objects(i).bbox().nrows() + shift;
+ }
+
+ return output;
+ }
+
+
+ template <typename I>
+ unsigned get_factor(const I& ima)
+ {
+ unsigned
+ nrows = ima.nrows(),
+ ncols = ima.ncols(),
+ max_dim = std::max(nrows, ncols),
+ factor = max_dim / conf.max_dim_size;
+
+ return factor ? factor : 1;
+ }
+
+} // end of namespace mln
+
+
+
+
+int main(int argc, char* argv[])
+{
+ using namespace scribo;
+ using namespace mln;
+
+ if (argc < 4 || argc > 6)
+ return scribo::debug::usage(argv,
+ "Find text in a photo.\n\n\
+Common usage: ./text_in_photo_fast input.ppm output.ppm out.txt [max_dim_size] [lbl.ppm]",
+ "input.ppm output.ppm out.txt [max_dim_size] [lbl.ppm]",
+ args_desc);
+
+
+ trace::entering("main");
+
+ image2d<value::rgb8> input_rgb;
+ mln::io::magick::load(input_rgb, argv[1]);
+
+ if (argc > 4)
+ conf.max_dim_size = atoi(argv[4]);
+
+ unsigned factor = get_factor(input_rgb);
+
+ std::cout << "Original domain: " << input_rgb.domain() << std::endl;
+
+ input_rgb = mln::subsampling::antialiased(input_rgb, factor);
+
+ std::cout << "Resized domain: " << input_rgb.domain() << std::endl;
+
+ unsigned lambda;
+
+ lambda = 1.2 * (input_rgb.nrows() + input_rgb.ncols());
+
+ image2d<value::int_u8> intensity_ima;
+
+ // Extract foreground
+ image2d<value::rgb8>
+ fg = preprocessing::split_bg_fg(input_rgb, lambda, 32).second();
+ intensity_ima = data::transform(fg, mln::fun::v2v::rgb_to_int_u<8>());
+
+
+
+ // Binarize foreground to use it in the processing chain.
+ image2d<bool> input;
+ unsigned w = std::min(intensity_ima.nrows() / 3, intensity_ima.ncols() / 3);
+ if (! w % 2)
+ ++w;
+ w = std::min(w, conf.sauvola_min_w);
+
+ input = scribo::binarization::sauvola_ms(intensity_ima, w, conf.sauvola_s);
+
+ logical::not_inplace(input);
+
+
+ typedef image2d<value::label_16> L;
+
+ /// Finding components.
+ typedef component_set<L> Obj;
+ Obj filtered_components;
+
+ {
+ mln::util::array<std::pair<box2d, std::pair<point2d, unsigned> > > attribs;
+
+ value::label_16 ncomponents;
+ L components = extract_components(input, ncomponents, attribs);
+
+ filtered_components = Obj(components, ncomponents, attribs);
+ }
+
+ /// linking potential components
+ mln::util::couple<object_links<L>, object_links<L> >
+ links = primitive::link::left_right(filtered_components);
+
+ object_links<L>& left_link = links.first();
+ object_links<L>& right_link = links.second();
+
+
+ // Validating left and right links.
+ object_links<L>
+ merged_links = primitive::link::merge_double_link(left_link, right_link);
+
+
+
+ // Remove links if bboxes have too different sizes.
+ object_links<L>
+ hratio_filtered_links = filter::object_links_bbox_h_ratio(merged_links,
+ conf.bbox_h_ratio);
+
+
+
+
+
+ //Remove links if bboxes overlap too much.
+ object_links<L> overlap_filtered_links
+ = filter::object_links_bbox_overlap(hratio_filtered_links,
+ conf.bbox_overlap);
+
+
+ object_groups<L>
+ groups = primitive::group::from_single_link(overlap_filtered_links);
+
+
+ // Remove components part of groups with strictly less than 3 components.
+
+ object_groups<L> filtered_small_groups;
+
+ filtered_small_groups = filter::object_groups_small(groups,
+ conf.small_groups);
+
+
+ // Remove components part of groups having a mean thickness lower than 8.
+ object_groups<L> filtered_thin_groups;
+ filtered_thin_groups
+ = filter::object_groups_v_thickness(filtered_small_groups,
+ conf.v_thickness);
+
+
+ // Grouping groups together if possible.
+ groups = primitive::regroup::from_single_left_link(filtered_thin_groups,
+ conf.regroup_dmax);
+
+ /// Filter grouped objects not having enough background components.
+ groups = scribo::filter::object_groups_with_holes(groups,
+ conf.group_min_holes);
+
+ component_set<L> comps = primitive::group::apply(groups);
+
+ if (argc > 5)
+ mln::io::ppm::save(mln::labeling::colorize(value::rgb8(),
+ comps.labeled_image(),
+ comps.nelements()),
+ argv[5]);
+ mln::io::ppm::save(scribo::debug::highlight_text_area(input_rgb, comps),
+ argv[2]);
+
+
+ scribo::line_set<L> lines = scribo::make::line_set(groups);
+ text::look_like_text_lines_inplace(lines);
+ text::recognition(lines, "fra");
+
+ scribo::io::text_boxes::save(lines, argv[3]);
+
+
+ trace::exiting("main");
+ return comps.nelements() != 0;
+}
--
1.5.6.5
1
0

06 Jul '10
* scribo/text/look_like_text_lines.hh: New.
* scribo/text/merging.hh: Make use of
text::look_like_text_lines.
---
scribo/ChangeLog | 42 ++++++++----
scribo/text/look_like_text_lines.hh | 116 +++++++++++++++++++++++++++++++++++
scribo/text/merging.hh | 16 +-----
3 files changed, 145 insertions(+), 29 deletions(-)
create mode 100644 scribo/text/look_like_text_lines.hh
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index dc0ac1a..ebab20e 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,35 +1,49 @@
+2010-07-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add text::look_like_text_lines.
+
+ * scribo/text/look_like_text_lines.hh: New.
+
+ * scribo/text/merging.hh: Make use of
+ text::look_like_text_lines.
+
2010-06-30 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
Extended XML mode support.
-
+
* scribo/demo/viewer/Makefile.am
-
+
* demo/viewer/image_region.cc,
* viewer/image_region.hh,
- * viewer/image_region.hxx: Change regions depths to have a hierarchy.
-
+ * viewer/image_region.hxx: Change regions depths to have a
+ hierarchy.
+
* demo/viewer/image_scene.cc,
* demo/viewer/image_scene.hh: Change mouse click behaviour.
-
+
* demo/viewer/key_widget.cc,
- * demo/viewer/key_widget.hh: Add new items (text line and paragraph)
-
+ * demo/viewer/key_widget.hh: Add new items (text line and
+ paragraph)
+
* demo/viewer/viewer.cc,
- * demo/viewer/viewer.hh: Chnage XML parsing to support extended format.
+ * demo/viewer/viewer.hh: Change XML parsing to support extended
+ format.
- * scribo/demo/viewer/common.hh: Add new RegionId's.
+ * scribo/demo/viewer/common.hh: Add new RegionId's.
2010-06-30 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
New features in Qt interface.
-
+
* demo/viewer/browser_widget.hh: Improve picture browser.
- * demo/viewer/step_widget.cc: Add a "step chooser" to load several XML files related to one picture.
+
+ * demo/viewer/step_widget.cc: Add a "step chooser" to load several
+ XML files related to one picture.
2010-06-30 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
Change XML output (replacement of html markups).
-
+
* io/xml/save.hh: Add internal::html_markups_replace.
2010-06-29 Guillaume Lazzara <z(a)lrde.epita.fr>
@@ -73,8 +87,8 @@
* io/xml/save_text_lines.hh: Rename as...
* io/xml/save.hh: ...this.
-
- * src/pbm_text_in_doc.cc: Update call to io::xml::save.
+
+ * src/pbm_text_in_doc.cc: Update call to io::xml::save.
2010-06-18 green <jacquelet(a)lrde.epita.fr>
diff --git a/scribo/text/look_like_text_lines.hh b/scribo/text/look_like_text_lines.hh
new file mode 100644
index 0000000..2ced7ce
--- /dev/null
+++ b/scribo/text/look_like_text_lines.hh
@@ -0,0 +1,116 @@
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#ifndef SCRIBO_TEXT_LOOK_LIKE_TEXT_LINES_HH
+# define SCRIBO_TEXT_LOOK_LIKE_TEXT_LINES_HH
+
+/// \file
+///
+/// \brief Set line type to line::Text according to criterion.
+
+# include <scribo/core/line_info.hh>
+
+namespace scribo
+{
+
+ namespace text
+ {
+
+ using namespace mln;
+
+ /// \brief Set line type to line::Text according to criterion.
+ //
+ template <typename L>
+ line_set<L>
+ look_like_text_lines(const scribo::line_set<L>& l);
+
+ /// \overload
+ /// Inplace version.
+ //
+ template <typename L>
+ void
+ look_like_text_lines_inplace(scribo::line_set<L>& line);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ namespace internal
+ {
+
+ template <typename L>
+ inline
+ bool looks_like_a_text_line(const scribo::line_info<L>& l)
+ {
+ return
+ l.card() >= 3 // at least 3 components
+ && l.bbox().height() > 10 // and minimal height
+ && l.bbox().width() > l.bbox().height(); // and more horizontal-like than vertical
+ // FIXME: Later on, add a criterion based on the number
+ // of alignments (on top and bot).
+ }
+
+ } // end of namespace scribo::text::namespace
+
+
+
+ // Facades
+
+ template <typename L>
+ inline
+ void
+ look_like_text_lines_inplace(scribo::line_set<L>& line)
+ {
+ trace::entering("scribo::text::look_like_text_lines_inplace");
+
+ for_all_lines(l, line)
+ if (internal::looks_like_a_text_line(line(l)))
+ line(l).update_type(line::Text);
+
+ trace::exiting("scribo::text::look_like_text_lines_inplace");
+ }
+
+ template <typename L>
+ inline
+ line_set<L>
+ look_like_text_lines(const scribo::line_set<L>& l)
+ {
+ trace::entering("scribo::text::look_like_text_lines");
+ line_set<L> output = l.duplicate();
+
+ look_like_text_lines_inplace(output);
+
+ trace::exiting("scribo::text::look_like_text_lines");
+ return output;
+ }
+
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace scribo::text
+
+} // end of namespace scribo
+
+#endif // ! SCRIBO_TEXT_LOOK_LIKE_TEXT_LINES_HH
diff --git a/scribo/text/merging.hh b/scribo/text/merging.hh
index 8efd210..c7ad3b3 100644
--- a/scribo/text/merging.hh
+++ b/scribo/text/merging.hh
@@ -57,7 +57,7 @@
#include <mln/data/wrap.hh>
#include <mln/util/timer.hh>
-
+#include <text/look_like_text_lines.hh>
namespace scribo
@@ -94,20 +94,6 @@ namespace scribo
using value::int_u8;
-
- template <typename L>
- inline
- bool looks_like_a_text_line(const scribo::line_info<L>& l)
- {
- return
- l.card() >= 3 // at least 3 components
- && l.bbox().height() > 10 // and minimal height
- && l.bbox().width() > l.bbox().height(); // and more horizontal-like than vertical
- // FIXME: Later on, add a criterion based on the number
- // of alignments (on top and bot).
- }
-
-
template <typename T, typename T2>
void draw_box(image2d<T>& input, const box2d& b, T2 l)
{
--
1.5.6.5
1
0