vendor: OpenCV 5.0.0 snapshot at 755e50675d97db9b7d449d8bd6b09888646f6c6e
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
Exporting a template parameter file {#tutorial_qds_export_parameters}
|
||||
==================
|
||||
|
||||
Goal
|
||||
----
|
||||
|
||||
In this tutorial you will learn how to
|
||||
|
||||
- create a simple parameter file template.
|
||||
|
||||
@include ./samples/export_param_file.cpp
|
||||
|
||||
## Explanation:
|
||||
|
||||
The class supports loading configuration parameters from a .yaml file using the method `loadParameters()`.
|
||||
This is very useful for fine-tuning the class' parameters on the fly. To extract a template of this
|
||||
parameter file you run the following code.
|
||||
|
||||
We create an instance of a `QuasiDenseStereo` object. Not specifying the second argument of the constructor,
|
||||
makes the object to load default parameters.
|
||||
@snippet ./samples/export_param_file.cpp create
|
||||
By calling the method `saveParameters()`, we store the template file to the location specified by `parameterFileLocation`
|
||||
@snippet ./samples/export_param_file.cpp write
|
||||
@@ -0,0 +1,39 @@
|
||||
Quasi dense Stereo {#tutorial_qds_quasi_dense_stereo}
|
||||
==================
|
||||
|
||||
Goal
|
||||
----
|
||||
|
||||
In this tutorial you will learn how to
|
||||
|
||||
- Configure a QuasiDenseStero object
|
||||
- Compute dense Stereo correspondences.
|
||||
|
||||
@include ./samples/dense_disparity.cpp
|
||||
|
||||
## Explanation:
|
||||
|
||||
The program loads a stereo image pair.
|
||||
|
||||
After importing the images.
|
||||
@snippet ./samples/dense_disparity.cpp load
|
||||
We need to know the frame size of a single image, in order to create an instance of a `QuasiDesnseStereo` object.
|
||||
|
||||
@snippet ./samples/dense_disparity.cpp create
|
||||
|
||||
Because we didn't specify the second argument in the constructor, the `QuasiDesnseStereo` object will
|
||||
load default parameters.
|
||||
|
||||
We can then pass the imported stereo images in the process method like this
|
||||
@snippet ./samples/dense_disparity.cpp process
|
||||
|
||||
The process method contains most of the functionality of the class and does two main things.
|
||||
- Computes a sparse stereo based in "Good Features to Track" and "pyramidal Lucas-Kanade" flow algorithm
|
||||
- Based on those sparse stereo points, densifies the stereo correspondences using Quasi Dense Stereo method.
|
||||
|
||||
After the execution of `process()` we can display the disparity Image of the stereo.
|
||||
@snippet ./samples/dense_disparity.cpp disp
|
||||
|
||||
|
||||
At this point we can also extract all the corresponding points using `getDenseMatches()` method and export them in a file.
|
||||
@snippet ./samples/dense_disparity.cpp export
|
||||
@@ -0,0 +1,14 @@
|
||||
Quasi Dense Stereo (stereo module) {#tutorial_table_of_content_quasi_dense_stereo}
|
||||
==========================================================
|
||||
|
||||
Quasi Dense Stereo is method for performing dense stereo matching. `QuasiDenseStereo` implements this process.
|
||||
The code uses pyramidal Lucas-Kanade with Shi-Tomasi features to get the initial seed correspondences.
|
||||
Then these seeds are propagated by using mentioned growing scheme.
|
||||
|
||||
- @subpage tutorial_qds_quasi_dense_stereo
|
||||
|
||||
Example showing how to get dense correspondences from a stereo image pair.
|
||||
|
||||
- @subpage tutorial_qds_export_parameters
|
||||
|
||||
Example showing how to genereate a parameter file template.
|
||||
Reference in New Issue
Block a user