|
OTB
9.0.0
Orfeo Toolbox
|
Go to the documentation of this file.
21 #ifndef otbCloudEstimatorFunctor_h
22 #define otbCloudEstimatorFunctor_h
40 template <
class TInput,
class TOutputValue>
58 inline TOutputValue
operator()(
const TInput& inPix)
const
63 double lCurPixNorm = 0.0;
64 double lGaussianCoef = 1.0;
67 for (
unsigned int i = 0; i < std::min(inPix.Size(),
m_ReferencePixel.Size()); ++i)
69 lCurPixNorm += inPix[i] * inPix[i];
71 lCurPixNorm = std::sqrt(
static_cast<double>(lCurPixNorm));
77 lOut =
static_cast<TOutputValue
>(lRes);
86 for (
unsigned int i = 0; i < ref.Size(); ++i)
TInput GetReferencePixel() const
virtual ~CloudEstimatorFunctor()
constexpr double CONST_PI
This functor computes the spectral angle according to a reference pixel.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
TOutputValue operator()(const TInput &inPix) const
void SetReferencePixel(TInput const &ref)
Functor to help with the cloud detection.
void SetReferencePixel(TInput ref)
void SetVariance(double variance)
double GetVariance() const
SpectralAngleFunctor< TInput, TOutputValue > SpectralAngleFunctorType
SpectralAngleFunctorType m_SpectralAngleFunctor