TransWikia.com

Adding RGB attributes to voxel

Geographic Information Systems Asked on July 4, 2021

How can I add the RGB attributes to a voxel object?

The idea is to give RGB to the colorargument inside the plot function in lidR. And still have the attribute Z as the legend in the RGLwindow. The whole idea is to give sort of realistic colors to the 3D model.

LAS_vox_met = voxel_metrics(LAS_denoised, ~list(N = length(Z)), 0.05) # calculate voxel metrics
plot(LAS_vox_met , color="Z", colorPalette = terrain.colors(50), size = 1, bg = "white", voxels = T, legend = T)

This is what I have produced so far.

enter image description here

One Answer

I'd go for something like

u = ~list(N = length(Z), R = mean(R), G = mean(G), B = mean(B))
LAS_vox_met = voxel_metrics(LAS_denoised, u, 2)
plot(LAS_vox_met , color="RGB", colorPalette = terrain.colors(50), size = 1, bg = "white", voxels = T, legend = T)

enter image description here

Correct answer by JRR on July 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP