Skip to content

Commit

Permalink
Merge branch '64-dichotomie-ajout-du-module-dichotomy-py' into 'release'
Browse files Browse the repository at this point in the history
feat: add dichotomy module in refinement package

See merge request 3d/PandoraBox/pandora2d!71
  • Loading branch information
lecontm committed Feb 9, 2024
2 parents 1875185 + eab2b2c commit 4e2739e
Show file tree
Hide file tree
Showing 8 changed files with 598 additions and 45 deletions.
56 changes: 46 additions & 10 deletions docs/source/userguide/step_by_step/refinement.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,57 @@ Theoretical basics
------------------
The purpose of this step is to refine the disparity identified in the previous step.

The available refinement method is :
The available refinement methods are:
* **Interpolation**:

* **Interpolation** : It consists on 3 differents steps:
It consists on 3 different steps:
* First, the cost_volumes is reshaped to obtain the 2D (disp_row, disp_col) costs map for each pixel, so we will obtain (row * col) 2D cost maps.
* The cost map of each pixel is interpolated using scipy to obtain a continuous function.
* Then, the interpolated functions are minimized using scipy to obtain the refined disparities.

* First, the cost_volumes is reshaped to obtain the 2D (disp_row, disp_col) costs map for each pixel, so we will obtain (row * col) 2D cost maps.
* The cost map of each pixel is interpolated using scipy to obtain a continuous function.
* Then, the interpolated functions are minimized using scipy to obtain the refined disparities.
* **Dichotomy**:

It’s an iterative process that will, at each iteration:
* compute the half way positions between each best candidate in the cost volume and its nearest neighbours.
* compute the similarity coefficients at those positions using the given filter method.
* find the new best candidate from those computed coefficients.

Configuration and parameters
----------------------------
+---------------------+-------------------+--------+---------------+---------------------+----------+
| Name | Description | Type | Default value | Available value | Required |
+=====================+===================+========+===============+=====================+==========+
| *refinement_method* | Refinement method | string | |"interpolation" | No |
+---------------------+-------------------+--------+---------------+---------------------+----------+

.. list-table:: Configuration and parameters
:header-rows: 1

* - Name
- Description
- Type
- Default value
- Available value
- Required
* - *refinemement_method*
- Refinement method
- string
-
- | "interpolation",
| "dichotomy",
- Yes
* - *iterations*
- Number of iterations
- integer
-
- | 1 to 9
| *if above, will be bound to 9*
| **Only available if "dichotomy" method**
- Yes
* - *filter*
- Name of the filter to use
- str
-
- | "sinc",
| "bicubic",
| "spline",
| **Only available if "dichotomy" method**
- Yes

**Example**

Expand Down
10 changes: 5 additions & 5 deletions notebooks/introduction_and_basic_usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@
"source": [
"### Available implementations for each step\n",
"\n",
"| Step | Algorithms implemented |\n",
"|:--------------------------|:-----------------------|\n",
"| Matching cost computation | SAD / SSD / ZNNC |\n",
"| Disparity computation | Winner-Takes-All |\n",
"| Subpixel disparity refinement | Interpolation |"
"| Step | Algorithms implemented |\n",
"|:------------------------------|:--------------------------|\n",
"| Matching cost computation | SAD / SSD / ZNNC |\n",
"| Disparity computation | Winner-Takes-All |\n",
"| Subpixel disparity refinement | Interpolation / Dichotomy |"
]
},
{
Expand Down
Loading

0 comments on commit 4e2739e

Please sign in to comment.