Commit 6682ad06 authored by Yann Jacquelet's avatar Yann Jacquelet
Browse files

Correct bad behaviour in kmean3d (see usage of zero label).

	* green/mln/clustering/kmean3d.hh
	(build_all_dbg, build_mean_dbg): Fix bad behaviour.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@4621 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 85ccfb2e
2009-10-08 Yann Jacquelet <jacquelet@lrde.epita.fr>
Correct bad behaviour in kmean3d (see usage of zero label).
* green/mln/clustering/kmean3d.hh
(build_all_dbg, build_mean_dbg): Fix bad behaviour.
2009-10-07 Edwin Carlinet <carlinet@lrde.epita.fr>
Alternate representation of tree (some tries...).
......@@ -54,6 +62,7 @@
* edwin/mln/util/ctree/node.hh:
Materials for the new tree representation.
2009-10-07 Yann Jacquelet <jacquelet@lrde.epita.fr>
Update the demo for debugging purpose.
......
......@@ -60,6 +60,7 @@
#include <mln/debug/println.hh>
#include <mln/data/fill.hh>
#include <mln/literal/zero.hh>
#include <mln/literal/one.hh>
#include <mln/labeling/colorize.hh>
#include <mln/labeling/mean_values.hh>
......@@ -1117,7 +1118,8 @@ namespace mln
t_value val = _point(pi);
t_label grp = _group(point3d(val.blue(), val.red(), val.green()));
_label_dbg(po) = grp;
// As label zero has got a particular semantic, the first label is one
_label_dbg(po) = ++grp;
}
trace::exiting("mln::clustering::kmean3d::build_label_dbg");
......@@ -1148,8 +1150,8 @@ namespace mln
{
trace::entering("mln::clustering::kmean3d::build_all_dbg");
build_label_dbg();
build_mean_dbg();
//_mean_dbg = labeling::mean_values(_point, _label_dbg, _k_center);
//build_mean_dbg();
_mean_dbg = labeling::mean_values(_point, _label_dbg, _k_center);
_color_dbg = labeling::colorize(value::rgb8(), _label_dbg);
trace::exiting("mln::clustering::kmean3d::build_all_dbg");
......
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