36#include <drain/image/Image.h>
39#include "FuzzyDetectorOp.h"
66 DualPolBioMetOp(
const std::string & name,
const std::string & description,
const std::string & classCode) :
FuzzyDetectorOp(name, description, classCode){
98 ftor_t & functor = bank.clone<ftor_t>();
99 functor.set(::abs(zdrAbsThreshold), -::abs(zdrAbsThreshold), 0.0);
107 ftor_t & functor = bank.clone<ftor_t>();
109 if (rhoHVthreshold.min > rhoHVthreshold.max){
110 functor.set(rhoHVthreshold);
112 else if (rhoHVthreshold.min < rhoHVthreshold.max){
113 functor.set(rhoHVthreshold.max, rhoHVthreshold.min);
116 functor.set(rhoHVthreshold.max, 0.8 * rhoHVthreshold.max);
145 BirdOp(
double dbzPeak = -10.0,
double vradDevMin = 1.0,
double rhoHVmax = 0.99,
double zdrAbsMin = 1.0,
double windowWidth = 2500,
double windowHeight = 5.0) :
147 DualPolBioMetOp(__FUNCTION__,
"Estimates bird probability from DBZH, VRAD, RhoHV and ZDR.",
"nonmet.biol.bird"){
149 init(dbzPeak, vradDevMin, rhoHVmax, zdrAbsMin, windowWidth, windowHeight);
155 this->parameters.
copyStruct(op.getParameters(), op, *
this);
162 void init(
double dbzPeak,
double vradDevMax,
double rhoHVmax,
double zdrDevMin,
double windowWidth,
double windowHeight);
170 ftor_t & functor = bank.clone<ftor_t>();
172 if (dbzParam.min < dbzParam.max){
173 functor.set(dbzParam);
175 else if (dbzParam.min > dbzParam.max){
176 functor.set(dbzParam.max, dbzParam.min);
180 functor.set(dbzParam.min+15.0, dbzParam.max-15.0);
206 ftor_t & functor = bank.clone<ftor_t>();
207 functor.set(vradDevThreshold-1.0, vradDevThreshold+1.0);
241 InsectOp(
double dbzMax = 0.0,
double vradDevMax = +5.0,
double rhoHVmax = 0.99,
double zdrAbsMin = 3.0,
double windowWidth = 2500,
double windowHeight = 5.0) :
242 DualPolBioMetOp(__FUNCTION__,
"Probability of insects, based on DBZH, VRAD, RhoHV and ZDR.",
"nonmet.biol.insect"){
243 init(dbzMax, vradDevMax, rhoHVmax, zdrAbsMin, windowWidth, windowHeight);
247 this->parameters.
copyStruct(op.getParameters(), op, *
this);
251 void init(
double dbzMax,
double vradDevMax,
double rhoHVmax,
double zdrDevMin,
double windowWidth,
double windowHeight);
256 ftor_t & functor = bank.clone<ftor_t>();
257 if (dbzParam.min > dbzParam.max){
258 functor.set(dbzParam);
260 else if (dbzParam.min < dbzParam.max){
261 functor.set(dbzParam.max, dbzParam.min);
265 functor.set(dbzParam.min+5.0, dbzParam.max-5.0);
274 ftor_t & functor = bank.clone<ftor_t>();
275 functor.set(vradDevThreshold+1.0, vradDevThreshold-1.0);
virtual const std::string & getName() const
Return the name of an instance.
Definition BeanLike.h:80
A base class for fuzzy functions; also an unary functor.
Definition Fuzzy.h:62
A smooth symmetric peak function that resembles the Gaussian bell curve. Diminishes quicker than Fuzz...
Definition Fuzzy.h:495
A simple linear transition from 0 to 1 .
Definition Fuzzy.h:170
A basic triangular peak function with linear around the peak.
Definition Fuzzy.h:279
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:313
void copyStruct(const ReferenceMap &m, const T &src, T &dst, extLinkPolicy policy=RESERVE)
Experimental. Copies references and values of a structure to another.
Definition ReferenceMap.h:415
Definition DualPolBioMetOp.h:130
BirdOp(double dbzPeak=-10.0, double vradDevMin=1.0, double rhoHVmax=0.99, double zdrAbsMin=1.0, double windowWidth=2500, double windowHeight=5.0)
Definition DualPolBioMetOp.h:145
virtual void init(double dbzPeak, double vradDevMax, double rhoHVmax, double zdrDevMin, double windowWidth, double windowHeight)
Definition DualPolBioMetOp.cpp:47
Definition DualPolBioMetOp.h:61
virtual drain::Fuzzifier< double > & getFuzzifierZDR(LocalFunctorBank &bank) const override
Fuzzifier of ZDR is designed to detect objects that have horizontal or vertical span.
Definition DualPolBioMetOp.h:96
virtual drain::Fuzzifier< double > & getFuzzifierRHOHV(LocalFunctorBank &bank) const override
Fuzzifier of RHOHV shows response on values lower than 1.0.
Definition DualPolBioMetOp.h:105
Base class for BirdOp and InsectOp.
Definition FuzzyDetectorOp.h:78
Definition DualPolBioMetOp.h:224
InsectOp(double dbzMax=0.0, double vradDevMax=+5.0, double rhoHVmax=0.99, double zdrAbsMin=3.0, double windowWidth=2500, double windowHeight=5.0)
Definition DualPolBioMetOp.h:241
Definition FuzzyDetectorOp.h:53
Namespace for images and image processing tools.
Definition AccumulationArray.cpp:45
Definition DataSelector.cpp:44