cars.applications.sparse_matching.sparse_matching

this module contains the abstract matching application class.

Module Contents

Classes

SparseMatching

SparseMatching

class cars.applications.sparse_matching.sparse_matching.SparseMatching(conf=None)[source]

Bases: cars.applications.application_template.ApplicationTemplate

SparseMatching

available_applications: Dict
default_application = 'sift'
classmethod __init_subclass__(short_name, **kwargs)[source]
abstract get_disparity_margin()[source]

Get disparity margin corresponding to sparse matches

Returns

margin in percent

abstract get_strip_margin()[source]

Get strip margin corresponding to sparse matches

Returns

margin

abstract get_epipolar_error_upper_bound()[source]

Get epipolar error upper bound corresponding to sparse matches

Returns

margin

abstract get_epipolar_error_maximum_bias()[source]

Get epipolar error lower bound corresponding to sparse matches

Returns

margin

abstract get_matches_filter_knn()[source]

Get matches_filter_knn : number of neighboors used to measure isolation of matches

Returns

matches_filter_knn

abstract 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

abstract get_minimum_nb_matches()[source]

Get minimum_nb_matches : get the minimum number of matches

Returns

minimum_nb_matches

get_margins_fun(disp_min=None, disp_max=None, method='sift')[source]

Get margins function to use in resampling

Parameters
  • disp_min – disp min for info

  • disp_max – disp max for info

  • method – method for the margins

Returns

margins function

Return type

function generating xr.Dataset

filter_matches(epipolar_matches_left, grid_left, grid_right, geom_plugin, orchestrator=None, pair_key='pair_0', pair_folder=None, save_matches=False)[source]

Transform matches CarsDataset to numpy matches, and filters matches

Parameters
  • cars_orchestrator – orchestrator

  • epipolar_matches_left (CarsDataset) –

    matches. 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”

  • grid_left (CarsDataset) – left epipolar grid

  • grid_right (CarsDataset) – right epipolar grid

  • save_matches (bool) – true is matches needs to be saved

:return filtered matches :rtype: np.ndarray

abstract get_save_matches()[source]

Get save_matches parameter

Returns

true is save_matches activated

Return type

bool

abstract run(epipolar_image_left, epipolar_image_right, **kwargs)[source]

Run Matching application.

Create left and right CarsDataset filled with pandas.DataFrame , corresponding to epipolar 2D disparities, on the same geometry that epipolar_images_left and epipolar_images_right.

Parameters
  • epipolar_image_left (CarsDataset) – tiled left epipolar

  • epipolar_image_right (CarsDataset) – tiled right epipolar

  • 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

  • mask1_ignored_by_sift (list) – values used in left mask to ignore in correlation

  • mask2_ignored_by_sift (list) – values used in right mask to ignore in correlation

:return left matches, right matches :rtype: Tuple(CarsDataset, CarsDataset)