Changeset 142 in pacpussensors for trunk/Vislab/VislabComponent.cpp


Ignore:
Timestamp:
03/30/17 16:18:32 (7 years ago)
Author:
ldecherf
Message:

Ajout de la classe outputter et modification d'openCV

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Vislab/VislabComponent.cpp

    r138 r142  
    99#include <Pacpus/kernel/DbiteFileTypes.h>
    1010#include <Pacpus/kernel/DbiteException.h>
    11 #include <lib3dv-1.2.0/lib3dv/device.h>
    12 #include <20150310_lib3dv-1.2.0/src/display.h>
     11#include <lib3dv/device.h>
     12//#include <20150310_lib3dv-1.2.0/src/display.h>
    1313
    1414// Includes, qt.
     
    5858  try
    5959  {
    60     QString filename = name() + ".dbt";
    61     //mDBTFile.open(filename.toStdString(), WriteMode, FILE_JPEG,MAX_LENGTH_NAME);
     60        camera.setVideoOutput(getTypedOutput<cv::Mat, VislabComponent>("image"));
     61        camera.setDispariteOutput(getTypedOutput<cv::Mat, VislabComponent>("disparity"));
    6262  }
    6363  catch (std::exception const& e)
     
    7272VislabComponent::configureComponent(XmlComponentConfig config)
    7373{
    74   try
    75   {
    76     QDir directory;
    77     if (!directory.exists(name().toLatin1()) && !directory.mkdir(name().toLatin1()))
    78       throw std::runtime_error("cannot create the webcam directory");
    79 
    80     //mFilenameTemplate = QString("%1/image-%2.jpg").arg(name());
    81     //LOG_INFO("template filename: " << mFilenameTemplate);
    82   }
    83   catch (std::exception const& e)
    84   {
    85     LOG_ERROR(e.what());
    86     return ComponentBase::CONFIGURED_FAILED;
    87   }
    88 
    8974  return ComponentBase::CONFIGURED_OK;
    9075}
Note: See TracChangeset for help on using the changeset viewer.