
Import Point Clouds from Agisoft Metashape, PLY, or TXT Files
Source:R/utils_gaussian_splatting.R
gs_import_metashape.RdImports a sparse or dense 3D point cloud exported by Agisoft Metashape (or COLMAP,
CloudCompare, LiDAR) and initializes a gaussian_splat object. Automatically reads
3D coordinates ($X, Y, Z$) and RGB vertex colors from binary or ASCII PLY files,
as well as delimited TXT/XYZ/CSV tables.
Usage
gs_import_metashape(
file,
format = c("auto", "ply", "txt", "las"),
initial_scale = NULL,
initial_opacity = 0.99,
subsample = NULL
)Arguments
- file
Character string. Path to the point cloud file (
.ply,.txt,.xyz,.csv,.las).- format
Character string. Format type:
"auto"(default, inferred from extension),"ply","txt", or"las".- initial_scale
Optional numeric scalar. If
NULL(default), automatically estimated via spatial k-NN sampling.- initial_opacity
Numeric scalar between 0 and 1. Default is
0.99(solid points).- subsample
Optional integer. If provided, randomly downsamples the point cloud to this maximum number of points for fast prototyping or rendering.
Value
A gaussian_splat object ready for gs_viewer(), gs_render(), gs_segment_sam(), and gs_measure().