Commit ae6ece0b authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

scribo/binarization/otsu.hh: Fix namespace ambiguities.

parent 83730f36
2012-06-20 Guillaume Lazzara <z@lrde.epita.fr>
* scribo/binarization/otsu_threshold.hh: Fix namespace ambiguities.
2012-05-22 Guillaume Lazzara <z@lrde.epita.fr> 2012-05-22 Guillaume Lazzara <z@lrde.epita.fr>
Small fixes in Scribo. Small fixes in Scribo.
......
// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE) // Copyright (C) 2011, 2012 EPITA Research and Development Laboratory
// (LRDE)
// //
// This file is part of Olena. // This file is part of Olena.
// //
...@@ -77,13 +78,13 @@ namespace scribo ...@@ -77,13 +78,13 @@ namespace scribo
/* calculation of probability density */ /* calculation of probability density */
util::array<double> pdf(hist.nvalues()); //probability distribution mln::util::array<double> pdf(hist.nvalues()); //probability distribution
for(unsigned i = 0; i< maxval; ++i) for(unsigned i = 0; i< maxval; ++i)
pdf[i] = (double)hist[i] / nsites; pdf[i] = (double)hist[i] / nsites;
util::array<double> cdf(hist.nvalues()); //cumulative probability distribution mln::util::array<double> cdf(hist.nvalues()); //cumulative probability distribution
util::array<double> myu(hist.nvalues()); // mean value for separation mln::util::array<double> myu(hist.nvalues()); // mean value for separation
/* cdf & myu generation */ /* cdf & myu generation */
cdf[0] = pdf[0]; cdf[0] = pdf[0];
...@@ -100,7 +101,7 @@ namespace scribo ...@@ -100,7 +101,7 @@ namespace scribo
and determines optimal threshold value */ and determines optimal threshold value */
mln_value(I) threshold = literal::zero; mln_value(I) threshold = literal::zero;
double max_sigma = 0.0; double max_sigma = 0.0;
util::array<double> sigma(hist.nvalues()); // inter-class variance mln::util::array<double> sigma(hist.nvalues()); // inter-class variance
for(int i = 0; i < (maxval - 1); ++i) for(int i = 0; i < (maxval - 1); ++i)
{ {
......
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