Skip to content

Commit

Permalink
Merge pull request #108 from eniksoft/patch-1
Browse files Browse the repository at this point in the history
adding check if array with distances to model is empty
  • Loading branch information
rbrusu committed Jun 2, 2013
2 parents 850652f + a0d6b04 commit b16dff1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sample_consensus/include/pcl/sample_consensus/impl/mlesac.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ pcl::MaximumLikelihoodSampleConsensus<PointT>::computeModel (int debug_verbosity
// Iterate through the 3d points and calculate the distances from them to the model
sac_model_->getDistancesToModel (model_coefficients, distances);

if (distances.empty ())
{
//iterations_++;
++skipped_count;
continue;
}

// Use Expectiation-Maximization to find out the right value for d_cur_penalty
// ---[ Initial estimate for the gamma mixing parameter = 1/2
double gamma = 0.5;
Expand Down

0 comments on commit b16dff1

Please sign in to comment.