Exemple #1
0
 void SiftHough :: vote(SiftPointMatchConstPtr match)
 {
   std::list<HoughPoint> points;
   houghpointsFromMatch(points, match);
   QMutexLocker locker(&m_lock);
   foreach_const_it(it, points, std::list<HoughPoint>)
     m_clusters[*it].push_back(match);
 }
Exemple #2
0
 double estimate_lognormal(const std::map<double,double>& distrib,
                           LogNormalDistrib::Params& init)
 {
   typedef std::map<double,double> distrib_type;    
   double n = distrib_size(distrib);
   
   double mu = 0.0;
   foreach_const_it(it, distrib, distrib_type)
     mu += log(it->first)*it->second;
   mu /= n;
   
   double dev = 0;
   foreach_const_it(it, distrib, distrib_type)
   {
     double t = log(it->first)-mu;
     dev += t*t*it->second;
   }
Exemple #3
0
 weibull_upper_bounds_function(const distrib_type& distrib,
                               WeibullEstimates estimates,
                               double confidence,
                               double c)
 	: vnl_cost_function(2), // 2 parameters
     distrib(distrib),
     estimates(estimates),
     confidence(confidence),
     c(c),
     gamma(estimates.gamma)
 {
   nbelem = 0;
   foreach_const_it(it, distrib, distrib_type)
     nbelem += it->second;
   WeibullDistrib m (estimates.beta, estimates.etha, estimates.gamma);
   logl_estimates = model_log_likelihood(distrib, nbelem, m);
   ntk_assert(confidence <= 0.99996 && confidence >= 0.99994, "");
 }