otb merge requestshttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests2021-08-30T08:17:30Zhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/849FIX: mosaic output image size fit best inputs extents2021-08-30T08:17:30ZRémi CressonFIX: mosaic output image size fit best inputs extents#### Summary
Closes #2217
#### Rationale
The Mosaic application computes the output image origin, size, and spacing in the `GenerateOutputInformation` method of the base mosaic filter.
First, the extent of the output image is retrie...#### Summary
Closes #2217
#### Rationale
The Mosaic application computes the output image origin, size, and spacing in the `GenerateOutputInformation` method of the base mosaic filter.
First, the extent of the output image is retrieved. The pixel spacing is computed from the smallest pixel spacing values of the input images. Then, the origin is computed (from this pixel spacing, and the extent). After that, the output image size is finally computed.
In the current implementation, the output image size is rounded to the upper number of pixels (the idea was to avoid losing one col/row of pixels, and it was not a big deal if we add some extra row/col to the output image):
```
// Set final size
m_OutputSize[0] = vcl_floor((extentSup[0] - extentInf[0]) / vcl_abs(m_OutputSpacing[0])) + 1;
m_OutputSize[1] = vcl_floor((extentSup[1] - extentInf[1]) / vcl_abs(m_OutputSpacing[1])) + 1;
```
However this is very embarrassing when you need to mosaic several images of the same extent/size, because the output image size will have +1 row/col.
The proposed change intend to correct that using `std::round` to compute the output image size from the extent and the pixel spacing.
This way, the output image size is more correctly adjusted and fits better the actual content: if the continuous size of the output image falls between the start corner of the pixel and its center, it will be rounded to the lower number. If it falls between its center and its end corner, it will be rounded to the upper number.
```
// Set final size (proposed changes)
m_OutputSize[0] = std::round((extentSup[0] - extentInf[0]) / vcl_abs(m_OutputSpacing[0]));
m_OutputSize[1] = std::round((extentSup[1] - extentInf[1]) / vcl_abs(m_OutputSpacing[1]));
```
#### Implementation Details
##### Classes and files
Only 2 lines of `Modules/Filtering/Mosaic/include/otbStreamingMosaicFilterBase.hxx` are changed (as described above).
##### Tests
~~If we are lucky, tests could pass (depending on the rounding of the input images extents...)~~
If not, the baseline of **all Mosaic tests** must be updated.
##### Documentation
No need
#### Copyright
The copyright owner is INRAe (ex-IRSTEA) and has signed the ORFEO ToolBox Contributor License Agreement.7.4.0Rémi CressonRémi Cressonhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/812Resolve "Update OpenJPEG to the last patch version of 2.3 in Superbuild"2021-04-21T15:29:38ZMickael SavinaudResolve "Update OpenJPEG to the last patch version of 2.3 in Superbuild"Closes #2184Closes #2184Mickael SavinaudMickael Savinaudhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/809Update version of diapOTB to 1.0.12021-06-09T13:53:34ZJulien OsmanUpdate version of diapOTB to 1.0.1#### Summary
Include latest release of DiapOTB (v1.0.1)
#### Rationale
DiapOTB v1.0.1 is about to be released. The purpose of this MR is to include this new release in OTB.
#### Implementation Details
The first step consist in setti...#### Summary
Include latest release of DiapOTB (v1.0.1)
#### Rationale
DiapOTB v1.0.1 is about to be released. The purpose of this MR is to include this new release in OTB.
#### Implementation Details
The first step consist in setting the DiapOTB tag to v1.0.1, to follow DiapOTB's release branch. This allow to run the CI on this release branch.
When DiapOTB's release is official, the tag will be changed to the release commit value.
#### Copyright
The copyright owner is *CNES* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.3.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/795Improve opticalibration pleiades2021-04-06T20:32:40ZThibaut ROMAINImprove opticalibration pleiadesCloses #2123 and #2161
#### Copyright
The copyright owner is *CNES* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from ...Closes #2123 and #2161
#### Copyright
The copyright owner is *CNES* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit8.0.0Thibaut ROMAINThibaut ROMAINhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/769Resolve "Missing kernels parameters in libsvm"2021-04-16T11:24:24ZRémi CressonResolve "Missing kernels parameters in libsvm"Add the following parameters for libsvm:
- gamma (used in `rbf`, `poly`, `sigmoid` kernel functions)
- coef0 (used in `poly`, `sigmoid` kernel functions)
- degree (used in `Poly` kernel function)
Closes #2124Add the following parameters for libsvm:
- gamma (used in `rbf`, `poly`, `sigmoid` kernel functions)
- coef0 (used in `poly`, `sigmoid` kernel functions)
- degree (used in `Poly` kernel function)
Closes #21248.0.0Rémi CressonRémi Cressonhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/767ENH: Improve QGIS interface for ExtractROI application2021-08-17T09:23:03ZJulien CabiecesENH: Improve QGIS interface for ExtractROI application#### Summary
This Merge request proposes to fix/improve some issues in QGIS ExtractROI parameters selection IHM.
#### Rationale
Hi,
I'm Julien Cabieces and I work for Oslandia on behalf of CNES and I'm a regular QGIS contributor (@tr...#### Summary
This Merge request proposes to fix/improve some issues in QGIS ExtractROI parameters selection IHM.
#### Rationale
Hi,
I'm Julien Cabieces and I work for Oslandia on behalf of CNES and I'm a regular QGIS contributor (@troopa81 on GitHub). I will contribute occasionally to OTB in order to improve OTB interface in QGIS.
I'll do my best to to contribute as expected in contribution guidelines. still, if I miss something please let me know.
This first PR is about fixing *ExtractRoi* application. When user try to use this application from QGIS, he faces two issues:
- **1.** When you select an other mode than *standard* one, you still have the standard parameters (Start X, Start Y, Size X, Size Y)
- **2.** On *fit* mode, you have to select both a vector and a raster when only one should be needed
#### Implementation Details
- **1.**
The issue is due to the fact that these parameters switch from *Input_Role* in *standard mode* to *Output_Role* in the other modes (in order to print the computed extent), but QGIS is not aware of this. I propose to add specific parameter for standard, and keep the actual ones as always output. One drawback of this is that the parameter are repeated in standard mode in Monteverdi.
![extractroi](/uploads/3e0994c3322df05aa8dd18df5b23f890/extractroi.png)
Another drawback is if some people use it from the command line, they'd have to change *startx* parameters to *mode.standard.x* (same for starty, sizex, sizey). I'm not sure if this is considered as an *API break* and should be documented/advertised somewhere.
- **2.** Both *reference vector* and *reference image* fields are Mandatory and their state switch in *DoUpParameters*. I propose to set them as not mandatory in *DoInit* and update their state in *DoUpdateParameters*.
<!---
##### Classes and files
Give an overview of the implementation: main changes made to classes, files and modules. Do not paste complete diff, as it is available in the merge request already.
-->
<!---
##### Applications
Describe any changes made to existing applications, or new applications that have been added.
-->
<!---
##### Tests
Describe the testing strategy for new features.
-->
<!---
##### Documentation
List or link documentation modifications that were made (doxygen, example, Software Guide, application documentation, CookBook).
-->
#### Additional notes
<!--- List remaining open issues if any, and additional notes. -->
#### Copyright
The copyright owner is Oslandia and has signed the ORFEO ToolBox Contributor License Agreement.
cc @ytanguy @esarrazin
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit8.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/709Add "epsg" filename extension2020-07-09T08:39:30ZJulien OsmanAdd "epsg" filename extension#### Summary
Add the *epsg* new filename extension. It allows the user to chose the map projection of the output image.
#### Rationale
Fixes issue #1889.
#### Implementation Details
##### Classes and files
- *otbGDALImageIO*: Add ...#### Summary
Add the *epsg* new filename extension. It allows the user to chose the map projection of the output image.
#### Rationale
Fixes issue #1889.
#### Implementation Details
##### Classes and files
- *otbGDALImageIO*: Add possibility to define the output projection with EPSG code
- *otbExtendetFilenameToWriterOptions*: Add management of the EPSG code
- *otbImageFileWriter*: Providing the epsg code to otbGDALImageIO
##### Tests
- Add the epsg filename extension to the otbExtendetFilenameToWriterOptions tests
- Add a new test for ImageFileWriter that uses the epsg filename extension
##### Documentation
- Update cookbook page for Filename Extensions.
#### Additional notes
- Would be great to add the possibility to test the projection of the output image in the test named ioTvImageFileWriterTIF2TIF
#### Copyright
The copyright owner is *CS* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.2.0Mickael SavinaudMickael Savinaudhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/708Spectral angle classification2020-07-09T08:39:34ZCédric TraizetSpectral angle classification#### Summary
description wip
Refactor spectral angle functors in otb and add a new application : SpectralAngleClassification
closes #2012
#### SAM
The spectral angle mapper (SAM) and spectral information divergence (SID) ...#### Summary
description wip
Refactor spectral angle functors in otb and add a new application : SpectralAngleClassification
closes #2012
#### SAM
The spectral angle mapper (SAM) and spectral information divergence (SID) are widely used in hyperspectral image processing, but otb does not provide an application implementing these algorithms.
The SAM of a pixel `x` with a reference pixel `r` is defined by :
``` math
sam[x, r] = cos^{-1}(\frac{<x,r>}{\|x\| * \|r\| } )
```
where `<x,r>` denotes the scalar product between x and r. This is also called the spectral angle between `x` and `r`. In SAM classification the spectral angle is computed for each pixel with a set of reference pixels, the class associated with the pixel is the index of the reference pixel that has the lowest spectral angle.
In otb there are several classes that computes spectral angle :
1) `BinarySpectralAngleFunctor` : computes spectral angle between two pixels.
2) `SpectralAngleFunctor` : computes spectral angle between a pixel and a reference (different from the above because the norm of the reference is cached and not computed again for each pixel
3) `SpectralAngleDistanceImageFilter` : Filter computing spectral angle on an image (it doesn't use a functor).
4) `sqrtSpectralAngleFunctor` : computes the square root of the spectral angle between a pixel and a reference.
5) `waterSqrtSpectralAngleFunctor` : computes the square root of the spectral angle between a pixel and a reference, with band indices (`blue`, `green`, `red` and `nir`). Note that this functor is not available in the `RadiometricIndices` application.
6) `waterSqrtSpectralAngleFilter` : `UnaryFunctorImageFilter` specialized with `waterSqrtSpectralAngleFunctor`
7) `ConnectedComponentMuParserImageFunctor` : defines the `spectralAngle` variablr for muParser in the connected component framework.
All these classes re-implement the spectral angle computation. In these merge request, they have been refactored to use the function
``` cpp
template <class TInput, class TReference, class TOutput>
TOutput ComputeSpectralAngle(TInput const & input, typename TInput ::ValueType const & inputNorm,
TReference const & reference, typename TReference::ValueType refNorm)
```
Note that the norm of input pixels is a parameter of the same norm might be used for several spectral angle computations.
A new functor has been implement for spectral angle with a vector of reference pixels : `SpectralAngleMapperFunctor`, and is used is the new `SpectralAngleClassification` application.
`WaterSqrtSpectralAngleFunctor` has been refactored to be a `RadiometricIndex` and can be used with a `FunctorImageFilter` like the other radiometry filters (with the SetBandIndex/GetBandIndex syntax etc)
`WaterSqrtSpectralAngleImageFilter` has been deprecated to stay coherent with the other radiometry functor. The filters corresponding to the functor are not defined in this module, and are defined on the fly with the `NewFunctorFilter(functor)` free function.
`SpectralAngleDistanceImageFilter` has been deprecated because it is a clone of `FunctorImageFilter< SpectralAngleFunctor>`
#### SID
The probability mass function p of a pixel x is defined by :
``` math
x = [x_1, x_2 ,..., x_L ]^T \\
p = [p_1, p_2 ,..., p_L ]^T \\
p_i = \frac{x_i}{\sum_{j=1}^L x_j}
```
The spectral information divergence between a pixel `x` and a reference `r` is defined by :
``` math
sid[x, r] = \sum_{j=1}^{L} p_j *log(\frac{p_j}{q_j}) + \sum_{j=1}^{L} q_j * log(\frac{q_j}{p_j})
```
where p and q are respectively the probability mass function of x and r.
A new functor has been implemented to compute SID on a vector of reference pixel.
Note that SID is only defined for strictly positive pixels. The functor will throw an exception if one of the channel of its input (pixels and reference pixels) is negative or equal to 0.
#### SpectralAngleClassification
A new application has been added, it takes as input :
* `in` : a hyperspectral image
* `ie` : endmembers stored in an image. Possibly the output of [VertexComponentAnalysis](https://www.orfeo-toolbox.org/CookBook/Applications/app_VertexComponentAnalysis.html).
* `mode` : `sid` or `sam`, the algorithm to be used.
and output :
* `out` : the output classification, i.e. the index of the endmember corresponding to the min sid or sam value, starting at 1.
* `measure` : the computed sid or sam map.
Note that the two output supports `multiwriting`.
Additional parameters are :
* `threshold` : value of sid or sam above the threshold are not considered for classification and are classified as background (not mandatory, if not set all pixels are classfied).
* `bv` : the background value (default 0)
Two tests have been added (`sid` and `sam` modes)
#### Implementation Details
<!---
##### Classes and files
Give an overview of the implementation: main changes made to classes, files and modules. Do not paste complete diff, as it is available in the merge request already.
-->
<!---
##### Applications
Describe any changes made to existing applications, or new applications that have been added.
-->
<!---
##### Tests
Describe the testing strategy for new features.
-->
<!---
##### Documentation
List or link documentation modifications that were made (doxygen, example, Software Guide, application documentation, CookBook).
-->
#### Additional notes
<!--- List remaining open issues if any, and additional notes. -->
#### Copyright
The copyright owner is *CNES* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.2.0Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/704Pantex texture extraction application2020-07-09T08:39:40ZCédric TraizetPantex texture extraction application#### Summary
New application for Pantex texture extraction. Closes #2022
#### Rationale
In otb there is `ScalarImageToPanTexTextureFilter` but there is no corresponding application (see #2022).
The filter is based on this pap...#### Summary
New application for Pantex texture extraction. Closes #2022
#### Rationale
In otb there is `ScalarImageToPanTexTextureFilter` but there is no corresponding application (see #2022).
The filter is based on this paper : Pesaresi, Martino & Gerhardinger, A. & Kayitakire, Francois. (2008). A Robust Built-Up Area Presence Index by Anisotropic Rotation-Invariant Textural Measure. Selected Topics in Applied Earth Observations and Remote Sensing, IEEE Journal of. 1. 180 - 192. 10.1109/JSTARS.2008.2002869.
This Merge Request adds an application for PantexTextureExtraction. It has the following parameters :
- `in` : The input image to compute the features on
- `channel` : The selected channel index
- `out` : Output image containing the selected texture features
- `min` : Input image minimum. If this parameter is not set, the application will compute the minumum of the image.
- `max` : Input image maximum. If this parameter is not set, the application will compute the maximum of the image.
- `sradx` : Radius of the window on which textures are computed (x direction)
- `srady` : Radius of the window on which textures are computed (y direction)
- `nbin` : Number of bins per axis for histogram generation number of gray levels considered in the computation of co-occurance)
A test has been added for this application.
Note that there are two other application for texture extraction in OTB, [HaralickTextureExtraction](https://www.orfeo-toolbox.org/CookBook-7.1/Applications/app_HaralickTextureExtraction.html) and [SFSTextureExtraction](https://www.orfeo-toolbox.org/CookBook-7.1/Applications/app_SFSTextureExtraction.html)
#### Copyright
The copyright owner is *CNES* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.2.0Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/697PERF: Use Boost.SmallVec in BCO interpolator2024-03-21T11:46:52ZLaurențiu NicolaPERF: Use Boost.SmallVec in BCO interpolator#### Summary
Use a small vector container for the output pixel and interpolator coefficients in `BCOInterpolateImageFunction`.
#### Rationale
This avoids two (for scalar images) or three (for vector ones) for small interpolation...#### Summary
Use a small vector container for the output pixel and interpolator coefficients in `BCOInterpolateImageFunction`.
#### Rationale
This avoids two (for scalar images) or three (for vector ones) for small interpolation radii and number of bands.
```
before:
286.76user 5.17system 0:36.00elapsed 810%CPU (0avgtext+0avgdata 1013876maxresident)k
2288inputs+15071432outputs (5major+1442780minor)pagefaults 0swaps
290.62user 5.28system 0:34.09elapsed 867%CPU (0avgtext+0avgdata 1013312maxresident)k
35776inputs+15071432outputs (207major+1443014minor)pagefaults 0swaps
291.82user 5.01system 0:34.05elapsed 871%CPU (0avgtext+0avgdata 1013196maxresident)k
18960inputs+15071432outputs (133major+1443078minor)pagefaults 0swaps
after:
260.86user 5.44system 0:37.12elapsed 717%CPU (0avgtext+0avgdata 1013652maxresident)k
4272inputs+15071432outputs (3major+1443217minor)pagefaults 0swaps
257.90user 5.85system 0:38.22elapsed 690%CPU (0avgtext+0avgdata 1014272maxresident)k
8inputs+15071432outputs (1major+1443207minor)pagefaults 0swaps
261.12user 5.58system 0:36.90elapsed 722%CPU (0avgtext+0avgdata 1012968maxresident)k
0inputs+15071432outputs (0major+1443212minor)pagefaults 0swaps
```
Tested on Ubuntu 18.04. I expect it might make a larger difference on older systems, because the GLIBC memory allocator used to be very slow (it got a per-thread cache in 2.26).
#### Implementation Details
I'm not sure what's the minimum Boost version we support, so I left in a path for pre-1.58, where `small_vector` is not available.
#### Additional notes
This is technically a breaking change:
- the `BCOInterpolateImageFunctionBase::CoefContainer` type is public and its type has changed
- `BCOInterpolateImageFunctionBase::EvaluateCoef` is no longer virtual
#### Copyright
The copyright owner is Laurențiu Nicola / CS ROMANIA and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit8.0.0Laurențiu NicolaLaurențiu Nicolahttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/681ENH: allow HTTP GDAL datasets2020-02-10T19:49:50ZLaurențiu NicolaENH: allow HTTP GDAL datasets#### Summary
Allow `IOGDAL` to open HTTP and HTTPS datasets.
#### Rationale
These were disabled in 6b1a62701acab46bab770783ccdf4a7f9b4c2567 as a work-around for a pre-GDAL 1.11 bug. We no longer support GDAL 1, let's remove this...#### Summary
Allow `IOGDAL` to open HTTP and HTTPS datasets.
#### Rationale
These were disabled in 6b1a62701acab46bab770783ccdf4a7f9b4c2567 as a work-around for a pre-GDAL 1.11 bug. We no longer support GDAL 1, let's remove this check and see what happens.
#### Copyright
The copyright owner is Laurențiu Nicola (CS ROMANIA) and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.1.0Laurențiu NicolaLaurențiu Nicolahttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/673Smoothing application enhancement2020-03-23T16:53:31ZCédric TraizetSmoothing application enhancement#### Summary
Some modifications of the Smoothing application. In particular the Gaussian mode now has two additional parameters : `type.gaussian.maxerror` and `type.gaussian.maxwidth`. These parameters were available in the ITK filter...#### Summary
Some modifications of the Smoothing application. In particular the Gaussian mode now has two additional parameters : `type.gaussian.maxerror` and `type.gaussian.maxwidth`. These parameters were available in the ITK filter, but were not exposed in the application
Closes #1961
#### Implementation Details
##### Applications
Smoothing :
* new parameter `type.gaussian.maxerror` : The algorithm will size the discrete kernel so that the error resulting from truncation of the kernel is no greater than `type.gaussian.maxerror`
* new parameter `type.gaussian.maxwidth` : Set the kernel to be no wider than maxwidth pixels, even if `type.gaussian.maxerror` demands it.
* the radius parameter has been renamed into stdev (because this is what it is, see the TODO in code)
* Some modernization (auto, RegisterPipeline())
FastNLMeans :
* Some modernization (auto, RegisterPipeline())
##### Tests
The tests for the Smoothing application have been updated:
* New test for the Gaussian mode (there was no test for this mode)
* New test for the Anisotropic mode (there was no test for this mode). Note that I needed to set a tolerance value for this test (1e-6), because the result were different on windows 8 (x86). The differences are probably caused by numerical error, and we can't do much about it anyway because we are using an ITK filter.
* The `apTvUtSmoothingTest_InXML` now depends on the `apTvUtSmoothingTest_OutXML` test, instead of using a stored baseline.
* The `apTvUtSmoothingTest` has been removed, there is no need to test 3 times the `mean` mode with the same parameters. (see InXML and OUTXML tests).
#### Copyright
The copyright owner is *CNES* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.1.0Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/644Fast nlmeans filter2020-02-07T16:33:52ZCarole AmiotFast nlmeans filter#### Summary
Implementation of the non-local mean filter, using a fast implementation scheme. This implementation is an adaptation of the nl means filter in python scikit skimage module. It is however faster due to OTB streaming and thr...#### Summary
Implementation of the non-local mean filter, using a fast implementation scheme. This implementation is an adaptation of the nl means filter in python scikit skimage module. It is however faster due to OTB streaming and threading strategies.
#### Rationale
This filter is used inside the RABASAR filtering algorithm to denoise temporal stack of SAR images. It is however useful for a broader class of images.
#### Implementation Details
##### Classes and files
Two new files implementing the filter have been added to the Filtering module, inside Smoothing directory :
* otbFastNLMeansImageFilter.h
* otbFastNLMeansImageFilter.hxx
##### Applications
An application to launch NL Means filter have been added in AppFiltering :
* otbFastNLMeans.cxx
##### Tests
Two tests have been added : one calling the application, the other one testing the filter
<!---
##### Documentation
List or link documentation modifications that were made (doxygen, example, Software Guide, application documentation, CookBook).
-->
#### Additional notes
<!--- List remaining open issues if any, and additional notes. -->
#### Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.1.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/642Resolve "ExtractROI: keep GCPs"2019-12-02T16:05:38ZGuillaume PaseroResolve "ExtractROI: keep GCPs"Due to GDAL limitations, we only save GCP when there is no projectionRef or imageKeywordlist.
Because the geotransform is not saved with the GCPs, the GCP image coordinates are adapted if the image has non-default origin/spacing values....Due to GDAL limitations, we only save GCP when there is no projectionRef or imageKeywordlist.
Because the geotransform is not saved with the GCPs, the GCP image coordinates are adapted if the image has non-default origin/spacing values.
The test `apTvUtQuicklookWithGCP` has been added to check this behaviour.
Closes #19377.1.0Guillaume PaseroGuillaume Paserohttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/628Added 'double' application parameter type.2020-11-02T10:56:25Zguillaume pernotAdded 'double' application parameter type.Closes #1971Closes #19717.1.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/586Add a new metadata (azimuthAnxTime) to Sentinel 1 Model2019-09-19T07:06:40ZGaëlle USSEGLIOAdd a new metadata (azimuthAnxTime) to Sentinel 1 Model#### Summary
New Metadata for Sentinel 1 Model : azimuthAnxTime
#### Rationale
The metadata will be used for S1 IW mode to select burst between two images.
#### Implementation Details
##### Classes and files
Four classes was change...#### Summary
New Metadata for Sentinel 1 Model : azimuthAnxTime
#### Rationale
The metadata will be used for S1 IW mode to select burst between two images.
#### Implementation Details
##### Classes and files
Four classes was changed :
* ossimSarSensorModelPathsAndKeys : New keys
* ossimSarSensorModel : Spread `BurstRecordType`
* ossimSentinel1Model : Get the new metadata and fill the `BurstRecordType`
* ossimCosmoSkymedModel : Fill `BurstRecordType` with a default value for this metadata (0)
NB : The version of geom file can be checked by some applications and an exeception can be thrown if the third version (at least) is required.
<!---
##### Applications
Describe any changes made to existing applications, or new applications that have been added.
-->
##### Tests
The application ReadImageInfo was used to visualize the new geom file for Sentinel 1 data.
<!---
##### Documentation
List or link documentation modifications that were made (doxygen, example, Software Guide, application documentation, CookBook).
-->
#### Additional notes
<!--- List remaining open issues if any, and additional notes. -->
#### Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/508New mode (SpotLight) for Cosmo sensor model2019-09-19T08:11:01ZGaëlle USSEGLIONew mode (SpotLight) for Cosmo sensor model#### Summary
New mode to read and extract metadata from Cosmo SpotLight products.
#### Rationale
Add a new product type (SCS_U) to allow spotlight mode into Cosmo SAR Sensor Model.
Correction of some metadata for Cosmo sensor...#### Summary
New mode to read and extract metadata from Cosmo SpotLight products.
#### Rationale
Add a new product type (SCS_U) to allow spotlight mode into Cosmo SAR Sensor Model.
Correction of some metadata for Cosmo sensor.
#### Implementation Details
##### Classes and files
Two classes was changed to add the new product type :
* ossimSarSensorModel
* ossimCosmoSkymedModel
<!---
##### Applications
Describe any changes made to existing applications, or new applications that have been added.
-->
<!---
##### Tests
Describe the testing strategy for new features.
-->
<!---
##### Documentation
List or link documentation modifications that were made (doxygen, example, Software Guide, application documentation, CookBook).
-->
#### Additional notes
<!--- List remaining open issues if any, and additional notes. -->
#### Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/487Refactor XML parameters2019-11-15T15:41:47ZVictor PoughonRefactor XML parameters#### Summary
Currently saving and loading application parameters to XML files is handled by two classes: `OutputProcessXMLParameter` and `InputProcessXMLParameter`. They are "parameters" in the sense of the application framework. They...#### Summary
Currently saving and loading application parameters to XML files is handled by two classes: `OutputProcessXMLParameter` and `InputProcessXMLParameter`. They are "parameters" in the sense of the application framework. They represent the "-inxml" and "-outxml" command line arguments in the CLI interface, and the load/save widgets in GUI. The actual calls to the XML reading/writing code are made inside UpdateParameters() for input, and inside ExecuteAndWriteOutput() for output.
The goal of this refactoring is double:
1. Separate XML operations from application's execution and UpdateParameters()
2. Replace the GUI widgets for XML load/save by a simple menu:
![Screenshot_from_2019-04-30_17-38-35](/uploads/54a19ac97339b1eaba516b4be19e30cc/Screenshot_from_2019-04-30_17-38-35.png)
This MR does this with a significant refactoring:
* Remove `OutputProcessXMLParameter`, `InputProcessXMLParameter` and their Qt wrappers
* Add public Application API: `LoadParametersFromXML(filename)` and `SaveParametersToXML(filename)` (in C++ and Python)
* Remove support for `-inxml` without application name in ApplicationLauncherCommandLine (somewhat of a niche use case)
Backwards compatibility of the otbcli interface is maintained. If argv contains `-inxml` or `-outxml`, the command line launcher will call LoadParametersFromXML or SaveParametersFromXML and behave as before. So they are command line arguments but not application parameters (like -help, -progress, -testenv and -version).
##### Backwards breaking changes:
* In GUI and Python, it is now possible to write XML parameters without executing the application. In that case parameters with the "output" role will not be written to the xml file.
* `SetParameterString("inxml")` or `SetParameterString("outxml")` will not work anymore, because parameters "inxml" and "outxml" are removed. Use `LoadParametersFromXML(filename)` and `SaveParametersToXML(filename)` instead.
#### Rationale
See above. It will also be helpful for solving #1842
#### Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 commit7.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/470KMeans input centroids2019-05-15T14:08:19ZCédric TraizetKMeans input centroids#### Summary
Add the option to provide user defined centroids as initialization of the kmean algorithm in `KMeansClassification` and `TrainVectorClassifier`.
See feature request #1820
#### Rationale
The result of the KMeans ...#### Summary
Add the option to provide user defined centroids as initialization of the kmean algorithm in `KMeansClassification` and `TrainVectorClassifier`.
See feature request #1820
#### Rationale
The result of the KMeans algorithm depends on the input centroids, but it is currently not possible to set them (the `k` first points of the training sample are used as initialization`. This MR adds the possibility to provide the centroids in a text file.
In the `TrainVectorClassifier` application, the following parameters have been added:
- classifier.sharkkm.centroids : input centroid text file
- classifier.sharkkm.centroidstats : a file containing stats to normalize the input centroids (non mandatory)
- classifier.sharkkm.outcentroids : a text file containing the output centroids
In the `KMeansClassification` composite application, the following parameters have been added:
- incentroids.in : input centroid text file
- incentroids.normalize : flag for centroid normalization (the stats are already computed in the app for data normalization)
#### Implementation Details
Input centroid file reading is done using the Shark API (importCSV).
In `SharkKMeansMachineLearningModel`, the normalization option has been removed. Normalization was possible during training (`Train()`), using the Shark API to train a normalizer on the input list sample. This option was not used anywhere in OTB, and I removed it because the normalizer cannot be used afterward during classification... Instead the data normalization should be done prior to the training (as it is done in the applications).
In `SharkKMeansMachineLearningModel`, I added a method to export the centroids as a text file (using the Shark's `exportCSV` method), this can be used to obtain a human readable version of the centroid (the serialized model file can be hard to read). The centroids can now be exported in the `TrainVectorClassifier` application, and the `KMeansClassification` uses this method instead of creating the output centroid file from the serialized file (this was not working anyway, the output centroids where wrong...)
This means that the output centroids text file from a kmean application can be used as input of another kmean application !
#### Copyright
The copyright owner is *CNES* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 Agreement7.0.0Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/468Design improvements of applications Qt Wrapper2019-04-29T15:02:03ZVictor PoughonDesign improvements of applications Qt Wrapper#### Summary
Various UX design improvements and code refactoring of `QtWrapper`:
* Remove Quit button
* Improve cancellation of a running application (fix crashes)
* Disable widgets during execution
* Design the main window with Qt Des...#### Summary
Various UX design improvements and code refactoring of `QtWrapper`:
* Remove Quit button
* Improve cancellation of a running application (fix crashes)
* Disable widgets during execution
* Design the main window with Qt Designer
* Show OTB icon
* Improve margins, layouts, sizes, etc.
* Add menu entry: Application -> Copy command line to clipboard
* Remove monteverdi layer stack pop-up
* Fix ListView small rendering
* Fix ListView not calling UpdateParameters
* Remove duplicated class QtWidgetProgressReport
![Screenshot_from_2019-04-16_17-27-59](/uploads/699a70b7580c1c7b9df90721c6273bc5/Screenshot_from_2019-04-16_17-27-59.png)
#### Rationale
Better UX, fewer crashes!
#### Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: 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 Agreement7.0.0