pandora.cpp.interval_tools_cpp
Functions
|
Create a boolean connection matrix from segment coordinates |
|
Regularize the intervals based on quantiles and a given connection graph. |
Module Contents
- pandora.cpp.interval_tools_cpp.create_connected_graph(border_left: numpy.ndarray, border_right: numpy.ndarray, depth: int) numpy.ndarray[source]
Create a boolean connection matrix from segment coordinates
- Parameters:
border_left ((n, 2) np.ndarray where n is the number of segments) – array containing the coordinates of segments left border
border_right ((n, 2) np.ndarray where n is the number of segments) – array containing the coordinates of segments right border
depth – the depth for regularization. It corresponds to the number of rows to explore below and above.
- Returns:
A symmetric boolean matrix of shape (n, n). 1 indicating that the segment are connected
- Return type:
np.ndarray of shape (n, n)
- pandora.cpp.interval_tools_cpp.graph_regularization(interval_inf: numpy.ndarray, interval_sup: numpy.ndarray, border_left: numpy.ndarray, border_right: numpy.ndarray, connection_graph: numpy.ndarray, quantile: float) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray][source]
Regularize the intervals based on quantiles and a given connection graph.
- Parameters:
interval_inf ((row, col) np.ndarray) – The lower estimation of the disparity to regularize
interval_sup ((row, col) np.ndarray) – The upper estimation of the disparity to regularize
border_left ((n, 2) np.ndarray where n is the number of segments) – array containing the coordinates of segments left border
border_right ((n, 2) np.ndarray where n is the number of segments) – array containing the coordinates of segments right border
graph (connection) – A matrix indicating if the segments (n in total) are connected
quantile (float. 0 <= quantile <= 1) – Which quantile to select for the regularized value
- Returns:
The regularized inf and sup of the disparity, and a boolean mask indicating regularization
- Return type:
Tuple[np.ndarray, np.ndarray, np.ndarray]