:py:mod:`cars.applications.point_cloud_outlier_removal.statistical` =================================================================== .. py:module:: cars.applications.point_cloud_outlier_removal.statistical .. autoapi-nested-parse:: this module contains the statistical point removal application class. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: cars.applications.point_cloud_outlier_removal.statistical.Statistical Functions ~~~~~~~~~ .. autoapisummary:: cars.applications.point_cloud_outlier_removal.statistical.statistical_removal_wrapper cars.applications.point_cloud_outlier_removal.statistical.epipolar_statistical_removal_wrapper .. py:class:: Statistical(conf=None) Bases: :py:obj:`cars.applications.point_cloud_outlier_removal.pc_out_removal.PointCloudOutlierRemoval` Statistical .. py:method:: check_conf(conf) Check configuration :param conf: configuration to check :type conf: dict :return: overloaded configuration :rtype: dict .. py:method:: get_optimal_tile_size(max_ram_per_worker, superposing_point_clouds=1, point_cloud_resolution=0.5) Get the optimal tile size to use, depending on memory available :param max_ram_per_worker: maximum ram available :type max_ram_per_worker: int :param superposing_point_clouds: number of point clouds superposing :type superposing_point_clouds: int :param point_cloud_resolution: resolution of point cloud :type point_cloud_resolution: float :return: optimal tile size in meter :rtype: float .. py:method:: get_method() Get margins to use during point clouds fusion :return: algorithm method :rtype: string .. py:method:: get_epipolar_margin() Get epipolar margin to use :return: margin :rtype: int .. py:method:: get_on_ground_margin(resolution=0.5) Get margins to use during point clouds fusion :return: margin :rtype: float .. py:method:: run(merged_point_cloud, orchestrator=None, depth_map_dir=None, point_cloud_dir=None, dump_dir=None, epsg=None) Run PointCloudOutlierRemoval application. Creates a CarsDataset filled with new point cloud tiles. :param merged_point_cloud: 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" :type merged_point_cloud: CarsDataset filled with pandas.DataFrame :param orchestrator: orchestrator used :param depth_map_dir: output depth map directory. If None output will be written in dump_dir if intermediate data is requested :type depth_map_dir: str :param point_cloud_dir: output depth map directory. If None output will be written in dump_dir if intermediate data is requested :type point_cloud_dir: str :param dump_dir: dump dir for output (except depth map) if intermediate data is requested :type dump_dir: str :param epsg: cartographic reference for the point cloud (array input) :type epsg: int :return: 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 .. py:function:: statistical_removal_wrapper(cloud, statistical_k, filtering_constant, mean_factor, std_dev_factor, use_median, save_by_pair: bool = False, point_cloud_csv_file_name=None, point_cloud_laz_file_name=None, saving_info=None) Statistical outlier removal :param cloud: cloud to filter :type cloud: pandas DataFrame :param statistical_k: k :type statistical_k: int :param filtering_constant: constant applied to the threshold :type filtering_constant: float :param mean_factor: mean factor :type mean_factor: float :param std_dev_factor: std factor :type std_dev_factor: float :param use_median: use median and quartile instead of mean and std :type use median: bool :param save_by_pair: save point cloud as pair :type save_by_pair: bool :param point_cloud_csv_file_name: write point cloud as CSV in filename (if None, the point cloud is not written as csv) :type point_cloud_csv_file_name: str :param point_cloud_laz_file_name: write point cloud as laz in filename (if None, the point cloud is not written as laz) :type point_cloud_laz_file_name: str :param saving_info: saving infos :type saving_info: dict :return: filtered cloud :rtype: pandas DataFrame .. py:function:: 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) Statistical outlier removal in epipolar geometry :param epipolar_ds: epipolar dataset to filter :type epipolar_ds: xr.Dataset :param statistical_k: k :type statistical_k: int :param filtering_constant: constant applied to the threshold :type filtering_constant: float :param mean_factor: mean factor :type mean_factor: float :param std_dev_factor: std factor :type std_dev_factor: float :param use_median: use median and quartile instead of mean and std :type use median: bool :param half_epipolar_size: half size of the window used to search neighbors :type half_epipolar_size: int :param window: window of base tile [row min, row max, col min col max] :type window: list :param overlap: overlap [row min, row max, col min col max] :type overlap: list :param epsg: epsg code of the CRS used to compute distances :type epsg: int :return: filtered dataset :rtype: xr.Dataset