pandora.refinement.quadratic

This module contains functions associated to the quadratic method used in the refinement step.

Classes

Quadratic

Quadratic class allows to perform the subpixel cost refinement step

Module Contents

class pandora.refinement.quadratic.Quadratic(**cfg: str)[source]

Bases: pandora.refinement.refinement.AbstractRefinement

Quadratic class allows to perform the subpixel cost refinement step

static refinement_method(cost: numpy.ndarray, disp: float, measure: str) Tuple[float, float, int][source]

Return the subpixel disparity and cost

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 (string = min | max) – the type of measure used to create the cost volume

Returns:

the refined disparity (disp + (sub_disp/subpix)), 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

cfg[source]
_refinement_method_name = ''[source]
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

desc() None[source]

Describes the subpixel refinement method :return: None