Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pcl::features::ISMVoteList<PointT>::findStrongestPeaks (
{
// find best peak with taking into consideration peak flags
double best_density = -1.0;
Eigen::Vector3f strongest_peak;
Eigen::Vector3f strongest_peak = Eigen::Vector3f::Constant (-1);
int best_peak_ind (-1);
int peak_counter (0);
for (int i = 0; i < NUM_INIT_PTS; i++)
Expand All @@ -188,7 +188,8 @@ pcl::features::ISMVoteList<PointT>::findStrongestPeaks (
}
}

if( peak_counter == 0 )
if( best_density == -1.0 || strongest_peak == Eigen::Vector3f::Constant (-1) ||
best_peak_ind == -1 || peak_counter == 0 )
break;// no peaks

pcl::ISMPeak peak;
Expand Down