otb issueshttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues2022-03-15T07:08:47Zhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2258Problem for CSK metadata in V82022-03-15T07:08:47ZGaëlle USSEGLIOProblem for CSK metadata in V8### Description
I have noticed a few problems using CSK metadata:
* CSK metadata interface always set HDF5:*filename*://SBI//S01 as image. It does not work if an extraction was made from a CSK product.
* Missing metadata in `parseGDAL` ...### Description
I have noticed a few problems using CSK metadata:
* CSK metadata interface always set HDF5:*filename*://SBI//S01 as image. It does not work if an extraction was made from a CSK product.
* Missing metadata in `parseGDAL` function such as NumberOfColums or GCPTimes
* Missing metadata in `parseGeom`
Here a [patch](/uploads/9a5ca82f7b5266d7734f2cc4252c98e5/csk_metadata.patch).
Let me know if there is a problem.
### Configuration information
OS centos 7.9 (HAL), OTB release-8.08.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2262GetImageProjection return nothing if used with Export/ImportImage2022-03-15T07:07:57ZBenjamin TardyGetImageProjection return nothing if used with Export/ImportImage### Description
After creating an application using an OTB image from `ExportImage` as input, the function `GetImageProjection()` returns an empty string.
In the following code, replacing `Execute()` by `ExecuteAndWriteOutput()` wrotes...### Description
After creating an application using an OTB image from `ExportImage` as input, the function `GetImageProjection()` returns an empty string.
In the following code, replacing `Execute()` by `ExecuteAndWriteOutput()` wrotes a tif with the correct projection (gdalinfo and qgis seem good)
If `SetParameterStringList` with path to .tif image is used, `GetImageProjection` returns the correct projection.
### Steps to reproduce
```python
def do_bandmath(image_name):
bandmath = otb.Registry.CreateApplicationWithoutLogger("BandMath")
bandmath.SetParameterStringList("il", [image_name])
bandmath.SetParameterString("exp", "im1b1")
bandmath.SetParameterString("out", "fake_out.tif")
bandmath.Execute()
otb_im = bandmath.ExportImage("out")
return otb_im, bandmath
otb_image2, dep = do_bandmath("InputImage.tif")
bandmath = otb.Registry.CreateApplication("BandMath")
bandmath.ImportImage("il", otb_image2)
bandmath.SetParameterString("exp", "im1b1+1")
bandmath.SetParameterString("out", "out_image.tif")
bandmath.Execute()
proj = bandmath.GetImageProjection("out")
print(proj) # print empty string
# same behaviour with
# proj = bandmath.GetImageProjection("il")
```
### Configuration information
Linux Ubuntu 20.04, OTB 8.0 , compiled using conda (superbuild)https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2239Link otb 8.0 with boost2022-03-08T07:15:13ZCédric TraizetLink otb 8.0 with boostSome users are unable to compile eternal code and standalone remote modules against OTB 8.0 without calling find-package Boost first.
I failed to reproduce this bug using the binary package for now
The user was using a compiled versio...Some users are unable to compile eternal code and standalone remote modules against OTB 8.0 without calling find-package Boost first.
I failed to reproduce this bug using the binary package for now
The user was using a compiled version using system libraries in a docker8.0.0Thibaut ROMAINThibaut ROMAINhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2253MultiDisparityMapTo3DFilter : Reference keywordlist is missing2022-02-14T11:08:22ZNicolas CadieuxMultiDisparityMapTo3DFilter : Reference keywordlist is missingHi,
I am trying to extract a DEM from Stereo Pairs. These images are scans of 1950 aerial photos. All I know is the lens (152.4mm) and the altitude (20000 feet). None of this is currently coded in the .tif tags but the images are geor...Hi,
I am trying to extract a DEM from Stereo Pairs. These images are scans of 1950 aerial photos. All I know is the lens (152.4mm) and the altitude (20000 feet). None of this is currently coded in the .tif tags but the images are georeferenced. No GPS info is currently added either.
Currently the StereoFrameWork process stops with the following error:
2022-02-02 22:22:37 (FATAL) StereoFramework: `itk::ERROR: MultiDisparityMapTo3DFilter(000002B76FC6CD80): Reference keywordlist is missing`
What is the cause for this error?
According to issue #1822, it indicates that OTB is looking for sensor information? What specific information is it looking for? Can I simulate this information and add it to the .tif tags?
If this should be posted in the user group, please direct me to it. The OTB google user group seems offline.
Thanks for your help
Nicolas
Full log from Monteverdi:
```
2022-02-02 21:33:06 (INFO) StereoFramework: Default RAM limit for OTB is 256 MB
2022-02-02 21:33:06 (INFO) StereoFramework: GDAL maximum cache size is 6548 MB
2022-02-02 21:33:06 (INFO) StereoFramework: OTB will use at most 12 threads
2022-02-02 21:33:06 (INFO) StereoFramework: Elevation management: setting default height above ellipsoid to 0 meters
2022-02-02 21:33:06 (WARNING) StereoFramework: DEM directory : X:/Monteverdi/DEM is not a valid DEM directory
2022-02-02 21:33:06 (INFO) StereoFramework: 1 Stereo couples will be processed
2022-02-02 21:33:07 (INFO) StereoFramework: Processing stereo couple 0 (images index 0 and 1)
2022-02-02 21:33:07 (INFO) StereoFramework: Minimum disparity : -0
2022-02-02 21:33:07 (INFO) StereoFramework: Maximum disparity : 0
2022-02-02 22:22:37 (INFO) StereoFramework: Using robust SSD Metric for BlockMatching.
2022-02-02 22:22:37 (INFO) StereoFramework: Using reverse block-matching to filter incoherent disparity values.
2022-02-02 22:22:37 (FATAL) StereoFramework: itk::ERROR: MultiDisparityMapTo3DFilter(000002B76FC6CD80): Reference keywordlist is missing
```
### Configuration information
OTB 7.4.0 on Windows 10 pro OShttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2246Issue with SetParameterString for ListView parameters2022-02-07T08:32:43ZCédric TraizetIssue with SetParameterString for ListView parameters### Description
in `otb::Application`, for `ListView` parameters, the `SetParameterStringList` selects from a vector of string the corresponding element in the ListView whose name can be found in the vector. However `SetParameterString`...### Description
in `otb::Application`, for `ListView` parameters, the `SetParameterStringList` selects from a vector of string the corresponding element in the ListView whose name can be found in the vector. However `SetParameterString` does not have the same behavior, it selects the element in the listView whose key correspond to the input string. This leads to some weird behavior, as the key names are usually managed by the application and are usually unknown to the users.
### Example
Using `PolygonClassStatistics`:
``` python
import otbApplication as otb
appStat = otb.Registry.CreateApplication("PolygonClassStatistics")
img = "img.tif"
db = "vec.sqlite" # vec.sqlite contains a field named my_id
appStat.SetParameterValue("in",img)
appStat.SetParameterString("out", "stats.xml")
appStat.SetParameterValue("vec",db) # Here UpdateParameters is called by the wrapper and the list view is initialized. for the my_id field, an element is added to the listView, with the key myid (PolygonClassStatistics only keeps the alphanumeric characters) and with name my_id
appStat.SetParameterString("field", "my_id") # error, my_id cannot be found in the list view keys
appStat.SetParameterString("field", "myid") # OK, myid can be found in the list view keys
appStat.SetParameterStringList("field", ["my_id"]) # OK, my_id can be found in the list view names
appStat.ExecuteAndWriteOutput()
```
Using `RadiometricIndices`:
``` python
import otbApplication as otb
app = otb.Registry.CreateApplication("RadiometricIndices")
app.SetParameterStringList("list", ["Vegetation:NDVI"]) # OK, Vegetation:NDVI can be found in the list view names
app.SetParameterString("list", "Vegetation:NDVI") # Error, Vegetation:NDVI can be found in the list view keys
app.SetParameterString("list", "ndvi") # OK, ndvi can be found in the list view keys (but this is not documented)
```
### Note
this really depends on how the application manage the list view, but I think `SetParameterStringList` and `SetParameterString` should have the same behavior, and for most (all ?) applications the behavior of `SetParameterStringList` is the expected one.8.1.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2245DOC: RadiometricIndices wrong Python example2022-02-07T08:32:43ZNicolas NarçonDOC: RadiometricIndices wrong Python exampleWhen trying the Python example of the CookBook (https://www.orfeo-toolbox.org/CookBook/Applications/app_RadiometricIndices.html), the line :
```python
app.SetParameterStringList("list", "Vegetation:NDVI Vegetation:RVI Vegetation:IPVI")
`...When trying the Python example of the CookBook (https://www.orfeo-toolbox.org/CookBook/Applications/app_RadiometricIndices.html), the line :
```python
app.SetParameterStringList("list", "Vegetation:NDVI Vegetation:RVI Vegetation:IPVI")
```
raises the error : `itk::ERROR: ListViewParameter(0x194c680): Value V not found in the list of choices: Vegetation:NDVI, Vegetation:TNDVI, .....`
It should be :
```python
app.SetParameterStringList("list", ["Vegetation:NDVI", "Vegetation:RVI", "Vegetation:IPVI"])
```
I didn't find where to edit this on GitlabCédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2233OTB plugin integration in QGIS >= 3.222022-02-07T08:32:43ZYannick TANGUYOTB plugin integration in QGIS >= 3.22### Target documentation resources
CookBook shall be updated to document recent QGIS changes in OTB plugin integration : https://www.orfeo-toolbox.org/CookBook/QGISInterface.html
### Change requested
QGIS 3.22 does not activate any mor...### Target documentation resources
CookBook shall be updated to document recent QGIS changes in OTB plugin integration : https://www.orfeo-toolbox.org/CookBook/QGISInterface.html
### Change requested
QGIS 3.22 does not activate any more OTB plugins (and some others) by default. As OTB plugin is an official plugin, it only needs to be activated (in the Plugins>Manage plugins menu) and then configured (as it used to be, in the Settings>Options menu).
This is a small change but users need to know how to reactivate OTB plugin.
Tests have been done on Ubuntu 20.04 / QGIS 3.22 RC / OTB 8.0a1 and it works fine.8.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2240DOC: Improve documentation on how to recompile python bindings2022-02-07T08:32:43ZThibaut ROMAINDOC: Improve documentation on how to recompile python bindingsIn the cookbook, the users don't have the information about the system requirements to rebuild the python bindingsIn the cookbook, the users don't have the information about the system requirements to rebuild the python bindings8.0.0Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2221Clean of elevation management geoid parameter2022-02-07T08:32:42ZaurelieemilienClean of elevation management geoid parameter### Description
This issue is a follow up of #2198
In the context of the [cars software](https://github.com/CNES/CARS), we are having troubles to unset the geoid parameter used in the otb applications.
CARS implements two homemade app...### Description
This issue is a follow up of #2198
In the context of the [cars software](https://github.com/CNES/CARS), we are having troubles to unset the geoid parameter used in the otb applications.
CARS implements two homemade applications that use the elevation management:
* [otbDEMReader](https://github.com/CNES/cars/blob/master/otb_remote_module/app/otbDEMReader.cxx) used in a CARS API function called [read_lowres_dem](https://github.com/CNES/cars/blob/master/cars/externals/otb_pipelines.py#L338)
* [otbConvertSensorToGeoPointFast](https://github.com/CNES/cars/blob/master/otb_remote_module/app/otbConvertSensorToGeoPointFast.cxx) used for example in the CARS API function [get_time_ground_direction](https://github.com/CNES/cars/blob/master/cars/core/projection.py#L574)
If several calls of the CARS API function are done in the same run session, the geoid parameter setting is not cleared between each otb application creation and execution. It seems that once `m_GeoidFile` is defined it is not unset when using [`DEMHandler::ClearDEM`](https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/blob/release-7.3/Modules/Adapters/OSSIMAdapters/src/otbDEMHandler.cxx#L111).
It might concerned usual otb application too but I couldn't print the geoid file path used by them (CARS also uses the `StereoRectificationGridGenerator` application).
### Steps to reproduce
Two consecutive calls of the application using the elevation management (I only tried with the CARS API function described above), one with the geoid file set and one without. The `m_GeoidFile` should be both time set to the first geoid file.
### Configuration information
Ubuntu, Centos, OTB 7.x (7.2), installation from binary version.8.0.0Cédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2238Need to document how to build a remote module against binary packages2022-02-07T08:32:42ZYannick TANGUYNeed to document how to build a remote module against binary packages### Target documentation resources
CookBook should add a section (or paragraph here : https://www.orfeo-toolbox.org/CookBook-8.0/RemoteModules.html#installation-and-usage)
### Change requested
I've compiled my remote module againt an ...### Target documentation resources
CookBook should add a section (or paragraph here : https://www.orfeo-toolbox.org/CookBook-8.0/RemoteModules.html#installation-and-usage)
### Change requested
I've compiled my remote module againt an installed OTB, I've a "symbol not found" error when I launched the application.
This is due to a very tricky bug, discussed here : https://gitlab.orfeo-toolbox.org/s1-tiling/s1tilingsupportapplications/-/issues/4#note_93605
When I add this flag, it works fine :
`cmake ../../fast-lsd/ -DOTB_BUILD_MODULE_AS_STANDALONE=True -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0`
This workaround should be documented.8.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1695Support GDAL statitistics into OTB2022-01-21T17:58:26ZMickael SavinaudSupport GDAL statitistics into OTB### What changes will be made and why they would make a better Orfeo ToolBox?
This issue is about computing full-image statistics (min, max, mean, standard-deviation) and histogram on all bands as a Monteverdi-driven background task.
C...### What changes will be made and why they would make a better Orfeo ToolBox?
This issue is about computing full-image statistics (min, max, mean, standard-deviation) and histogram on all bands as a Monteverdi-driven background task.
Currently, since it takes considerable time to process full image-data, Monteverdi approximates this calculation by doing it synchronously on a reduced pixel-data set which is the 512x512 best-fit overview. However, [GDAL](http://gdal.org/) allows to compute full image-data statistics and store them in its meta-data file. This feature could be used by Monteverdi and OTB in order to process full image-data statistics and histogram in a background task and store it for future use.
#### High level description
##### GDAL
At the lowest level, the [GDAL API](gdal.org/index.html) provides some statistics and histogram functions on full or resampled image-data. The following ones could be used:
* [`GDALRasterBand::ComputeStatistics()`](http://gdal.org/classGDALRasterBand.html#a48883c1dae195b21b37b51b10e910f9b): compute statistics (min, max, mean, standard-deviation) and usually caches it, if possible
* [`GDALRasterBand::GetStatistics()`](http://gdal.org/classGDALRasterBand.html#a6aa58b6f0a0c17722b9bf763a96ff069): gets cached statistics, if available
* [`GDALRasterBand::SetStatistics()`](http://gdal.org/classGDALRasterBand.html#a1c60c45cb9535999a5318266cc429421): caches statistics
* [`GDALRasterBand::GetHistogram()`](http://gdal.org/classGDALRasterBand.html#aa21dcb3609bff012e8f217ebb7c81953): computes histogram data
* [`GDALRasterBand::SetDefaultHistogram()`](http://gdal.org/classGDALRasterBand.html#a5f6c617787687085bd61489f20489bf9): stores default histogram data
* [`GDALRasterBand::GetDefaultHistogram()`](http://gdal.org/classGDALRasterBand.html#a0f52f8c98999276f5bd4996b60512424): fetches default histogram data
When histogram-data has been processed by [`GDALRasterBand::GetHistogram()`](http://gdal.org/classGDALRasterBand.html#aa21dcb3609bff012e8f217ebb7c81953) on full image-data, it could be stored as the default histogram for further uses by using [`GDALRasterBand::SetDefaultHistogram()`](http://gdal.org/classGDALRasterBand.html#a5f6c617787687085bd61489f20489bf9).
##### OTB
Similarly to [ITK](http://itk.org), [`otb::ImageFileReader`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageFileReader.html) and [`otb::ImageFileWriter`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageFileWriter.html) use the [`otb::ImageIOBase`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageIOBase.html) abstract class in order to access image-data via polymorphism. The abstract interface of this class could be improved in order to mimic the [GDAL API](gdal.org/index.html) by adding the following pure virtual functions:
* `::SupportsStatistics()`
* `::GetStatistics()`
* `::SetStatistics()`
* `::SupportsHistogram()`
* `::GetHistogram()`
* `::GetDefaultHistogram()`
* `::SetDefaultHistogram()`
This interface can be implemented in the [`otb::GDALImageIO`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1GDALImageIO.html) using the [GDAL API](gdal.org/index.html). Other [`otb::ImageIOBase`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageIOBase.html)-derived classes could use the [ITK](http://itk.org) classes to compute statistics and histogram.
Likewise, the [`otb::ImageFileReader`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageFileReader.html) and [`otb::ImageFileWriter`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageFileWriter.html) interfaces could be improved the same way by simply forwarding calls to their underlying [`otb::ImageIOBase`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageIOBase.html) instances.
##### Monteverdi
A [`QToolButton`](http://doc.qt.io/qt-5/qtoolbutton.html) could be added to the histogram [`QDockWidget`](http://doc.qt.io/qt-5/qdockwidget.html) in order to start the background computation. The [GDAL API](gdal.org/index.html) statistics and histogram functions provide a progress callback which can be linked to a [`QProgressBar`](http://doc.qt.io/qt-5/qprogressbar.html) of the Monteverdi [`QStatusBar`](http://doc.qt.io/qt-5/qstatusbar.html). Also, the background computation could be linked to Monteverdi, thanks to the already existing [`mvd::BackgroundTask`](https://www.orfeo-toolbox.org/doxygen/classmvd_1_1BackgroundTask.html) and [`mvd::AbstractWorkerThread`](https://www.orfeo-toolbox.org/doxygen/classmvd_1_1AbstractWorker.html) classes.
Also, a statistics editor [`QWidget`]() could be implemented and added as a [`QDockWidget`](http://doc.qt.io/qt-5/qdockwidget.html) tabbed with the histogram one.
![I24_GDAL_statistics.ui](/uploads/287773ce887d92855717b6c6b7edb78e/I24_GDAL_statistics.ui.png)
Similarly to the histogram-view, the statistics computation could be done asynchronously and ordered from a [`QToolButton`](http://doc.qt.io/qt-5/qtoolbutton.html) which could be added to the statistics [`QDockWidget`](http://doc.qt.io/qt-5/qdockwidget.html).
#### Risks and benefits
OTB would benefit from an API allowing to drive cached statistics and histogram computation on full image-data directly from [`otb::ImageFileReader`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageFileReader.html) and [`otb::ImageFileWriter`](https://www.orfeo-toolbox.org/doxygen/classotb_1_1ImageFileWriter.html). Moreover, the implementation of a `otb::HistogramDataObject` and some statistics and histogram filters based on the above-mentioned API could be considered (or, maybe the refactoring of existing filters) in order to use statistics and histogram as input and output in OTB pipelines.
However, the use of the **No-Data** value is not stated in the documentation of statistics and histogram functions of the [GDAL API](gdal.org/index.html) and should be checked (source code and/or experimentaly). Moreover, since the user can edit and enable/disable the use of the **No-Data** value which should be taken into acount in the statistics and histograms computations, the statistics and histogram might be inconsistent with image-data setup. Thus, a guarding or identifying mechanism should be discussed (e.g. adding the **No-Data** value of the last computation in the [GDAL](http://gdal.org) meta-data and/or popping-up a warning/failure dialog in Monteverdi).
#### Alternatives for implementations
Not Applicable.
### Who will be developing the proposed changes?
(TBD) :
* Developer who has strong knowledge of OTB and ITK core IO and pipeline.
* Developer who has strong knowledge of Monteverdi [Model-View-Controller](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) architecture.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1510Support configuration option of GDAL as extended filename2022-01-20T16:11:14ZMickael SavinaudSupport configuration option of GDAL as extended filename### What changes will be made and why they would make a better Orfeo ToolBox?
Configuration options of GDAL are very interesting: https://trac.osgeo.org/gdal/wiki/ConfigOptions
I could be interesting to add the possibility to pass these ...### What changes will be made and why they would make a better Orfeo ToolBox?
Configuration options of GDAL are very interesting: https://trac.osgeo.org/gdal/wiki/ConfigOptions
I could be interesting to add the possibility to pass these options trough the extended filename mechanism.
I propose to enhance the extendedFilename class to support them.
#### High level description
Add new key in extended filename syntax: gdal:config=<KEY>=<VALUE>
#### Risks and benefits
Offer the possibility to mimic the gdal config options.
#### Alternatives for implementations
No
### Who will be developing the proposed changes?
Not defined currentlyhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2175Imprecise error messages in Python API for `SetParameters`2022-01-20T14:51:10ZLuc HermitteImprecise error messages in Python API for `SetParameters`When we pass data of the wrong type or even `None` to `otb.Application.SetParams()`, we have no way to know what we did wrong.
In the stack trace we see messages like:
```
File "/path/to/OTB-7.2.0-Linux64/lib/python/otbApplication.p...When we pass data of the wrong type or even `None` to `otb.Application.SetParams()`, we have no way to know what we did wrong.
In the stack trace we see messages like:
```
File "/path/to/OTB-7.2.0-Linux64/lib/python/otbApplication.py", line 2920, in SetParameterString
val = _otbApplication.Application_SetParameterString(self, parameter, value, hasUserValueFlag)
TypeError: in method 'Application_SetParameterString', argument 3 of type 'std::string'
```
But, which parameter is it? What is its value?
Instead, we could have
```
File "/home/luc/dev/tests/OTB-7.2.0-Linux64/lib/python/otbApplication.py", line 3239, in SetParameterValue
raise TypeError('Expected a string for %s, got %s for %s' % (paramKey, type(value), value))
TypeError: Expected a string for elev.geoid, got <class 'NoneType'> for None
```
thanks to something like
```python
def SetParameterValue(self, paramKey, value):
paramType = self.GetParameterType(paramKey)
if paramType in [ParameterType_RAM,
ParameterType_String, ParameterType_InputFilename,
ParameterType_OutputImage, ParameterType_OutputVectorData,
ParameterType_OutputFilename,
ParameterType_Directory, ParameterType_InputImage,
ParameterType_InputVectorData]:
if not isinstance(value, str):
raise TypeError('Expected a string for %s, got %s for %s' % (paramKey, type(value), value))
return self.SetParameterString(paramKey, value)
elif paramType in [ParameterType_InputImageList, ParameterType_InputVectorDataList,
ParameterType_InputFilenameList, ParameterType_StringList,
ParameterType_ListView]:
if not isinstance(value, list):
raise TypeError('Expected a list for %s, got %s for %s' % (paramKey, type(value), value))
return self.SetParameterStringList(paramKey, value)
elif paramType in [ParameterType_Int, ParameterType_Radius]:
if not isinstance(value, int):
raise TypeError('Expected an int for %s, got %s for %s' % (paramKey, type(value), value))
return self.SetParameterInt(paramKey, value)
elif paramType in [ParameterType_Float]:
if not isinstance(value, float):
raise TypeError('Expected a float for %s, got %s for %s' % (paramKey, type(value), value))
return self.SetParameterFloat(paramKey, value)
elif paramType in [ParameterType_Double]:
if not isinstance(value, float):
raise TypeError('Expected a float for %s, got %s for %s' % (paramKey, type(value), value))
return self.SetParameterDouble(paramKey, value)
elif paramType in [ParameterType_Bool]:
if not isinstance(value, bool):
raise TypeError('Expected a bool for %s, got %s for %s' % (paramKey, type(value), value))
return self.SetParameterString(paramKey, str(value) )
elif paramType in [ParameterType_Group]:
return ApplicationProxy(self, paramKey)
elif paramType in [ParameterType_Choice]:
return ApplicationProxy(self, paramKey, value)
else:
print ("Unsupported parameter type '%s' with key '%s'" %(self.GetParameterTypeAsString(paramType) ,paramKey))
return
```
All I've added are tests + `raise`. It seems that some implicit conversions work like `string` to `bool` though. A more precise analysis shall be done in order to ignore the implicit conversions which are already supported.8.1.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2116Add a padding margin to ExtractROI (fit mode)2022-01-10T09:48:42ZYannick TANGUYAdd a padding margin to ExtractROI (fit mode)It could be useful to extract a ROI from the envelope of a vector data (or an image), with an optional margin.
This padding (mode.fit.padding ? or mode.fit.margin) would be optional. A negative value would crop the initial envelope of t...It could be useful to extract a ROI from the envelope of a vector data (or an image), with an optional margin.
This padding (mode.fit.padding ? or mode.fit.margin) would be optional. A negative value would crop the initial envelope of the vector data (or image).
Note : We've developed a remote module (that will soon be available) that contains an application, based on `otb::ROIExtractorImageFilter` for this specific usage : this feature will simplify the remote module and can be useful to other users.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2125MultiThreader(0x557c95dbc260): Exception occurred during SingleMethodExecute2022-01-10T09:46:56Zhanhao20190402MultiThreader(0x557c95dbc260): Exception occurred during SingleMethodExecuteI'm new to OTB, and I got this error when running the StereoFramework, could any one please tell me how to fix it? thanks.
```
sudo ./otbcli_StereoFramework -input.il /home/han/TRI-IMAGE/Ple_Tri_Mel/PHR1A_201202250025259_FR1_PX...I'm new to OTB, and I got this error when running the StereoFramework, could any one please tell me how to fix it? thanks.
```
sudo ./otbcli_StereoFramework -input.il /home/han/TRI-IMAGE/Ple_Tri_Mel/PHR1A_201202250025259_FR1_PX_E144S38_1205_01119/IMG_PHR1A_P_001/IMG_PHR1A_P_201202250025599_SEN_PRG_FC_5108-001_R1C1R2.tif '/home/han/TRI-IMAGE/Ple_Tri_Mel/PHR1A_201202250024589_FR1_PX_E144S38_1205_01084/IMG_PHR1A_P_001/IMG_PHR1A_P_201202250025329_SEN_PRG_FC_5110-001_R1C1R2.tif' -output.res 2.5 -output.out /home/han/dem.tif
2020-11-16 20:10:25 (INFO): Loading kwl metadata from official product in file /home/han/TRI-IMAGE/Ple_Tri_Mel/PHR1A_201202250025259_FR1_PX_E144S38_1205_01119/IMG_PHR1A_P_001/IMG_PHR1A_P_201202250025599_SEN_PRG_FC_5108-001_R1C1R2.tif
2020-11-16 20:10:25 (INFO): Loading kwl metadata from official product in file /home/han/TRI-IMAGE/Ple_Tri_Mel/PHR1A_201202250024589_FR1_PX_E144S38_1205_01084/IMG_PHR1A_P_001/IMG_PHR1A_P_201202250025329_SEN_PRG_FC_5110-001_R1C1R2.tif
2020-11-16 20:10:25 (INFO) StereoFramework: Default RAM limit for OTB is 8000 MB
2020-11-16 20:10:25 (INFO) StereoFramework: GDAL maximum cache size is 391 MB
2020-11-16 20:10:25 (INFO) StereoFramework: OTB will use at most 4 threads
2020-11-16 20:10:25 (INFO) StereoFramework: Elevation management: setting default height above ellipsoid to 0 meters
2020-11-16 20:10:25 (INFO) StereoFramework: 1 Stereo couples will be processed
2020-11-16 20:10:25 (INFO) StereoFramework: Processing stereo couple 0 (images index 0 and 1)
Computing epipolar grids...: 100% [**************************************************] (0s)
2020-11-16 20:10:25 (INFO) StereoFramework: Minimum disparity : -2.15046e+06
2020-11-16 20:10:25 (INFO) StereoFramework: Maximum disparity : 2.15046e+06
Inverting left displacement field ...: 100% [**************************************************] (0s)
2020-11-16 20:10:26 (INFO) StereoFramework: Using robust SSD Metric for BlockMatching.
2020-11-16 20:10:26 (INFO) StereoFramework: Using reverse block-matching to filter incoherent disparity values.
2020-11-16 20:10:26 (INFO) StereoFramework: Default elevation set for Min/Max elevation : 0
2020-11-16 20:10:26 (INFO) StereoFramework: Minimum elevation found : 0
2020-11-16 20:10:26 (INFO) StereoFramework: Maximum elevation found : 0
2020-11-16 20:10:26 (INFO) StereoFramework: Disparity mask formula : (hdisp > -2.15046e+06) and (hdisp < 2.15046e+06) and (mask>0) ? 255 : 0
2020-11-16 20:10:26 (INFO) StereoFramework: Output DSM parameters are estimated from sensor input data.
2020-11-16 20:10:26 (INFO) StereoFramework: Output DSM projection reference:
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
2020-11-16 20:10:26 (INFO): File /home/han/dem.tif will be written in 1073741824 blocks of 0x0 pixels
Writing /home/han/dem.tif...: 0% [ ]2020-11-16 20:10:27 (FATAL) StereoFramework: itk::ERROR: MultiThreader(0x557c95dbc260): Exception occurred during SingleMethodExecute
/home/han/OTB/install/include/ITK-4.13/itkImageConstIterator.h:210:
itk::ERROR: Region ImageRegion (0x7ffcda0b9020)
Dimension: 2
Index: [-2150463, 0]
Size: [3055, 661]
is outside of buffered region ImageRegion (0x557c9593f440)
Dimension: 2
Index: [0, 0]
Size: [3055, 2643]
```https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2201Compilation error with siftfast and test2022-01-10T09:24:45ZMickael SavinaudCompilation error with siftfast and test### Description
When I run compilation of 7.3 with siftfast deactivated and test activated the compilation fails.
### Steps to reproduce
Compile OTB from Superbuild but deactivates siftfast and activate test cf. [CMakeCahe.txt]([CMakeC...### Description
When I run compilation of 7.3 with siftfast deactivated and test activated the compilation fails.
### Steps to reproduce
Compile OTB from Superbuild but deactivates siftfast and activate test cf. [CMakeCahe.txt]([CMakeCache.txt](/uploads/5f97068ec11a18220ff3b5e90c39d10c/CMakeCache.txt))
### Configuration information
Ubuntu 18.04
OTB 7.3 compiled from source by using superbuildhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1513Binary mask filtering application2022-01-10T08:41:31ZCédric TraizetBinary mask filtering application### What changes will be made and why they would make a better Orfeo ToolBox?
New application to filter binary masks (water masks, cloud masks, etc).
#### High level description
The application will be based on the BinaryShapeOpeningI...### What changes will be made and why they would make a better Orfeo ToolBox?
New application to filter binary masks (water masks, cloud masks, etc).
#### High level description
The application will be based on the BinaryShapeOpeningImageFilter class of ITK and more generally on the Label object representation and manipulation framework (see http://www.insight-journal.org/browse/publication/176).
An attribute is computed for each object in the binary mask, where we define an object as a set of connected pixels in the mask. This attribute can be for example the number of pixels in the image.
If the value of the attribute of an object is lower (or higher, depending on a parameter) than a threshold (parameter), the object is then removed by the filter.
For example if the attribute is the number of pixels, the application will remove all the small objects. But other attributes could be used (see Alternatives for implementations)
The connectivity of the pixels (4-connectivity or 8-connectivity) is a parameter of the application.
#### Risks and benefits
This application would be complementary to the BinaryMorphologicalOperation application of the OTB to do image processing on binary images.
#### Alternatives for implementations
1)
The choice of the attribute could be a parameter of the application, Other attributes that could be used
- Physical Size : the size of the object in physical unit. It is equal to the Size multiplicated by the
physical pixel size.
- SizeOnBorder : the number of pixels in the objects which are on the border of the image. A pixel on
several borders (a pixel in a corner) is counted only one time, so the size on border can’t be greater
than the size of the object. This attribute is particulary useful to remove the objects which are touching
too much the border
- PhysicalSizeOnBorder : the physical size of the objects which are on the border of the image
2)
We could also use the BinaryStatisticsOpeningImageFilter class of the ITK : in addition to the mask we provide a feature image (which is the grayscale image to be masked), and the attributes of the objects are computed using the information of the feature image. Possible attributes are :
- Minimum : minimum value in the feature image for the object
- Maximum : Maximum value in the feature image for the object
- Mean : mean of the pixel values in the object
- Sum : Sum of all the pixels values in the object
- Sigma : standard deviation of all the pixels values in the object
- Variance : variance of all the pixels values in the object
- Median : median of all the pixels values in the object
- Kurtosis : kurtosis of all the pixels values in the object
- Skewness : skewness of all the pixels values in the object
3)
Instead of removing all objects whose attribute is inferior to a threshold, it is also possible to keep only the N objects with the highest (or lowest) attribute value. I'm not sure if this feature would be useful in remote sensing.
### Who will be developing the proposed changes?
CSCédric TraizetCédric Traizethttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2188Update Superbuild dependencies (major version)2022-01-07T11:15:51ZMickael SavinaudUpdate Superbuild dependencies (major version)Several dependencies can be updated at major level:
- [ ] glew from 1.13.0 to 2.1.0
- [ ] freeglut from 2.8.1 to 3.2.1
- [ ] libjpeg-turbo from 1.4.1 to 2.0.6
- [x] proj from 6.2.1 to 8.0.0
- [ ] qt from 5.11.3 to 6
- [x] swig from 3.0.7...Several dependencies can be updated at major level:
- [ ] glew from 1.13.0 to 2.1.0
- [ ] freeglut from 2.8.1 to 3.2.1
- [ ] libjpeg-turbo from 1.4.1 to 2.0.6
- [x] proj from 6.2.1 to 8.0.0
- [ ] qt from 5.11.3 to 6
- [x] swig from 3.0.7 to 4.0.28.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2187Update Superbuild dependencies (minor version)2022-01-07T11:15:36ZMickael SavinaudUpdate Superbuild dependencies (minor version)Several dependencies can be updated at minor level :
- [ ] Boost from 1.69 to 1.76
- [ ] CURL from 7.54.1 to 7.76.1
- [x] EXPAT from 2.1.0 (or 2.1.1) to 2.3.0 done in release-7.3 and develop
- [x] GEOS from 3.6.1 (or 3.6.5) to 3.9.1
- [...Several dependencies can be updated at minor level :
- [ ] Boost from 1.69 to 1.76
- [ ] CURL from 7.54.1 to 7.76.1
- [x] EXPAT from 2.1.0 (or 2.1.1) to 2.3.0 done in release-7.3 and develop
- [x] GEOS from 3.6.1 (or 3.6.5) to 3.9.1
- [x] geotiff from 1.5.1 to 1.6.0
- [ ] gsl from 2.3.0 to 2.6.0
- [ ] hdf5 from 1.10.1 (1.10.7) to 1.12
- [ ] libjpeg-turbo from 1.4.1 (or 1.4.2) to 1.5.3
- [ ] netcdf-c from 4.7.3 (4.7.4) to 4.8.0
- [x] OPENCV from 4.1.1 (4.1.2) to 4.5.2
- [x] OPENSSL from 1.0.1 to 1.1.1 done in release-7.3 for security reasons
- [ ] OpenSceneGraph from 3.4.0 (3.4.1) to 3.6.5
- [ ] proj from 6.2.1 to 6.3.2.tar.gz
- [x] qt from 5.11.3 to 5.15.2
- [ ] tiff from 4.2.0 to 4.3.0
- [ ] OpenJPEG from 2.3.0 to 2.4.08.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2244Enforce the chosen ABI in the redistributed cmake files provided for importin...2022-01-07T11:07:22ZJulien OsmanEnforce the chosen ABI in the redistributed cmake files provided for importing OTB in other project### Description
See https://gitlab.orfeo-toolbox.org/s1-tiling/s1tilingsupportapplications/-/issues/4.### Description
See https://gitlab.orfeo-toolbox.org/s1-tiling/s1tilingsupportapplications/-/issues/4.