* green/mln/display/display_histo.hh: Fix bug in the direction.
* green/mln/display/project_histo.hh: Add spaces to follow the LRDE
norm.
---
milena/sandbox/ChangeLog | 8 ++++++++
milena/sandbox/green/mln/display/display_histo.hh | 13 +++++++++----
milena/sandbox/green/mln/display/project_histo.hh | 4 ++--
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index 1ea3546..b94de66 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -75,6 +75,14 @@
* bin/pgm_to_pbm.cc,
* bin/ppm_negate.cc: New.
+2009-12-17 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+
+ Fix bug in the direction of projection.
+
+ * green/mln/display/display_histo.hh: Fix bug in the direction.
+ * green/mln/display/project_histo.hh: Add spaces to follow the LRDE
+ norm.
+
2009-12-16 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
Fix bugs in regional_maxima routine, work with rgb8 for stats.
diff --git a/milena/sandbox/green/mln/display/display_histo.hh
b/milena/sandbox/green/mln/display/display_histo.hh
index d34914c..1fd5da4 100644
--- a/milena/sandbox/green/mln/display/display_histo.hh
+++ b/milena/sandbox/green/mln/display/display_histo.hh
@@ -28,10 +28,12 @@
#ifndef MLN_DISPLAY_DISPLAY_HISTO_HH
# define MLN_DISPLAY_DISPLAY_HISTO_HH
+# include <mln/accu/math/sum.hh>
# include <mln/data/stretch.hh>
-# include <mln/fun/v2v/log.hh>
# include <mln/display/project_histo.hh>
-# include <mln/accu/math/sum.hh>
+# include <mln/fun/v2v/log.hh>
+# include <mln/value/int_u8.hh>
+
/// \file
///
@@ -59,9 +61,12 @@ namespace mln
///
/// The 3d histogram is projected in red/green space by
/// accumulating around the the blue dimension (green and blue
- /// composantes are being correlated). In fact, we sum in along
+ /// composantes are being correlated). In fact, we sum along
/// the blue direction. Then, we stretch value to feet pgm
/// format.
+ /// Direction r = 1
+ /// Direction g = 2
+ /// Direction b = 0
///
/// \parameter[in] histo the histogram in 3d.
/// \result return a equivalent 2d image.
@@ -74,7 +79,7 @@ namespace mln
typedef value::int_u8 t_int_u8;
typedef fun::v2v::log<float> t_log;
- image2d<unsigned> proj = project_histo<t_sum,2>(histo);
+ image2d<unsigned> proj = project_histo<t_sum,0>(histo);
image2d<t_int_u8> proj_int = data::stretch(t_int_u8(),
data::transform(proj,
t_log()));
diff --git a/milena/sandbox/green/mln/display/project_histo.hh
b/milena/sandbox/green/mln/display/project_histo.hh
index 63ea84e..f0e6858 100644
--- a/milena/sandbox/green/mln/display/project_histo.hh
+++ b/milena/sandbox/green/mln/display/project_histo.hh
@@ -54,7 +54,7 @@ namespace mln
image2d<mln_result(A)>
project_histo(const image3d<V>& histo);
-#ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_INCLUDE_ONLY
/// \brief Allow the visualization of 3d histogram.
///
@@ -86,7 +86,7 @@ namespace mln
return accu::image::to_result(histo_accu);
}
-#endif // ! MLN_INCLUDE_ONLY
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::transform
--
1.5.6.5