cars.applications.grid_generation.grid_correction
Grids module: contains functions used for epipolar grid correction
Module Contents
Functions

Correct grid from correction given in 1d 

Correct grid 

Estimates grid correction, and correct matches 

Create CarsDataset representing matches, from numpy matches. 
 cars.applications.grid_generation.grid_correction.correct_grid_from_1d(grid, grid_correction_coef, save_grid=False, pair_folder=None)
Correct grid from correction given in 1d
 Parameters
grid (CarsDataset) – grid to correct
grid_correction_coef (list(float), size 6) – grid correction to apply
save_grid (bool) – if True grids are saved in root or pair_folder
pair_folder (str) – directory where grids are saved
 cars.applications.grid_generation.grid_correction.correct_grid(grid, grid_correction, save_grid=None, pair_folder=None)
Correct grid
 Parameters
grid (CarsDataset) – grid to correct
grid_correction (Tuple(np.ndarray, np.ndarray) (coefsx_2d, coefsy_2d) , each of size (2,2)) – grid correction to apply
save_grid (bool) – if True grids are saved in root or pair_folder
pair_folder (str) – directory where grids are saved
 cars.applications.grid_generation.grid_correction.estimate_right_grid_correction(matches, grid_right, initial_cars_ds=None, save_matches=False, pair_folder='', pair_key='pair_0', orchestrator=None)
Estimates grid correction, and correct matches
 Parameters
matches (np.ndarray) – matches
grid_right (CarsDataset) – 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)
 cars.applications.grid_generation.grid_correction.create_matches_cars_ds(corrected_matches, initial_cars_ds)
Create CarsDataset representing matches, from numpy matches. Matches are split into tiles, stored in pandas DataFrames
Right CarsDataset is filled with Nones
 Parameters
corrected_matches (numpy array) – matches
initial_cars_ds (CarsDataset) – cars dataset to use tiling from
:return new_matches_cars_ds :rtype: CarsDataset