Skip to content

Poisson filter: Colors from pointcloud are not reconstructed #4493

@simplelife2010

Description

@simplelife2010

I am using a pipeline to convert a pointcloud into a mesh.

[
    {
        "type" : "readers.las",
        "filename": "ground_shifted.laz"
    },
    {
        "type": "filters.poisson",
        "depth": 9,
        "density": true
    },
    {
        "type":"writers.ply",
        "faces":true,
        "filename":"poisson.ply"
    }
]

The colors in the laz pointcloud are 16bit, so rgb values are between 0 and 65535. In the output ply file, rgb values are all set to 255.

ply
format ascii 1.0
comment Generated by PDAL
element vertex 30344
property float64 x
property float64 y
property float64 z
property uint16 intensity
property uint8 returnnumber
property uint8 numberofreturns
property uint8 scandirectionflag
property uint8 edgeofflightline
property uint8 classification
property uint8 synthetic
property uint8 keypoint
property uint8 withheld
property uint8 overlap
property float32 scananglerank
property uint8 userdata
property uint16 pointsourceid
property float64 gpstime
property uint8 scanchannel
property uint16 red
property uint16 green
property uint16 blue
property float64 normalx
property float64 normaly
property float64 normalz
property float64 density
element face 60590
property list uint8 uint32 vertex_indices
end_header
2.35787 -4.36061 30.9803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 -0.0501183 -0.0122663 0.998668 12.4105
2.10782 -4.1586 30.9803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.0830477 0.0251049 0.996229 12.3303
2.0246 -3.70051 30.9803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.0810682 -0.00103172 0.996708 12.2637
2.35787 -3.65725 30.9803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.00213294 -0.0635009 0.99798 12.3934
2.45993 -4.1586 30.9803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 -0.149958 0.0294945 0.988252 12.4502
2.37781 -3.70051 30.9803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.00213294 -0.0635009 0.99798 12.4045
2.35787 -4.1586 30.9662 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.0810522 0.0244778 0.996409 12.4087
2.35787 -3.70051 30.976 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.00213294 -0.0635009 0.99798 12.3952
2.35787 -5.91474 31.4384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.466573 0.378701 0.799309 12.2402
2.06671 -5.53287 31.4384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.455127 0.349289 0.819058 12.2716
6.02259 -9.62621 31.4384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.353506 0.312623 0.881646 12.6692
5.64255 -9.19759 31.4384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.375125 0.331655 0.865613 12.6274
7.85495 -11.3875 31.4384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0.246721 0.244824 0.937651 12.9892

Expected behavior
Colors should be represented in the mesh file.

pdal version (git)

59fa11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions