PointCloudLibrary / PointCloudLibrary/pcl

[filters] `Pyramid<RGB>::compute()` is broken

Open
#3,896 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind: bug module: filters needs: feedback
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

[ 17%] Building CXX object filters/CMakeFiles/pcl_filters.dir/src/pyramid.cpp.o
In file included from /__w/1/s/filters/include/pcl/filters/impl/pyramid.hpp:43:0,
                 from /__w/1/s/filters/include/pcl/filters/pyramid.h:170,
                 from /__w/1/s/filters/src/pyramid.cpp:38:
/__w/1/s/common/include/pcl/common/distances.h:180:47: error: 'const struct pcl::RGB' has no member named 'y'
     float diff_x = p2.x - p1.x, diff_y = p2.y - p1.y, diff_z = p2.z - p1.z;
                                               ^
/__w/1/s/common/include/pcl/common/distances.h:180:47: error: 'const struct pcl::RGB' has no member named 'y'
/__w/1/s/common/include/pcl/common/distances.h:180:69: error: 'const struct pcl::RGB' has no member named 'z'
     float diff_x = p2.x - p1.x, diff_y = p2.y - p1.y, diff_z = p2.z - p1.z;
                                                                     ^
/__w/1/s/common/include/pcl/common/distances.h:180:69: error: 'const struct pcl::RGB' has no member named 'z'

Caused at L548 of pyramid.hpp due to squaredEuclideanDistance which needs the point type to have x,y,z for computing Euclidean distance.

Derived from a post by @kunaltyagi in https://github.com/PointCloudLibrary/pcl/pull/3841#issuecomment-610744388

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in filters/include/pcl/filters/impl/pyramid.hpp around line 548 and inspect the squaredEuclideanDistance call used by Pyramid::compute(). Reproduce the filters build to confirm the RGB compilation failure, then verify that the selected distance handling supports RGB and that the filters target builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.