Fawkes API  Fawkes Development Version
threshold.h
1 
2 /***************************************************************************
3  * threshold.h - Header of threshold filter
4  *
5  * Created: Tue Jun 07 14:25:53 2005
6  * Copyright 2005-2012 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version. A runtime exception applies to
13  * this software (see LICENSE.GPL_WRE file mentioned below for details).
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
21  */
22 
23 #if ! (defined(HAVE_IPP) || defined(HAVE_OPENCV))
24 #error "Neither IPP nor OpenCV installed"
25 #endif
26 
27 #ifndef __FIREVISION_FILTER_THRESHOLD_H_
28 #define __FIREVISION_FILTER_THRESHOLD_H_
29 
30 #include <fvfilters/filter.h>
31 
32 namespace firevision {
33 #if 0 /* just to make Emacs auto-indent happy */
34 }
35 #endif
36 
37 class FilterThreshold : public Filter
38 {
39  public:
40  FilterThreshold(unsigned char min = 128, unsigned char min_replace = 0,
41  unsigned char max = 127, unsigned char max_replace = 255);
42 
43  void set_thresholds(unsigned char min, unsigned char min_replace,
44  unsigned char max, unsigned char max_replace);
45 
46  virtual void apply();
47 
48  private:
49  unsigned char max;
50  unsigned char min;
51  unsigned char min_replace;
52  unsigned char max_replace;
53 
54 };
55 
56 } // end namespace firevision
57 
58 #endif
FilterThreshold(unsigned char min=128, unsigned char min_replace=0, unsigned char max=127, unsigned char max_replace=255)
Constructor.
Definition: threshold.cpp:62
Filter interface.
Definition: filter.h:35
Threshold filter.
Definition: threshold.h:37
virtual void apply()
Apply the filter.
Definition: threshold.cpp:97
void set_thresholds(unsigned char min, unsigned char min_replace, unsigned char max, unsigned char max_replace)
Set new thresholds.
Definition: threshold.cpp:86