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

05 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 3e12eaa1e4dad3518a09c2adff34f4c223d754b8 (commit)
from 16ec2cb551d8e8724598ebb65e02d01f52f24c23 (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 -----------------------------------------------------------------
3e12eaa ICDAR XML to HTML.
-----------------------------------------------------------------------
Summary of changes:
scribo/sandbox/ChangeLog | 19 ++
scribo/sandbox/arthur/xml_to_html/README | 25 ++
.../arthur/xml_to_html}/domitem.cc | 0
.../arthur/xml_to_html}/domitem.hh | 0
.../arthur/xml_to_html}/dommodel.cc | 0
.../arthur/xml_to_html}/dommodel.hh | 0
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 ++++++++++++++++++++
.../arthur/xml_to_html/xml_to_html.hh} | 40 +--
scribo/sandbox/arthur/xml_to_html/xml_to_html.pro | 16 +
12 files changed, 683 insertions(+), 24 deletions(-)
create mode 100644 scribo/sandbox/arthur/xml_to_html/README
copy scribo/{demo/viewer => sandbox/arthur/xml_to_html}/domitem.cc (100%)
copy scribo/{demo/viewer => sandbox/arthur/xml_to_html}/domitem.hh (100%)
copy scribo/{demo/viewer => sandbox/arthur/xml_to_html}/dommodel.cc (100%)
copy scribo/{demo/viewer => sandbox/arthur/xml_to_html}/dommodel.hh (100%)
create mode 100644 scribo/sandbox/arthur/xml_to_html/main.cc
create mode 100644 scribo/sandbox/arthur/xml_to_html/patterns/css.css
create mode 100644 scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl
create mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.cc
copy scribo/{demo/viewer/step_widget.hh => sandbox/arthur/xml_to_html/xml_to_html.hh} (73%)
create mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.pro
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
* arthur/xml_to_html/domitem.cc,
* arthur/xml_to_html/domitem.hh.,
* arthur/xml_to_html/dommodel.cc,
* arthur/xml_to_html/dommodel.hh: XML parsing.
* arthur/xml_to_html/patterns/css.css,
* arthur/xml_to_html/patterns/xsl.xsl: HTML patterns.
* arthur/xml_to_html/xml_to_html.cc,
* arthur/xml_to_html/xml_to_html.hh: Image cropingd XML merging.
* arthur/xml_to_html/README
* arthur/xml_to_html/xml_to_html.pro
* arthur/xml_to_html/main.cc
---
scribo/sandbox/ChangeLog | 19 ++
scribo/sandbox/arthur/xml_to_html/README | 25 ++
.../arthur/xml_to_html}/domitem.cc | 0
.../arthur/xml_to_html}/domitem.hh | 0
.../arthur/xml_to_html}/dommodel.cc | 0
.../arthur/xml_to_html}/dommodel.hh | 0
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 ++++++++++++++++++++
.../arthur/xml_to_html/xml_to_html.hh} | 40 +--
scribo/sandbox/arthur/xml_to_html/xml_to_html.pro | 16 +
12 files changed, 683 insertions(+), 24 deletions(-)
create mode 100644 scribo/sandbox/arthur/xml_to_html/README
copy scribo/{demo/viewer => sandbox/arthur/xml_to_html}/domitem.cc (100%)
copy scribo/{demo/viewer => sandbox/arthur/xml_to_html}/domitem.hh (100%)
copy scribo/{demo/viewer => sandbox/arthur/xml_to_html}/dommodel.cc (100%)
copy scribo/{demo/viewer => sandbox/arthur/xml_to_html}/dommodel.hh (100%)
create mode 100644 scribo/sandbox/arthur/xml_to_html/main.cc
create mode 100644 scribo/sandbox/arthur/xml_to_html/patterns/css.css
create mode 100644 scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl
create mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.cc
copy scribo/{demo/viewer/step_widget.hh => sandbox/arthur/xml_to_html/xml_to_html.hh} (73%)
create mode 100644 scribo/sandbox/arthur/xml_to_html/xml_to_html.pro
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index f428dce..d3f537b 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,3 +1,22 @@
+2010-07-05 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
+
+ ICDAR XML to HTML.
+
+ * arthur/xml_to_html/domitem.cc,
+ * arthur/xml_to_html/domitem.hh.,
+ * arthur/xml_to_html/dommodel.cc,
+ * arthur/xml_to_html/dommodel.hh: XML parsing.
+
+ * arthur/xml_to_html/patterns/css.css,
+ * arthur/xml_to_html/patterns/xsl.xsl: HTML patterns.
+
+ * arthur/xml_to_html/xml_to_html.cc,
+ * arthur/xml_to_html/xml_to_html.hh: Image croping and XML merging.
+
+ * arthur/xml_to_html/README
+ * arthur/xml_to_html/xml_to_html.pro
+ * arthur/xml_to_html/main.cc
+
2010-06-25 Guillaume Lazzara <z(a)lrde.epita.fr>
Add algorithms to retrieve white spaces.
diff --git a/scribo/sandbox/arthur/xml_to_html/README b/scribo/sandbox/arthur/xml_to_html/README
new file mode 100644
index 0000000..f16f472
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_to_html/README
@@ -0,0 +1,25 @@
+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/demo/viewer/domitem.cc b/scribo/sandbox/arthur/xml_to_html/domitem.cc
similarity index 100%
copy from scribo/demo/viewer/domitem.cc
copy to scribo/sandbox/arthur/xml_to_html/domitem.cc
diff --git a/scribo/demo/viewer/domitem.hh b/scribo/sandbox/arthur/xml_to_html/domitem.hh
similarity index 100%
copy from scribo/demo/viewer/domitem.hh
copy to scribo/sandbox/arthur/xml_to_html/domitem.hh
diff --git a/scribo/demo/viewer/dommodel.cc b/scribo/sandbox/arthur/xml_to_html/dommodel.cc
similarity index 100%
copy from scribo/demo/viewer/dommodel.cc
copy to scribo/sandbox/arthur/xml_to_html/dommodel.cc
diff --git a/scribo/demo/viewer/dommodel.hh b/scribo/sandbox/arthur/xml_to_html/dommodel.hh
similarity index 100%
copy from scribo/demo/viewer/dommodel.hh
copy to scribo/sandbox/arthur/xml_to_html/dommodel.hh
diff --git a/scribo/sandbox/arthur/xml_to_html/main.cc b/scribo/sandbox/arthur/xml_to_html/main.cc
new file mode 100644
index 0000000..9ec705a
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_to_html/main.cc
@@ -0,0 +1,58 @@
+#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
new file mode 100644
index 0000000..7171754
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_to_html/patterns/css.css
@@ -0,0 +1,28 @@
+.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
new file mode 100644
index 0000000..aa5a078
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_to_html/patterns/xsl.xsl
@@ -0,0 +1,229 @@
+<?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
new file mode 100644
index 0000000..8267466
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_to_html/xml_to_html.cc
@@ -0,0 +1,292 @@
+// 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/demo/viewer/step_widget.hh b/scribo/sandbox/arthur/xml_to_html/xml_to_html.hh
similarity index 73%
copy from scribo/demo/viewer/step_widget.hh
copy to scribo/sandbox/arthur/xml_to_html/xml_to_html.hh
index 829f814..27a271e 100644
--- a/scribo/demo/viewer/step_widget.hh
+++ b/scribo/sandbox/arthur/xml_to_html/xml_to_html.hh
@@ -23,35 +23,27 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-
-#ifndef STEP_WIDGET_HH_
-# define STEP_WIDGET_HH_
+#ifndef IMAGE_CROP_HH
+# define IMAGE_CROP_HH
# include <QtGui>
-typedef QMap<QString, QString> StepQMap;
+class DomModel;
-class StepWidget
- : public QWidget
+class ImageCrop : public QObject
{
Q_OBJECT
-
-public:
- StepWidget();
- ~StepWidget();
- void add_element(const QString& element);
-
-signals:
- void load_image(QString);
- void load_xml(QString);
-
-public slots:
- void fill_steps(QString file);
- void activate(QListWidgetItem* item);
-
-private:
- QListWidget* view_;
- StepQMap map_;
+ 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 /* !STEP_WIDGET_HH_ */
+#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
new file mode 100644
index 0000000..b43b527
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_to_html/xml_to_html.pro
@@ -0,0 +1,16 @@
+######################################################################
+# 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
--
1.5.6.5
1
0

05 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 16ec2cb551d8e8724598ebb65e02d01f52f24c23 (commit)
from 7b2111843120f318b696b1b79bd2e900a7eeac4b (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 -----------------------------------------------------------------
16ec2cb Small fix in Qt interface.
-----------------------------------------------------------------------
Summary of changes:
scribo/ChangeLog | 31 +++++++++++++++++--------
scribo/demo/viewer/image_region.hxx | 1 +
scribo/demo/viewer/key_widget.cc | 9 +++++++
scribo/demo/viewer/key_widget.hh | 1 +
scribo/demo/viewer/viewer.cc | 42 ++++++++++++++++++----------------
5 files changed, 54 insertions(+), 30 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0

05 Jul '10
* scribo/demo/viewer/viewer.cc,
* scribo/demo/viewer/image_region.hxx: Disable item click if unchecked in item list.
* scribo/demo/viewer/key_widget.cc,
* scribo/demo/viewer/key_widget.hh: Add KeyWidget::checkAll.
---
scribo/ChangeLog | 31 +++++++++++++++++--------
scribo/demo/viewer/image_region.hxx | 1 +
scribo/demo/viewer/key_widget.cc | 9 +++++++
scribo/demo/viewer/key_widget.hh | 1 +
scribo/demo/viewer/viewer.cc | 42 ++++++++++++++++++----------------
5 files changed, 54 insertions(+), 30 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 6cab6a1..5d742bd 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,35 +1,46 @@
+2010-07-05 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
+
+ Small fix in Qt interface.
+
+ * scribo/demo/viewer/viewer.cc,
+ * scribo/demo/viewer/image_region.hxx: Disable item click if unchecked in item list.
+
+ * scribo/demo/viewer/key_widget.cc,
+ * scribo/demo/viewer/key_widget.hh: Add KeyWidget::checkAll.
+
+
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.
-
+
* 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/viewer.cc,
* demo/viewer/viewer.hh: Chnage 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.
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 +84,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/demo/viewer/image_region.hxx b/scribo/demo/viewer/image_region.hxx
index 50dc93d..efcf493 100644
--- a/scribo/demo/viewer/image_region.hxx
+++ b/scribo/demo/viewer/image_region.hxx
@@ -58,6 +58,7 @@ ImageRegion::setDrawIfSameId(int id, bool draw)
if (id == id_)
{
draw_ = draw;
+ setVisible(draw);
if (scene())
{
scene()->invalidate();
diff --git a/scribo/demo/viewer/key_widget.cc b/scribo/demo/viewer/key_widget.cc
index 93c2cf0..5e371ab 100644
--- a/scribo/demo/viewer/key_widget.cc
+++ b/scribo/demo/viewer/key_widget.cc
@@ -36,6 +36,15 @@ KeyWidget::KeyWidget(const region::KeyMap& key_map)
this, SLOT(update(QListWidgetItem*)));
}
+void KeyWidget::checkAll()
+{
+ for (int i = 0; i < items_->count(); ++i)
+ {
+ items_->item(i)->setCheckState(Qt::Checked);
+ emit updated(i, true);
+ }
+}
+
void
KeyWidget::change_mode(bool b)
{
diff --git a/scribo/demo/viewer/key_widget.hh b/scribo/demo/viewer/key_widget.hh
index e5259e2..71200c8 100644
--- a/scribo/demo/viewer/key_widget.hh
+++ b/scribo/demo/viewer/key_widget.hh
@@ -27,6 +27,7 @@ public:
KeyWidget(const region::KeyMap& key_map);
~KeyWidget();
+ void checkAll();
bool isChecked(region::RegionId id);
signals:
diff --git a/scribo/demo/viewer/viewer.cc b/scribo/demo/viewer/viewer.cc
index 8bafc39..61a57c1 100644
--- a/scribo/demo/viewer/viewer.cc
+++ b/scribo/demo/viewer/viewer.cc
@@ -138,8 +138,8 @@ Viewer::Viewer(int &argc, char** argv)
XmlWidget* xml_wgt = new XmlWidget();
BrowserWidget* browser_wgt =
new BrowserWidget(files_, argc != 2 ? QString() : argv[1]);
- ImageWidget* image_wgt = new ImageWidget(scene_);
key_wgt_ = new KeyWidget(key_map_);
+ ImageWidget* image_wgt = new ImageWidget(scene_);
scene_->setBackgroundBrush(scene_->palette().window());
@@ -212,7 +212,7 @@ Viewer::load_xml(QString filename)
scene_->removeItem(image_);
scene_->clear();
scene_->addItem(image_);
-
+
scene_->update();
if (doc_layout_)
@@ -220,9 +220,9 @@ Viewer::load_xml(QString filename)
doc_layout_->deleteLater();
doc_layout_ = 0;
}
-
+
emit updated(doc_layout_);
-
+
if (QFile::exists(xml_file))
{
QFile file(xml_file);
@@ -267,11 +267,11 @@ Viewer::xml_to_layout()
attributes = doc_layout_->index(i, 1, page);
QString name = doc_layout_->data(region, Qt::DisplayRole).toString();
region::RegionId id = static_cast<region::RegionId>(region_ids_[name]);
-
+
coords = doc_layout_->index(0, 0, region);
if (!region.isValid() || !coords.isValid())
break;
-
+
QVector<QPoint> points;
for (int j = 0; true; ++j)
{
@@ -279,14 +279,14 @@ Viewer::xml_to_layout()
point = doc_layout_->index(j, 1, coords);
if (!point.isValid())
break;
-
+
QMap<QString, QVariant> data =
doc_layout_->data(point, Qt::UserRole).toMap();
int x = data["x"].toInt();
int y = data["y"].toInt();
points << QPoint(x, y);
}
-
+
// Create region
ImageRegion* r = new ImageRegion(id,
key_map_[id].first,
@@ -296,7 +296,7 @@ Viewer::xml_to_layout()
fill_action_->isChecked(),
precise_action_->isChecked(),
key_wgt_->isChecked(id));
-
+
connect(this, SIGNAL(key_updated(int, bool)),
r, SLOT(setDrawIfSameId(int, bool)));
connect(this, SIGNAL(setOutline(bool)),
@@ -305,7 +305,7 @@ Viewer::xml_to_layout()
r, SLOT(setPrecise(bool)));
connect(this, SIGNAL(setFill(bool)),
r, SLOT(setFill(bool)));
-
+
scene_->addItem(r);
// EXTENDED MODE
@@ -325,6 +325,7 @@ Viewer::xml_to_layout()
QModelIndex par_coords = doc_layout_->index(0, 0, paragraph);
QModelIndex point_par;
+
QVector<QPoint> points_par;
for (int m = 0; true; ++m)
{
@@ -332,7 +333,7 @@ Viewer::xml_to_layout()
point_par = doc_layout_->index(m, 1, par_coords);
if (!point_par.isValid())
break;
-
+
QMap<QString, QVariant> data_par =
doc_layout_->data(point_par, Qt::UserRole).toMap();
int x = data_par["x"].toInt();
@@ -349,7 +350,7 @@ Viewer::xml_to_layout()
fill_action_->isChecked(),
precise_action_->isChecked(),
key_wgt_->isChecked(id_par));
-
+
connect(this, SIGNAL(key_updated(int, bool)),
r_par, SLOT(setDrawIfSameId(int, bool)));
connect(this, SIGNAL(setOutline(bool)),
@@ -360,7 +361,7 @@ Viewer::xml_to_layout()
r_par, SLOT(setFill(bool)));
scene_->addItem(r_par);
-
+
for (int l = 1; true; ++l)
{
QModelIndex line = doc_layout_->index(l, 0, paragraph);
@@ -370,7 +371,7 @@ Viewer::xml_to_layout()
QString name_line = doc_layout_->data(line, Qt::DisplayRole).toString();
region::RegionId id_line = static_cast<region::RegionId>(region_ids_[name_line]);
-
+
QModelIndex line_coords = doc_layout_->index(0, 0, line);
QModelIndex point_line;
QVector<QPoint> points_line;
@@ -380,14 +381,14 @@ Viewer::xml_to_layout()
point_line = doc_layout_->index(n, 1, line_coords);
if (!point_line.isValid())
break;
-
+
QMap<QString, QVariant> data_line =
doc_layout_->data(point_line, Qt::UserRole).toMap();
int x = data_line["x"].toInt();
int y = data_line["y"].toInt();
points_line << QPoint(x, y);
}
-
+
// Create region
ImageRegion* r_line = new ImageRegion(id_line,
key_map_[id_line].first,
@@ -397,7 +398,7 @@ Viewer::xml_to_layout()
fill_action_->isChecked(),
precise_action_->isChecked(),
key_wgt_->isChecked(id_line));
-
+
connect(this, SIGNAL(key_updated(int, bool)),
r_line, SLOT(setDrawIfSameId(int, bool)));
connect(this, SIGNAL(setOutline(bool)),
@@ -409,12 +410,12 @@ Viewer::xml_to_layout()
scene_->addItem(r_line);
}
- }
+ }
}
// END OF EXTENDED MODE
-
+
}
-
+
emit updated(doc_layout_);
}
}
@@ -481,6 +482,7 @@ Viewer::maybeChangeCacheMode(qreal scale)
void Viewer::useExtended(bool b)
{
extended_mode_ = b;
+ key_wgt_->checkAll();
if (xml_file_ != QString(""))
load_xml(xml_file_);
--
1.5.6.5
1
0

last-svn-commit-414-g4d14a47 Merge branch 'exp/scribo-z' into exp/next
by Guillaume Lazzara 01 Jul '10
by Guillaume Lazzara 01 Jul '10
01 Jul '10
This is a merge commit message of the following branches:
Merge: fd16f7e... 7b21118...
Conflicts:
milena/ChangeLog
milena/mln/core/point.hh
milena/tests/io/magick/save.cc
scribo/Makefile.am
scribo/core/def/lbl_type.hh
scribo/core/object_image.hh
scribo/demo/Makefile.am
scribo/src/binarization/sauvola_ms.cc
scribo/src/debug/Makefile.am
scribo/table/internal/connect_lines.hh
scribo/test.cc
scribo/tests/toolchain/Makefile.am
scribo/text/clean.hh
ChangeLog | 16 +
configure.ac | 15 +-
milena/ChangeLog | 74 ++
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 | 4 +
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/concept/gpoint.hh | 2 +-
milena/mln/core/image/image1d.hh | 6 +-
milena/mln/core/point.hh | 1 -
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 +++
.../green/demo/clustering/kmean_rgb/Makefile.am | 148 +++
.../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/io/magick/save.cc | 9 +-
milena/tests/subsampling/Makefile.am | 12 +-
milena/tests/subsampling/antialiased.cc | 74 ++
scribo/ChangeLog | 755 +++++++++++
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 | 38 +-
scribo/core/line_set.hh | 3 +
scribo/core/macros.hh | 3 +
scribo/core/object_groups.hh | 16 +-
scribo/core/object_links.hh | 35 +-
scribo/debug/decision_image.hh | 24 +-
scribo/debug/highlight_text_area.hh | 255 ++++
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/demat/src/doc_type.hh | 51 +
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
scribo/demo/tip/icons/remove.png | Bin 0 -> 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_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 ++++
scribo/sandbox/green/gaussian.sh | 12 +
scribo/sandbox/green/gaussian2d.sh | 21 +
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 | 71 +
scribo/sandbox/green/mln/fun/v2v/log.hh | 70 +
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 +++++
scribo/sandbox/green/ok/mln/accu/histo/histo2d.hh | 346 +++++
scribo/sandbox/green/ok/mln/accu/histo/histo3d.hh | 349 +++++
scribo/sandbox/green/ok/mln/img_path.hh | 239 ++++
.../sandbox/green/ok/test/accu/histo/gaussian.sh | 12 +
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 | 148 +++
.../green/tests/clustering/kmean1d/kmean1d.cc | 483 +++++++
.../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 | 85 +-
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 ++
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/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/text/clean.hh | 65 +-
scribo/text/clean_inplace.hh | 147 +++
scribo/text/extract_lines.hh | 6 +-
scribo/text/merging.hh | 49 +-
scribo/text/recognition.hh | 96 +-
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 ----
635 files changed, 61188 insertions(+), 6456 deletions(-)
diff --cc ChangeLog
index 3123be9,4cac155..b41d019
--- a/ChangeLog
+++ b/ChangeLog
@@@ -2,6 -2,18 +2,22 @@@
* m4/autotroll.m4: Fix invalid configuration when Qt is missing.
+ 2010-06-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * configure.ac: Set HAVE_QT correctly.
+
+ 2010-06-15 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * configure.ac: Configure scribo/demo.
+
+ 2010-06-03 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * configure.ac: Configure several directories in scribo/.
+
++2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
++
++ * m4/autotroll.m4: Fix invalid configuration when Qt is missing.
++
2010-06-03 Guillaume Lazzara <z(a)lrde.epita.fr>
* configure.ac: Check for Qt library using AutoTroll.
diff --cc configure.ac
index e6b01b8,0826019..46dc531
--- a/configure.ac
+++ b/configure.ac
@@@ -210,14 -165,13 +210,14 @@@ OLN_WITH_LIB([TIFF], [tiff.h], [tiff]
OLN_WITH_LIB([GDCM], [gdcm-2.0/gdcmReader.h], [gdcmCommon], [gdcm], [GDCM],
[-lgdcmzlib])
-# Tesseract
-OLN_WITH_LIB([TESSERACT], [tesseract/baseapi.h], [tesseract_full], [tesseract], [TESSERACT])
+# Tesseract.
+OLN_WITH_LIB([TESSERACT], [tesseract/baseapi.h], [tesseract_full],
+ [tesseract], [TESSERACT])
# Qt.
- AT_WITH_QT([], [], [],
- AC_DEFINE([HAVE_QT], 1, [Define to 1 if we can use Qt]),
- AC_DEFINE([HAVE_QT], 0))
+ AT_WITH_QT([+xml], [], [],
+ AC_DEFINE([HAVE_QT], 0, [Define to 1 if we can use Qt]),
+ AC_DEFINE([HAVE_QT], 1))
AM_CONDITIONAL([HAVE_QT], [test x$QT_PATH != x])
@@@ -313,17 -245,10 +318,19 @@@ AC_CONFIG_FILES(
scribo/tests/preprocessing/Makefile
scribo/tests/table/Makefile
scribo/tests/text/Makefile
+ scribo/tests/toolchain/Makefile
+ scribo/tests/toolchain/nepomuk/Makefile
scribo/tests/unit_test/Makefile
])
+
+# Flags for Scribo
+AC_ARG_VAR([SCRIBO_CXXFLAGS], [C++ compiler flags for Scribo binaries])
+AC_ARG_VAR([SCRIBO_TESTS_CXXFLAGS], [C++ compiler flags for Scribo tests])
+if test "$GXX" = yes || test "$ICPC" = yes; then
+ test -z "$SCRIBO_CXXFLAGS" && SCRIBO_CXXFLAGS="-DNDEBUG -O2"
+ # FIXME: We might want to use -ggdb when g++ is used.
+ test -z "$SCRIBO_TESTS_CXXFLAGS" && SCRIBO_TESTS_CXXFLAGS="-g -O0"
+fi
dnl>>
## --------------- ##
diff --cc milena/ChangeLog
index 4a45ec9,24cf7f3..7705ca4
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@@ -1,30 -1,63 +1,104 @@@
++2010-06-21 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
++
++ Fix the way to convert unsigned to float.
++
++ * mln/convert/from_to.hxx: New conversion utilities.
++ * mln/convert/impl/from_unsigned_to_value.hh: New conversion utilities.
++
++2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
++
++ Fix the outside template use case for the convolve macros.
++
++ * mln/linear/ch_convolve.hh (mln_ch_convolve_, mln_ch_convolve_grad_):
++ Define new macros to work outside templates.
++
+ 2010-06-28 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Revamp and fix a bug in io::magick::*.
+
+ * mln/io/magick/load.hh: Revamp.
+
+ * mln/io/magick/save.hh: Fix a bug while saving. RGB values must
+ be between 0 and 1.
+
+ * tests/io/magick/save.cc: Remove useless output.
+
+ 2010-06-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add new tests.
+
+ * tests/convert/Makefile.am,
+ * tests/subsampling/Makefile.am: Add targets for these new tests.
+
+ * tests/convert/to_qimage.cc,
+ * tests/convert/to_qimage_nocopy.cc,
+ * tests/subsampling/antialiased.cc: New.
+
+ 2010-06-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix conversion routines towards qimage.
+
+ * mln/convert/to_qimage.hh: Fix invalid conversions.
+
+ * mln/convert/to_qimage_nocopy.hh: Avoid a warning.
+
+ 2010-06-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/accu/count_value.hh: Add properties.
+
+ 2010-06-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix a bug in conversions from vec to point.
+
+ * milena/mln/core/concept/gpoint.hh: Fix comment.
+
+ * milena/mln/core/image/image1d.hh: Share a dpoint value.
+
+ * milena/mln/core/point.hh: Handle point1d.
+
+ 2010-06-15 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Introduce labeling::value_and_compute.
+
+ * mln/canvas/labeling/video.hh: Call more functor members.
+
+ * mln/labeling/value.hh: Provide new members to the functor.
+
+ * mln/labeling/value_and_compute.hh: New functor computing
+ attributes while labeling.
+
+ 2010-05-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/io/magick/load.hh: set minimum resolution for PDF files to
+ 300DPI.
+
+2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix a few tests.
+
+ * tests/core/other/box_runstart_piter.cc,
+ * tests/geom/translate.cc: Fix test.
+
+2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Update generated images included in the doc.
+
+ * doc/figures/fill-subdomain-3.ppm,
+ * doc/figures/ima2d-rot-2.ppm,
+ * doc/figures/labeling-compute-2.ppm,
+ * doc/figures/tuto3_colorize-2.ppm,
+ * doc/figures/tuto4_genericity_and_algorithms-5.ppm: Update
+ generated images.
+
+2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add from_to overloads for conversions from algebra::vec to point.
+
+ * mln/convert/from_to.hxx: Add new prototypes.
+
+ * mln/core/point.hh: Add new from_to overloads. Remove specialized
+ constructors causing ambiguities.
+
2010-06-03 Guillaume Lazzara <z(a)lrde.epita.fr>
Add a function to convert qt::rgb32 values to int_u8.
diff --cc milena/tests/convert/Makefile.am
index 856c143,c5a5c14..e4e3545
--- a/milena/tests/convert/Makefile.am
+++ b/milena/tests/convert/Makefile.am
@@@ -14,8 -14,12 +14,9 @@@
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-#
-
-## Process this file through Automake to create Makefile.in.
include $(top_srcdir)/milena/tests/tests.mk
+ include $(top_srcdir)/build-aux/autotroll.mk
SUBDIRS = impl
diff --cc milena/tests/io/magick/save.cc
index a4efd12,9af3e22..a6361c6
--- a/milena/tests/io/magick/save.cc
+++ b/milena/tests/io/magick/save.cc
@@@ -44,14 -43,15 +43,12 @@@ int main(
io::ppm::load(lena_mln, MLN_IMG_DIR "/tiny.ppm");
value::rgb8 c = lena_mln(p);
- io::magick::save(lena_mln, "tiny.png");
+ io::magick::save(lena_mln, "save-tiny.png");
image2d<value::rgb8> lena_im;
- io::magick::load(lena_im, "tiny.png");
-
+ io::magick::load(lena_im, "save-tiny.png");
- mln_assertion(lena_im(p) == c);
-
- io::ppm::save(lena_im, "save-tiny.ppm");
+ mln_assertion(lena_im(p) == c);
-
mln_assertion(lena_im.domain() == lena_mln.domain());
mln_assertion(lena_im == lena_mln);
-
}
diff --cc milena/tests/subsampling/Makefile.am
index 122b1a9,e59ed8d..7e859b4
--- a/milena/tests/subsampling/Makefile.am
+++ b/milena/tests/subsampling/Makefile.am
@@@ -13,5 -13,18 +13,15 @@@
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-#
-
-## Process this file through Automake to create Makefile.in.
include $(top_srcdir)/milena/tests/tests.mk
+
+
+ check_PROGRAMS = \
+ antialiased
+
+
+ antialiased_SOURCES = antialiased.cc
+
+
+ TESTS = $(check_PROGRAMS)
diff --cc scribo/Makefile.am
index 0f98de6,ff8f5a0..38c84a7
--- a/scribo/Makefile.am
+++ b/scribo/Makefile.am
@@@ -1,4 -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.
#
@@@ -14,7 -14,9 +15,7 @@@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
- SUBDIRS = tests src
-## Process this file through Automake to create Makefile.in.
-
+ SUBDIRS = demo tests src
.PHONY: bin
diff --cc scribo/demo/Makefile.am
index 5030e1e,365260d..b1d3c5b
--- a/scribo/demo/Makefile.am
+++ b/scribo/demo/Makefile.am
@@@ -15,12 -14,11 +15,9 @@@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
- include $(top_srcdir)/scribo/scribo.mk
-## Process this file through Automake to create Makefile.in.
-
+ if HAVE_QT
- .PHONY : demo
+ SUBDIRS = review viewer
- Makefile.demo:
- qmake-qt4 $(srcdir)/demo/demo.pro -o Makefile.demo
+ endif HAVE_QT
- demo: Makefile.demo
- make -f Makefile.demo all
diff --cc scribo/src/binarization/sauvola_ms.cc
index 30742a3,984ddee..d85eece
--- a/scribo/src/binarization/sauvola_ms.cc
+++ b/scribo/src/binarization/sauvola_ms.cc
@@@ -238,169 -80,39 +80,37 @@@ int main(int argc, char *argv[]
trace::entering("main");
- mln::debug::internal::filename_prefix = argv[1];
-
- // Window size.
- unsigned w = atoi(argv[2]);
+ // Window size
+ unsigned w_1;
+ if (argc >= 4)
+ w_1 = atoi(argv[3]); // Scale 1
+ else
+ w_1 = 101u;
// First subsampling scale.
- unsigned s = atoi(argv[4]);
-
- // Number of subscales.
- unsigned nb_subscale = atoi(argv[3]);
-
- // Subscale step.
- unsigned q = atoi(argv[5]);
-
- std::cout << "Running Sauvola_ms with w = " << w
- << ", s = " << s
- << ", nb_subscale = " << nb_subscale
- << ", q = " << q
- << std::endl;
-
- typedef image2d<value::int_u8> I;
- dpoint2d none(0, 0);
-
- mln::util::timer timer_;
-
- timer_.start();
- I input_full;
- io::pgm::load(input_full, argv[1]);
- std::cout << "Image loaded - " << timer_ << std::endl;
-
- timer_.restart();
-
- util::array<object_image(L)> lbls;
-
-
-
- // First subsampling 1/s
-
- // std::cout << "1/" << s << std::endl;
- timer_.start();
- I input = mln::subsampling::subsampling(input_full, none, s);
-
- integral_image<int_u8> simple, squared;
- image2d<int_u8>
- t_1 = scribo::binarization::sauvola_threshold(input, w, simple, squared);
-
- label_16 nb1;
- image2d<bool> b_1 = apply_sauvola(input, t_1, 1);
-
- {
- lbls.append(primitive::extract::objects(b_1, c8(), nb1));
- object_image(L) lbl_raw(lbls[0]);
- lbls[0] = filter::objects_large(lbls[0], atoi(argv[6]));
- scribo::debug::save_object_diff(lbl_raw, lbls[0],
- mln::debug::filename("filter_diff.ppm", 2));
- }
-
- std::cout << "Scale 2 - 1/" << s << " Done - " << timer_ << std::endl;
-
-
-
-
- // Additional subscales.
- for (unsigned i = 1; i < nb_subscale; ++i)
- {
- unsigned ratio = std::pow(float(q), int(i));
- // std::cout << "Scale " << 2 + i << " - 1/" << s * ratio << std::endl;
- timer_.restart();
- unsigned
- min_size = atoi(argv[5 + i]) / ratio,
- max_size;
- if ((3 + i) == static_cast<unsigned>(argc))
- max_size = 0; // Last subscale, so not max size limit.
- else
- max_size = atoi(argv[6 + i]) / ratio;
-
- lbls.append(get_objects(input, min_size, max_size, ratio, w, i));
- std::cout << "Scale " << 2 + i
- << " - 1/" << s * ratio
- << " Done - " << timer_ << std::endl;
- }
-
- std::cout << "--------" << std::endl;
-
- // Constructing "scale image".
- image2d<int_u8> e;
- initialize(e, input);
-
- data::fill(e, 0);
-
- typedef object_image(L) obj_t;
-
- for (int i = nb_subscale - 1; i >= 0; --i)
- {
- unsigned ratio = std::pow(float(q), int(i));
-
- std::cout << "Scale " << 2 + i << " - 1/" << s * ratio << " merged" << std::endl;
-
- mln_piter_(obj_t) p(lbls[i].domain());
- for_all(p)
- if (lbls[i](p) != 0 && e(p * ratio) == 0)
- {
- box2d b(p * ratio, p * ratio + mln::down_right * (ratio - 1));
- data::fill((e | b).rw(), i + 1);
- }
- }
-
- std::cout << "--------" << std::endl;
-
- /// Saving "scale image".
- {
- mln::fun::i2v::array<value::int_u8> f(nb_subscale + 1, 0);
- for (unsigned i = 1; i <= nb_subscale; ++i)
- f(i) = 255 / nb_subscale * i;
-
- io::pgm::save(e, "e_raw.pgm");
- io::pgm::save(data::transform(e, f), "e.pgm");
- }
-
-
- /// Saving influence zone scale image.
- image2d<int_u8> e_ext =
- transform::influence_zone_geodesic_saturated(e, c8(), mln_max(unsigned));
- io::pgm::save(e_ext, "e_ext.pgm");
-
-
- /// Creating window size image
- std::cout << "Creating window size image..." << std::endl;
- mln::fun::i2v::array<value::int_u16> f(nb_subscale, 0);
- for (unsigned i = 0; i < nb_subscale; ++i)
- {
- unsigned ratio = std::pow(float(q), int(i));
- f(i) = ratio * w;
- }
-
- image2d<int_u16> wsize = data::transform(e_ext, f);
- io::pgm::save(data::stretch(int_u8(), wsize), "wsize.pgm");
-
-
-
- /// Constructing threshold image
- image2d<int_u8> t;
- initialize(t, input);
-
- std::cout << "Computing threshold image..." << std::endl;
- timer_.restart();
- mln_piter_(L) p(input.domain());
- for_all(p)
- t(p) = binarization::internal::compute_sauvola_threshold(p,
- simple,
- squared,
- wsize(p));
- std::cout << "Compute t Done - " << timer_ << std::endl;
-
- io::pgm::save(t, "t.pgm");
-
-
- timer_.restart();
-
- /// Applying threshold image and save.
- io::pbm::save(apply_sauvola(input_full, t, s), argv[argc - 1]);
- std::cout << "sauvola applied and saved Done - " << timer_ << std::endl;
-
-
- trace::exiting("main");
+ unsigned s;
+ if (argc >= 5)
+ s = atoi(argv[4]);
+ else
+ s = 3u;
+
+ double k;
+ if (argc >= 6)
+ k = atof(argv[5]);
+ else
+ k = 0.34f;
+
+ // Load
+ image2d<value::rgb8> input_1;
+ io::magick::load(input_1, argv[1]);
+
+ // Convert to Gray level image.
+ image2d<value::int_u8>
+ input_1_gl = data::transform(input_1, mln::fun::v2v::rgb_to_int_u<8>());
+
+ // Binarize
+ image2d<bool>
+ output = scribo::binarization::sauvola_ms(input_1_gl, w_1, s, k);
+
+ io::pbm::save(output, argv[2]);
}
-
-
diff --cc scribo/src/debug/Makefile.am
index 6695113,6055ed6..f3dd4f9
--- a/scribo/src/debug/Makefile.am
+++ b/scribo/src/debug/Makefile.am
@@@ -73,6 -76,14 +73,13 @@@ show_objects_small_SOURCES = show_objec
show_objects_thick_SOURCES = show_objects_thick.cc
show_objects_thin_SOURCES = show_objects_thin.cc
- ## FIXME: Does not compile.
- ## bin_PROGRAMS += show_links_several_right_overlap
- ## show_links_several_right_overlap_SOURCES = show_links_several_right_overlap.cc
-
+ if HAVE_MAGICKXX
+
+ bin_PROGRAMS += highlight_text_area
+ highlight_text_area_SOURCES = highlight_text_area.cc
+ highlight_text_area_CPPFLAGS = $(AM_CPPFLAGS) \
+ `Magick++-config --cppflags`
+ highlight_text_area_LDFLAGS = $(AM_LDFLAGS) \
+ -lpthread `Magick++-config --libs`
+
-endif HAVE_MAGICKXX
++endif HAVE_MAGICKXX
diff --cc scribo/src/preprocessing/Makefile.am
index 5b355c9,6096d8f..8b99bf2
--- a/scribo/src/preprocessing/Makefile.am
+++ b/scribo/src/preprocessing/Makefile.am
@@@ -29,5 -33,38 +30,38 @@@ denoise_fg_SOURCES = denoise_fg.c
homogeneous_contrast_SOURCES = homogeneous_contrast.cc
preprocess_SOURCES = preprocess.cc
split_bg_fg_SOURCES = split_bg_fg.cc
- subsample_SOURCES = subsample.cc
unskew_SOURCES = unskew.cc
+
+ if HAVE_MAGICKXX
+
+ bin_PROGRAMS += rotate_90
+ rotate_90_SOURCES = rotate_90.cc
+ rotate_90_CPPFLAGS = $(AM_CPPFLAGS) \
+ $(TESSERACT_CPPFLAGS) \
+ `Magick++-config --cppflags`
+
+ rotate_90_LDFLAGS = $(AM_LDFLAGS) \
+ $(TESSERACT_LDFLAGS) \
+ -lpthread `Magick++-config --libs`
+
+ bin_PROGRAMS += to_pgm
+ to_pgm_SOURCES = to_pgm.cc
+ to_pgm_CPPFLAGS = $(AM_CPPFLAGS) \
+ $(TESSERACT_CPPFLAGS) \
+ `Magick++-config --cppflags`
+
+ to_pgm_LDFLAGS = $(AM_LDFLAGS) \
+ $(TESSERACT_LDFLAGS) \
+ -lpthread `Magick++-config --libs`
+
+ bin_PROGRAMS += subsample
+ subsample_SOURCES = subsample.cc
+ subsample_CPPFLAGS = $(AM_CPPFLAGS) \
+ $(TESSERACT_CPPFLAGS) \
+ `Magick++-config --cppflags`
+
+ subsample_LDFLAGS = $(AM_LDFLAGS) \
+ $(TESSERACT_LDFLAGS) \
+ -lpthread `Magick++-config --libs`
+
-endif HAVE_MAGICKXX
++endif HAVE_MAGICKXX
diff --cc scribo/tests/preprocessing/Makefile.am
index f6ff62a,f94a852..24686fe
--- a/scribo/tests/preprocessing/Makefile.am
+++ b/scribo/tests/preprocessing/Makefile.am
@@@ -17,12 -20,14 +17,16 @@@
include $(top_srcdir)/scribo/tests/tests.mk
check_PROGRAMS = \
- unskew \
- rotate_90
+ crop \
+ crop_without_localization \
+ rotate_90 \
+ deskew
- unskew_SOURCES = unskew.cc
+ crop_SOURCES = crop.cc
+ crop_without_localization_SOURCES = crop_without_localization.cc
rotate_90_SOURCES = rotate_90.cc
+ deskew_SOURCES = deskew.cc
TESTS = $(check_PROGRAMS)
+
+MOSTLYCLEANFILES = unskew.pbm
diff --cc scribo/tests/toolchain/Makefile.am
index 0000000,826fb86..1e4a032
mode 000000,100644..100644
--- a/scribo/tests/toolchain/Makefile.am
+++ b/scribo/tests/toolchain/Makefile.am
@@@ -1,0 -1,23 +1,20 @@@
+ # 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/>.
-#
-
-## Process this file through Automake to create Makefile.in.
+
+ include $(top_srcdir)/scribo/tests/tests.mk
+
+ SUBDIRS = \
- nepomuk
++ nepomuk
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
* tests/core/other/box_runstart_piter.cc,
* tests/geom/translate.cc: Fix test.
---
milena/ChangeLog | 7 +++++++
milena/tests/core/other/box_runstart_piter.cc | 5 +++--
milena/tests/geom/translate.cc | 5 +++--
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5f01108..4a45ec9 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,12 @@
2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Fix a few tests.
+
+ * tests/core/other/box_runstart_piter.cc,
+ * tests/geom/translate.cc: Fix test.
+
+2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Update generated images included in the doc.
* doc/figures/fill-subdomain-3.ppm,
diff --git a/milena/tests/core/other/box_runstart_piter.cc b/milena/tests/core/other/box_runstart_piter.cc
index d4662fc..d3009df 100644
--- a/milena/tests/core/other/box_runstart_piter.cc
+++ b/milena/tests/core/other/box_runstart_piter.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.
//
@@ -35,7 +36,7 @@ int main()
box_runstart_piter<point2d> p(b);
unsigned i = 0;
for_all(p)
- mln_assertion(p == point2d(i, 0));
+ mln_assertion(p == point2d(i++, 0));
mln_assertion(p.run_length() == 3);
}
diff --git a/milena/tests/geom/translate.cc b/milena/tests/geom/translate.cc
index 2efd753..f2abd14 100644
--- a/milena/tests/geom/translate.cc
+++ b/milena/tests/geom/translate.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.
//
@@ -45,7 +46,7 @@ int main()
box2d b = make::box2d(-2, -2, 2, 2);
image2d<bool>
ima_rot = geom::translate(ima,
- -1 * ima.domain().center().to_vec(),
+ -1 * ima.domain().pcenter().to_vec(),
literal::zero, b);
mln_piter_(image2d<bool>)
--
1.5.6.5
1
0

last-svn-commit-277-g092bb04 Update generated images included in the doc.
by Guillaume Lazzara 01 Jul '10
by Guillaume Lazzara 01 Jul '10
01 Jul '10
* doc/figures/fill-subdomain-3.ppm,
* doc/figures/ima2d-rot-2.ppm,
* doc/figures/labeling-compute-2.ppm,
* doc/figures/tuto3_colorize-2.ppm,
* doc/figures/tuto4_genericity_and_algorithms-5.ppm: Update
generated images.
---
milena/ChangeLog | 11 +++++++++++
milena/doc/figures/fill-subdomain-3.ppm | Bin 206 -> 206 bytes
milena/doc/figures/ima2d-rot-2.ppm | Bin 235320 -> 235320 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
6 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index e265636..5f01108 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Update generated images included in the doc.
+
+ * doc/figures/fill-subdomain-3.ppm,
+ * doc/figures/ima2d-rot-2.ppm,
+ * doc/figures/labeling-compute-2.ppm,
+ * doc/figures/tuto3_colorize-2.ppm,
+ * doc/figures/tuto4_genericity_and_algorithms-5.ppm: Update
+ generated images.
+
+2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add from_to overloads for conversions from algebra::vec to point.
* mln/convert/from_to.hxx: Add new prototypes.
diff --git a/milena/doc/figures/fill-subdomain-3.ppm b/milena/doc/figures/fill-subdomain-3.ppm
index 7955c51e4f6c5cfa01042b6357271bec005dae1b..412ab99fd3670bbe9ea230fb196ab14fccb32f45 100644
GIT binary patch
delta 52
bcmX@dc#d(xLft!ea)F2e29Vi6F*Gg!r<@Cs
delta 52
bcmX@dc#d(xLfwvDO(0@`0c18%42=r_Gu#LD
diff --git a/milena/doc/figures/ima2d-rot-2.ppm b/milena/doc/figures/ima2d-r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;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>
diff --git a/milena/doc/figures/labeling-compute-2.ppm b/milena/doc/figures/labeling-compute-2.ppm
index 31ae37215fdfc5fe715aef7117f676ee6066ab0f..0e507e87c48d7fd2f555801024e916fe6fc13d5c 100644
GIT binary patch
delta 94
wcmX@dc#d&GdH9_>xj@7K187{BFo>R=C=WzH#+`st2p7Tza)AgU1r&h*0MhUlfdBvi
delta 94
wcmX@dc#d&Gd3Z;!CJ-^e02&u245BwgPXZz!W3}FM2p7Tza)AgU1r&h*00lu6X#fBK
diff --git a/milena/doc/figures/tuto3_colorize-2.ppm b/milena/doc/figures/tuto3_colorize-2.ppm
index bd4fb052a3f7e2fa491ce4e97faf06ad2e38db45..b68f373dad97b5b2a35118ad5ddfd9bc33e623bc 100644
GIT binary patch
delta 82
zcmdnbxSw%CiT53iJ3urqZaWZZ`d@-`fovd};~N7(3}A5GahhlU3?R8`{SqJoG9U=T
F1ps#kDBu79
delta 82
tcmdnbxSw%CiT9imQ8?0jz7?5`%w+(BFew!a`8hzcM6?5lfD8zNZ~+608@m7i
diff --git a/milena/doc/figures/tuto4_genericity_and_algorithms-5.ppm b/milena/doc/figures/tuto4_genericity_and_algorithms-5.ppm
index dd6cc1dfa2dfcf8a8d5d8dfca97870c1e7c0605c..a2952c393360b605960c8d4825f7ab60989fa90b 100644
GIT binary patch
literal 12406
zcmdU#KaU($5X6ZuCm=B+IRPQ90r?gQAt8hfLNe0X;tQ;~IoZ<rZnf+oIV5pH00|La
zfsB-xh}_A380uW>a?$<f&FnD4pVMkwue-YXH}6&sET1foZZ@B{7wu-XZBLtrPn$0v
zpSKsQ=Do$cP4j5GU4MA%*5!3&alSci7w!7-cC|R$VCwG47hiqSJZQgZSDUXNHLHu$
z=1%)<dw#io(q3$vd#i_+2)*1qZQi=~;LhE*kCwNa<?W;QkB^UbyC=oZYlr{*ym}L#
z;d8~kDk2BEp0+!=lHWyrYO1bpEb2k8P`dxA2zzsi*ed?V`Ndfgy{}N5?Y+0*hSzU=
zUojWAd$BUhmYbz}rz(bnLS!xqY(ZVm;!+LL#$(Z0DJrBW#tm``fkA{c2iErB={m|k
zL=;2vV79@7BA;Dd)|HlRm5Qc%MGna$?(weIUBjcJ{HhET8tfGzP=3~NgwQi|!)!ht
z>h}cA7KNPXN<+xZqK+=yAN2B_AH1R|FAmWf%mU*qDhEf`x$7Zv1_5$@yskkn_G(S_
z3Pr(5tr4{#*k#M>uKyK&VFyUB6LKK@i0@C>#YMxPx<lq@(Cccc=t4I?;`_s7PjfAp
zy3mN*SY*Ww(h`&NV=2NN=1}e9(iC|5Pk_hKyV~nT*F^O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++^;Hdp|<?Z`-
zoO96c>|42laeLq;<@f#m^-8n9*Au2>TBXiDuG`=5>Pj@9E$@AVYYv+9F^|!oTLS(5
zE{@t7=^vvovg7qnN8_SCe(j%>j8v^mv;V@6pI(`8G6N(sMs4*9u0#yLI|bbCW!CEN
zcWI@gwZFvLy3sKqE|%pO{nNQPs#`q$CzL9AZEy-CC&23cIhueUrN1=3O0F2S6{vdp
zFZ}VOSB{a39D;G6tv_oSPs3YdJ!G%`ZUl2EK)uBlJwPkQDKCO%)RFqfQO?z#tmp<{
zH3d)t^a}mo58?{^khU<LvF5;FZvte1WArC{VF&a9WN`*ER*8?X|K;^|)diCp2G5nW
z@)3Izkf1b-O>w_})8ZuII+~uo1-re8rDT;xc!6W|=LDSrtU3U(gDL&G{nHgM5IAi+
zV={KU%lo7ByZuA`t>+}X+!(FGOSc4w70(FpLy!R9g4uQe;smOt7OSt2G|E&|Gyl;i
zpT{;<dM1td+QgY^amJOkE!$WHPUV9k%CShifZ&(N&{r|%IH62gQvcdkZ{hiz0C2)(
z-+cOqMz#)InXt>6IP}5GHPxTm0KcMG<#56U38T?nJ(DJlZb>+lBsBYr3|X_h>`L%t
zFR=Ugg^yU!r)_gYoPdj){SoZdKdxY`z&q5fGvv6%vBWP=-vsFNpDG_Nr74GGjZ;r#
z0j4y;dorVY5lr<DmzwX}zhBJD1fKe%o&>dd5=iF%3&C`nd#vMrd9NYY)DtBF7zf%u
ze)SreKzfn1Wh5#X#|SD|C?n7l@Hz-V?H{CG!R-~36D!A6>5P=lG;s}taS-0A{>|9U
zhqv(L1mhS1AhyDi!FK?GZb@W}orJpb^4bzka&-mchp;r2PLkONp8x*cBTq>9fc|Pu
T0R@Uo;dR8d1XO!sQu#jtoFK1O
--
1.5.6.5
1
0

last-svn-commit-276-g460f059 Add from_to overloads for conversions from algebra::vec to point.
by Guillaume Lazzara 01 Jul '10
by Guillaume Lazzara 01 Jul '10
01 Jul '10
* mln/convert/from_to.hxx: Add new prototypes.
* mln/core/point.hh: Add new from_to overloads. Remove specialized
constructors causing ambiguities.
---
milena/ChangeLog | 9 ++
milena/doc/figures/fill-subdomain-2.ppm | Bin 206 -> 206 bytes
milena/mln/convert/from_to.hxx | 10 ++
milena/mln/core/point.hh | 162 ++++++++++++++++++++++---------
4 files changed, 133 insertions(+), 48 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 0ba1a95..e265636 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add from_to overloads for conversions from algebra::vec to point.
+
+ * mln/convert/from_to.hxx: Add new prototypes.
+
+ * mln/core/point.hh: Add new from_to overloads. Remove specialized
+ constructors causing ambiguities.
+
2010-06-03 Guillaume Lazzara <z(a)lrde.epita.fr>
Add a function to convert qt::rgb32 values to int_u8.
diff --git a/milena/doc/figures/fill-subdomain-2.ppm b/milena/doc/figures/fill-subdomain-2.ppm
index 31ae37215fdfc5fe715aef7117f676ee6066ab0f..0e507e87c48d7fd2f555801024e916fe6fc13d5c 100644
GIT binary patch
delta 94
wcmX@dc#d&GdH9_>xj@7K187{BFo>R=C=WzH#+`st2p7Tza)AgU1r&h*0MhUlfdBvi
delta 94
wcmX@dc#d&Gd3Z;!CJ-^e02&u245BwgPXZz!W3}FM2p7Tza)AgU1r&h*00lu6X#fBK
diff --git a/milena/mln/convert/from_to.hxx b/milena/mln/convert/from_to.hxx
index 5007baf..98f9420 100644
--- a/milena/mln/convert/from_to.hxx
+++ b/milena/mln/convert/from_to.hxx
@@ -147,6 +147,16 @@ namespace mln
void
from_to_(const point<G,C1>& from, point<G,C2>& to);
+ // algebra::vec -> point
+ template <unsigned n, typename C1, typename G, typename C2>
+ void
+ from_to_(const algebra::vec<n,C1>& from, point<G,C2>& to);
+
+ // algebra::vec -> point
+ template <unsigned n, typename C1, typename G>
+ void
+ from_to_(const algebra::vec<n,C1>& from, point<G,C1>& to);
+
// algebra::vec -> Gpoint.
template <unsigned n, typename T, typename P>
void
diff --git a/milena/mln/core/point.hh b/milena/mln/core/point.hh
index 8da15b6..49a519e 100644
--- a/milena/mln/core/point.hh
+++ b/milena/mln/core/point.hh
@@ -74,6 +74,14 @@ namespace mln
template <typename G, typename C1, typename C2>
void from_to_(const point<G,C1>& from, point<G,C2>& to);
+ template <unsigned n, typename C1, typename G, typename C2>
+ void
+ from_to_(const 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);
+
} // end of namespace mln::convert::over_load
} // end of namespace mln::convert
@@ -89,6 +97,7 @@ namespace mln
{
typedef algebra::vec<G::dim, float> ret;
};
+
}
/// Generic point class.
@@ -153,8 +162,6 @@ namespace mln
point(const algebra::vec<dim,C2>& v);
point(const algebra::vec<dim,C>& v);
- point(const algebra::vec<dim,double>& v);
- point(const algebra::vec<dim,float>& v);
/// \{ Constructors with different numbers of arguments
@@ -210,6 +217,9 @@ namespace mln
/// Point with all coordinates set to the mininum value.
static const point<G,C>& minus_infty();
+ /// Return the underlying vector storing the coordinates.
+ algebra::vec<G::dim, C>& hook_coord_();
+
protected:
algebra::vec<G::dim, C> coord_;
};
@@ -249,6 +259,49 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+
+ namespace internal
+ {
+
+ template <typename C, typename C2>
+ inline
+ C
+ convert_data_(metal::bool_<false>, const C2& v)
+ {
+ return static_cast<C>(v);
+ }
+
+ template <typename C, typename C2>
+ inline
+ C
+ convert_data_(metal::bool_<true>, const C2& v)
+ {
+ return round(v);
+ }
+
+ template <typename C, typename C2>
+ inline
+ C
+ convert_data(const C2& v)
+ {
+ // If (C != float && C != double) && (C2 == float || C2 == double)
+ // => We want to round the value.
+ // Otherwise we can just statically cast.
+ //
+ return convert_data_<C>(
+ typename mlc_and(
+ 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);
+ }
+
+
+
+ } // end of namespace mln::internal
+
+
+
namespace convert
{
@@ -261,9 +314,57 @@ namespace mln
from_to_(const point<G,C1>& from, point<G,C2>& to)
{
mlc_converts_to(C1,C2)::check();
- to = point<G,C2>(from.to_vec());
+ enum { dim = G::dim };
+
+ for (unsigned i = 0; i < dim; ++i)
+ to[i] = internal::convert_data<C2>(from[i]);
}
+
+ template <unsigned n, typename C1, typename G, typename C2>
+ inline
+ void
+ from_to_(const algebra::vec<n,C1>& from, point<G,C2>& to)
+ {
+ mlc_converts_to(C1, C2)::check();
+ enum { dim = G::dim };
+ mlc_bool(G::dim == n)::check();
+
+ unsigned j = 0;
+ //FIXME: to be improved while adding a conversion routine.
+ if (dim < 3)
+ to.hook_coord_() = from;
+ else
+ {
+ for (unsigned i = dim - 2; i < dim; ++i)
+ to[i] = internal::convert_data<C2>(from[j++]);
+ for (unsigned i = 2; i < dim; ++i, ++j)
+ to[i-j] = internal::convert_data<C2>(from[j]);
+ }
+ }
+
+ template <unsigned n, typename C1, typename G>
+ inline
+ void
+ from_to_(const algebra::vec<n,C1>& from, point<G,C1>& to)
+ {
+ enum { dim = G::dim };
+ mlc_bool(G::dim == n)::check();
+
+ unsigned j = 0;
+ //FIXME: to be improved while adding a conversion routine.
+ if (dim < 3)
+ to.hook_coord_() = from;
+ else
+ {
+ for (unsigned i = dim - 2; i < dim; ++i)
+ to[i] = from[j++];
+ for (unsigned i = 2; i < dim; ++i, ++j)
+ to[i-j] = from[j];
+ }
+ }
+
+
} // end of namespace mln::convert::over_load
} // end of namespace mln::convert
@@ -315,18 +416,7 @@ namespace mln
inline
point<G,C>::point(const algebra::vec<dim,C2>& v)
{
- mlc_converts_to(C2, C)::check();
- unsigned j = 0;
- //FIXME: to be improved while adding a conversion routine.
- if (dim < 3)
- coord_ = v;
- else
- {
- for (unsigned i = dim - 2; i < dim; ++i)
- coord_[i] = static_cast<C>(v[j++]);
- for (unsigned i = 2; i < dim; ++i, ++j)
- coord_[i-j] = static_cast<C>(v[j]);
- }
+ convert::over_load::from_to_(v, *this);
}
@@ -334,42 +424,10 @@ namespace mln
inline
point<G,C>::point(const algebra::vec<dim,C>& v)
{
- unsigned j = 0;
- //FIXME: to be improved while adding a conversion routine.
- if (dim < 3)
- coord_ = v;
- else
- {
- for (unsigned i = dim - 2; i < dim; ++i)
- coord_[i] = v[j++];
- for (unsigned i = 2; i < dim; ++i, ++j)
- coord_[i-j] = v[j];
- }
+ convert::over_load::from_to_(v, *this);
}
- template <typename G, typename C>
- inline
- point<G,C>::point(const algebra::vec<dim,double>& v)
- {
- unsigned j = 0;
- for (unsigned i = dim - 2; i < dim; ++i)
- coord_[i] = round(v[j++]);
- for (unsigned i = 2; i < dim; ++i, ++j)
- coord_[i-j] = round(v[j]);
- }
-
- template <typename G, typename C>
- inline
- point<G,C>::point(const algebra::vec<dim,float>& v)
- {
- unsigned j = 0;
- for (unsigned i = dim - 2; i < dim; ++i)
- coord_[i] = round(v[j++]);
- for (unsigned i = 2; i < dim; ++i, ++j)
- coord_[i-j] = round(v[j]);
- }
-
template <typename G, typename C>
inline
@@ -563,6 +621,14 @@ namespace mln
return the_;
}
+ template <typename G, typename C>
+ inline
+ algebra::vec<G::dim, C>&
+ point<G,C>::hook_coord_()
+ {
+ return coord_;
+ }
+
namespace internal
{
--
1.5.6.5
1
0

Re: [Olena-patches] last-svn-commit-230-g7b21118 m4/autotroll.m4: Fix invalid configuration when Qt is missing.
by Guillaume Lazzara 01 Jul '10
by Guillaume Lazzara 01 Jul '10
01 Jul '10
Roland Levillain wrote:
> Don't forget to report this upstream (unless you already took care of
> it). Thanks in avance!
Done. Thanks.
1
0

last-svn-commit-230-g7b21118 m4/autotroll.m4: Fix invalid configuration when Qt is missing.
by Guillaume Lazzara 01 Jul '10
by Guillaume Lazzara 01 Jul '10
01 Jul '10
---
ChangeLog | 4 ++++
m4/autotroll.m4 | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ac87741..4cac155 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * m4/autotroll.m4: Fix invalid configuration when Qt is missing.
+
2010-06-25 Guillaume Lazzara <z(a)lrde.epita.fr>
* configure.ac: Set HAVE_QT correctly.
diff --git a/m4/autotroll.m4 b/m4/autotroll.m4
index e5cb25e..d04619d 100644
--- a/m4/autotroll.m4
+++ b/m4/autotroll.m4
@@ -421,6 +421,7 @@ instead" >&AS_MESSAGE_LOG_FD
if test x"$at_cv_qt_build" = xko; then
AX_INSTEAD_IF([$4], [Cannot build a test Qt program])
+ cd ..
break
fi
QT_VERSION_MAJOR=`echo "$at_cv_qt_build" | sed 's/[[^0-9]]*//g'`
@@ -447,6 +448,7 @@ instead" >&AS_MESSAGE_LOG_FD
fi
if test -f $at_mfile; then :; else
AX_INSTEAD_IF([$4], [Cannot find the Makefile generated by qmake.])
+ cd ..
break
fi
--
1.5.6.5
2
1