Changeset 51 in pacpussensors for trunk/PtGreyCameras
- Timestamp:
- Jun 13, 2014, 6:23:43 PM (10 years ago)
- Location:
- trunk/PtGreyCameras
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PtGreyCameras/CMakeLists.txt
r48 r51 107 107 Flea3Component.cpp 108 108 Flea3Component.h 109 Flea3Grabber.cpp 110 Flea3Grabber.h 109 111 ) 110 112 endif() … … 128 130 FILES_TO_MOC 129 131 Flea3Component.h 132 #Flea3Grabber.h 130 133 ) 131 134 endif() -
trunk/PtGreyCameras/Flea3Component.cpp
r50 r51 45 45 46 46 const int kMaxFilepathLength = 512; // TODO: should be same for all images 47 48 static const string Flea3MemoryName_img = "Flea3_";49 47 50 48 ////////////////////////////////////////////////////////////////////////// … … 84 82 // output data 85 83 this->shmem_image = 0; // Shared memory control access to the image data 86 87 stereoVision = false;88 cam_side = "";89 90 84 } 91 85 … … 279 273 this->save2dbt = config.getProperty("save2dbt").toInt(); 280 274 //--------------------------------------------------------------------------------------------------- 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 }290 275 291 276 if (config.getProperty("showdebug") != QString::null) … … 596 581 //std::cout << "Grab new image\n"; 597 582 // Retrieve an image 598 error = cam.RetrieveBuffer( &rawImage);583 error = cam.RetrieveBuffer(&rawImage); 599 584 if (error != FlyCapture2::PGRERROR_OK) 600 585 { … … 630 615 { 631 616 // Convert the raw image 632 error = rawImage.Convert( FlyCapture2::PIXEL_FORMAT_MONO8, &convertedImage);617 error = rawImage.Convert(FlyCapture2::PIXEL_FORMAT_MONO8, &convertedImage); 633 618 if (error != FlyCapture2::PGRERROR_OK) 634 619 { … … 640 625 { 641 626 // Convert the raw image 642 error = rawImage.Convert( FlyCapture2::PIXEL_FORMAT_BGR, &convertedImage);627 error = rawImage.Convert(FlyCapture2::PIXEL_FORMAT_BGR, &convertedImage); 643 628 if (error != FlyCapture2::PGRERROR_OK) 644 629 { 645 LOG_ERROR( error.GetDescription());630 LOG_ERROR(error.GetDescription()); 646 631 exit(0); 647 632 } … … 666 651 this->img_mem = malloc(this->img_mem_size); 667 652 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); 672 654 //------------------------------------------------------------------------------------------------ 673 655 -
trunk/PtGreyCameras/Flea3Component.h
r50 r51 118 118 119 119 bool THREAD_ALIVE; 120 bool stereoVision;121 QString cam_side;122 120 }; 123 121
Note:
See TracChangeset
for help on using the changeset viewer.