Changeset 214 in flair-src for trunk/demos/OpticalFlow
- Timestamp:
- Feb 7, 2018, 5:49:27 PM (7 years ago)
- Location:
- trunk/demos/OpticalFlow/uav/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp
r167 r214 22 22 #include <LowPassFilter.h> 23 23 #include <EulerDerivative.h> 24 #include < cvmatrix.h>24 #include <Matrix.h> 25 25 #include <GridLayout.h> 26 26 #include <DataPlot1D.h> … … 65 65 opticalFlowSpeedRaw=new OpticalFlowSpeed(opticalFlowCompensated,uav->GetAhrs(),uav->GetVerticalCamera()->GetLayout()->NewRow(),"vitesse du Flux Optique"); 66 66 //opticalFlowSpeed=vitesse de déplacement en pixels par seconde (moyenne sur tous les points et division par le delta T) 67 cvmatrix* twoByOneOFS=new cvmatrix((const Thread*)this,2,1,floatType);68 cvmatrix* twoByOneOFAR=new cvmatrix((const Thread*)this,2,1,floatType);69 cvmatrix* twoByOneOFA=new cvmatrix((const Thread*)this,2,1,floatType);67 Matrix* twoByOneOFS=new Matrix((const Thread*)this,2,1,floatType); 68 Matrix* twoByOneOFAR=new Matrix((const Thread*)this,2,1,floatType); 69 Matrix* twoByOneOFA=new Matrix((const Thread*)this,2,1,floatType); 70 70 opticalFlowSpeed=new LowPassFilter(opticalFlowSpeedRaw,uav->GetVerticalCamera()->GetLayout()->NewRow(),"Speed lowPass",twoByOneOFS); 71 71 opticalFlowAccelerationRaw=new EulerDerivative(opticalFlowSpeed,uav->GetVerticalCamera()->GetLayout()->NewRow(),"derivative",twoByOneOFAR); … … 83 83 84 84 xVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(0,0)); 85 xVelocityPlot->AddCurve(opticalFlowSpeed-> Matrix()->Element(0,0),DataPlot::Blue);85 xVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(0,0),DataPlot::Blue); 86 86 yVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(1,0)); 87 yVelocityPlot->AddCurve(opticalFlowSpeed-> Matrix()->Element(1,0),DataPlot::Blue);87 yVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(1,0),DataPlot::Blue); 88 88 xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(0,0)); 89 89 xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(1,0),DataPlot::Blue); … … 107 107 108 108 Tab* opticalFlowRealTab=new Tab(getFrameworkManager()->GetTabWidget(),"real speed"); 109 opticalFlowRealSpeed=new cvmatrix((const Thread*)this,2,1,floatType);110 opticalFlowReference=new cvmatrix((const Thread*)this,2,1,floatType);111 opticalFlowRealAcceleration=new cvmatrix((const Thread*)this,2,1,floatType);109 opticalFlowRealSpeed=new Matrix((const Thread*)this,2,1,floatType); 110 opticalFlowReference=new Matrix((const Thread*)this,2,1,floatType); 111 opticalFlowRealAcceleration=new Matrix((const Thread*)this,2,1,floatType); 112 112 DataPlot1D* xRealVelocityPlot=new DataPlot1D(opticalFlowRealTab->NewRow(),"x speed (m/s)",-2,2); 113 113 DataPlot1D* yRealVelocityPlot=new DataPlot1D(opticalFlowRealTab->LastRowLastCol(),"y speed (m/s)",-2,2); -
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h
r165 r214 20 20 namespace flair { 21 21 namespace core { 22 class cvmatrix;22 class Matrix; 23 23 } 24 24 namespace gui { … … 55 55 flair::gui::GroupBox* opticalFlowGroupBox; 56 56 flair::gui::DoubleSpinBox *maxXSpeed,*maxYSpeed; 57 flair::core:: cvmatrix *opticalFlowReference;57 flair::core::Matrix *opticalFlowReference; 58 58 flair::filter::Pid *u_x, *u_y; 59 59 flair::filter::CvtColor* greyCameraImage; 60 60 flair::core::AhrsData *customReferenceOrientation; 61 flair::core:: cvmatrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration;61 flair::core::Matrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration; 62 62 63 63 private:
Note:
See TracChangeset
for help on using the changeset viewer.