Fawkes API  Fawkes Development Version
thresholds_black.h
1 
2 /* This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version. A runtime exception applies to
6  * this software (see LICENSE.GPL_WRE file mentioned below for details).
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Library General Public License for more details.
12  *
13  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
14  */
15 
16 #ifndef __FIREVISION_DARKNESS_THRESHOLD_H_
17 #define __FIREVISION_DARKNESS_THRESHOLD_H_
18 
19 #include <fvmodels/color/colormodel.h>
20 
21 namespace firevision {
22 #if 0 /* just to make Emacs auto-indent happy */
23 }
24 #endif
25 
27 {
28  private:
29  unsigned int y_thresh_, u_thresh_, v_thresh_;
30  unsigned int ref_u_, ref_v_;
31  public:
32 
33  ColorModelBlack(unsigned int y_thresh = 30, unsigned int u_thresh = 30, unsigned int v_thresh = 30,
34  unsigned int ref_u = 128, unsigned int ref_v = 128);
35 
36  color_t determine(unsigned int y,
37  unsigned int u,
38  unsigned int v) const;
39 
40  const char * get_name();
41 
42 };
43 
44 } // end namespace firevision
45 
46 #endif
Color model interface.
Definition: colormodel.h:34
color_t determine(unsigned int y, unsigned int u, unsigned int v) const
Determine classification of YUV pixel.
ColorModelBlack(unsigned int y_thresh=30, unsigned int u_thresh=30, unsigned int v_thresh=30, unsigned int ref_u=128, unsigned int ref_v=128)
Initialize black colormodel.
const char * get_name()
Get name of color model.
Detect configurable shades/hues of "black" as a cuboid in YUV space.