- Timestamp:
- Oct 8, 2014, 3:02:31 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CMakeLists.txt
r67 r68 85 85 # add_subdirectory(Alasca) 86 86 #add_subdirectory(CanGateway) 87 #add_subdirectory(PtGreyCameras)87 add_subdirectory(PtGreyCameras) 88 88 # add_subdirectory(Dualshock) 89 add_subdirectory(PacpusSocket)89 # add_subdirectory(PacpusSocket) 90 90 # add_subdirectory(Sick) 91 #add_subdirectory(StereoVisionDisparity)91 add_subdirectory(StereoVisionDisparity) 92 92 #add_subdirectory(SensorsApplication) 93 93 # add_subdirectory(StdDbtPlayerComponents) 94 94 # add_subdirectory(Wifibot) 95 add_subdirectory(Gps)95 #add_subdirectory(Gps) 96 96 #add_subdirectory(SpanCPTComponent) 97 add_subdirectory(NMEA0183)98 add_subdirectory(OpencvVideo)97 #add_subdirectory(NMEA0183) 98 #add_subdirectory(OpencvVideo) 99 99 100 100 # ======================================== -
trunk/PtGreyCameras/Flea3Grabber.cpp
r67 r68 168 168 this->nbrCamera_ = config.getProperty("number_of_cameras").toInt(); 169 169 170 if (config.getProperty("master_indice") != QString::null) 170 if (config.getProperty("master_indice") != QString::null) // Master camera number 171 171 this->masterCamera_ = config.getProperty("master_indice").toInt(); 172 172 -
trunk/StereoVisionDisparity/ObstacleDetectionComponent.cpp
r64 r68 273 273 if (config.getProperty("cam_channels") != QString::null) 274 274 this->cam_channels = config.getProperty("cam_channels").toInt(); 275 276 if (config.getProperty("cam_ref_cx") != QString::null) 277 this->cam_ref_cx = config.getProperty("cam_ref_cx").toDouble(); // cx camera divide by x image size 278 279 if (config.getProperty("cam_ref_cy") != QString::null) 280 this->cam_ref_cy = config.getProperty("cam_ref_cy").toDouble(); // cy camera divide by y image size 281 282 if (config.getProperty("cam_ref_fx") != QString::null) 283 this->cam_ref_fx = config.getProperty("cam_ref_fx").toDouble(); // fx camera divide by x image size 284 285 if (config.getProperty("cam_ref_fy") != QString::null) 286 this->cam_ref_fy = config.getProperty("cam_ref_fy").toDouble(); // fy camera divide by y image size 287 288 if (config.getProperty("cam_baseline") != QString::null) 289 this->cam_baseline = config.getProperty("cam_baseline").toDouble(); // distance between two cameras in meter 275 290 276 291 if (config.getProperty("min_disp") != QString::null) … … 631 646 x,y,z = world coordinates 632 647 disparity = disparity value 633 648 */ 634 649 bool ObstacleDetectionComponent::PointTriangulate(int row, int col, double &x, double &y, double &z, double disparity) 635 650 { 636 bool valid_point = false;637 638 651 if(disparity > 0.0 && disparity < 255.0) 639 652 { 640 z = this->cam_width * this->cam_fx * this->cam_baseline / disparity; 641 double u = col / (this->cam_width - 1.0) - this->cam_cx; 642 double v = row / (this->cam_height - 1.0) - this->cam_cy; 643 644 x = u * z / this->cam_fx; 645 646 y = v * z / this->cam_fy; 647 648 valid_point = true; 649 } 650 651 return valid_point; 652 }*/ 653 z = this->cam_width * this->cam_ref_fx * this->cam_baseline / disparity; 654 double u = col / (this->cam_width - 1) - this->cam_ref_cx; 655 double v = row / (this->cam_height - 1) - this->cam_ref_cy; 656 657 x = u * z / this->cam_ref_fx; 658 y = v * z / this->cam_ref_fy; 659 660 return true; 661 } 662 663 return false; 664 }//*/ 653 665 654 666 -
trunk/StereoVisionDisparity/ObstacleDetectionComponent.h
r64 r68 74 74 double cam_ref_fx; // fx camera divide by x image size 75 75 double cam_ref_fy; // fy camera divide by y image size 76 double cam_baseline; // distance between two cameras in meter 76 77 bool showdebug; // Show frame acquired 77 78 int min_disp; // Minimum disparity value to detect obstacles in the u/v-disp map … … 194 195 A CalcMedian(std::vector<A> vetor) const; 195 196 196 //bool PointTriangulate(int row, int col, double &x, double &y, double &z, double disparity);197 bool PointTriangulate(int row, int col, double &x, double &y, double &z, double disparity); 197 198 }; 198 199
Note:
See TracChangeset
for help on using the changeset viewer.