Commit 7570d066 authored by green's avatar green Committed by Yann Jacquelet
Browse files

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.
parent b98887a2
......@@ -75,6 +75,14 @@
* bin/pgm_to_pbm.cc,
* bin/ppm_negate.cc: New.
2009-12-17 Yann Jacquelet <jacquelet@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@lrde.epita.fr>
Fix bugs in regional_maxima routine, work with rgb8 for stats.
......
......@@ -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()));
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment