Skip to content

Commit e34acbf

Browse files
committed
Merge pull request PointCloudLibrary#1176 from mujin/master
updated estimateProjectionMatrix() to make the down-sampled image have t...
2 parents 061f793 + 883f6c5 commit e34acbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

search/include/pcl/search/impl/organized.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,14 @@ pcl::search::OrganizedNeighbor<PointT>::estimateProjectionMatrix ()
350350
std::vector<int> indices;
351351
indices.reserve (input_->size () >> (pyramid_level_ << 1));
352352

353-
for (unsigned yIdx = 0, idx = 0; yIdx < input_->height; yIdx += ySkip, idx += input_->width * (ySkip - 1))
353+
for (unsigned yIdx = 0, idx = 0; yIdx < input_->height; yIdx += ySkip, idx += input_->width * ySkip)
354354
{
355-
for (unsigned xIdx = 0; xIdx < input_->width; xIdx += xSkip, idx += xSkip)
355+
for (unsigned xIdx = 0, idx2 = idx; xIdx < input_->width; xIdx += xSkip, idx2 += xSkip)
356356
{
357-
if (!mask_ [idx])
357+
if (!mask_ [idx2])
358358
continue;
359359

360-
indices.push_back (idx);
360+
indices.push_back (idx2);
361361
}
362362
}
363363

0 commit comments

Comments
 (0)