pandora.aggregation.cpp.aggregation_cpp
Functions
|
Build the fully aggregated matching cost for one disparity, |
|
Compute the cross support for an image: find the 4 arms. |
Module Contents
- pandora.aggregation.cpp.aggregation_cpp.cbca(input, cross_left, cross_right, range_col, range_col_right)[source]
Build the fully aggregated matching cost for one disparity, E = S_v(row, col + bottom_arm_length) - S_v(row, col - top_arm_length - 1)
- Parameters:
input (2D np.array (row, col) dtype = np.float32) – cost volume for the current disparity
cross_left (3D np.array (row, col, [left, right, top, bot]) dtype=np.int16) – cross support of the left image
cross_right (3D np.array (row, col, [left, right, tpo, bot]) dtype=np.int16) – cross support of the right image
range_col (1D np.array) – left column for the current disparity (i.e : np.arrange(nb columns), where the correspondent in the right image is reachable)
range_col_right (1D np.array) – right column for the current disparity (i.e : np.arrange(nb columns) - disparity, where column - disparity >= 0 and <= nb columns)
- Returns:
the fully aggregated matching cost, and the total number of support pixels used for the aggregation
- Return type:
tuple(2D np.array (row , col) dtype = np.float32, 2D np.array (row , col) dtype = np.float32)
- pandora.aggregation.cpp.aggregation_cpp.cross_support(image, len_arms, intensity)[source]
Compute the cross support for an image: find the 4 arms. Enforces a minimum support region of 3×3 if pixels are valid. The cross support of invalid pixels (pixels that are np.inf) is 0 for the 4 arms.
- Parameters:
image (2D np.array (row , col) dtype = np.float32) – image
len_arms – maximal length arms
len_arms – int16
intensity – maximal intensity
intensity – float 32
- Returns:
a 3D np.array ( row, col, [left, right, top, bot] ), with the four arms lengths computes for each pixel
- Return type:
3D np.array ( row, col, [left, right, top, bot] ), dtype=np.int16