00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2010 University of Malaga | 00007 | | 00008 | This software was written by the Machine Perception and Intelligent | 00009 | Robotics Lab, University of Malaga (Spain). | 00010 | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> | 00011 | | 00012 | This file is part of the MRPT project. | 00013 | | 00014 | MRPT is free software: you can redistribute it and/or modify | 00015 | it under the terms of the GNU General Public License as published by | 00016 | the Free Software Foundation, either version 3 of the License, or | 00017 | (at your option) any later version. | 00018 | | 00019 | MRPT is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00022 | GNU General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU General Public License | 00025 | along with MRPT. If not, see <http://www.gnu.org/licenses/>. | 00026 | | 00027 +---------------------------------------------------------------------------+ */ 00028 #ifndef CStereoGrabber_SVS_H 00029 #define CStereoGrabber_SVS_H 00030 00031 #include <mrpt/slam/CObservationStereoImages.h> 00032 #include <mrpt/hwdrivers/link_pragmas.h> 00033 00034 00035 namespace mrpt 00036 { 00037 namespace hwdrivers 00038 { 00039 00040 00041 /** Options used when creating a STOC Videre Design camera capture object 00042 */ 00043 struct HWDRIVERS_IMPEXP TCaptureOptions_SVS 00044 { 00045 TCaptureOptions_SVS(int _frame_width=640, int _frame_height=480 , double _framerate = 30, int _NDisp= 64, 00046 int _Corrsize=15, int _LR = false, int _Thresh = 10, int _Unique = 13, int _Horopter = 0,int _SpeckleSize = 100); 00047 00048 int frame_width, frame_height; //!< Capture resolution (Default: 640x480) 00049 00050 bool getRectified; //!< Indicates if the STOC camera must capture rectified images (Default: true -> rectified) 00051 double framerate; //!< STOC camera frame rate (Default: 30 fps) 00052 int m_NDisp; //!< number of STOC's disparities (Default: 64 ) 00053 int m_Corrsize; // correlation window size 00054 int m_LR; // no left-right check, not available 00055 int m_Thresh; // texture filter 00056 int m_Unique; // uniqueness filter 00057 int m_Horopter; 00058 int m_SpeckleSize; 00059 00060 }; 00061 00062 /** A class for grabing stereo images from a STOC camera of Videre Design 00063 * NOTE: 00064 * - Windows: 00065 * - This class is not available. 00066 * 00067 * - Linux: 00068 * - This class is only available when compiling MRPT with "MRPT_HAS_SVS". 00069 * - You must have the videre design's library. 00070 * - Capture will be made in grayscale. 00071 * - The grabber must be launch in root. 00072 * 00073 * Once connected to a camera, you can call "getStereoObservation" to retrieve the Disparity images. 00074 * 00075 * \sa You'll probably want to use instead the most generic camera grabber in MRPT: mrpt::hwdrivers::CCameraSensor 00076 */ 00077 class HWDRIVERS_IMPEXP CStereoGrabber_SVS : public mrpt::utils::CUncopiable 00078 { 00079 protected: 00080 bool m_bInitialized; //!< If this has been correctly initiated 00081 00082 void *m_videoObject; // svsVideoImages* 00083 void *m_stereoImage; // svsStereoImage* 00084 void *m_disparityParams; // svsDisparityParams* 00085 unsigned int m_resolutionX; 00086 unsigned int m_resolutionY; 00087 00088 unsigned char *m_ptrMat; 00089 00090 bool m_status; 00091 bool m_initialized; 00092 00093 00094 private: 00095 00096 public: 00097 00098 TCaptureOptions_SVS m_options; 00099 00100 /** Constructor: */ 00101 CStereoGrabber_SVS( int cameraIndex = 0, const TCaptureOptions_SVS &options = TCaptureOptions_SVS() ); 00102 00103 /** Destructor */ 00104 virtual ~CStereoGrabber_SVS(void); 00105 00106 /** Grab stereo images, and return the pair of rectified images. 00107 * \param out_observation The object to be filled with sensed data. 00108 * 00109 * NOTICE: (1) That the member "CObservationStereoImages::refCameraPose" must be 00110 * set on the return of this method, since we don't know here the robot physical structure. 00111 * (2) The images are already rectified. 00112 * 00113 * \return false on any error, true if all go fine. 00114 */ 00115 bool getStereoObservation( mrpt::slam::CObservationStereoImages &out_observation ); 00116 00117 }; // End of class 00118 00119 } // End of NS 00120 } // End of NS 00121 00122 00123 #endif
| Page generated by Doxygen 1.7.1 for MRPT 0.9.1 SVN:exported at Fri Aug 6 10:31:35 UTC 2010 |
