pandora.refinement.cpp.refinement_cpp
Functions
|
Return the subpixel disparity and cost, by fitting a quadratic curve |
|
Apply for each pixels the refinement method |
|
Apply for each pixels the refinement method on the right disparity map which was created with the approximate method : a diagonal search for the minimum on the left cost volume |
|
Return the subpixel disparity and cost, by matching a symmetric V shape (linear interpolation) |
Module Contents
- pandora.refinement.cpp.refinement_cpp.quadratic_refinement_method(cost, disp, measure, cst_pandora_msk_pixel_stopped_interpolation)[source]
Return the subpixel disparity and cost, by fitting a quadratic curve
- Parameters:
cost (1D numpy array : [cost[disp -1], cost[disp], cost[disp + 1]]) – cost of the values disp - 1, disp, disp + 1
disp (float) – the disparity
measure – the type of measure used to create the cost volume
measure – string = min | max
cst_pandora_msk_pixel_stopped_interpolation – value for the PANDORA_MSK_PIXEL_STOPPED_INTERPOLATION constant in pandora.constants
cst_pandora_msk_pixel_stopped_interpolation – int
- Returns:
the disparity shift, the refined cost and the state of the pixel ( Information: calculations stopped at the pixel step, sub-pixel interpolation did not succeed )
- Return type:
float, float, int
- pandora.refinement.cpp.refinement_cpp.loop_refinement(cv, disp, mask, d_min, d_max, subpixel, measure, method, cst_pandora_msk_pixel_invalid, cst_pandora_msk_pixel_stopped_interpolation)[source]
Apply for each pixels the refinement method
- Parameters:
cv (3D numpy array (row, col, disp)) – cost volume to refine
disp (2D numpy array (row, col)) – disparity map
mask (2D numpy array (row, col)) – validity mask
d_min (int) – minimal disparity
d_max (int) – maximal disparity
subpixel (int ( 1 | 2 | 4 )) – subpixel precision used to create the cost volume
measure – the measure used to create the cot volume
measure – string
method – the refinement method
method – function
cst_pandora_msk_pixel_invalid – value for the PANDORA_MSK_PIXEL_INVALID constant in pandora.constants
cst_pandora_msk_pixel_invalid – int
cst_pandora_msk_pixel_stopped_interpolation – value for the PANDORA_MSK_PIXEL_STOPPED_INTERPOLATION constant in pandora.constants
cst_pandora_msk_pixel_stopped_interpolation – int
- Returns:
the refine coefficient, the refine disparity map, and the validity mask
- Return type:
tuple(2D numpy array (row, col), 2D numpy array (row, col), 2D numpy array (row, col))
- pandora.refinement.cpp.refinement_cpp.loop_approximate_refinement(cv, disp, mask, d_min, d_max, subpixel, measure, method, cst_pandora_msk_pixel_invalid, cst_pandora_msk_pixel_stopped_interpolation)[source]
Apply for each pixels the refinement method on the right disparity map which was created with the approximate method : a diagonal search for the minimum on the left cost volume
- Parameters:
cv (3D numpy array (row, col, disp)) – the left cost volume
disp (2D numpy array (row, col)) – right disparity map
mask (2D numpy array (row, col)) – right validity mask
d_min (int) – minimal disparity
d_max (int) – maximal disparity
subpixel (int ( 1 | 2 | 4 )) – subpixel precision used to create the cost volume
measure (string = min | max) – the type of measure used to create the cost volume
method (function) – the refinement method
cst_pandora_msk_pixel_invalid – value for the PANDORA_MSK_PIXEL_INVALID constant in pandora.constants
cst_pandora_msk_pixel_invalid – int
cst_pandora_msk_pixel_stopped_interpolation – value for the PANDORA_MSK_PIXEL_STOPPED_INTERPOLATION constant in pandora.constants
cst_pandora_msk_pixel_stopped_interpolation – int
- Returns:
the refine coefficient, the refine disparity map, and the validity mask
- Return type:
tuple(2D numpy array (row, col), 2D numpy array (row, col), 2D numpy array (row, col))
- pandora.refinement.cpp.refinement_cpp.vfit_refinement_method(cost, disp, measure, cst_pandora_msk_pixel_stopped_interpolation) Tuple[float, float, int][source]
Return the subpixel disparity and cost, by matching a symmetric V shape (linear interpolation)
- Parameters:
cost (1D numpy array : [cost[disp -1], cost[disp], cost[disp + 1]]) – cost of the values disp - 1, disp, disp + 1
disp (float) – the disparity
measure – the type of measure used to create the cost volume
measure – string = min | max
cst_pandora_msk_pixel_stopped_interpolation – value for the PANDORA_MSK_PIXEL_STOPPED_INTERPOLATION constant in pandora.constants
cst_pandora_msk_pixel_stopped_interpolation – int
- Returns:
the disparity shift, the refined cost and the state of the pixel( Information: calculations stopped at the pixel step, sub-pixel interpolation did not succeed )
- Return type:
float, float, int