Changeset 214 in flair-src for trunk/demos/OpticalFlow


Ignore:
Timestamp:
02/07/18 17:49:27 (4 years ago)
Author:
Sanahuja Guillaume
Message:

matrix

Location:
trunk/demos/OpticalFlow/uav/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp

    r167 r214  
    2222#include <LowPassFilter.h>
    2323#include <EulerDerivative.h>
    24 #include <cvmatrix.h>
     24#include <Matrix.h>
    2525#include <GridLayout.h>
    2626#include <DataPlot1D.h>
     
    6565  opticalFlowSpeedRaw=new OpticalFlowSpeed(opticalFlowCompensated,uav->GetAhrs(),uav->GetVerticalCamera()->GetLayout()->NewRow(),"vitesse du Flux Optique");
    6666  //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);
    7070  opticalFlowSpeed=new LowPassFilter(opticalFlowSpeedRaw,uav->GetVerticalCamera()->GetLayout()->NewRow(),"Speed lowPass",twoByOneOFS);
    7171  opticalFlowAccelerationRaw=new EulerDerivative(opticalFlowSpeed,uav->GetVerticalCamera()->GetLayout()->NewRow(),"derivative",twoByOneOFAR);
     
    8383
    8484  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);
    8686  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);
    8888  xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(0,0));
    8989  xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(1,0),DataPlot::Blue);
     
    107107 
    108108  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);
    112112  DataPlot1D* xRealVelocityPlot=new DataPlot1D(opticalFlowRealTab->NewRow(),"x speed (m/s)",-2,2);
    113113  DataPlot1D* yRealVelocityPlot=new DataPlot1D(opticalFlowRealTab->LastRowLastCol(),"y speed (m/s)",-2,2);
  • trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h

    r165 r214  
    2020namespace flair {
    2121    namespace core {
    22         class cvmatrix;
     22        class Matrix;
    2323    }
    2424    namespace gui {
     
    5555        flair::gui::GroupBox* opticalFlowGroupBox;
    5656        flair::gui::DoubleSpinBox *maxXSpeed,*maxYSpeed;
    57         flair::core::cvmatrix *opticalFlowReference;
     57        flair::core::Matrix *opticalFlowReference;
    5858        flair::filter::Pid *u_x, *u_y;
    5959        flair::filter::CvtColor* greyCameraImage;
    6060        flair::core::AhrsData *customReferenceOrientation;
    61         flair::core::cvmatrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration;
     61        flair::core::Matrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration;
    6262
    6363    private:
Note: See TracChangeset for help on using the changeset viewer.