Changeset 338 in flair-src for trunk/demos/OpticalFlow/uav
- Timestamp:
- Oct 17, 2019, 2:49:35 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to
/branches/sanscv merged eligible
-
Property svn:mergeinfo
set to
-
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp
r314 r338 47 47 48 48 DemoOpticalFlow::DemoOpticalFlow(TargetController *controller): UavStateMachine(controller) { 49 Uav* uav=GetUav();49 Uav* uav=GetUav(); 50 50 if (uav->GetVerticalCamera() == NULL) { 51 51 Err("no vertical camera found\n"); … … 57 57 greyCameraImage=new CvtColor(uav->GetVerticalCamera(),"gray",CvtColor::Conversion_t::ToGray); 58 58 59 uav->GetVerticalCamera()->UseDefaultPlot(greyCameraImage->Output()); // Le defaultPlot de la caméra peut afficher n'importe quoi?59 uav->GetVerticalCamera()->UseDefaultPlot(greyCameraImage->Output()); 60 60 61 61 //optical flow stack … … 77 77 DataPlot1D* xVelocityPlot=new DataPlot1D(opticalFlowTab->NewRow(),"x speed (px/s)",-250,250); 78 78 DataPlot1D* yVelocityPlot=new DataPlot1D(opticalFlowTab->LastRowLastCol(),"y speed (px/s)",-250,250); 79 DataPlot1D* xFirstPointPlot=new DataPlot1D(opticalFlowTab->NewRow(),"x movement first point",-25,25); 80 DataPlot1D* yFirstPointPlot=new DataPlot1D(opticalFlowTab->LastRowLastCol(),"y movement first point",-25,25); 81 // DataPlot1D* xAccelerationPlot=new DataPlot1D(opticalFlowTab->NewRow(),"x_acceleration",-250,250); 82 // DataPlot1D* yAccelerationPlot=new DataPlot1D(opticalFlowTab->LastRowLastCol(),"y_acceleration",-250,250); 83 79 84 80 xVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(0,0)); 85 81 xVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(0,0),DataPlot::Blue); 86 82 yVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(1,0)); 87 83 yVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(1,0),DataPlot::Blue); 88 xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(0,0)); 89 xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(1,0),DataPlot::Blue); 90 xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(2,0),DataPlot::Green); 91 yFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(0,1)); 92 yFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(1,1),DataPlot::Blue); 93 yFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(2,1),DataPlot::Green); 94 // xAccelerationPlot->AddCurve(opticalFlowAccelerationRaw->Matrix()->Element(0,0)); 95 // xAccelerationPlot->AddCurve(opticalFlowAcceleration->Matrix()->Element(0,0),DataPlot::Blue); 96 // yAccelerationPlot->AddCurve(opticalFlowAccelerationRaw->Matrix()->Element(1,0)); 97 // yAccelerationPlot->AddCurve(opticalFlowAcceleration->Matrix()->Element(1,0),DataPlot::Blue); 98 84 99 85 u_x=new Pid(setupLawTab->At(1,0),"u_x"); 100 86 u_x->UseDefaultPlot(graphLawTab->NewRow()); … … 129 115 130 116 void DemoOpticalFlow::SignalEvent(Event_t event) { 117 UavStateMachine::SignalEvent(event); 131 118 switch(event) { 132 119 case Event_t::EnteringControlLoop: -
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h
r214 r338 66 66 flair::filter::OpticalFlowSpeed *opticalFlowSpeedRaw; 67 67 flair::filter::EulerDerivative *opticalFlowAccelerationRaw; 68 flair::gui::PushButton *startOpticalflow,*stopOpticalflow;69 void StartOpticalFlow(void);68 flair::gui::PushButton *startOpticalflow,*stopOpticalflow; 69 void StartOpticalFlow(void); 70 70 flair::filter::LowPassFilter* opticalFlowSpeed; 71 71 flair::filter::LowPassFilter* opticalFlowAcceleration;
Note:
See TracChangeset
for help on using the changeset viewer.