Commit 6b397594 authored by Edwin Carlinet's avatar Edwin Carlinet
Browse files

Fix extinction computation algrithm with negative values (for the max-tree).

    * mln/morpho/extinction.hpp: Handle max-tree based extinction computation.
parent 09a97883
......@@ -49,10 +49,10 @@ namespace mln
if (cmp(f(mp), f(mq))) { // mp is the minimum
amin(q) = mp;
extinction(mq) = f(q) - f(mq);
extinction(mq) = abs(f(q) - f(mq));
} else { // mq is the minimum
amin(q) = mq;
extinction(mp) = f(q) - f(mp);
extinction(mp) = abs(f(q) - f(mp));
}
}
......@@ -92,7 +92,7 @@ namespace mln
mln_viter(v, par);
v.init();
mln_point(I) root = *v;
extinction(amin(root)) = ima(root) - ima(amin(root));
extinction(amin(root)) = abs(ima(root) - ima(amin(root)));
}
// Propagate extinction value to minima flatzones ?
......
Markdown is supported
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