cars.applications.point_cloud_outlier_removal.statistical_app

this module contains the statistical point removal application class.

Classes

Statistical

Statistical

Functions

epipolar_statistical_removal_wrapper(epipolar_ds, ...)

Statistical outlier removal in epipolar geometry

Module Contents

class cars.applications.point_cloud_outlier_removal.statistical_app.Statistical(scaling_coeff, conf=None)[source]

Bases: cars.applications.point_cloud_outlier_removal.abstract_outlier_removal_app.PointCloudOutlierRemoval

Statistical

used_method
k
filtering_constant
mean_factor
std_dev_factor
use_median
half_epipolar_size
save_intermediate_data
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_epipolar_margin()[source]

Get epipolar margin to use

Returns:

margin

Return type:

int

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”

:rtype : CarsDataset filled with xr.Dataset

cars.applications.point_cloud_outlier_removal.statistical_app.epipolar_statistical_removal_wrapper(epipolar_ds, statistical_k, filtering_constant, mean_factor, std_dev_factor, use_median, 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]

Statistical outlier removal in epipolar geometry

Parameters:
  • epipolar_ds (xr.Dataset) – epipolar dataset to filter

  • statistical_k (int) – k

  • filtering_constant (float) – constant applied to the threshold

  • mean_factor (float) – mean factor

  • std_dev_factor (float) – std factor

  • use_median – use median and quartile instead of mean and std

  • 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