Changeset 56 in pacpussensors for trunk/PtGreyCameras
- Timestamp:
- Jun 27, 2014, 2:16:15 PM (10 years ago)
- Location:
- trunk/PtGreyCameras
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PtGreyCameras/Flea3Grabber.cpp
r53 r56 144 144 msleep(10); 145 145 } 146 147 146 } 148 147 … … 365 364 366 365 // Camera configuration 367 this->settings_[indice].auto_FrameRate = false; // Set auto frame rate366 this->settings_[indice].auto_FrameRate = true; // Set auto frame rate 368 367 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 gain368 this->settings_[indice].auto_Gain = true; // Set auto gain 370 369 this->settings_[indice].cam_Gain = 1.0; // Gain value in db 371 370 this->settings_[indice].auto_Exposure = true; // Set auto exposure 372 this->settings_[indice].cam_Exposure = 2.414; // Auto exposure in EV371 this->settings_[indice].cam_Exposure = 1.322; // Auto exposure in EV 373 372 this->settings_[indice].auto_Shutter = true; // Set auto shutter 374 373 this->settings_[indice].cam_Shutter = 66.639; // Shutter in miliseconds … … 377 376 this->settings_[indice].cam_start_point_left = 0; // Image left point (for standard modes only) 378 377 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) 381 380 this->settings_[indice].cam_video_mode = FlyCapture2::VIDEOMODE_FORMAT7; // DCAM video modes 382 381 this->settings_[indice].cam_mode = FlyCapture2::MODE_0; // Camera modes for DCAM formats as well as Format7 … … 428 427 429 428 this->is_running = true; 429 bool triggered = false; 430 430 431 431 // Tmp matrice used because of intelligent pointer of OpenCV and "intelligent" memory free … … 514 514 } 515 515 516 cams.push_back(new FlyCapture2::Camera); // FlyCapture camera class 516 cams.push_back(new FlyCapture2::Camera); // FlyCapture camera class 517 517 518 518 // Connect to a camerak … … 550 550 camInfo.firmwareVersion, 551 551 camInfo.firmwareBuildTime);*/ 552 552 553 553 // Query for available Format 7 modes 554 554 FlyCapture2::Format7Info fmt7Info; … … 698 698 ComponentManager::getInstance()->stop(name()); 699 699 } 700 701 triggered = true; 700 702 } 701 703 … … 715 717 } 716 718 } 719 717 720 //============================================================================================================ 718 721 … … 747 750 cams[masterCamera_]->FireSoftwareTrigger(); 748 751 usleep(50000); 752 749 753 cams[masterCamera_]->FireSoftwareTrigger(); 750 754 usleep(50000); 751 755 } 756 757 img_sending_ = new ShMem("Flea3Grabber_sending", settings_[0].mMaxImageOutputSize); 758 752 759 753 760 road_time_t time; … … 762 769 LOG_ERROR(error.GetDescription()); 763 770 continue; 764 } 765 time = road_time(); 766 } 771 } 772 } 773 774 time = road_time(); 767 775 768 776 //cout << settings_[1].timeStamp.microSeconds - settings_[0].timeStamp.microSeconds << endl; … … 832 840 cv::waitKey(1); 833 841 } 834 842 835 843 ///////////////////// 836 844 // Write images to disk … … 943 951 //++imageCount; 944 952 } 953 954 // Has to change 955 this->img_sending_->write((void*)correctedImg[0].data, settings_[0].mMaxImageOutputSize); 945 956 } 946 957 … … 948 959 { 949 960 //====================================== Camera finalization ================================================= 950 LOG_INFO( "Finished grabbing images!");961 LOG_INFO(QString("Finished grabbing images!" + QString::number(settings_[i].cam_serial))); 951 962 // Stop capturing images 952 963 error = cams[i]->StopCapture(); -
trunk/PtGreyCameras/Flea3Grabber.h
r53 r56 135 135 float rot_[3], trans_[3]; 136 136 137 ShMem * img_sending_; 138 137 139 std::vector<camSetting> settings_; 138 140 std::vector<ShMem*> shmem_images_;
Note:
See TracChangeset
for help on using the changeset viewer.