Fawkes API
Fawkes Development Version
colorthreshold.h
1
2
/***************************************************************************
3
* colorthreshold.h - Header of color threshold filter
4
*
5
* Created: Mon Jan 27 06:36:27 2014 +0100
6
* Copyright 2014 Victor Matare
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
#ifndef _FIREVISION_FILTER_COLORTHRESHOLD_H_
24
#define _FIREVISION_FILTER_COLORTHRESHOLD_H_
25
26
#include <fvfilters/filter.h>
27
#include <fvmodels/color/similarity.h>
28
#include <fvutils/color/rgb.h>
29
30
namespace
firevision {
31
32
/**
33
* A filter that uses the VLC color similarity algorithm to mark a certain color.
34
* All pixels that don't match the given ColorModel are drawn in grayscale.
35
*/
36
class
FilterColorThreshold
:
public
Filter
37
{
38
public
:
39
/**
40
* Constructor
41
* @param color_model Accepted color
42
*/
43
FilterColorThreshold
(
ColorModelSimilarity
*color_model);
44
~
FilterColorThreshold
();
45
46
virtual
void
apply
();
47
48
private
:
49
ColorModelSimilarity
*color_model_;
50
};
51
52
}
/* namespace firevision */
53
54
#endif
/* FIREVISION_FILTER_COLORTHRESHOLD_H__ */
firevision::FilterColorThreshold::FilterColorThreshold
FilterColorThreshold(ColorModelSimilarity *color_model)
Constructor.
Definition:
colorthreshold.cpp:32
firevision::FilterColorThreshold::apply
virtual void apply()
Apply the filter.
Definition:
colorthreshold.cpp:42
firevision::ColorModelSimilarity
Matches colors that are similar to given reference colors.
Definition:
similarity.h:41
firevision::FilterColorThreshold
A filter that uses the VLC color similarity algorithm to mark a certain color.
Definition:
colorthreshold.h:37
firevision::Filter
Filter interface.
Definition:
filter.h:33
src
libs
fvfilters
colorthreshold.h
Generated by
1.8.20