Refinement step

The purpose of this step is to refine the disparity identified in the previous step. So, the refinement step involves transforming a pixel disparity map into a sub-pixel disparity map.

Three methods are available in pandora2d:

  • Optical flow

  • Dichotomy (c++ version)

  • Dichotomy (python version)

Warning

The optical flow method is still in an experimental phase.

Dichotomy

The principle of the dichotomy is to only interpolate values around a specific value instead of the whole dataset.

In the case of the refinement, the dataset is the cost surface and the initial cost value to interpolate around is the one selected at pixelic step.

At each step of the dichotomy, the interpolated values are the 8 values located at half way of the value selected at the previous step and its first neighborhoods.

This means that at first iteration, the distance between initial value and its neighborhoods being of 1 pixel [1], the precision is \frac{1}{2}\times 1 = 0.5 pixel.

At the second iteration, the distance between initial value and its neighborhoods is now 0.5 pixel, thus the precision is \frac{1}{2}\times0.5=0.25 pixel.

As a matter of fact, at iteration t, the reached precision will be \frac{1}{2^t} pixel.

At each step, a new best value is selected among the interpolated values using the same method as the one used in disparity step (note that this can still be the initial one if none of the interpolated value is better). The position of this new best value will be used in the next step as position to interpolate around.

Illustration of the points interpolated at each step.

Clic on the iteration box in the legend to make corresponding step appear

Dichotomy_principle.drawio.html

The method used to do the interpolation depends on the one given in the configuration of the refinement step. It can be one of those listed in Interpolation filters where the fractional shift corresponds to the precision of the iteration step.

Footnotes