Skip to content

Commit

Permalink
Merge branch '782-bas-tuto-pleiade' into 'master'
Browse files Browse the repository at this point in the history
doc: add pleiades tutorial

See merge request 3d/cars!724
  • Loading branch information
dyoussef committed Jul 24, 2024
2 parents 5aad2c9 + 732c18f commit f7ae767
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 1 deletion.
147 changes: 146 additions & 1 deletion docs/source/howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,149 @@ Any OTB application can be ran in docker

.. code-block:: console
docker run --entrypoint=/bin/bash cnes/cars otbcli_BandMath -help
docker run --entrypoint=/bin/bash cnes/cars otbcli_BandMath -help
Use CARS with Pleiades images ...
========================================


.. _pleiade_raw_data:

... with raw data
-----------------


If you want to generate a 3D model with the following pair:

.. code-block:: bash
IMG_PHR1B_MS_003
IMG_PHR1B_MS_004
IMG_PHR1B_P_001
IMG_PHR1B_P_002
You should find in each folder the following data:

.. code-block:: bash
...
DIM_PHR1B_***.XML
IMG_PHR1B_***.TIF
RPC_PHR1B_***.XML
For each product, the user must provide the path to the pancromatic data (*P*.TIF) with its geomodel, all contained in the DIMAP file (DIMAP*P*.XML):


.. code-block:: json
{
"inputs": {
"sensors" : {
"one": {
"image": "IMG_PHR1B_P_001/DIM_PHR1B_***.XML"
},
"two": {
"image": "IMG_PHR1B_P_002/DIM_PHR1B_***.XML",
}
},
"pairing": [["one", "two"]]
}
}
If you want to add the colors, a P+XS fusion must be done, to specify a color.tif with the same shape and resolution than the Pancromatic data.
It can be performed with `otbcli_BundleToPerfectSensor` as explained in `make_a_simple_pan_sharpening`_

.. code-block:: json
{
"inputs": {
"sensors" : {
"one": {
"image": "IMG_PHR1B_P_001/DIM_PHR1B_***.XML",
"color": "color_one.tif"
},
"two": {
"image": "IMG_PHR1B_P_002/DIM_PHR1B_***.XML",
"color": "color_two.tif"
}
},
"pairing": [["one", "two"]]
}
}
.. _pleiade_roi_data:

... with a region of interest
-----------------------------

There are two different uses of roi in CARS:

* Crop input images: the whole pipeline will be done with cropped images
* Use input roi parameter: the whole images will be used to compute grid correction and terrain + epipolar a priori. Then the rest of the pipeline will use the given roi. This allow better correction of epipolar rectification grids.


If you want to only work with a region of interest for the whole pipeline, use cars-extractroi:

.. code-block:: bash
cars-extractroi -il DIM_PHR1B_***.XML -out ext_dir -bbx -58.5896 -34.4872 -58.5818 -34.4943
It generates a .tif and .geom to be used as:

.. code-block:: json
{
"inputs": {
"sensors" : {
"one": {
"image": "ext_dir/***.tif",
"geomodel": "ext_dir/***.geom",
"color": "color_one.tif"
}
}
And use generated data as previously explained with raw data.
If you want to compute grid correction and compute epipolar/ terrain a priori on the whole image, keep the same input images, but specify terrain ROI to use:
.. code-block:: json
{
"inputs":
{
"roi" : {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[5.194, 44.2064],
[5.194, 44.2059],
[5.195, 44.2059],
[5.195, 44.2064],
[5.194, 44.2064]
]
],
"type": "Polygon"
}
}
]
}
}
}
See Usage Sensors Images Inputs configuration for more information.
Binary file modified docs/source/images/cars_pipeline_sensor_to_pc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f7ae767

Please sign in to comment.