cars.applications.point_cloud_outlier_removal.small_components
this module contains the small_components point removal application class.
Module Contents
Classes
SmallComponents |
Functions
|
Small components outlier removal |
|
Small component outlier removal in epipolar geometry |
- class cars.applications.point_cloud_outlier_removal.small_components.SmallComponents(conf=None)[source]
Bases:
cars.applications.point_cloud_outlier_removal.pc_out_removal.PointCloudOutlierRemoval
SmallComponents
- check_conf(conf)[source]
Check configuration
- Parameters
conf (dict) – configuration to check
- Returns
overloaded configuration
- Return type
dict
- get_optimal_tile_size(max_ram_per_worker, superposing_point_clouds=1, point_cloud_resolution=0.5)[source]
Get the optimal tile size to use, depending on memory available
- Parameters
max_ram_per_worker (int) – maximum ram available
superposing_point_clouds (int) – number of point clouds superposing
point_cloud_resolution (float) – resolution of point cloud
- Returns
optimal tile size in meter
- Return type
float
- get_method()[source]
Get margins to use during point clouds fusion
- Returns
algorithm method
- Return type
string
- get_on_ground_margin(resolution=0.5)[source]
Get margins to use during point clouds fusion
- Returns
margin
- Return type
float
- run(merged_point_cloud, orchestrator=None, depth_map_dir=None, point_cloud_dir=None, dump_dir=None, epsg=None)[source]
Run PointCloudOutlierRemoval application.
Creates a CarsDataset filled with new point cloud tiles.
- Parameters
merged_point_cloud (CarsDataset filled with pandas.DataFrame) –
merged point cloud. CarsDataset contains:
Z x W Delayed tiles. Each tile will be a future pandas DataFrame containing:
data : with keys : “x”, “y”, “z”, “corr_msk” optional: “clr”, “msk”, “data_valid”,”coord_epi_geom_i”, “coord_epi_geom_j”,”idx_im_epi” - attrs with keys: “epsg”
attributes containing “bounds”, “ysize”, “xsize”, “epsg”
orchestrator – orchestrator used
depth_map_dir (str) – output depth map directory. If None output will be written in dump_dir if intermediate data is requested
point_cloud_dir (str) – output depth map directory. If None output will be written in dump_dir if intermediate data is requested
dump_dir (str) – dump dir for output (except depth map) if intermediate data is requested
epsg (int) – cartographic reference for the point cloud (array input)
- Returns
filtered merged point cloud. CarsDataset contains:
Z x W Delayed tiles. Each tile will be a future pandas DataFrame containing:
data : with keys : “x”, “y”, “z”, “corr_msk” optional: “clr”, “msk”, “data_valid”,”coord_epi_geom_i”, “coord_epi_geom_j”,”idx_im_epi”
attrs with keys: “epsg”
attributes containing “bounds”, “ysize”, “xsize”, “epsg”
- Return type
CarsDataset filled with xr.Dataset
- cars.applications.point_cloud_outlier_removal.small_components.small_component_removal_wrapper(cloud, connection_distance, nb_points_threshold, clusters_distance_threshold, save_by_pair: bool = False, point_cloud_csv_file_name=None, point_cloud_laz_file_name=None, saving_info=None)[source]
Small components outlier removal
- Parameters
cloud (pandas DataFrame) – cloud to filter
connection_distance (float) – connection distance
nb_points_threshold (int) –
clusters_distance_threshold (float) –
save_by_pair (bool) – save point cloud as pair
point_cloud_csv_file_name (str) – write point cloud as CSV in filename (if None, the point cloud is not written as csv)
point_cloud_laz_file_name (str) – write point cloud as laz in filename (if None, the point cloud is not written as laz)
saving_info (dict) – saving infos
- Returns
filtered cloud
- Return type
pandas DataFrame
- cars.applications.point_cloud_outlier_removal.small_components.epipolar_small_component_removal_wrapper(cloud, connection_distance, nb_points_threshold, clusters_distance_threshold, half_epipolar_size, window, overlap, epsg, point_cloud_csv_file_name=None, point_cloud_laz_file_name=None, saving_info_epipolar=None, saving_info_flatten=None)[source]
Small component outlier removal in epipolar geometry
- Parameters
epipolar_ds (xr.Dataset) – epipolar dataset to filter
connection_distance (float) – minimum distance of two connected points
nb_points_threshold (int) – minimum valid cluster size
clusters_distance_threshold (float) – max distance between an outlier cluster and other points
half_epipolar_size (int) – half size of the window used to search neighbors
window (list) – window of base tile [row min, row max, col min col max]
overlap (list) – overlap [row min, row max, col min col max]
epsg (int) – epsg code of the CRS used to compute distances
- Returns
filtered dataset
- Return type
xr.Dataset