There was an error while loading. Please reload this page.
1 parent c263786 commit 79008f4Copy full SHA for 79008f4
1 file changed
recognition/include/pcl/recognition/impl/implicit_shape_model.hpp
@@ -171,7 +171,7 @@ pcl::features::ISMVoteList<PointT>::findStrongestPeaks (
171
{
172
// find best peak with taking into consideration peak flags
173
double best_density = -1.0;
174
- Eigen::Vector3f strongest_peak;
+ Eigen::Vector3f strongest_peak = Eigen::Vector3f::Constant (-1);
175
int best_peak_ind (-1);
176
int peak_counter (0);
177
for (int i = 0; i < NUM_INIT_PTS; i++)
@@ -188,7 +188,8 @@ pcl::features::ISMVoteList<PointT>::findStrongestPeaks (
188
}
189
190
191
- if( peak_counter == 0 )
+ if( best_density == -1.0 || strongest_peak == Eigen::Vector3f::Constant (-1) ||
192
+ best_peak_ind == -1 || peak_counter == 0 )
193
break;// no peaks
194
195
pcl::ISMPeak peak;
0 commit comments