https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix registration std dev computation.
* mln/registration/icp2.hh (compute_standard_deviation): Fix.
icp2.hh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: mln/registration/icp2.hh
--- mln/registration/icp2.hh (revision 3305)
+++ mln/registration/icp2.hh (working copy)
@@ -32,6 +32,7 @@
///
/// Register an image over an another using the ICP algorithm.
+# include <cmath>
# include <algorithm>
# include <mln/core/alias/vec3d.hh>
@@ -114,8 +115,11 @@
const p_array<P>& X,
const F& closest_point);
+
+
# ifndef MLN_INCLUDE_ONLY
+
/// Closest point functor based on map distance.
template <typename P>
class closest_point_with_map
@@ -267,7 +271,7 @@
}
float d = e_k_accu.to_result();
- sd = math::sqrt((e_k_accu.hook_value_() - 2.5 * math::sqr(d)) / P_.nsites());
+ sd = std::sqrt(e_k_accu.hook_value_() / P_.nsites() - d * d);
return sd;
}
@@ -399,7 +403,7 @@
Qk(2,3) = Spx(1,2) + Spx(2,1);
Qk(3,2) = Spx(1,2) + Spx(2,1);
- return mln::math::jacobi(Qk);
+ return math::jacobi(Qk);
}