Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
simple.h
1
2
/***************************************************************************
3
* simple.h - Header for ReallySimpleClassifier
4
*
5
* Created: Wed May 18 11:39:10 2005
6
* Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#ifndef __FIREVISION_CLASSIFIERS_SIMPLE_H_
25
#define __FIREVISION_CLASSIFIERS_SIMPLE_H_
26
27
#include <fvclassifiers/classifier.h>
28
#include <fvutils/base/types.h>
29
30
namespace
firevision {
31
#if 0
/* just to make Emacs auto-indent happy */
32
}
33
#endif
34
35
class
ScanlineModel;
36
class
ColorModel;
37
38
class
SimpleColorClassifier
:
public
Classifier
39
{
40
public
:
41
SimpleColorClassifier
(
ScanlineModel
*scanline_model,
42
ColorModel
*color_model,
43
unsigned
int
min_num_points=6,
44
unsigned
int
box_extent = 50,
45
bool
upward =
false
,
46
unsigned
int
neighbourhood_min_match = 8,
47
unsigned
int
grow_by = 10,
48
color_t color = C_ORANGE);
49
50
virtual
std::list< ROI > * classify();
51
52
virtual
void
get_mass_point_of_color(
ROI
*roi,
fawkes::point_t
*massPoint);
53
private
:
54
unsigned
int
consider_neighbourhood(
unsigned
int
x,
unsigned
int
y, color_t what);
55
56
unsigned
char
*src;
57
58
unsigned
int
width;
59
unsigned
int
height;
60
61
unsigned
int
neighbourhood_min_match;
62
unsigned
int
grow_by;
63
64
bool
modified;
65
unsigned
int
min_num_points;
66
unsigned
int
box_extent;
67
68
bool
upward;
69
70
ScanlineModel
*scanline_model;
71
ColorModel
*color_model;
72
73
const
color_t color;
74
};
75
76
}
// end namespace firevision
77
78
#endif
src
libs
fvclassifiers
simple.h
Generated by
1.8.1.1