cars.applications.grid_correction.grid_correction_app

this module contains the epipolar grid correction application class.

Classes

GridCorrectionApp

EpipolarGridGeneration

Module Contents

class cars.applications.grid_correction.grid_correction_app.GridCorrectionApp(conf=None)[source]

Bases: cars.applications.grid_correction.abstract_grid_correction_app.GridCorrection

EpipolarGridGeneration

used_method
nb_matches
save_intermediate_data
check_conf(conf)[source]

Check configuration

Parameters:

conf (dict) – configuration to check

Returns:

overloaded configuration

Return type:

dict

get_minimum_nb_matches()[source]

Get the minimum number of matches required for grid correction

correct_grid(grid, grid_correction, pair_folder, save_grid=None)

Correct grid

Parameters:
  • grid (dict) – grid to correct

  • grid_correction (Tuple(np.ndarray, np.ndarray) (coefsx_2d, coefsy_2d) , each of size (2,2)) – grid correction to apply

  • pair_folder (str) – directory where grids are saved: either in pair_folder/tmp, or at the root of pair_folder if save_grid is True

  • save_grid (bool) – if True grids are saved in root of pair_folder, instead of tmp

run(matches, grid_right, save_matches=False, pair_folder='', pair_key='pair_0', orchestrator=None, save_corrected_grid=None)

Estimates grid correction, and correct matches

Parameters:
  • matches (np.ndarray) – matches

  • grid_right (dict) – grid to correct

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

  • pair_folder (str) – folder used for current pair

Returns:

grid_correction to apply, corrected_matches, info before, info after

Return type:

Tuple(np.ndarray, np.ndarray) , np.ndarray, dict, dict grid_correction is : (coefsx_2d, coefsy_2d) , each of size (2,2)