cars.applications.sparse_matching.sift
this module contains the dense_matching application class.
Module Contents
Classes
SparseMatching |
Functions
|
Compute matches from image objects. |
- class cars.applications.sparse_matching.sift.Sift(conf=None)[source]
Bases:
cars.applications.sparse_matching.sparse_matching.SparseMatching
SparseMatching
- 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_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_minimum_nb_matches()[source]
Get minimum_nb_matches : get the minimum number of matches
- Returns
minimum_nb_matches
- get_epipolar_error_maximum_bias()[source]
Get epipolar error maximum bias corresponding to sparse matches
- Returns
margin
- 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
- run(epipolar_image_left, epipolar_image_right, disp_to_alt_ratio, orchestrator=None, pair_folder=None, pair_key='PAIR_0')[source]
Run Matching application.
Create left and right CarsDataset filled with pandas.DataFrame , corresponding to epipolar 2D disparities, on the same geometry that epipolar_image_left and epipolar_image_right.
- Parameters
epipolar_image_left (CarsDataset) –
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”
disp_to_alt_ratio (float) – disp to alti ratio
orchestrator – orchestrator used
pair_folder (str) – folder used for current pair
pair_key (str) – pair key id
- Return 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.sift.compute_matches_wrapper(left_image_object: xarray.Dataset, right_image_object: xarray.Dataset, matching_threshold=None, n_octave=None, n_scale_per_octave=None, peak_threshold=None, edge_threshold=None, magnification=None, window_size=None, backmatching=None, disp_lower_bound=None, disp_upper_bound=None, saving_info_left=None) Dict[str, Tuple[xarray.Dataset, xarray.Dataset]] [source]
Compute 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
- Returns
Left matches object, Right matches object (if exists)
Returned objects are composed of :
- dataframe (None for right object) with :
TODO