Changeset 131 in pacpussensors for trunk/Vislab


Ignore:
Timestamp:
12/09/16 09:29:50 (8 years ago)
Author:
ldecherf
Message:

Comments

Location:
trunk/Vislab
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Vislab/CMakeLists.txt

    r128 r131  
    11project(VislabComponent)
     2
     3add_definitions( -DVISLAB_COMPONENT_EXPORTS )
    24
    35set(${PROJECT_NAME}_VERSION_MAJOR 0)
     
    2426    ${PACPUS_INCLUDE_DIR}
    2527    ${PACPUS_INCLUDE_DIR}/Pacpus/
    26         C:/Users/ldecherf/Documents/Visual Studio 2015/Projects/dev/pacpus/pacpussensors/Vislab/lib3dv-1.2.0/lib3dv
     28        "C:/Program Files (x86)/lib3dv/include/lib3dv"
    2729)
    2830
     
    5759    ${PLUGIN_HDR}
    5860    VislabComponent.hpp
    59     VislabCamera.hpp
    6061    Display.h
    6162)
     
    104105                      ${QT_LIBRARIES}
    105106                      ${OpenCV_LIBS}
    106                       3dv
     107                      "C:/Program Files (x86)/lib3dv/lib/3dv.lib"
    107108                     )
    108109################################################################################
  • trunk/Vislab/DiskWriter.cpp

    r127 r131  
    77const int MAX_LENGTH_NAME = 512;
    88
     9    /*! A more elaborate description of the constructor*/
    910    DiskWriter::DiskWriter(const QString name, lib3dv::image::type::types imageType) : VislabImageProcessor(name, imageType)
    1011    {
    1112        QDir directory;
     13        /*! For the classic picture */
    1214        if (imageType == lib3dv::image::type::RIGHT_RECTIFIED)
    1315        {
     
    2123
    2224        }
     25        /*! For the disparity picture */
    2326        if (imageType == lib3dv::image::type::DSI)
    2427        {
     
    3336    }
    3437
    35 
     38    /*! process function from the DiskWriter class with a cv:Mat parameter */
    3639    void DiskWriter::process(cv::Mat const& frame)
    3740    {
     
    4548          throw std::runtime_error("cannot save the following frame: " + filename.toStdString());
    4649
     50        /*! Write of the file on the disk */
    4751        mDBTFile.writeRecord(road_time(), 0, filename.toStdString().c_str(), MAX_LENGTH_NAME);
    4852      }
  • trunk/Vislab/Display.cpp

    r127 r131  
    55#include "VislabImageProcessor.h"
    66
     7    /*! A more elaborate description of the constructor*/
    78Display::Display(const QString& windowName, lib3dv::image::type::types imageType) : VislabImageProcessor(windowName, imageType)
    89{
     
    1213}
    1314
     15/*! DisplayFrame function from the Display class with a cv:Mat parameter */
    1416void Display::DisplayFrame(cv::Mat const& frame)
    1517{
     
    1719}
    1820
     21/*! process function from the Display class with a cv:Mat parameter
     22    Emit the signal to diplay the frame
     23*/
    1924void Display::process(cv::Mat const& frame)
    2025{
  • trunk/Vislab/VislabCamera.cpp

    r127 r131  
    2424
    2525//ComponentFactory<VislabCamera> sFactory("VislabComponent");
    26 
     26/*! Constructor */
    2727    VislabCamera::VislabCamera(const QString& name)
    2828     :diskwriterVideo(name,lib3dv::image::type::RIGHT_RECTIFIED),
     
    4141void VislabCamera::open()
    4242{
    43     curr_devices = lib3dv::device::enumerate(boost::asio::ip::address_v4::from_string("192.168.0.2"), 1, error);
     43       
     44    curr_devices = lib3dv::device::enumerate(boost::asio::ip::address_v4::from_string("192.168.0.1"), 1, error);
    4445    if(error != lib3dv::error::NONE)
    4546        std::cout << "[EE] 3dv-client: error detected: " << error << std::endl;
     
    5152    }
    5253      //disk_writer = boost::shared_ptr< ::disk_writer>(new ::disk_writer(paths, data_format, autonumber, params, guid_type, log_level));
     54        std::cout << "[II] 3dv-client: banane" << std::endl;
     55        curr_devices[0].log_level(2);
     56        curr_devices[0].timeout(boost::posix_time::milliseconds(5000));
    5357    curr_devices[0].connect_image_callback(boost::function<void(boost::shared_ptr< const lib3dv::image>, unsigned int)>(boost::bind(&::VislabImageProcessor::image_callback, &displayVideo, _1, _2)));
    5458    curr_devices[0].connect_image_callback(boost::function<void(boost::shared_ptr< const lib3dv::image>, unsigned int)>(boost::bind(&::VislabImageProcessor::image_callback, &displayDisparite, _1, _2)));
     
    5862    if(error != lib3dv::error::NONE)
    5963      std::cout << "[EE] 3dv-client: error detected: " << error << std::endl;
     64        else
     65                std::cout << "[II] 3dv-client: device successfully opened" << std::endl;
    6066}
    6167
  • trunk/Vislab/VislabCamera.hpp

    r127 r131  
    1111// Includes, lib3dv.
    1212#include <lib3dv-1.2.0/lib3dv/device.h>
     13#include <lib3dv-1.2.0/lib3dv/error.h>
    1314#include "DiskWriter.h"
    1415#include "Display.h"
  • trunk/Vislab/VislabComponent.cpp

    r127 r131  
    88#include <Pacpus/kernel/Log.h>
    99#include <Pacpus/kernel/DbiteFileTypes.h>
    10 #include </home/louis/dev/pacpus/pacpusframework/include/Pacpus/kernel/DbiteException.h>
    11 //#include <lib3dv-1.2.0/lib3dv/device.h>
     10#include <Pacpus/kernel/DbiteException.h>
     11#include <lib3dv-1.2.0/lib3dv/device.h>
    1212#include <20150310_lib3dv-1.2.0/src/display.h>
    1313
  • trunk/Vislab/VislabImageProcessor.cpp

    r127 r131  
    99    void VislabImageProcessor::image_callback(boost::shared_ptr< const lib3dv::image> image, unsigned int)
    1010    {
     11                //std::cout << "[II] 3dv-client: Gruyere" << std::endl;
    1112        if(image->m_type == mImageType)
    1213        {
  • trunk/Vislab/VislabImageProcessor.h

    r127 r131  
    2222public:
    2323    VislabImageProcessor(const QString& name, lib3dv::image::type::types imageType);
    24     void image_callback(boost::shared_ptr< const lib3dv::image>, unsigned int);
     24    void image_callback(boost::shared_ptr<const lib3dv::image>, unsigned int);
    2525    virtual void process(cv::Mat const& frame) = 0;
    2626    QString getName();
Note: See TracChangeset for help on using the changeset viewer.