21 #ifndef otbMeanDifference_h
22 #define otbMeanDifference_h
30 template <
class TInput1,
class TInput2,
class TOutput>
40 inline TOutput
operator()(
const TInput1& itA,
const TInput2& itB)
46 for (
unsigned long pos = 0; pos < itA.Size(); ++pos)
49 meanA +=
static_cast<TOutput
>(itA.GetPixel(pos));
50 meanB +=
static_cast<TOutput
>(itB.GetPixel(pos));
52 return static_cast<TOutput
>((meanA - meanB) / itA.Size());
virtual ~MeanDifference()
TOutput operator()(const TInput1 &itA, const TInput2 &itB)
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.