[122] | 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 | {
|
---|
[214] | 19 | class Matrix;
|
---|
[122] | 20 | }
|
---|
[274] | 21 | namespace gui {
|
---|
| 22 | class LayoutPosition;
|
---|
| 23 | class SpinBox;
|
---|
| 24 | class DoubleSpinBox;
|
---|
| 25 | class CheckBox;
|
---|
| 26 | }
|
---|
[122] | 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 | *
|
---|
[274] | 39 | * Speed is the mean of all optical flow values.
|
---|
[122] | 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 | */
|
---|
[274] | 52 | OpticalFlowSpeed(const core::IODevice* parent, const gui::LayoutPosition* position,std::string name);
|
---|
[122] | 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 | *
|
---|
[274] | 75 | * Matrix is of sze (2,1). \n
|
---|
[122] | 76 | * First line is speed along x axis. \n
|
---|
| 77 | * Second line is speed along y axis. \n
|
---|
| 78 | */
|
---|
[214] | 79 | core::Matrix *Output() const;
|
---|
[122] | 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 |
|
---|
[214] | 91 | core::Matrix *output;
|
---|
[274] | 92 | gui::DoubleSpinBox *quality;
|
---|
| 93 | gui::CheckBox *weightedAverage;
|
---|
| 94 | gui::CheckBox *timeMultiplication;
|
---|
| 95 | };
|
---|
| 96 |
|
---|
[122] | 97 | } // end namespace filter
|
---|
| 98 | } // end namespace flair
|
---|
| 99 | #endif // OPTICALFLOWSPEED_H
|
---|