lidar_platform.cc
- class lidar_platform.tools.cc.CCCommand(cc_exe, silent=True, auto_save='OFF', fmt='SBF')[source]
Bases:
list
- exception lidar_platform.tools.cc.CloudCompareError[source]
Bases:
ErrorException raised for errors in the input.
- expression -- input expression in which the error occurred
- message -- explanation of the error
- exception lidar_platform.tools.cc.Error[source]
Bases:
ExceptionBase class for exceptions in this module.
- lidar_platform.tools.cc.add_scalar_field(cloud, name, value, silent=True, verbose=False, cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe', odir=None, colorscale=None)[source]
- lidar_platform.tools.cc.apply_transformation(cloudfile, transformation, fmt='SBF', global_shift=None, silent=True, verbose=False, odir=None)[source]
Transform a point cloud using CloudCompare using a transformation specified in a text file.
- Parameters:
cloudfile
transformation
fmt
global_shift
silent
debug
- Returns:
- lidar_platform.tools.cc.c2c_dist(compared, reference, max_dist=None, split_xyz=False, split_xy_z=False, octree_level=10, export_fmt='SBF', global_shift='AUTO', silent=True, odir=None, verbose=False, cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
Compute the distance between a compared cloud and a reference cloud
- Parameters:
compared – filename of the compared cloud
reference – filename of the reference cloud
max_dist – max distance (speed calculations)
split_xyz
split_xy_z
octree_level – well set, it can speed up the calculations
export_fmt – output format
global_shift
silent – show the CloudCompare console
odir
verbose – verbose mode
cc_exe – CloudCompare executable (defaults to standard location)
- Returns:
- lidar_platform.tools.cc.compress_fwf(cloud, in_place=True, silent=True, debug=False, global_shift='AUTO', cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- lidar_platform.tools.cc.density(pc, radius, density_type, silent=True, verbose=False, global_shift='AUTO')[source]
Compute the density on a cloud
- Parameters:
pc
radius
density_type – type can be KNN SURFACE VOLUME
silent
verbose
global_shift
- Returns:
- lidar_platform.tools.cc.distances_from_sensor(pc, squared=False, silent=True, verbose=False, global_shift='AUTO', fmt='bin', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- lidar_platform.tools.cc.distances_from_sensor_and_scattering_angles(pc, squared=False, degrees=False, silent=True, verbose=False, global_shift='AUTO', fmt='bin', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- lidar_platform.tools.cc.filter_sf(cloud, filters, silent=True, verbose=False, cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe', fmt='sbf', odir=None, colorscale=None)[source]
- lidar_platform.tools.cc.fwf_ortho(cloud, ini, silent=True, debug=False, global_shift='AUTO', cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- lidar_platform.tools.cc.fwf_peaks(cloud, ini, silent=True, debug=False, global_shift='AUTO', cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- lidar_platform.tools.cc.icp(compared, reference, overlap=None, random_sampling_limit=None, farthest_removal=False, iter_=None, silent=True, debug=False)[source]
- lidar_platform.tools.cc.icpm3c2(reference, compared, params, core=None, silent=True, fmt='BIN', verbose=False, cc_exe='C:/opt/CloudCompareProjects/CloudCompare/CloudCompare.exe', global_shift=None, auto_save='OFF')[source]
coreCloudSelection USE_CLOUD1 = 0, SUBSAMPLE_CLOUD1 = 1, RASTERIZE_CLOUD1 = 2, USE_OTHER = 3,
filterUncertaintyMode UL_NOT_USED = 0,
UL_25 = 1, UL_50 = 2, UL_90 = 3, UL_MAX = 4,
- Parameters:
auto_save
reference
compared
params
core
silent
fmt
verbose
cc_exe
global_shift
Returns:
- lidar_platform.tools.cc.keep_points_with_range_below(pc, range_max, silent=True, verbose=False, global_shift='AUTO', fmt='e57', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- lidar_platform.tools.cc.m3c2(reference, compared, params, core=None, fmt='SBF', silent=True, verbose=False, global_shift='AUTO', cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe', odir=None)[source]
- NormalMode
DEFAULT_MODE = 0, //compute normals on core points USE_CLOUD1_NORMALS = 1, MULTI_SCALE_MODE = 2, VERT_MODE = 3, HORIZ_MODE = 4, USE_CORE_POINTS_NORMALS = 5,
- ProjDestIndex
PROJECT_ON_CLOUD1 = 0 PROJECT_ON_CLOUD2 = 1 PROJECT_ON_CORE_POINTS = 2 PROJECT_ON_CLOUD1_AND_CLOUD2 = 3 PROJECT_ON_CLOUD2_WITH_NORM2 = 4
- Parameters:
reference
compared
params
core
fmt
silent
verbose
global_shift
cc
Returns:
- lidar_platform.tools.cc.merge(files, fmt='sbf', silent=True, verbose=False, global_shift='AUTO', cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe', odir=None)[source]
- lidar_platform.tools.cc.normals_to_sfs(cloud, fmt='SBF', silent=True, verbose=False, odir=None)[source]
- lidar_platform.tools.cc.octree_normals(cloud, radius, with_grids=False, angle=1, orient='PLUS_Z', model='QUADRIC', fmt='BIN', silent=True, verbose=False, global_shift='AUTO', cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe', all_at_once=False)[source]
- Parameters:
cloud
radius
orient (str) – PLUS_ZERO PLUS_ORIGIN MINUS_ZERO MINUS_ORIGIN PLUS_BARYCENTER MINUS_BARYCENTER PLUS_X MINUS_X PLUS_Y MINUS_Y PLUS_Z MINUS_Z PREVIOUS SENSOR_ORIGIN WITH_GRIDS WITH_SENSOR
model (str) – LS TRI QUADRIC
fmt
silent
verbose
global_shift
cc
- lidar_platform.tools.cc.q3dmasc(clouds, training_file, only_features=False, keep_attributes=False, silent=True, verbose=False, global_shift='AUTO', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe', fmt='sbf')[source]
Command line call to 3DMASC with the only_features option.
The Python function generates the command line for you. Some details about the command are given below. For the Python call, you simply have to specify a list of clouds which respects the order of appearance of the roles in the parameter file. clouds[0] will be associated to the first read label clouds[1] to the second one and so on…
Details about the call in command line: In command line, the clouds to load are not read in the parameter file, you have to specify them in the call, and you also have to associate each label to a number, the number representing the order in which the clouds have been open (-O option in the command line).
- Parameters:
clouds – a list of cloud paths or a unique cloud path
training_file – a 3DMASC parameter file or a classifier, depending on the options
only_features – stop after the features computation, no training, no classification [True / False]
keep_attributes – keep attributes after completion
silent – call CloudCompare in silent mode [True / False]
verbose – verbose mode for the command line
global_shift – global_shifht for the opening of point clouds by CloudCompare
cc_exe – the CloudCompare executable
- Returns:
the name of the output file
- lidar_platform.tools.cc.rasterize(cloud, spacing, suffix='_RASTER', proj='AVG', fmt='SBF', silent=True, verbose=False, global_shift='AUTO', cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe', resample=False)[source]
- Parameters:
cloud
spacing
suffix
proj (str) – MIN AVG MAX
fmt
silent
verbose
global_shift
cc
resample (bool) – to resample the input cloud
- lidar_platform.tools.cc.scattering_angles(pc, degrees=False, silent=True, verbose=False, global_shift='AUTO', fmt='bin', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- lidar_platform.tools.cc.sf_add_const(filename, name_value, in_place=False, silent=True, verbose=False, global_shift='AUTO', fmt='sbf')[source]
Add one constant or several constant scalar fields to a point cloud
- Parameters:
filename – the path of the point cloud
name_value – either a (str, float/int) or a list of (str, float/int) ((“spam”, 0.5), (“eggs”, 5)) (“spam”, 0.5)
in_place – do not create a copy of the cloud, try to save the result in place
silent – do not display CloudCompare console
verbose – see messages in the python console (set silent to True)
global_shift – CloudCompare global_shift
fmt – export format (see CloudCompare documentation)
- Returns:
the name of the output cloud
- lidar_platform.tools.cc.sf_interp_and_merge(src, dst, index, global_shift, silent=True, debug=False, cc='C:/opt/CloudCompareProjects/CloudCompare/CloudCompare.exe', export_fmt='sbf')[source]
- lidar_platform.tools.cc.ss(fullname, method='OCTREE', parameter=8, odir=None, fmt=None, silent=True, verbose=False, global_shift='AUTO', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
Use CloudCompare to subsample a cloud.
- Parameters:
fullname – the full name of the cloud to subsample
algorithm – RANDOM SPATIAL OCTREE
parameter – number of points / distance between points / subdivision level
odir – output directory
fmt – output format
silent – use CloudCompare in silent mode
verbose
global_shift
cc_exe – CloudCompare executable
- Returns:
the name of the output file
- lidar_platform.tools.cc.store_in_bin(files, silent=True, verbose=False, global_shift='AUTO', cc='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- lidar_platform.tools.cc.to_bin(fullname, global_shift=None, cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe', silent=True, verbose=False)[source]
- lidar_platform.tools.cc.to_laz(fullname, remove=False, silent=True, debug=False, global_shift='AUTO', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe')[source]
- Parameters:
fullname
remove
silent
debug
global_shift
cc_exe
- Returns:
- lidar_platform.tools.cc.to_pcd(fullname, silent=True, verbose=False, global_shift='AUTO', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe', fwf=False, remove=False, odir=None)[source]
- lidar_platform.tools.cc.to_ply(fullname, silent=True, verbose=False, global_shift='AUTO', cc_exe='C:\\Program Files\\CloudCompare\\CloudCompare.exe', fwf=False)[source]