otb issueshttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues2022-01-06T16:08:34Zhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2101Output vector layers of LargeScaleMeanShift have not a correct geometry accor...2022-01-06T16:08:34ZaloboaOutput vector layers of LargeScaleMeanShift have not a correct geometry according to GEOS### Description
Output vector layers of LargeScaleMeanShift have not a correct geometry according to GEOS, as implemented in rgeos.
The layer can be fixed using geos tools.
Same problem is found if -mode raster is used, followed by gdal...### Description
Output vector layers of LargeScaleMeanShift have not a correct geometry according to GEOS, as implemented in rgeos.
The layer can be fixed using geos tools.
Same problem is found if -mode raster is used, followed by gdal_polygonize
### Steps to reproduce
`otbcli_LargeScaleMeanShift.bat -in QB_1_ortho.tif -spatialr 4 -ranger 80 -minsize 16 -tilesizex 256 -tilesizey 256 -cleanup 1 -mode.vector.out regions.shp`
in R:
```
> require(rgeos)
> require(rgdal)
> v1 <- readOGR(dsn="D:/FLUXPYRetal/Navarra/SegNavarra", layer="regions")
> gIsValid(v2)
[1] FALSE
Warning message:
In RGEOSUnaryPredFunc(spgeom, byid, "rgeos_isvalid") :
Ring Self-intersection at or near point 370624.65625896002 4831278.72278025
> v1f <- gSimplify(v1, tol = 0.00001)
> gIsValid(v1f)
[1] TRUE
```
### Configuration information
OS, OTB version or tag, information related to build (binaries, superbuild, system libs ...)https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2042otb application GetParameterImageBase on InputImageListParameter always retur...2022-01-06T16:10:19ZEsquis Benjaminotb application GetParameterImageBase on InputImageListParameter always return a FloatVectorImageDear,
When calling this function on an InputImageListParameter the return pointer is always casted into a FloatVectorImage while there is an accessor on InputImageParameter to get the real ImageBase* not casted.
This is particularly impo...Dear,
When calling this function on an InputImageListParameter the return pointer is always casted into a FloatVectorImage while there is an accessor on InputImageParameter to get the real ImageBase* not casted.
This is particularly important when chaining the applications with pointers of specifiq types (uint8 ...) that needs to keep their types.
Regardshttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1876No debug build on CI or dashboard2022-01-07T07:21:02ZVictor PoughonNo debug build on CI or dashboard### Description
There's no debug build in the CI, so asserts are not tested. Example of problems that should be caught by testing in debug mode: #1874, !457.
### Configuration information
debug### Description
There's no debug build in the CI, so asserts are not tested. Example of problems that should be caught by testing in debug mode: #1874, !457.
### Configuration information
debughttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1849otbcli_DimensionalityReduction: Add options to output eigenvalues, apply inve...2022-01-07T07:22:27Zaloboaotbcli_DimensionalityReduction: Add options to output eigenvalues, apply inverse transform for PCA and correctely deal with no-dataAdd options to otbcli_DimensionalityReduction
1. ~~Output eigenvalues along eigenvectors for PCA~~
2. ~~Apply the inverse transform~~ (I understand this is already done using the "-outinv" parameter.
3. Deal with nodata
4. Option to ...Add options to otbcli_DimensionalityReduction
1. ~~Output eigenvalues along eigenvectors for PCA~~
2. ~~Apply the inverse transform~~ (I understand this is already done using the "-outinv" parameter.
3. Deal with nodata
4. Option to estimate stats from a certain % sampled from the image
5. ~~Option to output eigenvalues and eigenvectors only, avoiding calcalating and writing the components (useful to decide how many components to keep in a second run that would perform the actual calculation of the components)~~https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2112Use symlink in main package page2022-01-07T07:30:30ZCédric TraizetUse symlink in main package pageThere are two pages on the website containing release packages:
* `https://www.orfeo-toolbox.org/packages/`: packages corresponding to the current release
* `https://www.orfeo-toolbox.org/packages/archives/OTB/`: all otb packages.
Pac...There are two pages on the website containing release packages:
* `https://www.orfeo-toolbox.org/packages/`: packages corresponding to the current release
* `https://www.orfeo-toolbox.org/packages/archives/OTB/`: all otb packages.
Packages for the current release are duplicated on two different pages. We could simplify it by creating symlinks from the main package page to the archive page.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1662mandatory parameters: why and how?2022-01-07T07:46:22ZRashad Kanavathmandatory parameters: why and how?### Description
Current state of mandatory parameter is really confusing.
Parameter class has a bool m_Mandatory and is true by default. Unless a parameter is set to off with `MandatoryOff(p)` then they are really required.
This make...### Description
Current state of mandatory parameter is really confusing.
Parameter class has a bool m_Mandatory and is true by default. Unless a parameter is set to off with `MandatoryOff(p)` then they are really required.
This make me tip toe around in finding mandatory flag in [otbQgisDescriptor.cxx](Modules/Wrappers/QGIS/src/otbQgisDescriptor.cxx#L302). Now that doesn't solve issue and ends up in error when using otbExtractROI. Error message from QGIS is `mode.fit.vect` is not set. QGIS sees this parameter as mandatory probably because otb description for ExtractROI said so!
This parameter is only required if `mode = fit`. so it must be optional. But not according to `param->GetMandatory()`. It says parameter is mandatory no matter what value is set for `mode` parameter. This is wrong and is problematic for apps like QGIS and others who rely on descriptor files.
In QGIS description file, there is a csv field to identify that parameter as optional or not. (mandatory or not in OTB terms).
Here is the list of paramters reported by otbcli_ExtractROI
```
in (mandatory)
out (mandatory)
mode.fit.im (mandatory)
mode.fit.vect (mandatory)
mode.extent.ulx (mandatory, default value is 0)
mode.extent.uly (mandatory, default value is 0)
mode.extent.lrx (mandatory, default value is 0)
mode.extent.lry (mandatory, default value is 0)
mode.extent.unit (mandatory, default value is pxl)
mode.radius.r (mandatory, default value is 0)
mode.radius.unitr (mandatory, default value is pxl)
mode.radius.cx (mandatory, default value is 0)
mode.radius.cy (mandatory, default value is 0)
mode.radius.unitc (mandatory, default value is pxl)
startx (mandatory, default value is 0)
starty (mandatory, default value is 0)
sizex (mandatory, default value is 0)
sizey (mandatory, default value is 0)
cl (mandatory, no default value)
elev.dem (optional, off by default)
elev.geoid (optional, off by default)
elev.default (mandatory, default value is 0)
ram (optional, off by default, default value is 128)
inxml (optional, off by default)
```
my suggestion is to use below rule to find out if parameter is mandatory.
A parameter is mandatory if statisfies all of the conditions:
1. Must have parent parameter set. `mode.fit.vect` is mandatory only if `mode = fit`
2. Must not have default a value.
Below code can cover first case in this rule. Before going on to add this in otbQgisDescriptor, I would like to find out if there is a better way to deal with mandatory flag in OTBApplicationEngine so other can rely on Parameter::GetMandatory() and stick to API rather than spaghetti forever.
```
+ std::string optional = "false";
+ ParameterKey pName(name);
+ auto splitName = pName.Split();
+ if (splitName.size() > 2)
+ optional = "true";
+ else
+ optional = param->HasValue() ? "true" : "false";
+
```
we can add a check for if-default-value-exists.
### Steps to reproduce
try ExtractROI application using QGIS 3.2 and OTB 6.6
### Configuration information
OS, OTB version or tag, information related to build (binaries, superbuild, system libs ...)https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2118double precision would be better for ConvertSensorToGeoPoint application output2022-01-07T07:47:39ZJonathan Guinetdouble precision would be better for ConvertSensorToGeoPoint application outputlat/lon output are displayed in float precision https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/blob/develop/Modules/Applications/AppProjection/app/otbConvertSensorToGeoPoint.cxx#L78. Double precision would be better .lat/lon output are displayed in float precision https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/blob/develop/Modules/Applications/AppProjection/app/otbConvertSensorToGeoPoint.cxx#L78. Double precision would be better .https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2041Missing ogr tools in binary package2022-01-07T07:51:13ZGuillaume PaseroMissing ogr tools in binary packageSince we already package gdal raster tools in the binary package, it would be nice to also have ogr tools (ogrinfo, ogr2ogr, ...). Should be simple to get.Since we already package gdal raster tools in the binary package, it would be nice to also have ogr tools (ogrinfo, ogr2ogr, ...). Should be simple to get.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2126orfeo-toolbox Conda package WSL2022-01-07T08:55:18Zschwarzcsorfeo-toolbox Conda package WSL### Description
I am able to install the orfeo-toolbox on WSL Ubuntu, using Anaconda and creating a python=3.7 virtual environment (conda install -c conda-forge -c orfeotoolbox otb).
I am able to successfully run the "Smoothing" test ca...### Description
I am able to install the orfeo-toolbox on WSL Ubuntu, using Anaconda and creating a python=3.7 virtual environment (conda install -c conda-forge -c orfeotoolbox otb).
I am able to successfully run the "Smoothing" test case using the above described setup (https://www.orfeo-toolbox.org/packages/nightly/2019-06-28/CookBook-stable/recipes/python.html).
However when I run the command "print(str(otb.Registry.GetAvailableApplications()))", I get the error message:
[...]/oftb/lib/otb/applications/otbapp_TrainVectorClassifier.so: undefined symbol: _ZN5shark6random9globalRngE
I further looked into the problem and it seems some applications are working, e.g. "TrainImageClassifier", while others such as "TrainVector Classifier" produces the same error:
run--> app1= otb.Registry.CreateApplication("TrainVectorClassifier")
error--> 2020-11-17 12:30:03 (WARNING): Failed to load libraries from /home/cschwarz/miniconda3/envs/oftb/lib/otb/applications/otbapp_TrainVectorClassifier.so while trying to create application TrainVectorClassifier
because: -> /home/cschwarz/miniconda3/envs/oftb/lib/otb/applications/otbapp_TrainVectorClassifier.so: undefined symbol: _ZN5shark6random9globalRngE
### Steps to reproduce
- install conda on WSL Ubuntu
1. conda create --name oftb python=3.7 spyder=4
2a. conda activate oftb
2b. conda install -c conda-forge -c orfeotoolbox otb
3. python
4. import otbApplication as otb
5. print(str(otb.Registry.GetAvailableApplications()))
### Configuration information
conda version: 4.9.2
python version: 3.7.8
otb : 7.1.0 / Build: py37h06a4308_1
I am very excited to use OTB for patch-image-processing and would value your advice on how to solve this issue?
Best Regards,
Christianhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2133Wrong input layer size in TrainImagesRegression using the ANN classifier2022-01-07T09:18:56ZCédric TraizetWrong input layer size in TrainImagesRegression using the ANN classifier### Description
This bug was reported by a user on the [forum](https://forum.orfeo-toolbox.org/t/problems-doing-imageregression-with-ann-created-model/934)
The input layer of the output model produced `TrainImagesRegression` when using...### Description
This bug was reported by a user on the [forum](https://forum.orfeo-toolbox.org/t/problems-doing-imageregression-with-ann-created-model/934)
The input layer of the output model produced `TrainImagesRegression` when using the artificial neural network classifier (`ann`) always has a size of 1, when it should match the number of bands of the input image. The training does not fail, and a mse is computed. However awhen trying to use the model with `ImageRegression` an error is thrown by OpenCV:
```
(FATAL) ImageRegression: itk::ERROR: MultiThreader(000001D5109CC040): Exception occurred during SingleMethodExecute OpenCV(4.1.1) C:\build\otb\build\OPENCV\src\OPENCV\modules\ml\src\ann_mlp.cpp:350: error: (-215:Assertion failed) (type == CV_32F || type == CV_64F) && inputs.cols == layer_sizes[0] in function ‘cv::ml::ANN_MLPImpl::predict’
```
Note that training an artificial neural network model with `TrainVectorRegression` works correctly, so the problem is likely located in `TrainImagesRegression`. Also note that `TrainImagesClassifier` works correctly whn trying to train an artificial neural network for classification.
### Steps to reproduce
```
otbcli_TrainImagesRegression -io.il input.tif -io.ip "predicted_values.tif" -io.out model.txt -classifier ann -classifier.ann.sizes 10
otbcli_ImageRegression -in input.tif -model model.txt -out out.tif
```
leads to the following model :
``` yml
%YAML:1.0
---
opencv_ml_ann_mlp:
format: 3
layer_sizes: [ 1, 10, 1 ]
[...]
```
but the input image has 4 bands.
### Configuration information
OTB 7.2, reproduced on Windows 10 and Ubuntu 16.04Thibaut ROMAINThibaut ROMAINhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2163Support Copernicus DEM2022-01-07T09:40:30ZMickael SavinaudSupport Copernicus DEM[Copernicus DEM](https://spacedata.copernicus.eu/web/cscda/dataset-details?articleId=394198) is provided free at 30m and 90m. It could nice to check if we support this DEM with the new framework.
[EDIT 2022-01-07]
This DEM is supported ...[Copernicus DEM](https://spacedata.copernicus.eu/web/cscda/dataset-details?articleId=394198) is provided free at 30m and 90m. It could nice to check if we support this DEM with the new framework.
[EDIT 2022-01-07]
This DEM is supported in OTB 8.0. We should had some tests.Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2013Improve non-regression testing methods2022-01-07T09:48:48ZYannick TANGUYImprove non-regression testing methodsOTBTestDriver is used to compare results (images, vector files, ascii files, ..) in OTB unit tests.
For ogr data, this driver compares different features (ie : nb of fields, nb of features, geometry, etc.) and then compares each feature ...OTBTestDriver is used to compare results (images, vector files, ascii files, ..) in OTB unit tests.
For ogr data, this driver compares different features (ie : nb of fields, nb of features, geometry, etc.) and then compares each feature by dropping content to an ASCII file and comparing reference and result.
=> There are a lot of temporary files written in temporary/testing folder and it may not be very efficient.
Here are some ideas to improve this behavior (thanks @gpasero for the explanations !) :
- the better solution would be to delegate this comparison to a specific OGR API (see GDAL API ?)
- we could compare md5 of result and reference file, and if there is a difference, compare the features : in most cases, it would save some time writing the temporary files.. But we need to get a MD5 sum API that we could call from the C++ test driver
- instead of writing ASCII files for each feature, we could drop content in two Strings and compare them. If there is a difference, the two Strings could be written to a file, as we do now.
=> This subject should be discussed to find the best solution !https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2171Support reading products from virtual file system2022-01-07T09:48:59ZMickael SavinaudSupport reading products from virtual file systemAs described by GDAL [here](https://gdal.org/user/virtual_file_systems.html), EO products are delivered as archive and in parallel more and more stored on network (in object storage for example).
Currently (with 8.0.0-alpha1) even if a...As described by GDAL [here](https://gdal.org/user/virtual_file_systems.html), EO products are delivered as archive and in parallel more and more stored on network (in object storage for example).
Currently (with 8.0.0-alpha1) even if a part of metadata are read with GDAL, we use specific code to retrieve the missing metadata. This code don't support virtual file system although the GDAL part yes. For example, you can made otbcli_ReadImage on a Sentinel-1 data in an archive and retrieve some metadata thanks to GDAL but not from the OTB part.
It would be nice to support this virtual file system in the OTB metadata. With that we can run an ortho on the Pleiades data without unarchive the product or run SARCalibration on a Sentinel1 data store in an object storage.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2105Add performance test monitoring into OTB CI2022-01-07T09:50:11ZMickael SavinaudAdd performance test monitoring into OTB CIIn order to facilitate the OTB development when large modifications are done. It could be interesting to monitor the performance of OTB.
Currently it is possible to use regression test to do that. Indeed CTest provide test time executio...In order to facilitate the OTB development when large modifications are done. It could be interesting to monitor the performance of OTB.
Currently it is possible to use regression test to do that. Indeed CTest provide test time execution and CDash display it. The idea could be to retrieve this test time and compare the test time of develop with feature branch.
@sdinot has perform some test with CDash API and it is very interesting:
* all test are available here: https://cdash.orfeo-toolbox.org/viewTest.php?buildid=53386
* successful tests are available here: https://cdash.orfeo-toolbox.org/viewTest.php?onlypassed&buildid=53386
* with API we can retrieve the corresponding JSON:
* https://cdash.orfeo-toolbox.org/api/v1/viewTest.php?buildid=53386
* https://cdash.orfeo-toolbox.org/api/v1/viewTest.php?onlypassed&buildid=53386
With [jq](https://stedolan.github.io/jq/) we can filter the JSON to retrieve the desired information and understand the content:
```
curl -s 'https://cdash.orfeo-toolbox.org/api/v1/viewTest.php?onlypassed&buildid=53386' | jq .
```
To retrieve the test time:
```
curl -s 'https://cdash.orfeo-toolbox.org/api/v1/viewTest.php?onlypassed&buildid=53386' | jq '.tests[] | { name: .name, time: .execTimeFull }'
```
or whitout JSON structure:
```
curl -s 'https://cdash.orfeo-toolbox.org/api/v1/viewTest.php?onlypassed&buildid=53386' | jq '.tests[] | .name, .execTimeFull'
```https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2203Improve the documentation of the RAM parameter2022-01-07T09:56:32ZCédric TraizetImprove the documentation of the RAM parameterA "ram" parameter is available in many OTB applications, it is documented as
> ram: Available memory for processing (in MB).
An environment variable `OTB_MAX_RAM_HINT` is also available :
> OTB_MAX_RAM_HINT: Default maximum memory th...A "ram" parameter is available in many OTB applications, it is documented as
> ram: Available memory for processing (in MB).
An environment variable `OTB_MAX_RAM_HINT` is also available :
> OTB_MAX_RAM_HINT: Default maximum memory that OTB should use for processing, in MB. If not set, default value is 128 MB.
The role of these parameters is to control the ram value used to determine the number of streaming block created by a writer (ImageFileWriter or virtual writer). It is compared by the memory print computed by the writer: the sum of the size of each intermediate filter output multiplied by the pixel size (in byte), for a requested region of a given size.
If we consider that the size of all non image C++ objects created by the application is negligible compared to the ram parameter, the ram parameter effectively controls the RAM used by the OTB application. In the common case of an application instantiating only a few filters and producing an output image, this assumption is probably reasonable). But in some applications, there are other voluminous objects that are not taken into account in the total RAM footprint. In this case the documentation of the ram parameter is misguiding because the total RAM used will be higher than the set RAM.
I think we should update the documentation to clarify what the effect of this parameter really is.
This also applies to the log:
> (INFO): Estimated memory for full processing: 41.1034MBhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1995Wrong Error Message at opening ENVI files in DimensionalityReduction2022-01-07T10:14:02ZaloboaWrong Error Message at opening ENVI files in DimensionalityReduction### Description
Given the command:
`otbcli_DimensionalityReduction -in CupriteAVIRISSubset.dat -out outpca.tif`
for which I have both
CupriteAVIRISSubset.dat
CupriteAVIRISSubset.hdr
(note that the "non-hdr" file in ENVI format c...### Description
Given the command:
`otbcli_DimensionalityReduction -in CupriteAVIRISSubset.dat -out outpca.tif`
for which I have both
CupriteAVIRISSubset.dat
CupriteAVIRISSubset.hdr
(note that the "non-hdr" file in ENVI format can have any extension (even not extension at all), as it is ignored)
I get
`ERROR 1: The selected file is an ENVI header file, but to open ENVI datasets, the data file should be selected instead of the .hdr file. Please try again selecting the data file corresponding to the header file: CupriteAVIRISSubset.hdr`
Nevertheless, the process goes on and completes successfully
### Steps to reproduce
You can get the CupriteAVIRISSubset.dat and CupriteAVIRISSubset.hdr files from http://exelis.http.internapcdn.net/exelis/data/envi_tutorial_data/hyperspectral.zip
### Configuration information
Linux Debian testing OTB-7.0.0Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2191Wrong results using the neural network classifier2022-01-07T10:17:55ZCédric TraizetWrong results using the neural network classifierSee https://forum.orfeo-toolbox.org/t/trainvectorclassifier-returns-no-result-when-using-artificial-neural-network/1022/2
Models trained with `TrainVectorClassifier` using the ann classifier (OpenCV neural network) produce wrong results...See https://forum.orfeo-toolbox.org/t/trainvectorclassifier-returns-no-result-when-using-artificial-neural-network/1022/2
Models trained with `TrainVectorClassifier` using the ann classifier (OpenCV neural network) produce wrong results. When the application computes the confusion matrix after the training part, all samples are classified as the first class, even when using the training dataset as validation dataset.Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2082ExtractROI and OrthoRectification loose band metadata from PHR DIMAP files2022-01-07T11:05:05ZYannick TANGUYExtractROI and OrthoRectification loose band metadata from PHR DIMAP files### Description
When using OrthoRectification or ExtractROI applications, the result file doen't not contain the band metadata (ex : calibration coefficients, radiance values, etc.) initially contained in the DIMAP file.
### Steps to re...### Description
When using OrthoRectification or ExtractROI applications, the result file doen't not contain the band metadata (ex : calibration coefficients, radiance values, etc.) initially contained in the DIMAP file.
### Steps to reproduce
This problem had been observed with OTB 7.x, with PHR images (DIMAP file + associated TIF).
Ex :
`gdalinfo DIM_PHR1B_PMS_202007181100059_SEN_5196690101.XML` gives the following output :
```
Driver: DIMAP/SPOT DIMAP
Files: DIM_PHR1B_PMS_202007181100059_SEN_5196690101.XML
IMG_PHR1B_PMS_202007181100059_SEN_5196690101_R1C1.TIF
IMG_PHR1B_PMS_202007181100059_SEN_5196690101_R1C2.TIF
IMG_PHR1B_PMS_202007181100059_SEN_5196690101_R2C1.TIF
IMG_PHR1B_PMS_202007181100059_SEN_5196690101_R2C2.TIF
Size is 25330, 20050
Coordinate System is `'
Metadata:
BAND_MODE=PX
CLOUDCOVER_MEASURE_NAME=Area_Of_Interest (ROI)
CLOUDCOVER_MEASURE_TYPE=AUTOMATIC
[....]
Band 1 Block=128x128 Type=UInt16, ColorInterp=Undefined
Metadata:
RADIANCE_BIAS=0
RADIANCE_CALIBRATION_DATE=2020-07-01T16:00:00.000Z
RADIANCE_GAIN=9.72
```
If we extract an area :
`otbcli_ExtractROI -in DIM_PHR1B_PMS_202007181100059_SEN_5196690101.XML -out xt_PHR.tif -startx 0 -starty 0 -sizex 100 -sizey 100`
`gdalinfo xt_PHR.tif` gives this :
```
Driver: GTiff/GeoTIFF
Files: xt_PHR.tif
Size is 100, 100
Coordinate System is `'
Metadata:
BAND_MODE=PX
CLOUDCOVER_MEASURE_NAME=Area_Of_Interest (ROI)
CLOUDCOVER_MEASURE_TYPE=AUTOMATIC
[...]
Upper Right ( 100.0, 0.0)
Lower Right ( 100.0, 100.0)
Center ( 50.0, 50.0)
Band 1 Block=100x5 Type=Float32, ColorInterp=Gray
Band 2 Block=100x5 Type=Float32, ColorInterp=Undefined
Band 3 Block=100x5 Type=Float32, ColorInterp=Undefined
Band 4 Block=100x5 Type=Float32, ColorInterp=Undefined
```
### Configuration information
OTB 7.0, 7.1, + current develop version
### Workaround
As a workaround, we've used gdal from the Python API to copy band metadata
This bug seems quite similar to #1937https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2198Elevation management tricky bugs2022-01-07T11:47:23ZEmmanuel DuboisElevation management tricky bugs### Description
Discussing with @ytanguy , I open a bug happening in [cars](https://github.com/CNES/CARS) 3D software.
We are using several OTB applications and it occurs that there are tricky behaviors when using elevation management ...### Description
Discussing with @ytanguy , I open a bug happening in [cars](https://github.com/CNES/CARS) 3D software.
We are using several OTB applications and it occurs that there are tricky behaviors when using elevation management API.
When using only one time or with the same dem, geoid or default_alt, the problem doesn't appear
But using several apps (different or not) with elevation interface seems to not reproduce the same results.
It appears that the first setting is not reset and we cannot put another one in next apps which takes.
This behavior is difficult to detect. For instance, the default_alt is not changing the result if elev.dem is set before.
The default_alt is not stable when already used in another app, ...
Is there a way to reset the elevation management information between two apps usage ?
Thanks by advance. First Bug in OTB so don't hesitate to react, change this content if not clear.
Emmanuel
### Steps to reproduce
Take an OTB application with elevation management (Example ImageEnvelop) and launch it two times with two dem different and check values with Python interface in the same code.
Take two OTB application with elevation management (Example ImageEnvelop and ConvertSensorToGeoPoint) and see standalone results and when the two apps are sequenced in the same python file.
Reproducibility: always
### Configuration information
Ubuntu, Centos, OTB 7.x (7.2), installation from binary version.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1778Test refactoring2022-01-07T11:47:24ZGuillaume PaseroTest refactoring### What changes will be made and why they would make a better Orfeo ToolBox?
Refactor the tests in order to have a faster validation procedure. Ideally, this refactoring should also simplify the testing strategy, and result in a better...### What changes will be made and why they would make a better Orfeo ToolBox?
Refactor the tests in order to have a faster validation procedure. Ideally, this refactoring should also simplify the testing strategy, and result in a better balance between over-tested and under-tested classes.
#### High level description
3 steps are proposed for this refactoring:
* [ ] Refactor the longest tests. 41 tests have been identified as they take more than 10s to run.
* [ ] Design a test framework without IO, only in-memory images
* [ ] Refactor filters `Tv` to use the new test framework
Prior to these steps, 2 other taks should simplify this work:
* #1765 : the modules to be moved out of OTB should reduce the number of tests
* !299 : refactor all functor based filters, their test will be much simpler
#### Risks and benefits
The main risk is on the refactoring time, that could be significant as there are about 2300 tests.
On the bright side, it will be possible to greatly reduce the total testing time, as well as the need for large test data repository.
#### Alternatives for implementations
##### Step 1
The list of 41 pre-selected tests to refactor is here (with associated timings in seconds):
```
10.1 ioTvDEMToImageGeneratorFromImageTest_SensorModel
10.38 bfTuMeanShiftSmoothingImageFilterROIQBMul4
10.49 coTvCoordinateToNameMultithreadTest
10.93 obTuMeanShiftStreamingConnectedComponentSegmentationOBIAToVectorDataFilter
11.1 ioTvKmzProductWriterWithGCP
11.27 apTvSeLargeScaleMeanShiftTest
11.6 leTvSVMMachineLearningModelReg
13.18 bfTvMeanShiftSmoothingImageFilterThreadingNonOpt
13.28 apTvSeSegmentationWatershedVector
14.37 dmTvDisparityMapEstimationMethod
14.72 leTeSEMModelEstimatorExampleTest
14.92 apTvSeSegmentationCCVector_ULOVW
15.2 leTeSOMClassifierExampleTest
15.29 apTvSeSegmentationMeanshiftVector
15.84 obTuMeanShiftConnectedComponentSegmentationFilter
16.47 feTvLocalHoughDraw2
16.63 apTvRaOpticalCalibration_UnknownSensor
16.79 apTvSeSegmentationCCVector_ULU
18.25 apTvClKMeansImageClassification_composite
20.58 apTvSeSegmentationCCVector
22.13 raTvReflectanceToSurfaceReflectanceImageFilter2
23.11 bfTuMeanShiftSmoothingImageFilterQBRoad
23.75 apTvCdbDSFuzzyModelEstimation_LI
26.45 apTvCdbDSFuzzyModelEstimation_LI_autoInit
27.77 apTvClSampleAugmentationReplicate
28.12 apTvFeLineSegmentDetectionNoRescale
29.79 apTvClSampleAugmentationSmote
29.96 leTvGradientBoostedTreeMachineLearningModel
31.1 maTeMarkovClassification3ExampleTest
32.73 leTeSVMImageEstimatorClassificationMultiExampleTest
33.31 apTvClSampleAugmentationJitter
34.57 hyTvMDMDNMFImageFilterTest2
36.32 apTvFeLineSegmentDetection
38.8 leTeSOMExampleTest
51.22 ioTeTileMapImageIOExampleTest
52.66 reTeImageRegistration2ExampleTest
60.84 ioTvSHPVectorDataFileReader3
60.98 ioTvTileMapImageIOWeb
88.13 dmTvFineRegistrationImageFilterTestWithMeanSquare
112.69 owTvQtWidgetShow
135.51 apTvClMethodGBTImageClassifierQB1
```
##### Step 2
In module OTBTestKernel:
* a set of functions to produce hardcoded images:
* template functions working on both otb::Image and otb::VectorImage
* start with image allocation (buffered region equals to largest possible region)
* fills the image with a formula, an array, ...
* a set of functions to set hardcoded image metadata
* fills any image metadata (projection ref, origin, spacing, OSSIM keywordlist, ...)
* a set of functions to produce hardcoded vector data:
* two families of functions : for otb::VectorData or otb::OGRDataSource
* fills the dataset with hardcoded geometries and fields
* hardcoded metadata (projection ref, ...)
* new generic functions to check the result of a boolean condition (similar to
an `assert` statement). There are blocking and non-blocking flavours (a
blocking check will stop the test execution if it fails).
##### Step 3
`Tv` tests can be re-written to use the in-memory test data. They are composed
of the following steps:
* Instanciate the filter to be tested.
* Instanciate a given fake image
* Set the fake image as input of the filter
* Set the filter parameters
* Call Update() on the filter
* Check the differences with the baseline (if any)
* Check other outputs of the filter (if any)
* If all checks passed: returns EXIT_SUCCESS
* If one check failed:
* write PNG file for the difference image (if any)
* return EXIT_FAILURE
With this strategy, the comparison of test and baseline images in CDash is
preserved. The baselines don't have to be images on disk, they can also be
hardcoded in the test (suited for tiny images, like 10 x 10 pixels).
### Who will be developing the proposed changes?
@salbert & OTB Dev Team