Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ otherwise you might get errors during compilation.
After installing everything, you can start CMake. There you have to set the `PCL_DIR` to your PCL installation (e.g. C:/Program Files/PCL 1.9.1/cmake)
and the `royale_DIR` to the share folder of your Royale binary installation (e.g. D:/Program Files/royale/4.23.0.1062/share) and click **Generate**.

**Attention**: With Royale 5.3 we switched to C++17, but there is no PCL version available that
supports this. So, if you want to use PCL with Royale, you have to use a version <5.3!
If you only need a pointcloud functionality, check out our Open3D example.

## Quick Start
Below you see which key toggles which filter:
- n: [show normals](#show-normals)
Expand Down
26 changes: 13 additions & 13 deletions samplePCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,19 @@ class RoyaleListener : public IDepthDataListener

for (size_t i = 0u; i < cloud->points.size(); ++i)
{
cloud->points[i].x = data->points[i].x;
cloud->points[i].y = data->points[i].y;
cloud->points[i].z = data->points[i].z;
cloud->points[i].x = data->getX(i);
cloud->points[i].y = data->getY(i);
cloud->points[i].z = data->getZ(i);

cloudDuplicate->points[i].x = data->points[i].x;
cloudDuplicate->points[i].y = data->points[i].y;
cloudDuplicate->points[i].z = data->points[i].z;
cloudDuplicate->points[i].x = data->getX(i);
cloudDuplicate->points[i].y = data->getY(i);
cloudDuplicate->points[i].z = data->getZ(i);

cloudIntensity->points[i].x = data->points[i].x;
cloudIntensity->points[i].y = data->points[i].y;
cloudIntensity->points[i].z = data->points[i].z;
cloudIntensity->points[i].x = data->getX(i);
cloudIntensity->points[i].y = data->getY(i);
cloudIntensity->points[i].z = data->getZ(i);

const RgbColor col = getColor(data->points[i].z);
const RgbColor col = getColor(data->getZ(i));

cloud->points[i].r = col.r;
cloud->points[i].g = col.g;
Expand All @@ -222,9 +222,9 @@ class RoyaleListener : public IDepthDataListener
cloudDuplicate->points[i].b = col.b;

// calculate intensity from color
cloudIntensity->points[i].intensity = data->points[i].grayValue / 2000.0f;
cloudIntensity->points[i].intensity = data->getGrayValue(i) / 2000.0f;

if (data->points[i].depthConfidence > 0)
if (data->getDepthConfidence(i) > 0)
{
cloud->points[i].a = 255;
cloudDuplicate->points[i].a = 255;
Expand Down Expand Up @@ -670,7 +670,7 @@ int main(int argc, char *argv[])
}
}

if (!growRegion & !bilateral & !detectPlanes)
if (!growRegion && !bilateral && !detectPlanes)
{
viewer.removeAllPointClouds();

Expand Down