Loading...
Searching...
No Matches
LineOp.h
1/*
2
3MIT License
4
5Copyright (c) 2017 FMI Open Development / Markus Peura, first.last@fmi.fi
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software and associated documentation files (the "Software"), to deal
9in the Software without restriction, including without limitation the rights
10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11copies of the Software, and to permit persons to whom the Software is
12furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in all
15copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23SOFTWARE.
24
25*/
26/*
27Part of Rack development has been done in the BALTRAD projects part-financed
28by the European Union (European Regional Development Fund and European
29Neighbourhood Partnership Instrument, Baltic Sea Region Programme 2007-2013)
30*/
31
32#ifndef EMITTER_OP_H_
33#define EMITTER_OP_H_
34
35
36//#include <drain/imageops/GammaOp.h>
37//#include <drain/imageops/HighBoostOp.h>
38
39
40#include <drain/image/ImageFile.h>
41#include "DetectorOp.h"
42
43
44//using namespace drain::image;
45
46using namespace drain::image;
47
48namespace rack {
49
51// UNDER CONSTRUCTION.
52// TODO Optional enchancement.
53class LineOp: public DetectorOp {
54
55public:
56
57 /*
58 *
59 * \param sensitivity - "contrast" between horz and vert medians (0.0...1.0) [0=detection, 1.0=overdetection]
60 * \param enhancement - post-enhancement: median reflMin for directional statistics
61 * \param eHeight - post-enhancement: spread radius for directional statistics
62 *
63 */
64
72 LineOp(double lengthMin=5, double widthMax=10.0, double reflMin=-10.0, double reflMin2=std::numeric_limits<double>::min(), double reflMin3=std::numeric_limits<double>::min()) : //, double sensitivity=1.0) : //, double enhancement = 0.0) :
73 DetectorOp(__FUNCTION__, "Detects lines caused by electromagnetic interference.", "emitter.line")
74 {
76 parameters.link("lengthMin", this->lengthMin = lengthMin, "km");
77 parameters.link("widthMax", this->widthMax = widthMax, "deg");
78 parameters.link("reflMin", this->reflMin = reflMin, "dBZ");
79 parameters.link("reflMin2", this->reflMin2 = reflMin2, "dBZ");
80 parameters.link("reflMin3", this->reflMin3 = reflMin3, "dBZ");
81 //parameters.link("sensitivity", this->sensitivity, sensitivity);
82 // parameters.link("enhancement", this->enhancement, enhancement);
83 // parameters.link("eHeight", this->eHeight, eHeight);
84 dataSelector.setQuantities("DBZH"); // ,"DBZV
85 //double d =
86 }
87
88
89 double lengthMin;
90 double widthMax;
91 double reflMin;
92 double reflMin2;
93 double reflMin3;
94
95 double sensitivity;
96 //double enhancement;
97 //float eHeight;
98
99
100protected:
101
102 virtual
103 //void filterImage(const PolarODIM &odimIn, const Image &src, Image &dst) const;
104 void runDetector(const PlainData<PolarSrc> &src, PlainData<PolarDst> &dst) const;
105};
106
107}
108
109#endif /* POLARTOCARTESIANOP_H_ */
110
111// Rack
void setQuantities(const std::string &s)
Sets basic quantities and quality quantities. These sets are separated by '/'.
Definition DataSelector.cpp:282
Base class for anomaly detectors.
Definition DetectorOp.h:49
bool REQUIRE_STANDARD_DATA
Set to true if operator expects fixed background intensities instead of "nodata" defined by the Polar...
Definition DetectorOp.h:216
Quick emitter detection based on subtracting a horizontal segment lengths by inversed vertical segmen...
Definition LineOp.h:53
LineOp(double lengthMin=5, double widthMax=10.0, double reflMin=-10.0, double reflMin2=std::numeric_limits< double >::min(), double reflMin3=std::numeric_limits< double >::min())
Definition LineOp.h:72
virtual void runDetector(const PlainData< PolarSrc > &src, PlainData< PolarDst > &dst) const
Process as sweep (data in one elevation angle)
Definition LineOp.cpp:70
Essential class for storing radar data.
Definition Data.h:300
Namespace for images and image processing tools.
Definition AccumulationArray.cpp:45
Definition DataSelector.cpp:44