Loading...
Searching...
No Matches
SuperProberOp.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#ifndef DRAIN_SPROBER_OP_H
32#define DRAIN_SPROBER_OP_H
33
34// #include <math.h>
35
36
37#include "ImageOp.h"
38
39namespace drain
40{
41namespace image
42{
43
44
45
47
50class SuperProberOp: public ImageOp {
51
52public:
53
54 int threshold = 128;
55 std::string filename;
56
59 int debug = 0;
60
61 inline
62 SuperProberOp() : ImageOp(__FUNCTION__, "Hierarchical segment prober"){
63 parameters.link("threshold", threshold, "min intensity");
64 parameters.link("filename", filename);
65 parameters.link("debug", debug, "Dump intermediate control images etc");
66 }
67
68 void traverseChannel(const Channel & src, Channel & dst) const;
69
70 void traverseChannel2(const Channel & src, Channel & dst) const;
71
72 inline
73 void traverseChannels(const ImageTray<const Channel> & src, ImageTray<Channel> & dst) const {
75 }
76
77
78};
79
80
81} // namespace image
82
83} // namespace drain
84
85#endif
86
87// Drain
Image with static geometry.
Definition ImageChannel.h:60
Base class for image processing functions.
Definition ImageOp.h:49
void traverseChannelsSeparately(const ImageTray< const Channel > &src, ImageTray< Channel > &dst) const
Process each (src,dst) channel pair independently. Raise error if their counts differ.
Definition ImageOp.cpp:340
Container applicable for Channels and Images, with alpha support.
Definition ImageTray.h:267
A base class for computing statistics of segments. As segment is an area of connected pixels.
Definition SuperProberOp.h:50
void traverseChannel(const Channel &src, Channel &dst) const
Apply to single channel.
Definition SuperProberOp.cpp:47
Definition DataSelector.cpp:1277