31#ifndef RACK_ANALYSIS_DOPPLER_H
32#define RACK_ANALYSIS_DOPPLER_H
37#include <drain/Type.h>
38#include <drain/util/Fuzzy.h>
39#include <drain/util/Functor.h>
40#include <drain/util/FunctorBank.h>
41#include <drain/image/Window.h>
42#include <drain/image/SlidingWindow.h>
44#include "RadarWindows.h"
61 sumI(0.0), sumI2(0.0), sumJ(0.0), sumJ2(0.0), count(0){};
100 this->NI = this->odimSrc.getNyquist(LOG_WARNING);
101 if (this->NI == 0.0){
103 mout.
error(
"Could not derive Nyquist velocity (NI) from metadata." );
159 return atan2(sumJ, sumI);
168 double c = 1.0/
static_cast<double>(count);
169 return ::sqrt((sumI2+sumJ2 - (sumI*sumI+sumJ*sumJ)*c)*c);
181 return ::sqrt(sumI*sumI + sumJ*sumJ) /
static_cast<double>(count);
205 if (count > countMin){
222 this->dst.
put(this->
location, this->odimSrc.undetect);
247 double confidence = this->myFunctor(this->
eccentricity());
249 if (count > countMin){
256 this->dstWeight.putScaled(this->
location.x, this->location.y, confidence);
262 this->dst.
put(this->
location, this->odimSrc.undetect);
263 this->dstWeight.put(this->
location, 0.0);
286 if (count > countMin){
334 if (count > countMin){
335 this->dst.
putScaled(this->
location.x, this->location.y, this->myFunctor(this->eccentricity()));
338 this->dst.
put(this->
location, this->odimSrc.undetect);
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:312
Logger & warn(const TT &... args)
Possible error, but execution can continue.
Definition Log.h:430
Logger & error(const TT &... args)
Echoes.
Definition Log.h:416
void put(size_t i, T x)
Sets the intensity in location i to x. See \address.
Definition ImageFrame.h:192
void putScaled(size_t i, size_t j, double x)
Put intensity using original physical value.
Definition ImageFrame.h:241
Point2D< int > location
Current location of this window.
Definition Window.h:523
void setLoopLimits()
Sets the actual traversal range inside the window. Sometimes applied dynamically by reset().
Definition Window.h:608
Smoothens Doppler field, providing quality computed as eccentricity.
Definition Doppler.h:229
virtual void write()
Write the result in the target image.
Definition Doppler.h:242
virtual void write()
Write the result in the target image.
Definition Doppler.h:201
virtual void write()
Write the result in the target image.
Definition Doppler.h:284
Computes eccentrity of Doppler speeds mapped on a Nyquist-normalized unit window.
Definition Doppler.h:314
virtual void write()
Write the result in the target image.
Definition Doppler.h:327
double radialSpeedConv
Speed scaled to radians [-M_PI, M_PI]: radialSpeedConv = M_PI/this->conf.odimSrc.NI.
Definition Doppler.h:75
virtual double stdDevR()
Returns the radial speed variance [rad] defined as the variance of the cloud of velocity points on un...
Definition Doppler.h:167
virtual void initialize()
Sets class-specific initial values. Does not change general window state (e.g. location)....
Definition Doppler.h:91
virtual void removeTrailingValue(double x)
Handles the converted (natural-scaled) value.
Definition Doppler.h:129
virtual void addLeadingValue(double x)
Handles the converted (natural-scaled) value.
Definition Doppler.h:142
virtual double averageR()
Returns direction [rad] of the dominant speed.
Definition Doppler.h:158
double radialSpeedConvInv
Inverse of radialSpeedConv.
Definition Doppler.h:80
virtual void clear()
Clears the applied statistics. Redefined in derived classes.
Definition Doppler.h:118
virtual double eccentricity()
Returns the eccentricity of the velocity points on unit circle.
Definition Doppler.h:180
Definition RadarWindows.h:84
bool relativeScale
If true, use speed up to -1.0...+1.0 instead of -Vnyq...+Vnyq.
Definition RadarWindows.h:95
void setImageLimits() const
Sets internal limits corresponding to image geometries. Typically using coordHandler.
Definition RadarWindows.h:247
virtual bool reset()
Returns false, if traversal should be ended.
Definition RadarWindows.h:280
void setRangeNorm()
To compensate polar geometry, set applicable range for pixel area scaling.
Definition RadarWindows.h:253
Definition RadarWindows.h:303
Namespace for images and image processing tools.
Definition AccumulationArray.cpp:45
Definition DataSelector.cpp:1277
DRAIN_TYPENAME(void)
Add a specialization for each type of those you want to support.
Definition DataSelector.cpp:44