Skip to content

How to export correct color after pointcloud sampling? #3038

Answered by Grantim
zhangzhousuper asked this question in Q&A
Discussion options

You must be logged in to vote

Hello!

Basically makeUniformSampledCloud is simpler version of pointUniformSampling that allows to support VertColors:

  • makeUniformSampledCloud:
    1. find desired vertices with pointUniformSampling
    2. create new pointcloud from these vertices

What you need to do is to keep only sampled vertices enabled instead of creating new point cloud like this

auto optVerts = pointUniformSampling( pointCloud, settings );
if ( !optVerts )
    return;
pointCloud.validPoints &= *optVerts;

then you can export it and colors should be saved fine

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zhangzhousuper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants