Enhancement of OpticalCalibration

Open Rémi Cresson requested to merge enh_optical_calib_params into develop


This MR modifies OpticalCalibration application


In the current implementation, the following is not right:

  • The computation of the atmo.pixsize value (float) is not deterministic, which is a big issue when we want to reproduce things,
  • The "atmo" parameter group is used only when "level" is "toc", but the parameters group is always enabled.

We discovered that adding some tests in pyotb to cover the summarize() method that enables to summarize OTB pipelines or applications in JSON format (see discussion here).

Implementation Details

Only the code of the application is changed (otbOpticalCalibration.cxx).

Regarding the non-deterministic issue: we have removed vnl_rand that was used to select the pixel of which to evaluate the pixel size, instead we use the next pixel after the center of the image.

Regarding the unused "atmo" parameter group, we just disable/mandatoryoff/clearvalue the "atmo.*" parameters in DoUpdateParameters()

Additional notes

We noticed that computing pixsize from the central pixel leads to NaN, probably because of the way GroundSpacingImageFunction works. This is why we use the next pixel coordinate. We have tested the new implementation against images with odd pixel size and it works well. We think the old implementation has one chance to fail when the randomly-selected pixel was in the center (1 chance over N, with N the number of pixels in the image. But still!)


The copyright owner is INRAE and has signed the ORFEO ToolBox Contributor License Agreement.

Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
  • Optionally, run git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i on latest changes and commit
Edited by Rémi Cresson

Merge request reports