Changeset 56 in pacpussensors for trunk/PtGreyCameras


Ignore:
Timestamp:
06/27/14 14:16:15 (10 years ago)
Author:
phudelai
Message:

Vision component updated for StereoVision for PointGrey Flea3

Location:
trunk/PtGreyCameras
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/PtGreyCameras/Flea3Grabber.cpp

    r53 r56  
    144144                        msleep(10);
    145145                }
    146                                
    147146        }
    148147
     
    365364       
    366365        // Camera configuration
    367         this->settings_[indice].auto_FrameRate = false;                                 // Set auto frame rate
     366        this->settings_[indice].auto_FrameRate = true;                                  // Set auto frame rate
    368367        this->settings_[indice].cam_FrameRate = 15.0;                                           // Frame rates in frames per second = FlyCapture2::FRAMERATE_15
    369         this->settings_[indice].auto_Gain = false;                                              // Set auto gain
     368        this->settings_[indice].auto_Gain = true;                                               // Set auto gain
    370369        this->settings_[indice].cam_Gain = 1.0;                                                 // Gain value in db
    371370        this->settings_[indice].auto_Exposure = true;                                           // Set auto exposure
    372         this->settings_[indice].cam_Exposure = 2.414;                                           // Auto exposure in EV
     371        this->settings_[indice].cam_Exposure = 1.322;                                           // Auto exposure in EV
    373372        this->settings_[indice].auto_Shutter = true;                                            // Set auto shutter
    374373        this->settings_[indice].cam_Shutter = 66.639;                                           // Shutter in miliseconds
     
    377376        this->settings_[indice].cam_start_point_left = 0;                                       // Image left point (for standard modes only)
    378377        this->settings_[indice].cam_start_point_top = 0;                                        // Image top point (for standard modes only)
    379         this->settings_[indice].cam_width = 4096;                                                       // Image width (for standard modes only)
    380         this->settings_[indice].cam_height = 2160;                                              // image height (for standard modes only)
     378        this->settings_[indice].cam_width = 1280;                                                       // Image width (for standard modes only)
     379        this->settings_[indice].cam_height = 960;                                               // image height (for standard modes only)
    381380        this->settings_[indice].cam_video_mode = FlyCapture2::VIDEOMODE_FORMAT7;                                // DCAM video modes
    382381        this->settings_[indice].cam_mode = FlyCapture2::MODE_0;                                                         // Camera modes for DCAM formats as well as Format7
     
    428427
    429428        this->is_running = true;
     429        bool triggered = false;
    430430
    431431        // Tmp matrice used because of intelligent pointer of OpenCV and "intelligent" memory free
     
    514514                }
    515515       
    516                 cams.push_back(new FlyCapture2::Camera);        // FlyCapture camera class     
     516                cams.push_back(new FlyCapture2::Camera);        // FlyCapture camera class
    517517
    518518                // Connect to a camerak
     
    550550                        camInfo.firmwareVersion,
    551551                        camInfo.firmwareBuildTime);*/
    552            
     552
    553553                // Query for available Format 7 modes
    554554                FlyCapture2::Format7Info fmt7Info;
     
    698698                                ComponentManager::getInstance()->stop(name());
    699699                        }
     700
     701                        triggered = true;
    700702                }
    701703
     
    715717                        }
    716718                }
     719
    717720                //============================================================================================================
    718721       
     
    747750                cams[masterCamera_]->FireSoftwareTrigger();
    748751                usleep(50000);
     752
    749753                cams[masterCamera_]->FireSoftwareTrigger();
    750754                usleep(50000);
    751755        }
     756
     757        img_sending_ = new ShMem("Flea3Grabber_sending", settings_[0].mMaxImageOutputSize);
     758
    752759
    753760        road_time_t time;
     
    762769                                        LOG_ERROR(error.GetDescription());
    763770                                        continue;
    764                         }
    765                         time = road_time();
    766                 }
     771                        }                       
     772                }
     773
     774                time = road_time();
    767775
    768776                //cout << settings_[1].timeStamp.microSeconds - settings_[0].timeStamp.microSeconds << endl;
     
    832840                                cv::waitKey(1);
    833841                        }
    834                
     842
    835843                        /////////////////////
    836844                        // Write images to disk
     
    943951                        //++imageCount;
    944952                }
     953
     954                // Has to change
     955                this->img_sending_->write((void*)correctedImg[0].data, settings_[0].mMaxImageOutputSize);
    945956        }
    946957               
     
    948959        {
    949960                //====================================== Camera finalization =================================================
    950                 LOG_INFO("Finished grabbing images!");
     961                LOG_INFO(QString("Finished grabbing images!" + QString::number(settings_[i].cam_serial)));
    951962                // Stop capturing images
    952963                error = cams[i]->StopCapture();
  • trunk/PtGreyCameras/Flea3Grabber.h

    r53 r56  
    135135        float rot_[3], trans_[3];
    136136
     137        ShMem * img_sending_;
     138
    137139        std::vector<camSetting> settings_;
    138140        std::vector<ShMem*> shmem_images_;
Note: See TracChangeset for help on using the changeset viewer.