[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 |
|
---|
[338] | 15 | namespace flair
|
---|
[122] | 16 | {
|
---|
[338] | 17 | namespace core
|
---|
[122] | 18 | {
|
---|
[214] | 19 | class Matrix;
|
---|
[122] | 20 | }
|
---|
[274] | 21 | namespace gui {
|
---|
| 22 | class LayoutPosition;
|
---|
| 23 | }
|
---|
[122] | 24 | }
|
---|
| 25 |
|
---|
[338] | 26 | class OpticalFlowSpeed_impl;
|
---|
| 27 |
|
---|
| 28 | namespace flair
|
---|
[122] | 29 | {
|
---|
[338] | 30 | namespace filter
|
---|
[122] | 31 | {
|
---|
| 32 | class OpticalFlow;
|
---|
| 33 |
|
---|
| 34 | /*! \class OpticalFlowSpeed
|
---|
| 35 | *
|
---|
| 36 | * \brief Optical flow speed calculation
|
---|
| 37 | *
|
---|
[274] | 38 | * Speed is the mean of all optical flow values.
|
---|
[122] | 39 | */
|
---|
| 40 | class OpticalFlowSpeed : public core::IODevice
|
---|
| 41 | {
|
---|
| 42 | public:
|
---|
| 43 | /*!
|
---|
| 44 | * \brief Constructor
|
---|
| 45 | *
|
---|
| 46 | * Construct OpticalFlowSpeed.
|
---|
| 47 | *
|
---|
| 48 | * \param parent parent
|
---|
| 49 | * \param name name
|
---|
| 50 | */
|
---|
[274] | 51 | OpticalFlowSpeed(const core::IODevice* parent, const gui::LayoutPosition* position,std::string name);
|
---|
[122] | 52 |
|
---|
| 53 | /*!
|
---|
| 54 | * \brief Destructor
|
---|
| 55 | *
|
---|
| 56 | */
|
---|
| 57 | ~OpticalFlowSpeed();
|
---|
| 58 |
|
---|
| 59 | /*!
|
---|
| 60 | * \brief Speed along x axis
|
---|
| 61 | *
|
---|
| 62 | */
|
---|
| 63 | float Vx(void) const;
|
---|
| 64 |
|
---|
| 65 | /*!
|
---|
| 66 | * \brief Speed along y axis
|
---|
| 67 | *
|
---|
| 68 | */
|
---|
| 69 | float Vy(void) const;
|
---|
| 70 |
|
---|
| 71 | /*!
|
---|
| 72 | * \brief Output matrix
|
---|
| 73 | *
|
---|
[274] | 74 | * Matrix is of sze (2,1). \n
|
---|
[122] | 75 | * First line is speed along x axis. \n
|
---|
| 76 | * Second line is speed along y axis. \n
|
---|
| 77 | */
|
---|
[214] | 78 | core::Matrix *Output() const;
|
---|
[122] | 79 |
|
---|
| 80 | private:
|
---|
| 81 | /*!
|
---|
| 82 | * \brief Update using provided datas
|
---|
| 83 | *
|
---|
| 84 | * Reimplemented from IODevice.
|
---|
| 85 | *
|
---|
| 86 | * \param data data from the parent to process
|
---|
| 87 | */
|
---|
| 88 | void UpdateFrom(const core::io_data *data);
|
---|
[338] | 89 |
|
---|
| 90 | OpticalFlowSpeed_impl *pimpl_;
|
---|
[274] | 91 | };
|
---|
| 92 |
|
---|
[122] | 93 | } // end namespace filter
|
---|
| 94 | } // end namespace flair
|
---|
| 95 | #endif // OPTICALFLOWSPEED_H
|
---|