Skip to content

ZonalStatistics app inbv parameter is not taken into account in stats filter

Description

ZonalStatistics app does not filter out nodata value set through the inbv parameter.

Steps to reproduce

See: https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/blob/develop/Modules/Filtering/Statistics/include/otbStreamingStatisticsMapFromLabelImageFilter.h#L100

And implementation of UpdateValue:

https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/blob/develop/Modules/Filtering/Statistics/include/otbStreamingStatisticsMapFromLabelImageFilter.h#L126

In case a nodata is found, the count of pixel is not incremented but remaining stats are.

I have a patch for that (see upcoming MR).

It would be better to update filter test to also test the nodata case.

Configuration information

7.0.0 RC1