1 | /*!
|
---|
2 | * \file OpticalFlowSpeed.h
|
---|
3 | * \brief Optical flow speed calculation
|
---|
4 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
5 | * \date 2012/04/12
|
---|
6 | * \version 4.0
|
---|
7 | */
|
---|
8 |
|
---|
9 |
|
---|
10 | #ifndef OPTICALFLOWSPEED_H
|
---|
11 | #define OPTICALFLOWSPEED_H
|
---|
12 |
|
---|
13 | #include <IODevice.h>
|
---|
14 |
|
---|
15 | namespace flair
|
---|
16 | {
|
---|
17 | namespace core
|
---|
18 | {
|
---|
19 | class Matrix;
|
---|
20 | }
|
---|
21 | namespace gui {
|
---|
22 | class LayoutPosition;
|
---|
23 | class SpinBox;
|
---|
24 | class DoubleSpinBox;
|
---|
25 | class CheckBox;
|
---|
26 | }
|
---|
27 | }
|
---|
28 |
|
---|
29 | namespace flair
|
---|
30 | {
|
---|
31 | namespace filter
|
---|
32 | {
|
---|
33 | class OpticalFlow;
|
---|
34 |
|
---|
35 | /*! \class OpticalFlowSpeed
|
---|
36 | *
|
---|
37 | * \brief Optical flow speed calculation
|
---|
38 | *
|
---|
39 | * Speed is the mean of all optical flow values.
|
---|
40 | */
|
---|
41 | class OpticalFlowSpeed : public core::IODevice
|
---|
42 | {
|
---|
43 | public:
|
---|
44 | /*!
|
---|
45 | * \brief Constructor
|
---|
46 | *
|
---|
47 | * Construct OpticalFlowSpeed.
|
---|
48 | *
|
---|
49 | * \param parent parent
|
---|
50 | * \param name name
|
---|
51 | */
|
---|
52 | OpticalFlowSpeed(const core::IODevice* parent, const gui::LayoutPosition* position,std::string name);
|
---|
53 |
|
---|
54 | /*!
|
---|
55 | * \brief Destructor
|
---|
56 | *
|
---|
57 | */
|
---|
58 | ~OpticalFlowSpeed();
|
---|
59 |
|
---|
60 | /*!
|
---|
61 | * \brief Speed along x axis
|
---|
62 | *
|
---|
63 | */
|
---|
64 | float Vx(void) const;
|
---|
65 |
|
---|
66 | /*!
|
---|
67 | * \brief Speed along y axis
|
---|
68 | *
|
---|
69 | */
|
---|
70 | float Vy(void) const;
|
---|
71 |
|
---|
72 | /*!
|
---|
73 | * \brief Output matrix
|
---|
74 | *
|
---|
75 | * Matrix is of sze (2,1). \n
|
---|
76 | * First line is speed along x axis. \n
|
---|
77 | * Second line is speed along y axis. \n
|
---|
78 | */
|
---|
79 | core::Matrix *Output() const;
|
---|
80 |
|
---|
81 | private:
|
---|
82 | /*!
|
---|
83 | * \brief Update using provided datas
|
---|
84 | *
|
---|
85 | * Reimplemented from IODevice.
|
---|
86 | *
|
---|
87 | * \param data data from the parent to process
|
---|
88 | */
|
---|
89 | void UpdateFrom(const core::io_data *data);
|
---|
90 |
|
---|
91 | core::Matrix *output;
|
---|
92 | gui::DoubleSpinBox *quality;
|
---|
93 | gui::CheckBox *weightedAverage;
|
---|
94 | gui::CheckBox *timeMultiplication;
|
---|
95 | };
|
---|
96 |
|
---|
97 | } // end namespace filter
|
---|
98 | } // end namespace flair
|
---|
99 | #endif // OPTICALFLOWSPEED_H
|
---|