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
box_relative.h
1
2
/***************************************************************************
3
* box_relative.h - A simple implementation of a relative position model
4
* for boxes
5
*
6
* Created: Thu Jun 08 19:21:35 2006
7
* Copyright 2005-2006 Tim Niemueller [www.niemueller.de]
8
*
9
****************************************************************************/
10
11
/* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version. A runtime exception applies to
15
* this software (see LICENSE.GPL_WRE file mentioned below for details).
16
*
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU Library General Public License for more details.
21
*
22
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23
*/
24
25
#ifndef __FIREVISION_MODELS_RELPOS_BOX_H_
26
#define __FIREVISION_MODELS_RELPOS_BOX_H_
27
28
#include <fvmodels/relative_position/relativepositionmodel.h>
29
30
// include <utils/kalman_filter/ckalman_filter_2dim.h>
31
32
namespace
firevision {
33
#if 0
/* just to make Emacs auto-indent happy */
34
}
35
#endif
36
37
class
BoxRelative
:
public
RelativePositionModel
38
{
39
public
:
40
BoxRelative
(
unsigned
int
image_width,
unsigned
int
image_height,
41
float
camera_height,
42
float
camera_offset_x,
float
camera_offset_y,
43
float
camera_ori,
44
float
horizontal_angle,
float
vertical_angle
45
);
46
47
virtual
const
char
* get_name()
const
;
48
virtual
void
set_center(
float
x,
float
y);
49
virtual
void
set_center(
const
center_in_roi_t
& c);
50
virtual
void
set_radius(
float
r);
51
52
virtual
void
set_pan_tilt(
float
pan = 0.0f,
float
tilt = 0.0f);
53
virtual
void
get_pan_tilt(
float
*pan,
float
*tilt)
const
;
54
55
virtual
void
set_horizontal_angle(
float
angle_deg);
56
virtual
void
set_vertical_angle(
float
angle_deg);
57
58
virtual
float
get_distance()
const
;
59
60
virtual
float
get_x()
const
;
61
virtual
float
get_y()
const
;
62
63
virtual
float
get_bearing()
const
;
64
virtual
float
get_slope()
const
;
65
66
virtual
void
calc();
67
virtual
void
calc_unfiltered();
68
virtual
void
reset();
69
70
virtual
bool
is_pos_valid()
const
;
71
72
private
:
73
float
DEFAULT_X_VARIANCE;
74
float
DEFAULT_Y_VARIANCE;
75
76
float
pan_rad_per_pixel;
77
float
tilt_rad_per_pixel;
78
79
center_in_roi_t
center;
80
float
pan;
81
float
tilt;
82
83
float
horizontal_angle;
84
float
vertical_angle;
85
86
unsigned
int
image_width;
87
unsigned
int
image_height;
88
89
float
camera_height;
90
float
camera_offset_x;
91
float
camera_offset_y;
92
float
camera_orientation;
93
94
float
last_x;
95
float
last_y;
96
bool
last_available;
97
float
box_x;
98
float
box_y;
99
float
bearing;
100
float
slope;
101
float
distance_box_motor;
102
float
distance_box_cam;
103
104
/*
105
float var_proc_x;
106
float var_proc_y;
107
float var_meas_x;
108
float var_meas_y;
109
kalmanFilter2Dim *kalman_filter;
110
111
void applyKalmanFilter();
112
*/
113
};
114
115
}
// end namespace firevision
116
117
#endif // __FIREVISION_MODELS_RELPOS_BOX_H_
118
src
libs
fvmodels
relative_position
box_relative.h
Generated by
1.8.1.1