Changeset 64 in pacpussensors for trunk/PtGreyCameras


Ignore:
Timestamp:
09/04/14 11:19:05 (10 years ago)
Author:
phudelai
Message:

Programme détection d'obstacles amélioré

Location:
trunk/PtGreyCameras
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PtGreyCameras/CMakeLists.txt

    r51 r64  
    130130                FILES_TO_MOC
    131131                Flea3Component.h
    132                 #Flea3Grabber.h
     132                Flea3Grabber.h
    133133        )       
    134134endif()
  • trunk/PtGreyCameras/Flea3Grabber.cpp

    r56 r64  
    4343        this->nbrCamera_ = 1;
    4444        this->masterCamera_ = 0;
     45        this->img2send_ = 0;
    4546}
    4647
     
    951952                        //++imageCount;
    952953                }
    953 
    954                 // Has to change
    955                 this->img_sending_->write((void*)correctedImg[0].data, settings_[0].mMaxImageOutputSize);
    956         }
     954               
     955                switch (img2send_)
     956                {
     957                case 0:
     958                        this->img_sending_->write((void*)convertedImage[0].GetData(), settings_[0].mMaxImageOutputSize);
     959                        break;
     960                case 1:
     961                        this->img_sending_->write((void*)correctedImg[0].data, settings_[0].mMaxImageOutputSize);
     962                        break;
     963                case 2:
     964                        this->img_sending_->write((void*)convertedImage[1].GetData(), settings_[0].mMaxImageOutputSize);
     965                        break;
     966                case 3:
     967                        this->img_sending_->write((void*)correctedImg[1].data, settings_[0].mMaxImageOutputSize);
     968                        break;
     969                default:
     970                        // Should not happen
     971                        break;
     972                }
     973        }
    957974               
    958975        for (int i = 0; i < this->nbrCamera_; i++)
     
    9891006        }
    9901007}
     1008
     1009
     1010////////////////////////////////////////////////////////////////////////////////
     1011/// Slot to change the image
     1012////////////////////////////////////////////////////////////////////////////////
     1013void Flea3Grabber::changeImage()
     1014{
     1015        img2send_ = ++img2send_ & 0x03;
     1016}
  • trunk/PtGreyCameras/Flea3Grabber.h

    r56 r64  
    1515
    1616#include <QThread>
    17 #include <QMutex>
    1817#include <QDir>
    1918
     
    3231#include <string>
    3332#include <vector>
    34 #include "../../StdDbtPlayerComponents/ImageBaseStructure.h"
     33#include "../../../Pacpussensors/trunk/StdDbtPlayerComponents/ImageBaseStructure.h"
    3534
    3635namespace pacpus {
     
    102101                                                                                public ComponentBase
    103102{
     103        Q_OBJECT
    104104public:
    105105        //============================= DEFAULT ELEMENTS ===============================================
     
    113113    virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
    114114        //==============================================================================================
    115                
     115
     116        /**
     117        * Initialize default values
     118        */
     119        void InitDefault(int indice);
     120
     121        int img2send_; 
     122
    116123protected:
    117124
     
    123130        bool THREAD_ALIVE;
    124131
    125 public:
    126 
    127         /**
    128         * Initialize default values
    129         */
    130         void InitDefault(int indice);
    131132
    132133private:
     
    139140        std::vector<camSetting> settings_;
    140141        std::vector<ShMem*> shmem_images_;
     142
     143public Q_SLOTS:
     144        void changeImage();
    141145};
    142146
Note: See TracChangeset for help on using the changeset viewer.