cars.applications.dense_match_filling.cpp.dense_match_filling_cpp
this module contains the headers of the dense_match_filling_cpp module.
Module Contents
Functions
|
Interpolation of the left disparity map to fill holes. |
|
Find valid neighbors along directions |
- cars.applications.dense_match_filling.cpp.dense_match_filling_cpp.fill_disp_pandora(disp: numpy.ndarray, msk_fill_disp: numpy.ndarray, nb_directions: int) Tuple[numpy.ndarray, numpy.ndarray] [source]
Interpolation of the left disparity map to fill holes. Interpolate invalid pixel by finding the nearest correct pixels in 8/16 different directions and use the median of their disparities. ?bontar, J., & LeCun, Y. (2016). Stereo matching by training a convolutional neural network to compare image patches. The journal of machine learning research, 17(1), 2287-2318. HIRSCHMULLER, Heiko. Stereo processing by semiglobal matching and mutual information. IEEE Transactions on pattern analysis and machine intelligence, 2007, vol. 30, no 2, p. 328-341.
Copied/adapted fct from pandora/validation/interpolated_disparity.py
- Parameters
disp (2D np.array (row, col)) – disparity map
msk_fill_disp (2D np.array (row, col)) – validity mask
nb_directions (integer) – nb directions to explore
- Returns
the interpolate left disparity map, with the validity mask update :
- Return type
tuple(2D np.array (row, col), 2D np.array (row, col))
- cars.applications.dense_match_filling.cpp.dense_match_filling_cpp.find_valid_neighbors(dirs: numpy.ndarray, disp: numpy.ndarray, valid: numpy.ndarray, row: int, col: int, nb_directions: int)[source]
Find valid neighbors along directions
Copied/adapted fct from pandora/validation/interpolated_disparity.py
- Parameters
dirs (2D np.array (row, col)) – directions
disp (2D np.array (row, col)) – disparity map
valid (2D np.array (row, col)) – validity mask
row (int) – row current value
col (int) – col current value
nb_directions (int) – nb directions to explore
- Returns
valid neighbors
- Return type
2D np.array