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 gimpplugin has been created
at 6c0b45ce7368a98b667f55af8c63c750931b822c (commit)
- Log -----------------------------------------------------------------
6c0b45c backup
069c248 backup basic plugin
bab624b New GIMP image wrapper.
ad921ba First attempts for gimp plugin
9177e80 Move Otsu's threshold computation in a separate routine.
2fb4b79 Add Niblack's binarization algorithm.
-----------------------------------------------------------------------
hooks/post-receive
--
Olena, a generic and efficient image processing platform
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 skewness has been created
at d1d6d8452e7be68f882d711281d77fbb8d6b8765 (commit)
- Log -----------------------------------------------------------------
d1d6d84 scribo/binarization/all.hh: Add more includes.
22aace9 scribo/binarization/otsu.hh: Fix namespace ambiguities.
c2dc161 mln/fun/x2x/rotation.hh: Remove alpha and axis attributes.
d50796a mln/registration/icp.hh: Cleanup some debug.
1ff7fba mln/geom/rotate.hh: Add support for n-D images.
87c1ef5 mln/algebra/mat.hh: Add implementations for 4x4 matrices.
7fb7ed4 New routines to get bottom left and top right sites.
8e2e7f1 Improve conversion between algebra::h_mat and algebra::quat.
68ec926 Rely on Argument-Dependent Lookup (ADL) in from_to_ overloads.
bd0b64a demos/graph/region_adjacency_graph.cc: Add program arguments.
1a12c68 Small fixes in Scribo.
590eeaa Add a better support for different k values in Sauvola Multiscale.
9bf1541 Add a default verbose mode in debug::logger.
73d0b5d Make use of logger features.
2f3154f Fix arguments.
ab0cdca Fix call to sauvola_ms.
948844a Make use of new logger features.
f9ea569 Cleanup Kim's binarization.
00db91c Make integral browsing canvas robust to large windows.
89004a2 Backup
17a98b3 bACKUP
146727e Backup
3987224 Backup: cleanup Sauvola's debug.
258f415 BACKUP
5ef0358 Add Wolf's binarization algorithm.
4aaafbb backup
9a341b3 backup new area thresholds.
2867bcb Improve debug output for sauvola_ms.
4fae4c0 Use C8 neighborhood for labeling in sauvola_ms.
4ad97fb Fix warning in Otsu related files.
8766c50 Fix and improve sauvola_ms_debug
ef55c70 Fix invalid line offset due to input image size.
2b17781 Fix binarization tests.
d5ba09d Revamp *_threshold functions.
f853081 Refactoring of local threshold binarization algorithms
d303f0b Backup
b781ec6 Very fast classic sauvola.
3ca5ebf Working optimized sauvola classic
b98b0d1 backup
effe50e Backup
574c613 backup
07c26a2 BACKUP - fixed by theo
bd5b77d backup - fast multiscale binarization + skewness/revert on input image.
e69e187 Working sauvola_ms_rv
62c6860 BACKUP
d60f027 Backup
3a65b8d Improve option parser.
9aec998 Add Readme files about contests.
8c4e2dd Fix compilation in Scribo.
e1b3bd7 Rely on Argument-Dependent Lookup (ADL) in from_to_ overloads.
183d831 scribo/debug/logger.hh: Improve log system.
9846847 mln/registration/icp.hh: Add a missing initialization.
13097b1 mln/io/magick/save.hh: Add generic and fast implementations
b7cf120 mln/draw/box_plain.hh: Fix unused variable warning.
6bc3a11 Remove useless targets in scribo/src/binarization.
03eaf1c Cleanup text_in_picture_dual.
962ceb9 Make unskew an option in content_in_doc.
-----------------------------------------------------------------------
hooks/post-receive
--
Olena, a generic and efficient image processing platform
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 cleanup has been updated
via cfc65f324dbe578cea17162f954e90e696f260c3 (commit)
from b2369d6d4c5f48d3b44808b8be120cc380363774 (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 -----------------------------------------------------------------
cfc65f3 Ensure `bootstrap -r' regenerates all files.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
bootstrap | 23 +++++++++++++++++------
2 files changed, 24 insertions(+), 6 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
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 apps-morphers has been updated
via b4ca8d4c88354e1577271f6103b13e1ab1f285c6 (commit)
via 08bc024b524e8e1c89b9baa4070eb562715f0b03 (commit)
via 72ee021ea66c1cb31d559c7803596199c11dea02 (commit)
via 3864857f85d254caf232b2a9fb4c547d7bf8f11a (commit)
via f8e2ffe537bc8dc29cc432ef21462dee8046d0dc (commit)
via bc142a16b5a6963f43b63f286e4f201a69ad9211 (commit)
from 3363574ac18e8b13b42f21d354a1901a511c513d (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 -----------------------------------------------------------------
b4ca8d4 Improve the (movie) output of apps/morphers/iz.
08bc024 Use the lazy recorder morpher in apps/morphers/iz.
72ee021 Add rules to build and run apps/morphers/iz.
3864857 New example demonstrating the use of influence zones.
f8e2ffe New ``lazy'' recorder morpher in apps/morpher.
bc142a1 Render the recorder morpher more generic.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 66 ++++++++
milena/apps/morphers/Makefile.am | 36 ++++-
milena/apps/morphers/iz.cc | 173 ++++++++++++++++++++
milena/apps/morphers/iz_input.pbm | Bin 0 -> 21890 bytes
.../morphers/{recorder.cc => lazy_recorder.cc} | 11 +-
.../morphers/{recorder.hh => lazy_recorder.hh} | 79 ++++++---
milena/apps/morphers/recorder.hh | 11 +-
7 files changed, 337 insertions(+), 39 deletions(-)
create mode 100644 milena/apps/morphers/iz.cc
create mode 100644 milena/apps/morphers/iz_input.pbm
copy milena/apps/morphers/{recorder.cc => lazy_recorder.cc} (88%)
copy milena/apps/morphers/{recorder.hh => lazy_recorder.hh} (64%)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
* apps/morphers/lazy_recorder.hh: New.
* apps/morphers/lazy_recorder.cc: New test.
* apps/morphers/Makefile.am (noinst_HEADERS):
Add lazy_recorder.hh.
(noinst_PROGRAMS): Add lazy_recorder.
(lazy_recorder_SOURCES): New.
(MOSTLYCLEANFILES): Add lena-fill-lazy??????.ppm.
---
milena/ChangeLog | 12 +++
milena/apps/morphers/Makefile.am | 9 ++-
.../morphers/{recorder.cc => lazy_recorder.cc} | 11 ++--
.../morphers/{recorder.hh => lazy_recorder.hh} | 76 +++++++++++++-------
4 files changed, 74 insertions(+), 34 deletions(-)
copy milena/apps/morphers/{recorder.cc => lazy_recorder.cc} (88%)
copy milena/apps/morphers/{recorder.hh => lazy_recorder.hh} (66%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 6f9f9f0..920aac7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,17 @@
2012-06-21 Roland Levillain <roland(a)lrde.epita.fr>
+ New ``lazy'' recorder morpher in apps/morpher.
+
+ * apps/morphers/lazy_recorder.hh: New.
+ * apps/morphers/lazy_recorder.cc: New test.
+ * apps/morphers/Makefile.am (noinst_HEADERS):
+ Add lazy_recorder.hh.
+ (noinst_PROGRAMS): Add lazy_recorder.
+ (lazy_recorder_SOURCES): New.
+ (MOSTLYCLEANFILES): Add lena-fill-lazy??????.ppm.
+
+2012-06-21 Roland Levillain <roland(a)lrde.epita.fr>
+
Render the recorder morpher more generic.
* apps/morphers/recorder.hh (recorder<I>::sequence): Store a
diff --git a/milena/apps/morphers/Makefile.am b/milena/apps/morphers/Makefile.am
index 8633933..5dbcc7e 100644
--- a/milena/apps/morphers/Makefile.am
+++ b/milena/apps/morphers/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2011, 2012 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -27,19 +27,22 @@ noinst_PROGRAMS = \
recorder \
recorder-bft \
recorder-wst \
- mask+recorder
+ mask+recorder \
+ lazy_recorder
-noinst_HEADERS = recorder.hh
+noinst_HEADERS = recorder.hh lazy_recorder.hh
mask_channel_SOURCES = mask+channel.cc
recorder_SOURCES = recorder.cc
recorder_bft_SOURCES = recorder-bft.cc image2d-skel.hh
recorder_wst_SOURCES = recorder-wst.cc
mask_recorder_SOURCES = mask+recorder.cc
+lazy_recorder_SOURCES = lazy_recorder.cc
MOSTLYCLEANFILES = \
lena-mask-channel.ppm \
lena-fill??????.ppm \
+ lena-fill-lazy??????.ppm \
lena-bft??????.pbm \
lena-wst??????.ppm \
lena-roi-fill??????.ppm
diff --git a/milena/apps/morphers/recorder.cc b/milena/apps/morphers/lazy_recorder.cc
similarity index 88%
copy from milena/apps/morphers/recorder.cc
copy to milena/apps/morphers/lazy_recorder.cc
index 86af667..f3c770e 100644
--- a/milena/apps/morphers/recorder.cc
+++ b/milena/apps/morphers/lazy_recorder.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2012 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -24,7 +24,8 @@
// executable file might be covered by the GNU General Public License.
/// \file
-/// \brief Exercise a morpher recording every change in the morphed image.
+/// \brief Exercise a morpher recording every change in the morphed
+/// image in a lazy fashion.
///
/// To produce an AVI movie from the `lena-fill*.ppm' files, use:
///
@@ -43,7 +44,7 @@
#include <mln/io/ppm/load.hh>
-#include "apps/morphers/recorder.hh"
+#include "apps/morphers/lazy_recorder.hh"
#include "apps/data.hh"
@@ -55,7 +56,7 @@ int main()
typedef image2d<rgb8> I;
I lena = io::ppm::load<rgb8>(MLN_IMG_DIR "/tiny.ppm");
- decorated_image< I, recorder<I> > lena_rec = record(lena);
+ decorated_image< I, lazy_recorder<I> > lena_rec = lazy_record(lena);
data::fill(lena_rec, literal::green);
- ppm::save(lena_rec, "lena-fill");
+ ppm::save(lena_rec, "lena-fill-lazy");
}
diff --git a/milena/apps/morphers/recorder.hh b/milena/apps/morphers/lazy_recorder.hh
similarity index 66%
copy from milena/apps/morphers/recorder.hh
copy to milena/apps/morphers/lazy_recorder.hh
index a2222a3..a9e0f08 100644
--- a/milena/apps/morphers/recorder.hh
+++ b/milena/apps/morphers/lazy_recorder.hh
@@ -23,12 +23,16 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef APPS_MORPHERS_RECORDER_HH
-# define APPS_MORPHERS_RECORDER_HH
+#ifndef APPS_MORPHERS_LAZY_RECORDER_HH
+# define APPS_MORPHERS_LAZY_RECORDER_HH
/// \file
-/// \brief Morpher recording every change in the morphed image,
-/// storing snapshots of the morphed image at each write operation.
+/// \brief Morpher recording every change in the morphed image in a
+/// lazy fashion, storing each write operation (i.e., the (site,
+/// value) pairs).
+///
+/// The data recorded by this morpher can thus be used to ``replay''
+/// the set of changes applied to an image.
///
/// \todo Split and move this into the library?
@@ -51,22 +55,22 @@
// Forward declaration.
-template <typename I> struct recorder;
+template <typename I> struct lazy_recorder;
/* FIXME: mln::decorated_image lacks a proper definition of
properties! (see mln/core/image/imorph/decorated_image.hh). We use
the following (minimal) set of properties as a workaround for the
- recorder decoration. */
+ lazy_recorder decoration. */
namespace mln
{
namespace trait
{
template <typename I>
- struct image_< decorated_image< I, recorder<I> > >
+ struct image_< decorated_image< I, lazy_recorder<I> > >
: default_image_morpher< I,
mln_value(I),
- decorated_image< I, recorder<I> > >
+ decorated_image< I, lazy_recorder<I> > >
{
typedef trait::image::category::identity_morpher category;
@@ -80,24 +84,37 @@ namespace mln
} // end of namespace mln
-// Recorder.
+// ``Lazy'' recorder.
template <typename I>
-struct recorder
+struct lazy_recorder
{
+ lazy_recorder()
+ {
+ }
+
+ lazy_recorder(mln::Image<I>& ima)
+ : initial(mln::duplicate(ima))
+ {
+ }
+
void reading(const I&, const mln_psite(I)&) const
{
// N/A.
}
- void writing(I& ima, const mln_psite(I)&, const mln_value(I)&)
+ void writing(I&, const mln_psite(I)& p, const mln_value(I)& v)
{
- sequence.push_back(mln::duplicate(ima));
+ sequence.push_back(std::make_pair(p, v));
}
- std::vector<mln_concrete(I)> sequence;
+ /// The initial image.
+ mln_concrete(I) initial;
+ /// The sequence of changes (list of (psite, value) pairs).
+ // Make it a tracked_ptr to avoid costly copy operations?
+ std::vector< std::pair<mln_psite(I), mln_value(I)> > sequence;
};
-/* Skeleton of an image decorated with a recorder.
+/* Skeleton of an image decorated with a lazy_recorder.
Initialy, I (Roland) wanted to add this to mln/trait/ch_value.hh:
@@ -108,14 +125,14 @@ struct recorder
typedef M< mln_ch_value(I, V), D > ret;
};
- However, this would not work in the case of the recorder since the
+ However, this would not work in the case of the lazy_recorder since the
type D of the data attached to the image (of type I) has to be
changed as well. Indeed the initial decoration contains a sequence
of images of type I, which should be changed into a sequence of
images of type mln_ch_value(I, V).
There are several option to improve this. One is to create a
- ch_value trait for data/decorations such as `recorder<I>'. Another
+ ch_value trait for data/decorations such as `lazy_recorder<I>'. Another
one is to refine the skeleton of decorated_image<I, D> to have it
convey the type the data stored in the decoration, e.g, changing
@@ -128,7 +145,7 @@ struct recorder
but this seems overly complicated.
The workaround chosen here is very local, and address the very
- specific case of decorated_image< I, recorder<I> >. */
+ specific case of decorated_image< I, lazy_recorder<I> >. */
namespace mln
{
@@ -138,11 +155,11 @@ namespace mln
{
template < typename I, typename V >
struct ch_value_< decorated_image< tag::image_<I>,
- tag::data_< recorder<I> > >,
+ tag::data_< lazy_recorder<I> > >,
V >
{
typedef decorated_image< mln_ch_value(I, V),
- recorder< mln_ch_value(I, V) > > ret;
+ lazy_recorder< mln_ch_value(I, V) > > ret;
};
} // end namespace mln::trait::impl
@@ -153,10 +170,10 @@ namespace mln
// Helper.
template <typename I>
inline
-mln::decorated_image< I, recorder<I> >
-record(mln::Image<I>& ima)
+mln::decorated_image< I, lazy_recorder<I> >
+lazy_record(mln::Image<I>& ima)
{
- return mln::decorate(ima, recorder<I>());
+ return mln::decorate(ima, lazy_recorder<I>(ima));
}
@@ -166,17 +183,24 @@ namespace ppm
template <typename I>
inline
void
- save(const mln::decorated_image< I, recorder<I> >& rec,
+ save(const mln::decorated_image< I, lazy_recorder<I> >& rec,
const std::string& prefix)
{
+ mln_concrete(I) frame = mln::duplicate(rec.decoration().initial);
for (size_t i = 0; i < rec.decoration().sequence.size(); ++i)
{
std::stringstream s;
s << std::setfill ('0') << std::setw (6) << i;
- mln::io::ppm::save(rec.decoration().sequence[i],
- prefix + s.str() + ".ppm");
+ mln::io::ppm::save(frame, prefix + s.str() + ".ppm");
+ // Apply the I-th change to the next frame.
+ //
+ // Changes are applied after the I-th image has been written,
+ // to mimic the behavior of the original recorder morpher (see
+ // recorder.hh).
+ frame(rec.decoration().sequence[i].first) =
+ rec.decoration().sequence[i].second;
}
}
}
-#endif // ! APPS_MORPHERS_RECORDER_HH
+#endif // ! APPS_MORPHERS_LAZY_RECORDER_HH
--
1.7.2.5
* apps/morphers/recorder.hh (recorder<I>::sequence): Store a
sequence of concrete images.
Add missing inline keywords.
Improve the documentation.
---
milena/ChangeLog | 9 +++++++++
milena/apps/morphers/recorder.hh | 11 +++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5d791e6..6f9f9f0 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,12 @@
+2012-06-21 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Render the recorder morpher more generic.
+
+ * apps/morphers/recorder.hh (recorder<I>::sequence): Store a
+ sequence of concrete images.
+ Add missing inline keywords.
+ Improve the documentation.
+
2011-11-28 Roland Levillain <roland(a)lrde.epita.fr>
New morpher example: recording a breadth-first thinning.
diff --git a/milena/apps/morphers/recorder.hh b/milena/apps/morphers/recorder.hh
index f8fc4f4..a2222a3 100644
--- a/milena/apps/morphers/recorder.hh
+++ b/milena/apps/morphers/recorder.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2012 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -27,7 +27,8 @@
# define APPS_MORPHERS_RECORDER_HH
/// \file
-/// \brief Morpher recording every change in the morphed image.
+/// \brief Morpher recording every change in the morphed image,
+/// storing snapshots of the morphed image at each write operation.
///
/// \todo Split and move this into the library?
@@ -55,7 +56,7 @@ template <typename I> struct recorder;
/* FIXME: mln::decorated_image lacks a proper definition of
properties! (see mln/core/image/imorph/decorated_image.hh). We use
the following (minimal) set of properties as a workaround for the
- recorder decoration. */
+ recorder decoration. */
namespace mln
{
namespace trait
@@ -93,7 +94,7 @@ struct recorder
sequence.push_back(mln::duplicate(ima));
}
- std::vector<I> sequence;
+ std::vector<mln_concrete(I)> sequence;
};
/* Skeleton of an image decorated with a recorder.
@@ -151,6 +152,7 @@ namespace mln
// Helper.
template <typename I>
+inline
mln::decorated_image< I, recorder<I> >
record(mln::Image<I>& ima)
{
@@ -162,6 +164,7 @@ record(mln::Image<I>& ima)
namespace ppm
{
template <typename I>
+ inline
void
save(const mln::decorated_image< I, recorder<I> >& rec,
const std::string& prefix)
--
1.7.2.5