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
30namespace 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 */
37{
38public:
39 /**
40 * Constructor
41 * @param color_model Accepted color
42 */
45
46 virtual void apply();
47
48private:
49 ColorModelSimilarity *color_model_;
50};
51
52} /* namespace firevision */
53
54#endif /* FIREVISION_FILTER_COLORTHRESHOLD_H__ */
Matches colors that are similar to given reference colors.
Definition: similarity.h:41
A filter that uses the VLC color similarity algorithm to mark a certain color.
FilterColorThreshold(ColorModelSimilarity *color_model)
Constructor.
virtual void apply()
Apply the filter.
Filter interface.
Definition: filter.h:33