cars.applications.point_cloud_outlier_removal.small_components_app
this module contains the small_components point removal application class.
Classes
SmallComponents |
Functions
|
Small component outlier removal in epipolar geometry |
Module Contents
- class cars.applications.point_cloud_outlier_removal.small_components_app.SmallComponents(scaling_coeff, conf=None)[source]
Bases:
cars.applications.point_cloud_outlier_removal.abstract_outlier_removal_app.PointCloudOutlierRemovalSmallComponents
- used_method
- on_ground_margin
- connection_distance
- nb_points_threshold
- clusters_distance_threshold
- half_epipolar_size
- orchestrator = None
- 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_app.epipolar_small_component_removal_wrapper(cloud, connection_distance, nb_points_threshold, clusters_distance_threshold, half_epipolar_size, window, overlap, epsg=None, 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]
- Returns:
filtered dataset
- Return type:
xr.Dataset