Main MRPT website > C++ reference
MRPT logo
CCameraSensor.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2014, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #ifndef CCameraSensor_H
11 #define CCameraSensor_H
12 
13 #include <mrpt/poses/CPose3D.h>
14 #include <mrpt/slam/CObservation.h>
18 
25 #include <mrpt/hwdrivers/CKinect.h>
28 
31 
33 
34 namespace mrpt
35 {
36  namespace hwdrivers
37  {
38  /** The central class for camera grabbers in MRPT, implementing the "generic sensor" interface.
39  * This class provides the user with a uniform interface to a variety of other classes which manage only one specific camera "driver" (opencv, ffmpeg, bumblebee,...)
40  *
41  * Following the "generic sensor" interface, all the parameters must be passed int the form of a configuration file,
42  * which may be also formed on the fly (without being a real config file) as in this example:
43  *
44  * \code
45  * CCameraSensor myCam;
46  * const string str =
47  * "[CONFIG]\n"
48  * "grabber_type=opencv\n";
49  *
50  * CConfigFileMemory cfg(str);
51  * myCam.loadConfig(cfg,"CONFIG");
52  * myCam.initialize();
53  * CObservationPtr obs = myCam.getNextFrame();
54  * \endcode
55  *
56  * Images can be retrieved through the normal "doProcess()" interface, or the specific method "getNextFrame()".
57  *
58  * Some notes:
59  * - "grabber_type" determines the class to use internally for image capturing (see below).
60  * - For the meaning of cv_camera_type and other parameters, refer to mrpt::hwdrivers::CImageGrabber_OpenCV
61  * - For the parameters of dc1394 parameters, refer to generic IEEE1394 documentation, and to mrpt::hwdrivers::TCaptureOptions_dc1394.
62  * - If the high number of existing parameters annoy you, try the function prepareVideoSourceFromUserSelection(),
63  * which displays a GUI dialog to the user so he/she can choose the desired camera & its parameters.
64  *
65  * Images can be saved in the "external storage" mode. Detached threads are created for this task. See \a setPathForExternalImages() and \a setExternalImageFormat().
66  * These methods are called automatically from the app rawlog-grabber.
67  *
68  * These is the list of all accepted parameters:
69  *
70  * \code
71  * PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
72  * -------------------------------------------------------
73  * [supplied_section_name]
74  * # Select one of the grabber implementations -----------------------
75  * grabber_type = opencv | dc1394 | bumblebee | ffmpeg | rawlog | swissranger | svs | kinect | flycap | flycap_stereo | image_dir | duo3d
76  *
77  * # Options for any grabber_type ------------------------------------
78  * preview_decimation = 0 // N<=0 (or not present): No preview; N>0, display 1 out of N captured frames.
79  * preview_reduction = 0 // 0 or 1 (or not present): The preview shows the actual image. For 2,3,..., reduces the size of the image by that factor, only for the preview window.
80  * capture_grayscale = 0 // 1:capture in grayscale, whenever the driver allows it. Default=0
81  * # For externaly stored images, the format of image files (default=jpg)
82  * #external_images_format = jpg
83  *
84  * # For externaly stored images: whether to spawn independent threads to save the image files.
85  * #external_images_own_thread = 1 // 0 or 1
86  *
87  * # If external_images_own_thread=1, this changes the number of threads to launch
88  * # to save image files. The default is determined from mrpt::system::getNumberOfProcessors()
89  * # and should be OK unless you want to save processor time for other things.
90  * #external_images_own_thread_count = 2 // >=1
91  *
92  * # (Only when external_images_format=jpg): Optional parameter to set the JPEG compression quality:
93  * #external_images_jpeg_quality = 95 // [1-100]. Default: 95
94  *
95  * # Pose of the sensor on the robot:
96  * pose_x=0 ; (meters)
97  * pose_y=0
98  * pose_z=0
99  * pose_yaw=0 ; (Angles in degrees)
100  * pose_pitch=0
101  * pose_roll=0
102  *
103  * # Options for grabber_type= opencv ------------------------------------
104  * cv_camera_index = 0 // [opencv] Number of camera to open
105  * cv_camera_type = CAMERA_CV_AUTODETECT
106  * cv_frame_width = 640 // [opencv] Capture width (not present or set to 0 for default)
107  * cv_frame_height = 480 // [opencv] Capture height (not present or set to 0 for default)
108  * cv_fps = 15 // [opencv] IEEE1394 cams only: Capture FPS (not present or 0 for default)
109  * cv_gain = 0 // [opencv] Camera gain, if available (nor present or set to 0 for default).
110  *
111  * # Options for grabber_type= dc1394 -------------------------------------
112  * dc1394_camera_guid = 0 | 0x11223344 // 0 (or not present): the first camera; A hexadecimal number: The GUID of the camera to open
113  * dc1394_camera_unit = 0 // 0 (or not present): the first camera; 0,1,2,...: The unit number (within the given GUID) of the camera to open (Stereo cameras: 0 or 1)
114  * dc1394_frame_width = 640
115  * dc1394_frame_height = 480
116  * dc1394_framerate = 15 // eg: 7.5, 15, 30, 60, etc... For posibilities see mrpt::hwdrivers::TCaptureOptions_dc1394
117  * dc1394_mode7 = -1 // -1: Ignore, i>=0, set to MODE7_i
118  * dc1394_color_coding = COLOR_CODING_YUV422 // For posibilities see mrpt::hwdrivers::TCaptureOptions_dc1394
119  * # Options for setting feature values: dc1394_<feature> = <n>
120  * # with <feature> = brightness | exposure | sharpness | white_balance | gamma | shutter | gain
121  * # <n> a value, or -1 (or not present) for not to change this feature value in the camera, possible values are shown in execution
122  * dc1394_shutter = -1
123  * # Options for setting feature modes: dc1394_<feature>_mode = <n>
124  * # with <feature> = brightness | exposure | sharpness | white_balance | gamma | shutter | gain
125  * # <n> = -1 (or not present) [not to change] | 0 [manual] | 1 [auto] | 2 [one_push_auto]
126  * dc1394_shutter_mode = -1
127  * # Options for setting trigger options:
128  * dc1394_trigger_power = -1 // -1 (or not present) for not to change | 0 [OFF] | 1 [ON]
129  * dc1394_trigger_mode = -1 // -1 (or not present) for not to change | 0..7 corresponding to possible modes 0,1,2,3,4,5,14,15
130  * dc1394_trigger_source= -1 // -1 (or not present) for not to change | 0..4 corresponding to possible sources 0,1,2,3,SOFTWARE
131  * dc1394_trigger_polarity = -1 // -1 (or not present) for not to change | 0 [ACTIVE_LOW] | 1 [ACTIVE_HIGH]
132  *
133  * # Options for grabber_type= bumblebee ----------------------------------
134  * bumblebee_camera_index = 0 // [bumblebee] Number of camera within the firewire bus to open (typically = 0)
135  * bumblebee_frame_width = 640 // [bumblebee] Capture width (not present or set to 0 for default)
136  * bumblebee_frame_height = 480 // [bumblebee] Capture height (not present or set to 0 for default)
137  * bumblebee_fps = 15 // [bumblebee] Capture FPS (not present or 0 for default)
138  * bumblebee_mono = 0|1 // [bumblebee] OPTIONAL: If this parameter is present, monocular (0:left, 1:right) images will be grabbed instead of stereo pairs.
139  * bumblebee_get_rectified = 0|1 // [bumblebee] Determines if the camera should grab rectified or raw images (1 is the default)
140  *
141  * # Options for grabber_type= ffmpeg -------------------------------------
142  * ffmpeg_url = rtsp://127.0.0.1 // [ffmpeg] The video file or IP camera to open
143  *
144  * # Options for grabber_type= rawlog -------------------------------------
145  * rawlog_file = mylog.rawlog // [rawlog] This can be used to simulate the capture of images already grabbed in the past in the form of a MRPT rawlog.
146  * rawlog_camera_sensor_label = CAMERA1 // [rawlog] If this field is not present, all images found in the rawlog will be retrieved. Otherwise, only those observations with a matching sensor label.
147  *
148  * # Options for grabber_type= svs -------------------------------------
149  * svs_camera_index = 0
150  * svs_frame_width = 800
151  * svs_frame_height = 600
152  * svs_framerate = 25.0
153  * svs_NDisp = ...
154  * svs_Corrsize = ...
155  * svs_LR = ...
156  * svs_Thresh = ...
157  * svs_Unique = ...
158  * svs_Horopter = ...
159  * svs_SpeckleSize = ...
160  * svs_procesOnChip = false
161  * svs_calDisparity = true
162  *
163  * # Options for grabber_type= swissranger -------------------------------------
164  * sr_use_usb = true // True: use USB, false: use ethernet
165  * sr_IP = 192.168.2.14 // If sr_use_usb=false, the camera IP
166  * sr_grab_grayscale = true // whether to save the intensity channel
167  * sr_grab_3d = true // whether to save the 3D points
168  * sr_grab_range = true // whether to save the range image
169  * sr_grab_confidence = true // whether to save the confidence image
170  *
171  * # Options for grabber_type= XBox kinect -------------------------------------
172  * kinect_grab_intensity = true // whether to save the intensity (RGB) channel
173  * kinect_grab_3d = true // whether to save the 3D points
174  * kinect_grab_range = true // whether to save the depth image
175  * #kinect_video_rgb = true // Optional. If set to "false", the IR intensity channel will be grabbed instead of the color RGB channel.
176  *
177  * # Options for grabber_type= flycap (Point Grey Research's FlyCapture 2) --------
178  * flycap_camera_index = 0
179  * #... (all the parameters enumerated in mrpt::hwdrivers::TCaptureOptions_FlyCapture2 with the prefix "flycap_")
180  *
181  * # Options for grabber_type= flycap_stereo (Point Grey Research's FlyCapture 2, two cameras setup as a stereo pair) ------
182  * # fcs_start_synch_capture = false // *Important*: Only set to true if using Firewire cameras: the "startSyncCapture()" command is unsupported in USB3 and GigaE cameras.
183  *
184  * fcs_LEFT_camera_index = 0
185  * #... (all the parameters enumerated in mrpt::hwdrivers::TCaptureOptions_FlyCapture2 with the prefix "fcs_LEFT_")
186  * fcs_RIGHT_camera_index = 0
187  * #... (all the parameters enumerated in mrpt::hwdrivers::TCaptureOptions_FlyCapture2 with the prefix "fcs_RIGHT_")
188  *
189  * # Options for grabber_type= image_dir
190  * image_dir_url = // [string] URL of the directory
191  * left_filename_format = imL_%05d.jpg // [string] Format including prefix, number of trailing zeros, digits and image format (extension)
192  * right_filename_format = imR_%05d.jpg // [string] Format including prefix, number of trailing zeros, digits and image format (extension). Leave blank if only images from one camera will be used.
193  * start_index = 0 // [int] Starting index for images
194  * end_index = 100 // [int] End index for the images
195  *
196  * # Options for grabber_type= duo3d
197  * Create a section like this:
198  * [DUO3DOptions]
199  * rawlog-grabber-ignore = true // Instructs rawlog-grabber to ignore this section (it is not a separate device!)
200  *
201  * image_width = 640 // [int] x Resolution
202  * image_height = 480 // [int] y Resolution
203  * fps = 30 // [int] Frames per second (<= 30)
204  * exposure = 50 // [int] Exposure value (1..100)
205  * led = 0 // [int] Led intensity (only for some device models) (1..100).
206  * gain = 50 // [int] Camera gain (1..100)
207  * capture_rectified = false // [bool] Rectify captured images
208  * capture_imu = true // [bool] Capture IMU data from DUO3D device (if available)
209  * calibration_from_file = true // [bool] Use YML calibration files provided by calibration application supplied with DUO3D device
210  * intrinsic_filename = "" // [string] Intrinsic parameters file. This filename should contain a substring _RWWWxHHH_ with WWW being the image width and HHH the image height, as provided by the calibration application.
211  * extrinsic_filename = "" // [string] Extrinsic parameters file. This filename should contain a substring _RWWWxHHH_ with WWW being the image width and HHH the image height, as provided by the calibration application.
212  * rectify_map_filename = "" // [string] Rectification map file. This filename should contain a substring _RWWWxHHH_ with WWW being the image width and HHH the image height, as provided by the calibration application.
213  *
214  * // if 'calibration_from_file' = false, three more sections containing the calibration must be provided:
215  * [DUO3D_LEFT]
216  * rawlog-grabber-ignore = true // Instructs rawlog-grabber to ignore this section (it is not a separate device!)
217  * resolution = [640 480]
218  * cx = 320
219  * cy = 240
220  * fx = 700
221  * fy = 700
222  * dist = [0 0 0 0 0]
223  *
224  * [DUO3D_RIGHT]
225  * rawlog-grabber-ignore = true // Instructs rawlog-grabber to ignore this section (it is not a separate device!)
226  * resolution = [640 480]
227  * cx = 320
228  * cy = 240
229  * fx = 700
230  * fy = 700
231  * dist = [0 0 0 0 0]
232  *
233  * [DUO3D_LEFT2RIGHT_POSE]
234  * rawlog-grabber-ignore = true // Instructs rawlog-grabber to ignore this section (it is not a separate device!)
235  * pose_quaternion = [0.12 0 0 1 0 0 0]
236  *
237  * \endcode
238  *
239  * \note The execution rate, in rawlog-grabber or the user code calling doProcess(), should be greater than the required capture FPS.
240  * \note In Linux you may need to execute "chmod 666 /dev/video1394/ * " and "chmod 666 /dev/raw1394" for allowing any user R/W access to firewire cameras.
241  * \sa mrpt::hwdrivers::CImageGrabber_OpenCV, mrpt::hwdrivers::CImageGrabber_dc1394, CGenericSensor, prepareVideoSourceFromUserSelection()
242  * \ingroup mrpt_hwdrivers_grp
243  */
245  {
247 
248  public:
249  /** Constructor. The camera is not open until "initialize" is called. */
250  CCameraSensor();
251 
252  /** Destructor */
253  virtual ~CCameraSensor();
254 
255  // See docs in parent class
256  void doProcess();
257 
258  /** Retrieves the next frame from the video source, raising an exception on any error.
259  * Note: The returned observations can be of one of these classes (you can use IS_CLASS(obs,CObservationXXX) to determine it):
260  * - mrpt::slam::CObservationImage (For normal cameras or video sources)
261  * - mrpt::slam::CObservationStereoImages (For stereo cameras)
262  * - mrpt::slam::CObservation3DRangeScan (For 3D cameras)
263  */
264  mrpt::slam::CObservationPtr getNextFrame( );
265  void getNextFrame( std::vector<mrpt::utils::CSerializablePtr> & out_obs );
266 
267  /** Tries to open the camera, after setting all the parameters with a call to loadConfig.
268  * \exception This method must throw an exception with a descriptive message if some critical error is found.
269  */
270  virtual void initialize();
271 
272  /** Close the camera (if open).
273  * This method is called automatically on destruction.
274  */
275  void close();
276 
277  /** Set Software trigger level value (ON or OFF) for cameras with this function available.
278  */
279  void setSoftwareTriggerLevel( bool level );
280 
281  /** Set the path where to save off-rawlog image files (this class DOES take into account this path).
282  * An empty string (the default value at construction) means to save images embedded in the rawlog, instead of on separate files.
283  * \exception std::exception If the directory doesn't exists and cannot be created.
284  */
285  virtual void setPathForExternalImages( const std::string &directory );
286 
287  /** This must be called before initialize() */
288  void enableLaunchOwnThreadForSavingImages(bool enable=true) { m_external_images_own_thread = enable; };
289 
290  /** Functor type */
291  typedef void (*TPreSaveUserHook)(const mrpt::slam::CObservationPtr &obs, void* user_ptr);
292 
293  /** Provides a "hook" for user-code to be run BEFORE an image is going to be saved to disk if external storage is enabled (e.g. to rectify images, preprocess them, etc.)
294  * Notice that this code may be called from detached threads, so it must be thread safe.
295  * If used, call this before initialize() */
296  void addPreSaveHook( TPreSaveUserHook user_function, void *user_ptr ) { m_hook_pre_save=user_function; m_hook_pre_save_param=user_ptr; };
297 
298  protected:
299  // Options for any grabber_type ------------------------------------
300  poses::CPose3D m_sensorPose;
301 
302  std::string m_grabber_type; //!< Can be "opencv",...
304 
305  // Options for grabber_type= opencv ------------------------------------
307  std::string m_cv_camera_type;
309 
310  // Options for grabber_type= dc1394 -------------------------------------
316 
317  // Options for grabber_type= bumblebee ----------------------------------
320  int m_bumblebee_monocam; // 0:Left, 1: Right, <0,>1 -> Stereo
321 
322  // Options for grabber type= svs -----------------------------------------
325 
326  // Options for grabber_type= ffmpeg -------------------------------------
327  std::string m_ffmpeg_url;
328 
329  // Options for grabber_type= rawlog -------------------------------------
330  std::string m_rawlog_file;
333 
334  // Options for grabber_type= swissranger -------------------------------------
335  bool m_sr_open_from_usb; //!< true: USB, false: ETH
336  std::string m_sr_ip_address;
337  bool m_sr_save_3d; //!< Save the 3D point cloud (default: true)
338  bool m_sr_save_range_img; //!< Save the 2D range image (default: true)
339  bool m_sr_save_intensity_img; //!< Save the 2D intensity image (default: true)
340  bool m_sr_save_confidence; //!< Save the estimated confidence 2D image (default: false)
341 
342  // Options for grabber_type= XBox kinect -------------------------------------
343  bool m_kinect_save_3d; //!< Save the 3D point cloud (default: true)
344  bool m_kinect_save_range_img; //!< Save the 2D range image (default: true)
345  bool m_kinect_save_intensity_img; //!< Save the 2D intensity image (default: true)
346  bool m_kinect_video_rgb; //!< Save RGB or IR channels (default:true)
347 
348  // Options for grabber type= flycap -----------------------------------------
350 
351  // Options for grabber type= flycap_stereo -----------------------------------------
353  TCaptureOptions_FlyCapture2 m_flycap_stereo_options[2]; // [0]:left, [1]:right
354 
355  // Options for grabber type= image_dir
356  std::string m_img_dir_url;
361 
364 
365  // Options for grabber type= duo3d
367 
368  // Other options:
369  bool m_external_images_own_thread; //!< Whether to launch independent thread
370 
371  /** See the class documentation at the top for expected parameters */
372  void loadConfig_sensorSpecific(
373  const mrpt::utils::CConfigFileBase &configSource,
374  const std::string &iniSection );
375 
376  private:
377  // Only one of these will be !=NULL at a time ===========
378  CImageGrabber_OpenCV * m_cap_cv; //!< The OpenCV capture object.
379  CImageGrabber_dc1394 * m_cap_dc1394; //!< The dc1394 capture object.
380  CImageGrabber_FlyCapture2 * m_cap_flycap; //!< The FlyCapture2 object
381  CImageGrabber_FlyCapture2 * m_cap_flycap_stereo_l, *m_cap_flycap_stereo_r; //!< The FlyCapture2 object for stereo pairs
382  CStereoGrabber_Bumblebee * m_cap_bumblebee; //!< The bumblebee capture object.
383  CStereoGrabber_SVS * m_cap_svs; //!< The svs capture object.
384  CFFMPEG_InputStream * m_cap_ffmpeg; //!< The FFMPEG capture object
385  mrpt::utils::CFileGZInputStream * m_cap_rawlog; //!< The input file for rawlogs
386  CSwissRanger3DCamera * m_cap_swissranger; //!< SR 3D camera object.
387  CKinect * m_cap_kinect; //!< Kinect camera object.
388  COpenNI2Sensor * m_cap_openni2; //!< OpenNI2 object.
389  std::string * m_cap_image_dir; //!< Read images from directory
390  CDUO3DCamera * m_cap_duo3d; //!< The DUO3D capture object
391  // =========================
392 
395 
397  mrpt::gui::CDisplayWindowPtr m_preview_win1,m_preview_win2; //!< Normally we'll use only one window, but for stereo images we'll use two of them.
398 
399  /** @name Stuff related to working threads to save images to disk
400  @{ */
401  unsigned int m_external_image_saver_count; //!< Number of working threads. Default:1, set to 2 in quad cores.
402  std::vector<mrpt::system::TThreadHandle> m_threadImagesSaver;
403 
405  mrpt::synch::CCriticalSection m_csToSaveList; //!< The critical section for m_toSaveList
406  std::vector<TListObservations> m_toSaveList; //!< The queues of objects to be returned by getObservations, one for each working thread.
407  void thread_save_images(unsigned int my_working_thread_index); //!< Thread to save images to files.
408 
409  TPreSaveUserHook m_hook_pre_save;
411  /** @} */
412 
413  }; // end class
414 
415  typedef stlplus::smart_ptr<CCameraSensor> CCameraSensorPtr; //!< A smart pointer to a CCameraSensor
416 
417  /** Used only from MRPT apps: Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection *"
418  */
419  CCameraSensorPtr HWDRIVERS_IMPEXP prepareVideoSourceFromPanel(void *panel);
420 
421  /** Parse the user options in the wxWidgets "panel" and write the configuration into the given section of the given configuration file.
422  * Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection *"
423  * \sa prepareVideoSourceFromUserSelection, prepareVideoSourceFromPanel, readConfigIntoVideoSourcePanel
424  */
426  void *panel,
427  const std::string &in_cfgfile_section_name,
428  mrpt::utils::CConfigFileBase *out_cfgfile
429  );
430 
431  /** Parse the given section of the given configuration file and set accordingly the controls of the wxWidgets "panel".
432  * Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection *"
433  * \sa prepareVideoSourceFromUserSelection, prepareVideoSourceFromPanel, writeConfigFromVideoSourcePanel
434  */
436  void *panel,
437  const std::string &in_cfgfile_section_name,
438  const mrpt::utils::CConfigFileBase *in_cfgfile
439  );
440 
441  /** Show to the user a list of possible camera drivers and creates and open the selected camera.
442  */
444 
445 
446  } // end namespace
447 } // end namespace
448 
449 #endif
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
bool m_sr_save_range_img
Save the 2D range image (default: true)
std::vector< TListObservations > m_toSaveList
The queues of objects to be returned by getObservations, one for each working thread.
This class provides simple critical sections functionality.
Options used when creating an dc1394 capture object All but the frame size, framerate, and color_coding can be changed dynamically by CImageGrabber_dc1394::changeCaptureOptions.
A class for grabing stereo images from a STOC camera of Videre Design NOTE:
COpenNI2Sensor * m_cap_openni2
OpenNI2 object.
This "software driver" implements the communication protocol for interfacing a DUO3D Stereo Camera...
Definition: CDUO3DCamera.h:132
A wrapper for Point Gray Research (PGR) FlyCapture2 API for capturing images from Firewire...
TCaptureCVOptions m_cv_options
bool m_sr_save_3d
Save the 3D point cloud (default: true)
A class for grabing "range images" from a MESA imaging SwissRanger 3D cameras (SR-2, SR-3000, SR-4k).
TCaptureOptions_bumblebee m_bumblebee_options
void HWDRIVERS_IMPEXP writeConfigFromVideoSourcePanel(void *panel, const std::string &in_cfgfile_section_name, mrpt::utils::CConfigFileBase *out_cfgfile)
Parse the user options in the wxWidgets "panel" and write the configuration into the given section of...
A generic class which process a video file or other kind of input stream (http, rtsp) and allows the ...
bool m_external_images_own_thread
Whether to launch independent thread.
TCaptureOptions_FlyCapture2 m_flycap_options
A class for grabing "range images", intensity images (either RGB or IR) and other information from an...
bool m_kinect_save_3d
Save the 3D point cloud (default: true)
This class allows loading and storing values and vectors of different types from a configuration text...
bool m_sr_save_intensity_img
Save the 2D intensity image (default: true)
bool m_kinect_save_intensity_img
Save the 2D intensity image (default: true)
mrpt::utils::CFileGZInputStream * m_cap_rawlog
The input file for rawlogs.
CImageGrabber_OpenCV * m_cap_cv
The OpenCV capture object.
A class for grabing "range images", intensity images (either RGB or IR) and other information from an...
Definition: CKinect.h:207
The central class for camera grabbers in MRPT, implementing the "generic sensor" interface.
CStereoGrabber_Bumblebee * m_cap_bumblebee
The bumblebee capture object.
CCameraSensorPtr HWDRIVERS_IMPEXP prepareVideoSourceFromUserSelection()
Show to the user a list of possible camera drivers and creates and open the selected camera...
CSwissRanger3DCamera * m_cap_swissranger
SR 3D camera object.
CStereoGrabber_SVS * m_cap_svs
The svs capture object.
A class for grabing images from a IEEE1394 (Firewire) camera using the libdc1394-2 library...
Transparently opens a compressed "gz" file and reads uncompressed data from it.
Options used when creating a bumblebee camera capture object.
std::vector< mrpt::system::TThreadHandle > m_threadImagesSaver
stlplus::smart_ptr< CCameraSensor > CCameraSensorPtr
A smart pointer to a CCameraSensor.
Options used when creating a camera capture object of type CImageGrabber_FlyCapture2.
CKinect * m_cap_kinect
Kinect camera object.
CDUO3DCamera * m_cap_duo3d
The DUO3D capture object.
Options used when creating a camera capture object of type CImageGrabber_FlyCapture2.
Definition: CDUO3DCamera.h:27
void HWDRIVERS_IMPEXP readConfigIntoVideoSourcePanel(void *panel, const std::string &in_cfgfile_section_name, const mrpt::utils::CConfigFileBase *in_cfgfile)
Parse the given section of the given configuration file and set accordingly the controls of the wxWid...
bool m_sr_open_from_usb
true: USB, false: ETH
CImageGrabber_FlyCapture2 * m_cap_flycap_stereo_r
The FlyCapture2 object for stereo pairs.
TPreSaveUserHook m_hook_pre_save
std::string m_grabber_type
Can be "opencv",...
A class for grabing stereo images from a "Bumblebee" or "Bumblebee2" camera NOTE: ...
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
TCaptureOptions_dc1394 m_dc1394_options
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Options used when creating a STOC Videre Design camera capture object.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:69
bool m_kinect_save_range_img
Save the 2D range image (default: true)
bool m_kinect_video_rgb
Save RGB or IR channels (default:true)
A class for grabing images from a "OpenCV"-compatible camera, or from an AVI video file...
TCaptureOptions_DUO3D m_duo3d_options
#define HWDRIVERS_IMPEXP
mrpt::synch::CCriticalSection m_csToSaveList
The critical section for m_toSaveList.
CImageGrabber_dc1394 * m_cap_dc1394
The dc1394 capture object.
CImageGrabber_FlyCapture2 * m_cap_flycap
The FlyCapture2 object.
Options used when creating an OpenCV capture object Some options apply to IEEE1394 cameras only...
unsigned int m_external_image_saver_count
Number of working threads. Default:1, set to 2 in quad cores.
CFFMPEG_InputStream * m_cap_ffmpeg
The FFMPEG capture object.
mrpt::gui::CDisplayWindowPtr m_preview_win2
Normally we'll use only one window, but for stereo images we'll use two of them.
std::string * m_cap_image_dir
Read images from directory.
CCameraSensorPtr HWDRIVERS_IMPEXP prepareVideoSourceFromPanel(void *panel)
Used only from MRPT apps: Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection ...
This base class provides a common printf-like method to send debug information to std::cout...
TCaptureOptions_SVS m_svs_options
bool m_sr_save_confidence
Save the estimated confidence 2D image (default: false)
void enableLaunchOwnThreadForSavingImages(bool enable=true)
This must be called before initialize()



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014