Main MRPT website > C++ reference
MRPT logo
CStereoGrabber_SVS.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 #ifndef CStereoGrabber_SVS_H
29 #define CStereoGrabber_SVS_H
30 
33 
34 
35 namespace mrpt
36 {
37  namespace hwdrivers
38  {
39 
40 
41  /** Options used when creating a STOC Videre Design camera capture object
42  * \ingroup mrpt_hwdrivers_grp
43  */
45  {
46  TCaptureOptions_SVS(int _frame_width=640, int _frame_height=480 , double _framerate = 30, int _NDisp= 64,
47  int _Corrsize=15, int _LR = false, int _Thresh = 10, int _Unique = 13, int _Horopter = 0,int _SpeckleSize = 100,bool _procesOnChip = true,bool _calDisparity = true);
48 
49  int frame_width, frame_height; //!< Capture resolution (Default: 640x480)
50 
51  bool getRectified; //!< Indicates if the STOC camera must capture rectified images (Default: true -> rectified)
52  double framerate; //!< STOC camera frame rate (Default: 30 fps)
53  int m_NDisp; //!< number of STOC's disparities (Default: 64 )
54  int m_Corrsize; // correlation window size
55  int m_LR; // no left-right check, not available
56  int m_Thresh; // texture filter
57  int m_Unique; // uniqueness filter
62 
63  };
64 
65  /** A class for grabing stereo images from a STOC camera of Videre Design
66  * NOTE:
67  * - Windows:
68  * - This class is not available.
69  *
70  * - Linux:
71  * - This class is only available when compiling MRPT with "MRPT_HAS_SVS".
72  * - You must have the videre design's library.
73  * - Capture will be made in grayscale.
74  * - The grabber must be launch in root.
75  *
76  * Once connected to a camera, you can call "getStereoObservation" to retrieve the Disparity images.
77  *
78  * \sa You'll probably want to use instead the most generic camera grabber in MRPT: mrpt::hwdrivers::CCameraSensor
79  * \ingroup mrpt_hwdrivers_grp
80  */
82  {
83  protected:
84  bool m_bInitialized; //!< If this has been correctly initiated
85 
86  void *m_videoObject; // svsVideoImages*
87  void *m_stereoImage; // svsStereoImage*
88  void *m_disparityParams; // svsDisparityParams*
89  void *m_processObject; // svsStereoProcess
90  unsigned int m_resolutionX;
91  unsigned int m_resolutionY;
92 
93  unsigned char *m_ptrMat;
94 
95  bool m_status;
99 
100 
101  private:
102 
103  public:
104 
106 
107  /** Constructor: */
108  CStereoGrabber_SVS( int cameraIndex = 0, const TCaptureOptions_SVS &options = TCaptureOptions_SVS() );
109 
110  /** Destructor */
111  virtual ~CStereoGrabber_SVS(void);
112 
113  /** Grab stereo images, and return the pair of rectified images.
114  * \param out_observation The object to be filled with sensed data.
115  *
116  * NOTICE: (1) That the member "CObservationStereoImages::refCameraPose" must be
117  * set on the return of this method, since we don't know here the robot physical structure.
118  * (2) The images are already rectified.
119  *
120  * \return false on any error, true if all go fine.
121  */
122  bool getStereoObservation( mrpt::slam::CObservationStereoImages &out_observation );
123 
124  }; // End of class
125 
126  } // End of NS
127 } // End of NS
128 
129 
130 #endif



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013