36#include <drain/image/Image.h>
37#include <drain/image/Window.h>
38#include <drain/imageops/ImageOp.h>
41#include "FuzzyDetectorOp.h"
68 DualPolBioMetOp(
const std::string & name,
const std::string & description,
const std::string & classCode) :
FuzzyDetectorOp(name, description, classCode){
100 ftor_t & functor = bank.clone<ftor_t>();
101 functor.set(::abs(zdrAbsThreshold), -::abs(zdrAbsThreshold), 0.0);
109 ftor_t & functor = bank.clone<ftor_t>();
111 if (rhoHVthreshold.min > rhoHVthreshold.max){
112 functor.set(rhoHVthreshold);
114 else if (rhoHVthreshold.min < rhoHVthreshold.max){
115 functor.set(rhoHVthreshold.max, rhoHVthreshold.min);
118 functor.set(rhoHVthreshold.max, 0.8 * rhoHVthreshold.max);
147 BirdOp(
double dbzPeak = -10.0,
double vradDevMin = 1.0,
double rhoHVmax = 0.99,
double zdrAbsMin = 1.0,
double windowWidth = 2500,
double windowHeight = 5.0) :
149 DualPolBioMetOp(__FUNCTION__,
"Estimates bird probability from DBZH, VRAD, RhoHV and ZDR.",
"nonmet.biol.bird"){
151 init(dbzPeak, vradDevMin, rhoHVmax, zdrAbsMin, windowWidth, windowHeight);
157 this->parameters.
copyStruct(op.getParameters(), op, *
this);
164 void init(
double dbzPeak,
double vradDevMax,
double rhoHVmax,
double zdrDevMin,
double windowWidth,
double windowHeight);
172 ftor_t & functor = bank.clone<ftor_t>();
174 if (dbzParam.min < dbzParam.max){
175 functor.set(dbzParam);
177 else if (dbzParam.min > dbzParam.max){
178 functor.set(dbzParam.max, dbzParam.min);
182 functor.set(dbzParam.min+15.0, dbzParam.max-15.0);
208 ftor_t & functor = bank.clone<ftor_t>();
209 functor.set(vradDevThreshold-1.0, vradDevThreshold+1.0);
243 InsectOp(
double dbzMax = 0.0,
double vradDevMax = +5.0,
double rhoHVmax = 0.99,
double zdrAbsMin = 3.0,
double windowWidth = 2500,
double windowHeight = 5.0) :
244 DualPolBioMetOp(__FUNCTION__,
"Probability of insects, based on DBZH, VRAD, RhoHV and ZDR.",
"nonmet.biol.insect"){
245 init(dbzMax, vradDevMax, rhoHVmax, zdrAbsMin, windowWidth, windowHeight);
249 this->parameters.
copyStruct(op.getParameters(), op, *
this);
253 void init(
double dbzMax,
double vradDevMax,
double rhoHVmax,
double zdrDevMin,
double windowWidth,
double windowHeight);
258 ftor_t & functor = bank.clone<ftor_t>();
259 if (dbzParam.min > dbzParam.max){
260 functor.set(dbzParam);
262 else if (dbzParam.min < dbzParam.max){
263 functor.set(dbzParam.max, dbzParam.min);
267 functor.set(dbzParam.min+5.0, dbzParam.max-5.0);
276 ftor_t & functor = bank.clone<ftor_t>();
277 functor.set(vradDevThreshold+1.0, vradDevThreshold-1.0);
virtual const std::string & getName() const
Return the name of an instance.
Definition BeanLike.h:82
A base class for fuzzy functions; also an unary functor.
Definition Fuzzy.h:55
A smooth symmetric peak function that resembles the Gaussian bell curve. Diminishes quicker than Fuzz...
Definition Fuzzy.h:470
A basic, linear transition from 0 to scale between (start) and (end) .
Definition Fuzzy.h:154
A basic triangular peak function with linear around the peak.
Definition Fuzzy.h:262
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:312
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:407
Definition DualPolBioMetOp.h:132
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:147
virtual void init(double dbzPeak, double vradDevMax, double rhoHVmax, double zdrDevMin, double windowWidth, double windowHeight)
Definition DualPolBioMetOp.cpp:62
Definition DualPolBioMetOp.h:63
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:98
virtual drain::Fuzzifier< double > & getFuzzifierRHOHV(LocalFunctorBank &bank) const override
Fuzzifier of RHOHV shows response on values lower than 1.0.
Definition DualPolBioMetOp.h:107
Base class for BirdOp and InsectOp.
Definition FuzzyDetectorOp.h:90
Definition DualPolBioMetOp.h:226
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:243
Definition FuzzyDetectorOp.h:65
Namespace for images and image processing tools.
Definition AccumulationArray.cpp:45
Definition DataSelector.cpp:44