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
21namespace firevision {
22
24{
25private:
26 unsigned int y_thresh_, u_thresh_, v_thresh_;
27 unsigned int ref_u_, ref_v_;
28
29public:
30 ColorModelBlack(unsigned int y_thresh = 30,
31 unsigned int u_thresh = 30,
32 unsigned int v_thresh = 30,
33 unsigned int ref_u = 128,
34 unsigned int ref_v = 128);
35
36 color_t determine(unsigned int y, unsigned int u, unsigned int v) const;
37
38 const char *get_name();
39};
40
41} // end namespace firevision
42
43#endif
Detect configurable shades/hues of "black" as a cuboid in YUV space.
const char * get_name()
Get name of color model.
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.
color_t determine(unsigned int y, unsigned int u, unsigned int v) const
Determine classification of YUV pixel.
Color model interface.
Definition: colormodel.h:32