Rescale application does not exactly rescale image
Mantis Issue 1341, reported by mgrizonnet, assigned to sdinot, created: 2017-01-19
OTB rescale application documentation indicates that it scales the given image pixel intensity between two given values. No more info are provided
The application is based on the class VectorRescaleIntensityImageFilter which internally do not exactly perform only a rescale:
- By default, the filter computes automaticcally min/max of input image internally
- By default, the filter has an option to clamp output values lower/upper first/last quantile using the ClampThreshold parameter. By default this parameter is set to 0.01 in the constructor.
These behaviors are let by default in the application.
1485251708 - LudovicSince application already compute Minimum and Maximum input, setting RescaleFilter parameter AutomaticInputMinMaxComputation to false avoid the use of clamp threshold.
1485780261 - grizonnetmThanks, note that I think that the behavior of the OTB filter used internally is also rather strange.
The filter is called VectorRescaleIntensityImageFilter and in the constructor the clamp threshold is initialized to 0.01. Doxygen for this filter (currently empty) could document the default behaviour.
Note that there is also an itk::VectorRescaleIntensityImageFilter. It could be nice to know for the user differences between the 2 implementations.
1485790071 - LudovicI also found the internal behavior of the otb::VectorRescaleIntensityImageFilter strange, given that the automatic calculation of minimum or maximum can be done with a simple otb::StreamingMinMaxVectorImageFilter without any clamp value, just as the application do.
But since other filters use it, I prefer to avoid an