-
Hello, I want to create some point cloud images for a presentation. Trying the very simplified commands: roi <- clip_circle(ctg, 310000,4323000, 200)
png("point_cloud.png")
plot(roi)
dev.off() produces a white (empty) image. # install.packages("rgl")
library(lidR)
library(rgl)
library(tidyverse)
xyz <- as.data.frame(roi@data)
plot3d(xyz[, 1], xyz[, 2], xyz[, 3], col = xyz[, 3], size = 1) and then use a command like rgl.snapshot(). but it feels a bit non-standard, and I kind of prefer the visuals of the lidR::plot. Is there a way to output such an image using the lidR::plot? TLDR: I want to extract .jpg or .png images using lidR::plot() output on a LAS object. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I do not know why I did not realize earlier, but rgl.snapshot() directly applies to lidR::plot(). My current solution is: roi <- clip_circle(ctg, 310000,4323000, 200)
plot(roi)
rgl.snapshot("point_cloud.jpg") Please let me know if you have a better suggestion. Edit: typos |
Beta Was this translation helpful? Give feedback.
I do not know why I did not realize earlier, but rgl.snapshot() directly applies to lidR::plot(). My current solution is:
Please let me know if you have a better suggestion.
Edit: typos