bazar
1.3.1
Main Page
Modules
Classes
Files
Examples
File List
File Members
garfeild
viewsets
image_classifier.h
Go to the documentation of this file.
1
/*
2
Copyright 2005, 2006 Computer Vision Lab,
3
Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland.
4
All rights reserved.
5
6
This file is part of BazAR.
7
8
BazAR is free software; you can redistribute it and/or modify it under the
9
terms of the GNU General Public License as published by the Free Software
10
Foundation; either version 2 of the License, or (at your option) any later
11
version.
12
13
BazAR is distributed in the hope that it will be useful, but WITHOUT ANY
14
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
PARTICULAR PURPOSE. See the GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License along with
18
BazAR; if not, write to the Free Software Foundation, Inc., 51 Franklin
19
Street, Fifth Floor, Boston, MA 02110-1301, USA
20
*/
21
#ifndef IMAGE_CLASSIFIER_H
22
#define IMAGE_CLASSIFIER_H
23
24
#include <vector>
25
#include <string>
26
using namespace
std;
27
28
#include "
image_class_example.h
"
29
#include "
example_generator.h
"
30
32
33
34
enum
{
35
DETECT_MODEL_POINTS
=0,
36
BUILDING_TREE
=1,
37
FOREST_REFINEMENT
=2,
38
GENERATING_TESTING_SET
=3
39
};
40
41
typedef
void (*
LEARNPROGRESSION
)(int,int,int);
42
47
class
image_classifier
48
{
49
public
:
50
image_classifier
(
int
image_width,
int
image_height,
int
class_number,
LEARNPROGRESSION
LearnProgress=0);
51
image_classifier
(
LEARNPROGRESSION
LearnProgress=0);
52
53
virtual
~image_classifier
() { }
54
55
virtual
bool
load
(
string
/*directory_name*/
) {
return
false
; }
56
virtual
bool
save
(
string
/*directory_name*/
) {
return
false
; }
57
virtual
void
refine(
example_generator
* vg,
int
call_number) = 0;
58
virtual
void
test(
example_generator
* vg,
int
call_number) = 0;
59
virtual
int
recognize(
image_class_example
* pv,
float
* confidence = 0,
int
dummy = 0) = 0 ;
60
virtual
float
* posterior_probabilities(
image_class_example
* pv,
int
dummy = 0) = 0;
61
62
LEARNPROGRESSION
LearnProgression
;
63
64
int
image_width
, image_height;
65
int
class_number
;
66
67
};
68
70
#endif // IMAGE_CLASSIFIER_H
Generated on Tue Jan 15 2013 12:50:21 for bazar by
1.8.1.2