cars.applications.sparse_matching.abstract_sparse_matching_app

this module contains the abstract matching application class.

Attributes

AbstractSparseMatchingMethod

Classes

SparseMatching

SparseMatching

Module Contents

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

Bases: cars.applications.application_template.ApplicationTemplate

SparseMatching

available_applications: Dict
default_application = 'basic'
default_method = 'sift'
classmethod __init_subclass__(short_name, **kwargs)[source]
sparse_matching_method
abstract get_required_bands()[source]

Get bands required by this application.

Returns:

required bands for left and right image

Return type:

dict

abstract get_margins_strip_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

abstract get_margins_tile_fun(grid_left, disp_range_grid, method='sift')[source]

Get Margins function that generates margins needed by matching method, to use during resampling

Parameters:
  • grid_left (dict) – left epipolar grid

  • disp_range_grid – minimum and maximum disparity grid

Returns:

function that generates margin for given roi

abstract 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 (dict) – left epipolar grid dict

  • grid_right (dict) – right epipolar grid dict

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

:return filtered matches :rtype: np.ndarray

abstract run(epipolar_image_left, epipolar_image_right, disp_to_alt_ratio, orchestrator=None, pair_folder=None, pair_key='PAIR_0', classif_bands_to_mask=None)[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.