Changeset 51 in pacpussensors for trunk/PtGreyCameras/Flea3Component.cpp


Ignore:
Timestamp:
06/13/14 18:23:43 (10 years ago)
Author:
phudelai
Message:

New component added: FLEA3GRABBER_H
FLEA3COMPONENT corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PtGreyCameras/Flea3Component.cpp

    r50 r51  
    4545
    4646const int kMaxFilepathLength = 512; // TODO: should be same for all images
    47 
    48 static const string Flea3MemoryName_img = "Flea3_";
    4947
    5048//////////////////////////////////////////////////////////////////////////
     
    8482        // output data
    8583        this->shmem_image = 0;                  // Shared memory control access to the image data
    86 
    87         stereoVision = false;
    88         cam_side = "";
    89        
    9084}
    9185
     
    279273                this->save2dbt = config.getProperty("save2dbt").toInt();
    280274        //---------------------------------------------------------------------------------------------------
    281 
    282         if (config.getProperty("stereoVision") != QString::null)
    283                 stereoVision = config.getBoolProperty("stereoVision");
    284 
    285         if (stereoVision)
    286         {
    287                 if (config.getProperty("cam_side") != QString::null)
    288                         cam_side = config.getProperty("cam_side");
    289         }
    290275
    291276        if (config.getProperty("showdebug") != QString::null)
     
    596581                //std::cout << "Grab new image\n";
    597582                // Retrieve an image
    598         error = cam.RetrieveBuffer( &rawImage );
     583        error = cam.RetrieveBuffer(&rawImage);
    599584        if (error != FlyCapture2::PGRERROR_OK)
    600585        {
     
    630615                {
    631616                        // Convert the raw image
    632                         error = rawImage.Convert( FlyCapture2::PIXEL_FORMAT_MONO8, &convertedImage );
     617                        error = rawImage.Convert(FlyCapture2::PIXEL_FORMAT_MONO8, &convertedImage);
    633618                        if (error != FlyCapture2::PGRERROR_OK)
    634619                        {
     
    640625                {
    641626                        // Convert the raw image
    642                         error = rawImage.Convert( FlyCapture2::PIXEL_FORMAT_BGR, &convertedImage );
     627                        error = rawImage.Convert(FlyCapture2::PIXEL_FORMAT_BGR, &convertedImage);
    643628                        if (error != FlyCapture2::PGRERROR_OK)
    644629                        {
    645                                 LOG_ERROR( error.GetDescription() );
     630                                LOG_ERROR(error.GetDescription());
    646631                                exit(0);
    647632                        }
     
    666651                                this->img_mem = malloc(this->img_mem_size);
    667652       
    668                                 if (this->cam_side == "right" || this->cam_side == "Right")
    669                                         this->shmem_image = new ShMem(QString(Flea3MemoryName_img.c_str() + QString().setNum(camInfo.serialNumber) + "-right").toStdString().c_str(), this->img_mem_size);
    670                                 else if (this->cam_side == "left" || this->cam_side == "Left")
    671                                         this->shmem_image = new ShMem(QString(Flea3MemoryName_img.c_str() + QString().setNum(camInfo.serialNumber) + "-left").toStdString().c_str(), this->img_mem_size);
     653                                this->shmem_image = new ShMem((name() + QString().setNum(camInfo.serialNumber)).toStdString().c_str(), this->img_mem_size);
    672654                                //------------------------------------------------------------------------------------------------
    673655
Note: See TracChangeset for help on using the changeset viewer.