Ignore:
Timestamp:
Feb 7, 2018, 5:49:27 PM (4 years ago)
Author:
Sanahuja Guillaume
Message:

matrix

File:
1 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);
Note: See TracChangeset for help on using the changeset viewer.