source: flair-src/trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h@ 154

Last change on this file since 154 was 154, checked in by Sanahuja Guillaume, 5 years ago

modifs

File size: 2.0 KB
Line 
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
20namespace 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 EulerDerivative;
34 class CvtColor;
35 }
36 namespace sensor {
37 class TargetController;
38 }
39}
40
41class DemoOpticalFlow : public flair::meta::UavStateMachine {
42
43 public:
44 DemoOpticalFlow(flair::sensor::TargetController *controller);
45 ~DemoOpticalFlow();
46
47 protected:
48 void SignalEvent(Event_t event);
49 void ExtraCheckJoystick(void);
50 void ExtraCheckPushButton(void);
51 const flair::core::AhrsData *GetReferenceOrientation(void);
52
53 flair::gui::GroupBox* opticalFlowGroupBox;
54 flair::gui::DoubleSpinBox *maxXSpeed,*maxYSpeed;
55 flair::core::cvmatrix *opticalFlowReference;
56 flair::filter::Pid *u_x, *u_y;
57 flair::filter::LowPassFilter* opticalFlowSpeed;
58 flair::filter::LowPassFilter* opticalFlowAcceleration;
59 flair::filter::CvtColor* greyCameraImage;
60 flair::core::AhrsData *customReferenceOrientation;
61
62 private:
63 flair::filter::OpticalFlow *opticalFlow;
64 flair::filter::OpticalFlowSpeed *opticalFlowSpeedRaw;
65 flair::filter::EulerDerivative *opticalFlowAccelerationRaw;
66 flair::gui::PushButton *startOpticalflow,*stopOpticalflow;
67 void StartOpticalFlow(void);
68 flair::core::cvmatrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration;
69};
70
71#endif // DEMOOPTICALFLOW_H
Note: See TracBrowser for help on using the repository browser.