-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '52-ajout_interne_fo_pcc' into 'release'
Resolve "[interne] Ajout flots optiques+ corrélation de phase" See merge request 3d/PandoraBox/pandora2d!59
- Loading branch information
Showing
48 changed files
with
2,055 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"input": { | ||
"left": { | ||
"img": "./maricopa/left.tif", | ||
"nodata": -9999 | ||
}, | ||
"right": { | ||
"img": "./maricopa/right.tif", | ||
"nodata": -9999 | ||
} | ||
}, | ||
"pipeline": { | ||
"estimation": { | ||
"estimation_method": "phase_cross_correlation", | ||
"range_row": 5, | ||
"range_col": 5, | ||
"sample_factor": 100 | ||
}, | ||
"matching_cost": { | ||
"matching_cost_method": "zncc", | ||
"window_size": 5 | ||
}, | ||
"disparity": { | ||
"disparity_method": "wta", | ||
"invalid_disparity": "NaN" | ||
}, | ||
"refinement": { | ||
"refinement_method": "interpolation" | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Exploring the field | ||
=================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
exploring_the_field/initial_disparity.rst | ||
exploring_the_field/refining_disparity.rst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.. _initial_disparity: | ||
|
||
Disparity range exploration | ||
=========================== | ||
|
||
The user is required to set up pandora2d by specifying a range of disparity to be explored. | ||
There are two available methods to do this. | ||
|
||
Setting an interval | ||
------------------- | ||
|
||
In the configuration file, the user is required to enter disparity range, as a list with two elements each, indicating | ||
the minimum and maximum values for both row and columns disparity. | ||
|
||
.. code:: json | ||
:name: Setting disparity ranges example | ||
{ | ||
"input": | ||
{ | ||
"col_disparity": [-2, 2], | ||
"row_disparity": [-2, 2] | ||
} | ||
} | ||
.. figure:: ../Images/range_schema.png | ||
|
||
|
||
Setting a range | ||
--------------- | ||
|
||
In situations where the user does not know the required interval range, an alternative method is provided. | ||
The user should leave the 'disparity_col' and 'disparity_row' parameters empty. Instead, they need to enable an estimation stage in the pipeline. This stage calculates a global shift throughout the image. By using 'range_col' and 'range_row' parameters, the user can then approximate an interval around this determined shift. | ||
|
||
The following diagram illustrates how the disparity intervals are initialized using the estimation step: | ||
|
||
.. figure:: ../Images/estimation_schema.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. _refining disparity: | ||
|
||
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. | ||
|
||
|
||
Two methods are available in pandora2d: | ||
|
||
- Interpolation | ||
- Optical flow. | ||
|
||
.. warning:: | ||
The optical flow method is still in an experimental phase. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
.. _estimation: | ||
|
||
Estimation computation | ||
========================= | ||
|
||
This step aims to calculate a steady shift in both row and column to establish the starting central | ||
point of the disparity intervals that are applied in the matching_cost process. | ||
|
||
**Phase cross correlation method** | ||
|
||
The phase cross correlation method depends on frequency domain. | ||
It isolates the phase information of cross-correlation from two similar images. | ||
|
||
The phase cross correlation algorithm is divided into 4 steps: | ||
|
||
- Firstly, we compute the Fourier transform of both the right and left images. | ||
- Secondly, we calculate the cross-correlation between the two Fourier transforms. | ||
- Then, we identify the maximum peak and retrieve a pixel-level shift. | ||
- Finally, for sub-pixel level shifting, we perform an interpolation around this peak. | ||
|
||
.. note:: Currently, only the **phase_cross_correlation** method is implemented in Pandora2d. | ||
We use the phase_cross_correlation function from scipy, for further information please see | ||
`Scipy documentation <https://scikit-image.org/docs/stable/api/skimage.registration.html#skimage.registration.phase_cross_correlation>`__ | ||
|
||
|
||
Configuration and parameters | ||
---------------------------- | ||
.. warning:: | ||
|
||
You don't need to set disparities in input section if you set the estimation step | ||
|
||
.. list-table:: Parameters | ||
:header-rows: 1 | ||
|
||
|
||
* - Name | ||
- Description | ||
- Type | ||
- Default value | ||
- Available value | ||
- Required | ||
* - *estimation_method* | ||
- estimation measure | ||
- string | ||
- | ||
- "phase_cross_correlation" | ||
- Yes | ||
* - *range_col* | ||
- Exploration around the initial disparity for columns | ||
- int | ||
- 5 | ||
- >0, odd number | ||
- No | ||
* - *range_row* | ||
- Exploration around the initial disparity for rows | ||
- int | ||
- 5 | ||
- >0, odd number | ||
- No | ||
* - *sample_factor* | ||
- | Upsampling factor. | ||
| Images will be registered to within 1 / upsample_factor of a pixel | ||
- int | ||
- 1 | ||
- >= 1 | ||
- No | ||
|
||
|
||
**Example** | ||
|
||
.. sourcecode:: text | ||
|
||
{ | ||
"input" : | ||
{ | ||
... | ||
}, | ||
"pipeline" : | ||
{ | ||
"estimation": | ||
{ | ||
"estimation_method": "phase_cross_correlation", | ||
"range_col": 5, | ||
"range_row": 5, | ||
"sample_factor": 20 | ||
} | ||
... | ||
} | ||
} | ||
|
||
|
||
Outputs: | ||
-------- | ||
|
||
- Showed in log in verbose mode | ||
- Written in the output configuration file | ||
- Stored in the inputs_dataset |
Oops, something went wrong.