I need to transform Lidar Data (3D Point Cloud) into reflectance and range maps (images) in order to use them as channels for CNN.
Anyone who has already work with lidar data and can help me?
Thanks you in advance.
The data products you are referring to are commonly called "grid metrics". Grid metrics are descriptive statistics for LiDAR point cloud height and intensity datasets calculated within a user defined grid (e.g. raster cell). I use both FUSION
(reference p.72), a set of command line tools, and lidr
(reference p.29), a LiDAR processing package in R, to produce LiDAR grid metrics.
Here is an example from the documentation using the lidr
package:
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las = readLAS(LASfile)
colors = height.colors(50)
# Canopy surface model with 4 m^2 cells
metrics = grid_metrics(las, max(Z), 2)
plot(metrics, col = colors)
# Mean height with 400-m^2 cells
metrics = grid_metrics(las, mean(Z), 20)
plot(metrics, col = colors)
# Define your own new metrics
myMetrics = function(z, i)
{
metrics = list(
zwimean = sum(z*i)/sum(i), # Mean elevation weighted by intensities
zimean = mean(z*i), # Mean products of z by intensity
zsqmean = sqrt(mean(z^2)) # Quadratic mean
)
return(metrics)
}
metrics = grid_metrics(las, myMetrics(Z, Intensity))
plot(metrics, col = colors)
plot(metrics, "zwimean", col = colors)
plot(metrics, "zimean", col = colors)
plot(metrics, "zsqmean", col = colors)
Here is the sytax from the FUSION
documentation:
GridMetrics [switches] groundfile heightbreak cellsize outputfile datafile1 [datafile2 ...
datafileN]