* configure.ac: New.
* configure.gnu: New.
* Makefile.am (ACLOCAL_AMFLAGS): New.
(EXTRA_DIST): Add configure.gnu and img/lena.pgm.
* AUTHORS: New.
* README: New.
* NEWS: New (imported from Olena and updated).
* COPYING: New (imported from Olena).
* INSTALL: New (generated by Automake).
* run.mk: Adjust paths.
* m4/pypath.m4, m4/swig.m4: New (imported from Olena).
* img/lena.pgm: New (imported from Milena).
* python/Makefile.am: Adjust paths.
(%-wrap.cc %.py): Likewise.
(MILENA_CPPFLAGS): New. Use it...
(AM_CPPFLAGS, AM_SWIGFLAGS): ...here.
(TOOLS_CXXFLAGS): Remove. Superseded by
(SWILENA_CXXFLAGS): ...this (new) variable.
(AM_CXXFLAGS): Adjust.
* python/data.py: Adjust path.
---
swilena/.gitignore | 18 ++
swilena/AUTHORS | 32 ++++
swilena/COPYING | 1 +
swilena/ChangeLog | 25 +++
INSTALL => swilena/INSTALL | 0
swilena/Makefile.am | 13 ++-
swilena/NEWS | 376 ++++++++++++++++++++++++++++++++++++++++++++
swilena/README | 277 ++++++++++++++++++++++++++++++++
swilena/configure.ac | 168 ++++++++++++++++++++
swilena/configure.gnu | 39 +++++
swilena/img/lena.pgm | 1 +
swilena/m4/pypath.m4 | 6 +
{m4 => swilena/m4}/swig.m4 | 0
swilena/python/Makefile.am | 13 +-
swilena/python/data.py | 4 +-
swilena/run.mk | 9 +-
16 files changed, 968 insertions(+), 14 deletions(-)
create mode 100644 swilena/.gitignore
create mode 100644 swilena/AUTHORS
create mode 120000 swilena/COPYING
copy INSTALL => swilena/INSTALL (100%)
create mode 100644 swilena/NEWS
create mode 100644 swilena/README
create mode 100644 swilena/configure.ac
create mode 100755 swilena/configure.gnu
create mode 120000 swilena/img/lena.pgm
create mode 100644 swilena/m4/pypath.m4
copy {m4 => swilena/m4}/swig.m4 (100%)
diff --git a/swilena/.gitignore b/swilena/.gitignore
new file mode 100644
index 0000000..994b291
--- /dev/null
+++ b/swilena/.gitignore
@@ -0,0 +1,18 @@
+/build-aux/config.guess
+/build-aux/config.sub
+/build-aux/depcomp
+/build-aux/install-sh
+/build-aux/ltmain.sh
+/build-aux/missing
+/build-aux/py-compile
+
+/m4/libtool.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
+/m4/lt~obsolete.m4
+
+/*aclocal.m4
+/autom4te.cache*
+/configure
+/configure.scan
diff --git a/swilena/AUTHORS b/swilena/AUTHORS
new file mode 100644
index 0000000..2e82a7e
--- /dev/null
+++ b/swilena/AUTHORS
@@ -0,0 +1,32 @@
+This package was written by and with the assistance of
+
+==================
+Active LRDE Staff.
+==================
+
+* Guillaume Lazzara z(a)lrde.epita.fr
+* Roland Levillain roland(a)lrde.epita.fr
+
+================================
+Past contributors of LRDE Staff.
+================================
+
+* Akim Demaille akim(a)lrde.epita.fr
+
+=========
+Students.
+=========
+
+* Nicolas Burrus
+* David Lesage
+* Giovanni Palma
+* Raphaël Poss
+* Damien Thivolle
+* Niels Van Vliet
+* Astrid Wang
+
+
+.. Local Variables:
+.. mode: rst
+.. ispell-local-dictionary: "american"
+.. End:
diff --git a/swilena/COPYING b/swilena/COPYING
new file mode 120000
index 0000000..012065c
--- /dev/null
+++ b/swilena/COPYING
@@ -0,0 +1 @@
+../COPYING
\ No newline at end of file
diff --git a/swilena/ChangeLog b/swilena/ChangeLog
index 6d31d60..37c591f 100644
--- a/swilena/ChangeLog
+++ b/swilena/ChangeLog
@@ -1,5 +1,30 @@
2010-10-25 Roland Levillain <roland(a)lrde.epita.fr>
+ Autoconfiscate Swilena.
+
+ * configure.ac: New.
+ * configure.gnu: New.
+ * Makefile.am (ACLOCAL_AMFLAGS): New.
+ (EXTRA_DIST): Add configure.gnu and img/lena.pgm.
+ * AUTHORS: New.
+ * README: New.
+ * NEWS: New (imported from Olena and updated).
+ * COPYING: New (imported from Olena).
+ * INSTALL: New (generated by Automake).
+ * run.mk: Adjust paths.
+ * m4/pypath.m4, m4/swig.m4: New (imported from Olena).
+ * img/lena.pgm: New (imported from Milena).
+ * python/Makefile.am: Adjust paths.
+ (%-wrap.cc %.py): Likewise.
+ (MILENA_CPPFLAGS): New. Use it...
+ (AM_CPPFLAGS, AM_SWIGFLAGS): ...here.
+ (TOOLS_CXXFLAGS): Remove. Superseded by
+ (SWILENA_CXXFLAGS): ...this (new) variable.
+ (AM_CXXFLAGS): Adjust.
+ * python/data.py: Adjust path.
+
+2010-10-25 Roland Levillain <roland(a)lrde.epita.fr>
+
Fix Swilena's dependency tracking.
* python/Makefile.am (%-wrap.cc %.py): Honor Automake's `AMDEP'
diff --git a/INSTALL b/swilena/INSTALL
similarity index 100%
copy from INSTALL
copy to swilena/INSTALL
diff --git a/swilena/Makefile.am b/swilena/Makefile.am
index 109fb2e..f696032 100644
--- a/swilena/Makefile.am
+++ b/swilena/Makefile.am
@@ -1,4 +1,5 @@
-# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -14,8 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
+ACLOCAL_AMFLAGS = -I m4
+
SUBDIRS = python
+# `configure' wrapper used in recursive configuration.
+EXTRA_DIST = configure.gnu
+
# Meta-wrappers (templates), not generating a module, but factoring
# common parts.
meta_wrappers = \
@@ -50,6 +56,9 @@ wrappers = \
\
dynamic_image2d.i
-EXTRA_DIST = $(meta_wrappers) $(wrappers)
+EXTRA_DIST += $(meta_wrappers) $(wrappers)
+
+# Images used in tests.
+EXTRA_DIST += img/lena.pgm
check_SCRIPTS = run
diff --git a/swilena/NEWS b/swilena/NEWS
new file mode 100644
index 0000000..2054481
--- /dev/null
+++ b/swilena/NEWS
@@ -0,0 +1,376 @@
+* Swilena 1.0a
+
+ * Starting with Olena 1.1, Swilena is an independent component
+ of the project, distributed both together with the Olena
+ package and as a standalone package.
+
+ * Misc fixes and improvements.
+
+
+* Olena 1.0 July 14, 2009
+
+ * The core C++ library, renamed to Milena, has been rewritten from
+ scratch and features numerous additions over the past releases.
+ Some features have also been dropped or disabled, and some of them
+ will be reintegrated in future releases. The programming
+ interface has changed from previous versions, but most programs
+ using Olena 0.11 can be adapted to the Olena 1.0 API.
+
+ * Milena uses a simplified version of the SCOOP 2 paradigm
+ (informally called SCOOP 1.5), to improve the speed of compilation
+ and make developing easier while still providing very good
+ run-time performances.
+
+ * A first (re)implementation of Swilena featuring Python wrappers
+ for a very small subset of Milena is available. The bundled
+ Swilena Python Shell (sps) allows interactive Olena sessions.
+
+ * A reference documentation including a tutorial and a quick
+ reference guide have been started. They do not cover the whole
+ Milena library yet.
+
+ * Olena includes some demos and applications using Milena.
+
+
+* Olena 0.11 February 21, 2007
+
+ * The whole Olena distribution compiles with the GNU C++
+ Compiler (G++) 4.0 and 4.1. The compatibility with previous
+ versions of the compiler has been broken.
+
+ * Revamp of Swilena.
+ The Swilena wrappers have been repaired, as they had become
+ incompatible with recent versions of SWIG, G++, Python and Ruby.
+ Moreover, a lot of small bugs have been fixed in Swilena.
+ The test suite of Rblena, the Ruby wrappers for Olena, has
+ been completed and is comparable to Pylena's (the Python
+ wrappers for Olena).
+
+ * Libtool.
+ The whole package uses GNU Libtool to handle libraries.
+ Swilena benefits this, and uses Libtool to create shared
+ libraries upon which SWIG wrappers are built.
+
+ * Miscellaneous corrections in Olena and Integre, as well as in
+ their test suites.
+
+
+* Olena 0.10 April 15, 2004
+
+ * New documentation system.
+ Now any comment should use Doxygen style (i.e. /*! ... */).
+ You can also write some programs inside the comments. They are
+ compiled at documentation generation time. It is useful to
+ illustrate some algorithms with concrete input and output. To
+ use this feature the program has to be between \code and \endcode
+ tags. If you produce an image, you can include it in the comments
+ with the \image command, using the same name you used to produce
+ it, but with the png extension. To make sure your image will not
+ overwrite another existing one, you should name it taking care of
+ the namespace you are using: e.g. if you comment the function
+ oln::boo::bar::fun, the image should be named oln_foo_bar_fun.ppm.
+ The macros IMG_IN and IMG_OUT correspond to the path of the images.
+
+ * Border behavior can be controlled with the behavior hierarchy.
+ If an algorithm support it, you can choose the way the image
+ border will be seen. Three behaviors are available: mirror,
+ replicate or user defined value.
+
+ * Attribute opening/closing enhancement
+ - Make the algorithm more generic.
+ - Add a lot of attributes (area, disk, square, dist,
+ rectangle, volume, height, maxvalue, minvalue).
+
+ * Change the color conversion system
+ - CIE RGB is the main color system i.e. it can be converted
+ directly into any other color system.
+ - Conversion between 2 color systems should pass by the RGB one.
+
+ * Generic and concrete morphers are now implemented in Olena.
+ - Five morphers are included in this release:
+ Color morpher
+ Sub quantifying morpher
+ Piece morpher
+ Iter morpher
+ Slicing morpher
+ - These morphers can be manipulated as if they were normal images.
+
+
+* Olena 0.9 August 8, 2003
+
+ * New static hierarchy paradigm
+ - Complete rewrite of the image hierarchy.
+ - The new hierarchy benefits from multiple inheritance and
+ diamond constructs.
+ - Objects' abstract interfaces made available, leading to
+ safer and easier algorithm writing.
+ - Label images such as binary_image or vectorial_image added.
+
+ * Partial rewrite of images I/O
+ - Support for 1d, 3d images and windows.
+ - Better handling of built-in types.
+
+ * Color conversions fixed and improved.
+
+ * Cleanup and coding style conformance.
+
+ * Many bug fixes.
+ * Improved test-suite.
+
+
+* Olena 0.8 April 10, 2003
+
+ IMPORTANT NOTE: This version is not compatible with older
+ versions of Olena. The project has been split into three part,
+ so many header files have moved and new namespaces have been
+ created. Please read the UPGRADING file for more information.
+
+ * Many source code cleanups.
+ * The source code has been split into 3 parts: image
+ processing (olena/), data types (integre/) and meta-programming
+ tools (metalic/).
+ * First part of the new static hierarchy paradigm implementation.
+ * Support for combinatorial maps.
+ * Many bug fixes.
+
+
+* Olena 0.7 February 10, 2003
+
+ * Manual pages for the command-line utilities.
+ * New, saner, source tree layout.
+ * Each `part' of the source tree can be excluded from the
+ build process with configuration flags.
+ * New `oln.m4' file for use by autoconf'ed user projects.
+ * Major documentation updates.
+ * New `oln-config.sh' scripts for user Makefiles.
+ * Olena now works on Mac OS X, NetBSD, FreeBSD and Cygwin.
+
+
+* Olena 0.6 January 15, 2003
+
+ * Complete rewriting of data types.
+ * Command line utilities.
+ * Fully implementation of convolutions
+ * Fast Fourier Transform (FFT)
+ * Discrete Wavelet Transform (Daubechie's wavelet) (DWT)
+ * Many bug fixes.
+
+
+* Olena 0.5 July 25, 2002
+
+ * Documentation in LaTeX (instead of Texinfo).
+ * Support reading/writing gziped images
+ (include <oln/io/gz.hh> and link with libz).
+ * Complete rewrite of the static arrays
+ (meta::array1d, meta::array2d, meta::array3d).
+ * Preliminary implementation of convolutions
+ (oln::convol::convolve)
+ * All headers should now be referenced with the `oln/' prefix,
+ as in `#include <oln/basics2d.hh>'.
+ * New conversion operator: convert::stretch.
+ * Many bug fixes.
+
+
+* Olena 0.4.1 April 25, 2002
+
+ * Buglet in the 0.4 Makefiles.
+
+
+* Olena 0.4 April 24, 2002
+
+ * New morpho:: operators:
+ - thinning
+ - thickening
+ * New convert:: operators:
+ - ng_to_se
+ - ng_to_cse
+ * First sketch of a test suite.
+ * Many bug fixes.
+
+
+* Olena 0.3 January 14, 2002
+
+ * fast_morpho() speeded-up.
+ * Minor bug fixes.
+ * "Documentation" updates.
+
+
+* Olena 0.2b December 13, 2001
+
+ * Value:
+ - Support for HSL and HSV color systems.
+ - Define internal::default_less<vec<N,T>>.
+
+ * Core:
+ - New window generator: mk_win_ellipse, mk_win_disc,
+ mk_win_ellipsoid, and mk_win_ball.
+
+ * Various #include fixes.
+
+
+* Olena 0.2 November 28, 2001
+
+ * Color:
+ - nrgb_8, nrgb_16, nrgb_32: new types for NTSC RGB. The
+ conversion from and to YIQ and HSI which assumed NTSC RGB
+ has been adjusted to actually use nrgb_* (instead of rgb_*)
+ and renamed accordingly.
+ - yuv_8, yuv_16, yuv_32: New types.
+
+ The currently available conversions are
+
+ hsi yuv
+ \ /
+ rgb -- nrgb
+ \ / \
+ xyz yiq
+
+ * Various cleanups and bug fixes. Especially:
+ - border handling (mirroring, copying) simplified and fixed.
+ - ++k, --k: return a value with the same type as k.
+
+ * I/O:
+ - pnm/P1, pnm/P3, and pnm/P6 support for image_3d.
+
+
+* Olena 0.1f November 22, 2001
+
+ * Core:
+ - Several bug fixes in memory handling.
+
+ * Types:
+ - New color types: HSI, YIQ; with conversions to and from RGB.
+ - `min()' and `max()' are now defined with the types (i.e.
+ not in math/macros.hh), along with the other operators.
+ Also, these procedures will two arguments of different
+ types.
+
+ * Casts:
+ - `cast::round': similar to C's round()
+ - `cast::rbound': ditto, but constrained to fit the
+ output type's range.
+
+ * I/O:
+ - Support for `image_3d<int_u<N> >' (as PNM P2 & P5).
+
+ * Processings
+ - `level::is_greater_or_equal', `level::is_greater',
+ `level::is_lower_or_equal', `level::is_lower',
+ `level::is_equal': Comparisons between images.
+ - `level::connected_component': Number connected components.
+ - `morpho::geodesic_dilation', `morpho::simple_geodesic_dilation'.
+ - `morpho::geodesic_erosion', `morpho::simple_geodesic_erosion'.
+ - `morpho::get_plus_se_only', `morpho::get_plus_se_p',
+ `morpho::get_minus_se_only', `morpho::get_minus_se_p': Split
+ a structural element in a `plus' (lexically before than the center)
+ and `minus' (after).
+
+ * Misc:
+ - `utils::timer': for benchmarking
+ - `level::lut', `level::hlut': Lookup tables.
+
+
+* Olena 0.1d November 15, 2001
+
+ * Core:
+ - `point's, `dpoint's, and `image_size's feature a `nth()' method,
+ that returns the value of the nth coordinate.
+ - `fold': new high order operator.
+
+ * Types:
+ - `vec<N,T>' uses an array to store its elements
+ and accepts builtin types.
+ - `rgb<T>' has been replaced by `rgb_8', `rgb_16', `rgb_32'
+ - `xyz_8', `xyz_16', `xyz_32' are new types.
+ - the latter six types are instances of the `color' type.
+
+ * Processings:
+ - All basic morphological processings (`opening',
+ `hit_or_miss', `beucher_gradient', etc.) from namespace
+ `morpho::' have their fast equivalent in namespace
+ `morpho::fast::'.
+ - `convert::apply' is similar to `apply' but will work
+ for all types of conversions while `apply' can only work
+ on `conversion_to_type' conversions.
+
+ * Tools:
+ - `utils::fill': fill an image
+ - `utils::f_moments', `utils::f_minmax': statistical functors.
+
+ * Casts:
+ - `cast::bound': similar to `convert::bound'.
+
+ * I/O:
+ - It's possible to load and save as PPM any kind of image2d
+ whose color has 3 components on 8 bits.
+
+
+* Olena 0.1b November 8, 2001
+
+ * New type: rgb<T>
+
+ * New processings:
+ - morpho::watershed_con
+ - convol::fast::gaussian
+ - convol::fast::gaussian_derivative
+ - convol::fast::gaussian_second_derivative
+
+ * Conversion are organized in the following hierarchy
+
+ conversion<Inferior>
+ ^
+ |
+ conversion_to_type<To,Inferior>
+ ^
+ |
+ conversion_from_type_to_type<From,To,Inferior>
+
+ All children of conversion_from_type_to_type are models of
+ Adaptable Unary Function. See conversion.hh for more comments.
+
+ * The only two functions that perform file i/o are `load' and
+ `save'. The other functions (`read', `write', `read_pnm',
+ `write_pnm') have been removed.
+
+ * image2d<rgb<int_u8> > can be loaded and saved as ppm.
+
+ * All iterators support a new method, cur(), that returns
+ the current point (or dpoint). It is meant to be used
+ at places where the compiler is unable to implicitly convert
+ an iterator into a point (or dpoint).
+
+ * Bug fixes:
+ - Olena now compiles successfully with -pedantic.
+ - `image2d<int_u8> lena = load("lena.pgm");' works.
+ - Multiplications and subtractions on 'vec' no longer
+ perform additions.
+
+
+* Olena 0.1 November 1, 2001
+
+ * Initial public release.
+
+
+Local Variables:
+mode: outline
+ispell-local-dictionary: "american"
+End:
+
+----
+
+Copyright (C) 2001, 2002, 2003, 2004, 2007, 2009, 2010 EPITA Research and
+Development Laboratory (LRDE)
+
+This file is part of Olena.
+
+Olena is free software: you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation, version 2 of the License.
+
+Olena is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Olena. If not, see <http://www.gnu.org/licenses/>.
diff --git a/swilena/README b/swilena/README
new file mode 100644
index 0000000..69c7f3e
--- /dev/null
+++ b/swilena/README
@@ -0,0 +1,277 @@
+Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+Laboratory (LRDE)
+
+This file is part of Olena.
+
+Olena is free software: you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation, version 2 of the License.
+
+Olena is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Olena. If not, see <http://www.gnu.org/licenses/>.
+
+The complete GNU General Public License Notice can also be found in
+the 'COPYING' file in the root directory.
+
+
+=======================
+Introduction to Swilena
+=======================
+
+Swilena is a part of Olena_, a generic and efficient platform
+dedicated to image processing.
+
+.. _Olena: http://olena.lrde.epita.fr
+
+Swilena provides bindings of the Milena C++ library (also a part of
+Olena) to other languages (currently Python).
+
+Swilena is distributed in two ways:
+
+ * as a component of the Olena package
+
+ * and a standalone package.
+
+If you obtained Swilena as an project embedded an Olena package, we
+advise you to read Olena's README, at the top-level directory of the
+package, and not to configure nor compile Swilena separately (i.e., do
+not use `swilena/configure', use the top-level `configure' instead
+and run `make' from the top-level directory).
+
+Otherwise, you are in the case of a standalone package, and you might
+want to read the rest of this file.
+
+
+==========================================
+Detailed Instructions (Standalone Package)
+==========================================
+
+-----------------
+Required Software
+-----------------
+
+Here is a non-exhaustive list of required software required to build
+Swilena successfully.
+
+ * to compile the user examples:
+
+ - a POSIX shell, like Bash
+
+ - a decent C++ compiler, like GNU C++
+
+ - a `make' utility, like GNU `make'
+
+ - the Simplified Wrapper and Interface Generator (SWIG_).
+
+ - Python_
+
+.. _SWIG: http://www.swig.org
+
+.. _Python: http://www.python.org
+
+
+If you are using a standalone version of Swilena, you also need a
+working Milena_ install (Milena is shipped with Olena).
+
+.. _Milena: http://olena.lrde.epita.fr
+
+
+-------------
+Configuration
+-------------
+
+In order to prepare the build process, you need to configure the source
+tree.
+
+ Assuming your Swilena distribution is uncompressed in directory
+`swilena-1.1', follow these steps:
+
+ % cd swilena-1.1
+ % mkdir _build
+ % cd _build
+ % ../configure
+
+ The build process can be altered by a number of options you can pass
+to the `configure' script. The following sections describe them.
+
+
+Milena path
+===========
+
+Swilena requires the Milena library. If Swilena's `configure' is
+unable to find your installation of Milena, or if you want to use a
+specific installation, you must help `configure' find it using the
+`--with-milena' flag. For instance, if you have installed Milena in
+`$HOME/local', replace the call to `configure' from the previous
+section by this command:
+
+ % ../configure --with-milena=$HOME/local
+
+
+Installation Path
+=================
+
+By default, Swilena is installed in the standard "local" directory of
+your system. This is usually `/usr/local' under Unix.
+
+ You can change this path with the following flag:
+
+ --prefix=<installation prefix>
+
+
+Compiler Selection and Compilation Flags
+========================================
+
+By default, `configure' will try to use the first C++ compiler it
+encounters on your system. If `CXX' is not set, it will look, in order,
+for:
+
+ - the value of the `CXX' environment variable,
+
+ - the GNU C++ compiler (`g++'),
+
+ - the `c++' or `gpp' commands on your system,
+
+ - `aCC', the HP-UX standard C++ compiler,
+
+ - the `CC', `cxx', `cc++' or `cl' commands on your system,
+
+ - KAI's C++ compiler (`KCC'),
+
+ - `RCC', `xlC_r' or `xlC'.
+
+ You can override the detection system by passing your favorite
+compiler name to `configure', as follows:
+
+ % ../configure CXX=<your-favorite-C++-compiler>
+
+ As an alternative, you can also set the environment variable `CXX'.
+
+
+ For some compilers (GNU g++ and Intel's icpc to some extent) ,
+`configure' will use default CXXFLAGS. You can override the default
+C++ flags by giving `configure' your selection of flags:
+
+ % ../configure CXXFLAGS="<your-favorite-flags>"
+
+
+--------
+Building
+--------
+
+Once your build directory is `configure'd, you can run
+
+ % make
+
+to build Swilena.
+
+
+ Additionally, you can build and run the test suite with:
+
+ % make check
+
+However, this process is time- and memory- consuming, and you probably
+do not need it except if you are developing/debugging Swilena.
+
+
+----------
+Installing
+----------
+
+To install Swilena on your system, run:
+
+ % make install
+
+from the build directory.
+
+ If not overridden with `--prefix', this will install:
+
+ * the Swilena Python Shell (`sps' script) in `/usr/local/bin',
+
+ * Python bindings in `/usr/local/lib/python2.x/site-packages/'.
+
+
+ You can later remove Swilena from your system by running
+
+ % make uninstall
+
+from the build directory (if you have kept it). We recommend the use
+of GNU Stow (or any similar program) during the installation of Swilena,
+to make the uninstallation of Swilena easier.
+
+
+=====================
+Layout of the Tarball
+=====================
+
+The Swilena project directory layout is as follows:
+
+build-aux
+ Auxiliary tools used by the GNU Build System during ``configure``
+ and ``make`` stages.
+
+img
+ Some (2D) images, mostly used for test purpose.
+
+m4
+ Extra Autoconf macros.
+
+python
+ Some Python bindings for Milena.
+
+
+===================
+Supported Platforms
+===================
+
+Swilena has been tested on the following configurations:
+
+=========================== =============================================
+System Compiler
+=========================== =============================================
+GNU/Linux on IA-32 g++ (GNU GCC) 3.3, 4.1, 4.2 and 4.4
+GNU/Linux on IA-32 icpc (Intel C/C++ Compiler) 10.1 and 11.0
+GNU/Linux on AMD64/Intel 64 g++ (GNU GCC) 4.1
+Mac OS X (10.6) on IA-32 g++ (GNU GCC) 4.2.1
+=========================== =============================================
+
+
+See Also
+========
+
+There are other sources of interest in the distribution.
+
+- Headline news about the project can be found in the file ``NEWS`` at
+ the root of the source tree.
+
+
+License
+=======
+
+Swilena is released under the GNU General Public Licence. See the file
+``COPYING`` (at the root of the source tree) for details.
+
+
+Contacts
+========
+
+The team can be reached by mail at olena(a)lrde.epita.fr. The snail
+mail address follows.
+
+* Olena - LRDE
+
+ | Laboratoire de Recherche et Développement de l'EPITA (LRDE)
+ | 14-16 rue Voltaire
+ | FR-94276 Le Kremlin-Bicêtre CEDEX
+ | France
+
+
+
+.. Local Variables:
+.. mode: rst
+.. End:
diff --git a/swilena/configure.ac b/swilena/configure.ac
new file mode 100644
index 0000000..a0c90f3
--- /dev/null
+++ b/swilena/configure.ac
@@ -0,0 +1,168 @@
+# Copyright (C) 2006, 2007, 2008, 2009, 2010 EPITA Research and
+# Development Laboratory (LRDE).
+#
+# This file is part of Olena.
+#
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
+#
+# Olena is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Olena. If not, see <http://www.gnu.org/licenses/>.
+
+m4_pattern_forbid([^OLN_])
+
+AC_PREREQ([2.61])
+
+
+## ---------------- ##
+## Package set up. ##
+## ---------------- ##
+
+AC_INIT([Swilena], [1.0a], [olena(a)lrde.epita.fr], [swilena])
+
+# M4 macros.
+AC_CONFIG_MACRO_DIR([m4])
+
+# Auxiliary files.
+AC_CONFIG_AUX_DIR([build-aux])
+
+# Automake.
+AM_INIT_AUTOMAKE([1.10 subdir-objects check-news dist-bzip2 nostdinc -Wall])
+
+## --------------------- ##
+## C++ compiler set up. ##
+## --------------------- ##
+
+# If the user doesn't provide any CXXFLAGS, prevent Autoconf from
+# settings its own default ones (e.g., `-g -O2' for g++).
+if test ! ${CXXFLAGS+set}; then
+ CXXFLAGS=""
+fi
+
+# Look for a C++ compiler.
+AC_LANG([C++])
+AC_PROG_CXX
+
+# Set `ICPC' to `yes' if the Intel C++ compiler is used.
+test $CXX --version 2>/dev/null | grep '\bICC\b' >/dev/null 2>&1 && ICPC=yes
+
+# GNU C++ compiler setup.
+if test "$GXX" = yes; then
+ # Speed up compiling times.
+ CXXFLAGS="$CXXFLAGS -pipe"
+
+ # The code generated for mln::data::impl::memcpy__() by g++ 4.2 with
+ # a high optimization level (`-O3') and without
+ # `-fno-strict-aliasing' might be wrong, at least with Debian's g++
+ # 4.2 on IA-32 (see also milena/mln/memcpy_.hh). We observed this
+ # behavior with e.g. milena/apps/graph-morpho/samples-image2d.cc.
+ # Note that Debian's g++ 4.0, 4.1, 4.3 and 4.4 are fine.
+ #
+ # So, when the C++ compiler is g++ 4.2, set STRICT_ALIASING_CXXFLAGS
+ # to `-fno-strict-aliasing'.
+ if $CXX --version | head -n 1 | grep '\b4\.2' >/dev/null 2>&1; then
+ STRICT_ALIASING_CXXFLAGS=-fno-strict-aliasing
+ fi
+fi
+AC_SUBST([STRICT_ALIASING_CXXFLAGS])
+
+
+# Adjusting warning options according to compilers.
+AC_ARG_VAR([WARNINGS_CXXFLAGS], [C++ compiler warning flags])
+case "$CXX" in
+ # Intel compiler
+ *icpc*)
+ WARNINGS_CXXFLAGS="-Wall -wd111,193,279,383,444,522,654,810,981,1418"
+ ;;
+ *)
+ WARNINGS_CXXFLAGS="-Wall -W"
+ ;;
+esac
+
+
+## -------- ##
+## Milena. ##
+## -------- ##
+
+# The current approach to providing Swilena a path to Milena's headers
+# is naive: for instance, we cannot provide two paths (source and
+# build dirs) in the case of an Olena build using a parallel build
+# (where srcdir != builddir). Improve if needed.
+
+AC_ARG_WITH([milena],
+ [AC_HELP_STRING([--with-milena=DIR], [path to Milena headers])],
+ [if test x"$with_milena" = xno; then
+ AC_MSG_ERROR([Milena is required for Swilena. Try to invoke configure
+without `--with-milena=no' nor `--without-milena.'])
+ fi])
+if test -n "$with_milena" && test x"$with_milena" != xyes; then
+ MILENA_CPPFLAGS="-I$with_milena"
+fi
+swl_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$MILENA_CPPFLAGS $CPPFLAGS"
+AC_CHECK_HEADER([mln/core/essential.hh], [],
+ AC_MSG_ERROR([Cannot find Milena's headers. Try to invoke configure with
+`--with-milena=DIR'.]))
+CPPFLAGS=$swl_save_CPPFLAGS
+AC_SUBST([MILENA_CPPFLAGS])
+
+
+## --------- ##
+## Swilena. ##
+## --------- ##
+
+# Use Libtool.
+# To be replaced by a call to LT_INIT as soon as Libtool 2.2 is used.
+AC_PROG_LIBTOOL
+
+# Ensure dynamic libraries are enabled.
+if test "x$enable_shared" = xno; then
+ AC_MSG_ERROR([Dynamic libraries are disabled. Try to invoke
+configure with `--enable-shared'.])
+fi
+# Check for SWIG.
+AC_PROG_SWIG([1.3.35])
+if (eval "$SWIG -version") >/dev/null 2>&1; then :; else
+ AC_MSG_ERROR([SWIG 1.3.35 is required for Swilena])
+fi
+# Check for Python.
+AM_PATH_PYTHON([2.4], [],
+ [AC_MSG_ERROR([Python 2.4 is required for Swilena.])])
+AS_VERSION_COMPARE([2.5], [$am_cv_python_version],
+ [AC_MSG_WARN([Python 2.6 and greater may not work with Swilena.])])
+adl_CHECK_PYTHON
+# Check for Python headers.
+save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS -I$PYTHONINC"
+AC_CHECK_HEADERS([Python.h], [],
+ [AC_MSG_ERROR([`Python.h' is required for Swilena.
+Try adding `-I <Python include path>' to `CPPFLAGS'.])])
+CPPFLAGS=$save_CPPFLAGS
+
+AC_ARG_VAR([SWILENA_CXXFLAGS], [C++ compiler flags for tools])
+# We want fast binaries for tools.
+if test -z "$SWILENA_CXXFLAGS"; then
+ if test "$GXX" = yes; then
+ SWILENA_CXXFLAGS="-O3 -DNDEBUG -ggdb $WARNINGS_CXXFLAGS"
+ elif test "$ICPC" = yes; then
+ SWILENA_CXXFLAGS="-O3 -DNDEBUG -g $WARNINGS_CXXFLAGS"
+ fi
+fi
+
+AC_CONFIG_FILES([Makefile
+ python/Makefile])
+
+AC_CONFIG_FILES([run], [chmod +x run])
+
+AC_CONFIG_FILES([python/sps:python/sps-common.in:python/sps.in],
+ [chmod +x python/sps])
+AC_CONFIG_FILES([python/sps-local:python/sps-common.in:python/sps-local.in],
+ [chmod +x python/sps-local])
+
+AC_OUTPUT
diff --git a/swilena/configure.gnu b/swilena/configure.gnu
new file mode 100755
index 0000000..09a9463
--- /dev/null
+++ b/swilena/configure.gnu
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+# This `configure.gnu' script is invoked by the parent `configure'
+# instead of `configure' in recursive configurations (see
+# ``Configuring Other Packages in Subdirectories'' in Autoconf's
+# manual). This is convenient to pass extra options, like the path to
+# Milena's source directory.
+#
+# This idea was taken and adapted from this message:
+# http://lists.gnu.org/archive/html/autoconf/2002-12/msg00116.html
+
+# Is option checking disabled?
+no_option_checking_p=false
+# Is ``--with-milena' not provided?
+no_milena_p=true
+
+for i; do
+ case "$i" in
+ # First try to get SRCDIR from a possible `--srcdir' argument.
+ --srcdir=*) srcdir=`echo "$i" | sed 's/^--srcdir=//'`;;
+ --disable-option-checking) no_option_checking_p=true;;
+ --with-milena*) no_milena_p=false;;
+ esac
+done
+
+# Then try to guess it from this script's path.
+test x"${srcdir+set}" != xset && srcdir=`dirname $0`
+
+# Disabled option checking is a hint that this `configure.gnu' was
+# called from a parent `configure'. If so, and if no `--with-milena'
+# option was provided, pass our own `--with-milena' option to the
+# recursive call to the actual `configure', carrying the path to
+# Milena's source directory.
+if $no_option_checking_p && $no_milena_p; then
+ milena_dir=`cd "$srcdir/../milena" && pwd`
+ exec "$srcdir/configure" ${1+"$@"} "--with-milena=$milena_dir"
+else
+ exec "$srcdir/configure" ${1+"$@"}
+fi
diff --git a/swilena/img/lena.pgm b/swilena/img/lena.pgm
new file mode 120000
index 0000000..5a1f6d9
--- /dev/null
+++ b/swilena/img/lena.pgm
@@ -0,0 +1 @@
+../../milena/img/lena.pgm
\ No newline at end of file
diff --git a/swilena/m4/pypath.m4 b/swilena/m4/pypath.m4
new file mode 100644
index 0000000..a4e62d1
--- /dev/null
+++ b/swilena/m4/pypath.m4
@@ -0,0 +1,6 @@
+AC_DEFUN([adl_CHECK_PYTHON],
+ [AM_PATH_PYTHON([2.0])
+ AC_CACHE_CHECK([for $am_display_PYTHON includes directory],
+ [adl_cv_python_inc],
+ [adl_cv_python_inc=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()" 2>/dev/null`])
+ AC_SUBST([PYTHONINC], [$adl_cv_python_inc])])
diff --git a/m4/swig.m4 b/swilena/m4/swig.m4
similarity index 100%
copy from m4/swig.m4
copy to swilena/m4/swig.m4
diff --git a/swilena/python/Makefile.am b/swilena/python/Makefile.am
index 531880f..6a9991f 100644
--- a/swilena/python/Makefile.am
+++ b/swilena/python/Makefile.am
@@ -22,16 +22,17 @@
## FIXME: Factor as much as possible. See how we handled this in TC.
CLEANFILES =
-AM_CPPFLAGS = -I$(PYTHONINC) -I$(top_srcdir)/milena
-TOOLS_CXXFLAGS = @TOOLS_CXXFLAGS@
-AM_CXXFLAGS = $(TOOLS_CXXFLAGS)
-AM_SWIGFLAGS = -Wall -c++ -python -I$(top_srcdir)/milena
+MILENA_CPPFLAGS = @MILENA_CPPFLAGS@
+AM_CPPFLAGS = -I$(PYTHONINC) $(MILENA_CPPFLAGS)
+SWILENA_CXXFLAGS = @SWILENA_CXXFLAGS@
+AM_CXXFLAGS = $(SWILENA_CXXFLAGS)
+AM_SWIGFLAGS = -Wall -c++ -python $(MILENA_CPPFLAGS)
## We build modules, not plain libs.
AM_LDFLAGS = -avoid-version -module -shared
## Run Swig to create the C++ wrapper files, the Python interface
## files, and the dependency Makefile snippets.
-%-wrap.cc %.py: $(top_srcdir)/swilena/%.i
+%-wrap.cc %.py: $(top_srcdir)/%.i
@AMDEP_TRUE@ if $(SWIG) $(AM_SWIGFLAGS) $(SWIGFLAGS) -MD -MF "$(DEPDIR)/$*-wrap.Tcc" -o $@ $<; then \
@AMDEP_TRUE@ mv -f "$(DEPDIR)/$*-wrap.Tcc" "$(DEPDIR)/$*-wrap.Pcc";\
@AMDEP_TRUE@ else \
@@ -207,7 +208,7 @@ CLEANFILES += $(bin_SCRIPTS) $(noinst_SCRIPTS)
## Tests. ##
## ------- ##
-include $(top_srcdir)/swilena/run.mk
+include $(top_srcdir)/run.mk
## FIXME: Do we really need to pass top_srcdir and top_builddir to run?
TESTS_ENVIRONMENT = \
diff --git a/swilena/python/data.py b/swilena/python/data.py
index 4a162d9..0d715de 100644
--- a/swilena/python/data.py
+++ b/swilena/python/data.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python
-# Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+# Copyright (C) 2008, 2010 EPITA Research and Development Laboratory (LRDE)
#
# This file is part of Olena.
#
@@ -22,5 +22,5 @@
import os
top_srcdir = os.environ["top_srcdir"]
-img_dir = os.path.join(top_srcdir, "milena", "img")
+img_dir = os.path.join(top_srcdir, "img")
lena = os.path.join (img_dir, "lena.pgm")
diff --git a/swilena/run.mk b/swilena/run.mk
index 993b5d4..e962c2e 100644
--- a/swilena/run.mk
+++ b/swilena/run.mk
@@ -1,4 +1,5 @@
-# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -16,7 +17,7 @@
# A test/script wrapper.
-RUN = $(top_builddir)/swilena/run
-RUN_IN = $(top_srcdir)/swilena/run.in
+RUN = $(top_builddir)/run
+RUN_IN = $(top_srcdir)/run.in
$(RUN): $(RUN_IN)
- cd $(top_builddir)/swilena && $(MAKE) $(AM_MAKEFLAGS) run
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) run
--
1.5.6.5
* tests/binarization/global_threshold.cc,
* tests/binarization/local_threshold.cc,
* tests/primitive/link/merge_double_link.cc: Fix tests.
* tests/core/Makefile.am: Add a new test.
* tests/core/line_info.cc: New.
* tests/filter/small_and_large_bboxes.cc: Remove useless arguments.
* tests/img/pixels.pbm: Update.
---
scribo/ChangeLog | 16 ++++++
scribo/tests/binarization/global_threshold.cc | 28 ++++++++++-
scribo/tests/binarization/local_threshold.cc | 34 +++++++++++--
scribo/tests/core/Makefile.am | 4 +-
.../line_info.cc} | 54 +++++++++++---------
scribo/tests/filter/small_and_large_bboxes.cc | 2 +-
scribo/tests/img/pixels.pbm | 2 +-
scribo/tests/primitive/link/merge_double_link.cc | 7 +--
8 files changed, 110 insertions(+), 37 deletions(-)
copy scribo/tests/{filter/small_and_large_bboxes.cc => core/line_info.cc} (56%)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 98c90d6..b4c122c 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,21 @@
2010-10-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Update tests in Scribo.
+
+ * tests/binarization/global_threshold.cc,
+ * tests/binarization/local_threshold.cc,
+ * tests/primitive/link/merge_double_link.cc: Fix tests.
+
+ * tests/core/Makefile.am: Add a new test.
+
+ * tests/core/line_info.cc: New.
+
+ * tests/filter/small_and_large_bboxes.cc: Remove useless arguments.
+
+ * tests/img/pixels.pbm: Update.
+
+2010-10-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Small fixes in Scribo
* scribo/core/line_info.hh: Fix invalid extended bboxes.
diff --git a/scribo/tests/binarization/global_threshold.cc b/scribo/tests/binarization/global_threshold.cc
index 9da29e3..e43a487 100644
--- a/scribo/tests/binarization/global_threshold.cc
+++ b/scribo/tests/binarization/global_threshold.cc
@@ -1,10 +1,36 @@
+// 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.
+
+/// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/make/image.hh>
#include <mln/data/compare.hh>
#include <scribo/binarization/global_threshold.hh>
-
int main(int argc, char *argv[])
{
using namespace mln;
diff --git a/scribo/tests/binarization/local_threshold.cc b/scribo/tests/binarization/local_threshold.cc
index 8fb5045..5de4dfd 100644
--- a/scribo/tests/binarization/local_threshold.cc
+++ b/scribo/tests/binarization/local_threshold.cc
@@ -1,11 +1,37 @@
+// 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.
+
+/// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/make/image.hh>
#include <mln/data/compare.hh>
#include <scribo/binarization/local_threshold.hh>
-
-int main(int argc, char *argv[])
+int main()
{
using namespace mln;
@@ -15,8 +41,8 @@ int main(int argc, char *argv[])
unsigned data_threshold[2][2] = { { 12, 13 },
{ 14, 15 } };
- bool data_ref[2][2] = { { 1, 1 },
- { 0, 0 } };
+ bool data_ref[2][2] = { { 1, 0 },
+ { 1, 1 } };
image2d<unsigned> input = make::image(data);
image2d<unsigned> threshold = make::image(data_threshold);
diff --git a/scribo/tests/core/Makefile.am b/scribo/tests/core/Makefile.am
index cf1c528..356cc31 100644
--- a/scribo/tests/core/Makefile.am
+++ b/scribo/tests/core/Makefile.am
@@ -20,6 +20,8 @@
include $(top_srcdir)/scribo/tests/tests.mk
-check_PROGRAMS =
+check_PROGRAMS = line_info
+
+line_info_SOURCES = line_info.cc
TESTS = $(check_PROGRAMS)
diff --git a/scribo/tests/filter/small_and_large_bboxes.cc b/scribo/tests/core/line_info.cc
similarity index 56%
copy from scribo/tests/filter/small_and_large_bboxes.cc
copy to scribo/tests/core/line_info.cc
index 20ddd12..cc0c575 100644
--- a/scribo/tests/filter/small_and_large_bboxes.cc
+++ b/scribo/tests/core/line_info.cc
@@ -1,5 +1,4 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -28,28 +27,32 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
-#include <mln/util/graph.hh>
#include <mln/value/label_16.hh>
#include <mln/io/pbm/load.hh>
-#include <mln/literal/colors.hh>
#include <scribo/primitive/extract/components.hh>
-#include <scribo/primitive/group/apply.hh>
#include <scribo/primitive/link/with_single_left_link.hh>
#include <scribo/primitive/group/from_single_link.hh>
-#include <scribo/filter/objects_small.hh>
-
-#include <scribo/make/debug_filename.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_linked_bboxes_image.hh>
+#include <scribo/core/line_set.hh>
#include "tests/data.hh"
-int main(int argc, char* argv[])
+
+int main()
{
using namespace scribo;
using namespace mln;
- std::string img = SCRIBO_IMG_DIR "/text_to_group_and_clean.pbm";
+
+ int ref[][9] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ // baseline, meanline, ascent, descent, x_height, d_height, a_height, char_space, char_width
+ { 2, 2, 2, 2, 1, 0, 1, 1, 1 },
+ { 4, 4, 4, 4, 1, 0, 1, 0, 1 },
+ { 6, 6, 6, 6, 1, 0, 1, 0, 1 },
+ { 7, 7, 7, 7, 1, 0, 1, 0, 1 },
+ { 12, 12, 10, 12, 1, 0, 3, 0, 1 },
+ { 17, 15, 15, 17, 3, 0, 3, 0, 4 } };
+
+ std::string img = SCRIBO_IMG_DIR "/pixels.pbm";
image2d<bool> input;
io::pbm::load(input, img.c_str());
@@ -61,23 +64,24 @@ int main(int argc, char* argv[])
object_links<L> links = primitive::link::with_single_left_link(text, 30);
-
- mln_assertion(nbboxes == 12u);
-
object_groups<L> groups = primitive::group::from_single_link(links);
- component_set<L> grouped_comps = primitive::group::apply(groups);
+ line_set<L> lines = scribo::line_set<L>(groups);
- mln_assertion(grouped_comps.nelements() == 6u);
- component_set<L>
- filtered_comps = scribo::filter::components_small(grouped_comps, 20);
+ for_all_lines(l, lines)
+ {
+ mln_assertion(lines(l).baseline() == ref[l][0]);
+ mln_assertion(lines(l).meanline() == ref[l][1]);
+ mln_assertion(lines(l).ascent() == ref[l][2]);
+ mln_assertion(lines(l).descent() == ref[l][3]);
+ mln_assertion(lines(l).x_height() == unsigned(ref[l][4]));
+ mln_assertion(lines(l).d_height() == ref[l][5]);
+ mln_assertion(lines(l).a_height() == ref[l][6]);
+ mln_assertion(lines(l).char_space() == unsigned(ref[l][7]));
+ mln_assertion(lines(l).char_width() == unsigned(ref[l][8]));
+ }
- unsigned valid_comps = 0;
- for_all_comps(c, filtered_comps)
- if (filtered_comps(c).is_valid())
- ++valid_comps;
+}
- mln_assertion(valid_comps == 2u);
-}
diff --git a/scribo/tests/filter/small_and_large_bboxes.cc b/scribo/tests/filter/small_and_large_bboxes.cc
index 20ddd12..b3d7d5f 100644
--- a/scribo/tests/filter/small_and_large_bboxes.cc
+++ b/scribo/tests/filter/small_and_large_bboxes.cc
@@ -44,7 +44,7 @@
#include "tests/data.hh"
-int main(int argc, char* argv[])
+int main()
{
using namespace scribo;
using namespace mln;
diff --git a/scribo/tests/img/pixels.pbm b/scribo/tests/img/pixels.pbm
index e69f06d..6f72469 100644
--- a/scribo/tests/img/pixels.pbm
+++ b/scribo/tests/img/pixels.pbm
@@ -1,4 +1,4 @@
P4
# CREATOR: GIMP PNM Filter Version 1.1
38 23
-ÿÿÿÿüÿÿÿÿüÿþ¿ÿüÿÿÿÿüÿþÿÿüÿÿÿÿüÿûÿÿüÿïÿÿüÿÿÿÿüÿÿÿÿüÿïÿÿüÿßÿÿüÿ×ÿÿüÿÿÿÿüÿÿÿÿüÿÿÿüÿoÿÿüÿïÿÿüÿÿÿÿüÿÿÿÿüÿÿÿÿüÿÿÿÿüÿÿÿÿü
\ No newline at end of file
+ÿÿÿÿüÿÿÿÿüÿþ¯ÿüÿÿÿÿüÿþÿÿüÿÿÿÿüÿûÿÿüÿïÿÿüÿÿÿÿüÿÿÿÿüÿïÿÿüÿßÿÿüÿ×ÿÿüÿÿÿÿüÿÿÿÿüÿÿÿüÿoÿÿüÿïÿÿüÿÿÿÿüÿÿÿÿüÿÿÿÿüÿÿÿÿüÿÿÿÿü
\ No newline at end of file
diff --git a/scribo/tests/primitive/link/merge_double_link.cc b/scribo/tests/primitive/link/merge_double_link.cc
index ca3002b..1b0674e 100644
--- a/scribo/tests/primitive/link/merge_double_link.cc
+++ b/scribo/tests/primitive/link/merge_double_link.cc
@@ -50,9 +50,9 @@ int main()
std::string img = SCRIBO_IMG_DIR "/pixels.pbm";
- unsigned ref_left[] = {0, 1, 1, 3, 4, 5, 6, 6, 8};
- unsigned ref_right[] = {0, 2, 2, 3, 4, 5, 6, 7, 8};
- unsigned ref_merged[] = {0, 1, 1, 3, 4, 5, 6, 7, 8};
+ unsigned ref_left[] = {0, 1, 1, 2, 4, 5, 6, 7, 7, 9};
+ unsigned ref_right[] = {0, 2, 3, 3, 4, 5, 6, 7, 8, 9};
+ unsigned ref_merged[] = {0, 1, 1, 2, 4, 5, 6, 7, 8, 9};
image2d<bool> input;
@@ -79,7 +79,6 @@ int main()
merged_links = primitive::link::merge_double_link(left_link,
right_link);
-
for_all_links(i, left_link)
mln_assertion(ref_left[i] == left_link(i));
--
1.5.6.5
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 fix-swilena-deps-tracking has been created
at 7924629f9a5ed75553a8fa6cee857bf59b634c0f (commit)
- Log -----------------------------------------------------------------
7924629 Fix Swilena's dependency tracking.
-----------------------------------------------------------------------
hooks/post-receive
--
Olena, a generic and efficient image processing platform