* mln/fun/v2b/threshold.hh: Here.
---
milena/ChangeLog | 6 ++++++
milena/mln/fun/v2b/threshold.hh | 8 ++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 549694b..8b495e8 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2011-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Invert threshold function test.
+
+ * mln/fun/v2b/threshold.hh: Here.
+
+2011-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add new crop routines.
* mln/geom/crop.hh,
diff --git a/milena/mln/fun/v2b/threshold.hh b/milena/mln/fun/v2b/threshold.hh
index 240920b..5a8e8e9 100644
--- a/milena/mln/fun/v2b/threshold.hh
+++ b/milena/mln/fun/v2b/threshold.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -69,7 +70,10 @@ namespace mln
bool
threshold<V>::operator()(const V& v) const
{
- return v >= a;
+ // Here the test seems to be inversed compared to the usual
+ // use. Indeed, we want to preserve the following convention:
+ // True for foreground and False for background.
+ return v <= a;
}
# endif // ! MLN_INCLUDE_ONLY
--
1.7.2.5