pandora.refinement.quadratic
This module contains functions associated to the quadratic method used in the refinement step.
Module Contents
Classes
Quadratic class allows to perform the subpixel cost refinement step |
- class pandora.refinement.quadratic.Quadratic(**cfg: str)[source]
Bases:
pandora.refinement.refinement.AbstractRefinement
Quadratic class allows to perform the subpixel cost refinement step
- static check_conf(**cfg: str) Dict[str, str] [source]
Add default values to the dictionary if there are missing elements and check if the dictionary is correct
- Parameters:
cfg (dict) – refinement configuration
- Return cfg:
refinement configuration updated
- Return type:
dict
- static refinement_method(cost: numpy.ndarray, disp: float, measure: str) Tuple[float, float, int] [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
- 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