1 | // created: 2011/05/01
|
---|
2 | // filename: DemoOpticalFlow.h
|
---|
3 | //
|
---|
4 | // author: Guillaume Sanahuja
|
---|
5 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
6 | //
|
---|
7 | // version: $Id: $
|
---|
8 | //
|
---|
9 | // purpose: demo optical flow
|
---|
10 | //
|
---|
11 | //
|
---|
12 | /*********************************************************************/
|
---|
13 | //------------
|
---|
14 |
|
---|
15 | #ifndef DEMOOPTICALFLOW_H
|
---|
16 | #define DEMOOPTICALFLOW_H
|
---|
17 |
|
---|
18 | #include <UavStateMachine.h>
|
---|
19 |
|
---|
20 | namespace flair {
|
---|
21 | namespace core {
|
---|
22 | class cvmatrix;
|
---|
23 | }
|
---|
24 | namespace gui {
|
---|
25 | class GroupBox;
|
---|
26 | class DoubleSpinBox;
|
---|
27 | class PushButton;
|
---|
28 | }
|
---|
29 | namespace filter {
|
---|
30 | class OpticalFlow;
|
---|
31 | class OpticalFlowSpeed;
|
---|
32 | class LowPassFilter;
|
---|
33 | class CvtColor;
|
---|
34 | }
|
---|
35 | namespace sensor {
|
---|
36 | class TargetController;
|
---|
37 | }
|
---|
38 | }
|
---|
39 |
|
---|
40 | class DemoOpticalFlow : public flair::meta::UavStateMachine {
|
---|
41 |
|
---|
42 | public:
|
---|
43 | DemoOpticalFlow(flair::sensor::TargetController *controller);
|
---|
44 | ~DemoOpticalFlow();
|
---|
45 |
|
---|
46 | protected:
|
---|
47 | void SignalEvent(Event_t event);
|
---|
48 | void ExtraCheckJoystick(void);
|
---|
49 | void ExtraCheckPushButton(void);
|
---|
50 | const flair::core::AhrsData *GetReferenceOrientation(void);
|
---|
51 |
|
---|
52 | flair::gui::GroupBox* opticalFlowGroupBox;
|
---|
53 | flair::gui::DoubleSpinBox *maxXSpeed,*maxYSpeed;
|
---|
54 | flair::core::cvmatrix *opticalFlowReference;
|
---|
55 | flair::filter::Pid *u_x, *u_y;
|
---|
56 | flair::filter::LowPassFilter* opticalFlowSpeedFiltered;
|
---|
57 | flair::filter::CvtColor* greyCameraImage;
|
---|
58 | flair::core::AhrsData *customReferenceOrientation;
|
---|
59 |
|
---|
60 | private:
|
---|
61 | flair::filter::OpticalFlow *opticalFlow;
|
---|
62 | flair::filter::OpticalFlowSpeed *opticalFlowSpeed;
|
---|
63 | flair::gui::PushButton *startOpticalflow,*stopOpticalflow;
|
---|
64 | void StartOpticalFlow(void);
|
---|
65 | };
|
---|
66 |
|
---|
67 | #endif // DEMOOPTICALFLOW_H
|
---|