Skip to content

Commit

Permalink
updated estimateProjectionMatrix() to make the down-sampled image hav…
Browse files Browse the repository at this point in the history
…e the same number of points for each row (e.g. given a 5x5 input with x/yskip=2, the downsampled image now has 3 points for each row instead of 3,2,3 points for each row)
  • Loading branch information
liuhuanjim013 committed Mar 16, 2015
1 parent 24320e5 commit 0951763
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions search/include/pcl/search/impl/organized.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,14 @@ pcl::search::OrganizedNeighbor<PointT>::estimateProjectionMatrix ()
std::vector<int> indices;
indices.reserve (input_->size () >> (pyramid_level_ << 1));

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

indices.push_back (idx);
indices.push_back (idx2);
}
}

Expand Down

0 comments on commit 0951763

Please sign in to comment.