cars.applications.sparse_matching.pandora_sparse_matching
this module contains the pandora_sparse_matching application class.
Module Contents
Classes
Pandora low resolution class |
Functions
|
Compute pandora matches from image objects. |
- class cars.applications.sparse_matching.pandora_sparse_matching.PandoraSparseMatching(conf=None)[source]
Bases:
cars.applications.sparse_matching.sparse_matching.SparseMatching
Pandora low resolution class
- check_conf(conf)[source]
Check configuration
- Parameters
conf (dict) – configuration to check
- Returns
overloaded configuration
- Return type
dict
- get_save_matches()[source]
Get save_matches parameter
- Returns
true is save_matches activated
- Return type
bool
- get_disparity_margin()[source]
Get disparity margin corresponding to sparse matches
- Returns
margin in percent
- get_connection_val()[source]
Get connection_val : distance to use to consider that two points are connected
- Returns
connection_val
- Return type
- get_nb_pts_threshold()[source]
Get nb_pts_threshold : number of points to use to identify small clusters to filter
- Returns
nb_pts_threshold
- get_minimum_nb_matches()[source]
Get minimum_nb_matches : get the minimum number of matches
- Returns
minimum_nb_matches
- get_matches_filter_knn()[source]
Get matches_filter_knn : number of neighboors used to measure isolation of matches
- Returns
matches_filter_knn
- get_matches_filter_dev_factor()[source]
Get matches_filter_dev_factor : factor of deviation in the formula to compute threshold of outliers
- Returns
matches_filter_dev_factor
- get_filtered_elt_pos()[source]
Get filtered_elt_pos : if filtered_elt_pos is set to True, the removed points positions in their original epipolar images are returned, otherwise it is set to None
- Returns
filtered_elt_pos
- get_clusters_dist_thresh()[source]
Get clusters_distance_threshold : distance to use to consider if two points clusters are far from each other or not (set to None to deactivate this level of filtering)
- Returns
clusters_distance_threshold
- get_strip_margin()[source]
Get strip margin corresponding to sparse matches
- Returns
margin in percent
- get_epipolar_error_upper_bound()[source]
Get epipolar error upper bound corresponding to sparse matches
- Returns
margin
- get_epipolar_error_maximum_bias()[source]
Get epipolar error maximum bias corresponding to sparse matches
- Returns
margin
- run(epipolar_image_left, epipolar_image_right, orchestrator=None, pair_folder=None, pair_key='PAIR_0', disp_to_alt_ratio=None)[source]
Run PandoraSparseMatching application.
Get matches using pandora in low resolution
- Parameters
epipolar_image_left (CarsDataset) – tiled left epipolar CarsDataset contains:
epipolar_image_left –
tiled left epipolar CarsDataset contains:
N x M Delayed tiles. Each tile will be a future xarray Dataset containing:
data with keys : “im”, “msk”, “color”
attrs with keys: “margins” with “disp_min” and “disp_max” “transform”, “crs”, “valid_pixels”, “no_data_mask”, “no_data_img”
- attributes containing:
”largest_epipolar_region”,”opt_epipolar_tile_size”
epipolar_image_right (CarsDataset) –
tiled right epipolar CarsDataset contains:
N x M Delayed tiles. Each tile will be a future xarray Dataset containing:
data with keys : “im”, “msk”, “color”
- attrs with keys: “margins” with “disp_min” and “disp_max”
”transform”, “crs”, “valid_pixels”, “no_data_mask”, “no_data_img”
- attributes containing:
”largest_epipolar_region”,”opt_epipolar_tile_size”
orchestrator – orchestrator used
pair_folder (str) – folder used for current pair
pair_key (str) – pair id
disp_to_alt_ratio (float) – disp to alti ratio used for performance map
- Returns
left matches, right matches. Each CarsDataset contains:
- N x M Delayed tiles Each tile will be a future pandas DataFrame containing:
data : (L, 4) shape matches
attributes containing “disp_lower_bound”, “disp_upper_bound”, “elevation_delta_lower_bound”,”elevation_delta_upper_bound”
- Return type
Tuple(CarsDataset, CarsDataset)
- cars.applications.sparse_matching.pandora_sparse_matching.compute_pandora_matches_wrapper(left_image_object: xarray.Dataset, right_image_object: xarray.Dataset, corr_conf, disp_upper_bound, disp_lower_bound, resolution, saving_info_matches=None, saving_info_disparity_map=None) Dict[str, Tuple[xarray.Dataset, xarray.Dataset]] [source]
Compute pandora matches from image objects. This function will be run as a delayed task.
User must provide saving infos to save properly created datasets
- Parameters
left_image_object –
tiled Left image dataset with :
cst.EPI_IMAGE
cst.EPI_MSK (if given)
cst.EPI_COLOR (for left, if given)
right_image_object (xr.Dataset) – tiled Right image
disp_upper_bound (float) – upper bound of disparity range
disp_lower_bound (float) – lower bound of disparity range
corr_conf (dict) – pandora conf
resolution (int or list) – resolution for downsampling
disp_to_alt_ratio (float) – disp to alti ratio used for performance map
- Returns
Left pandora matches object, Right pandora matches object (if exists)