Main MRPT website > C++ reference for MRPT 1.3.2
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-2015, 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/obs/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  * dc1394_ring_buffer_size = 15 // Length of frames ring buffer (internal to libdc1394)
133  *
134  * # Options for grabber_type= bumblebee ----------------------------------
135  * bumblebee_camera_index = 0 // [bumblebee] Number of camera within the firewire bus to open (typically = 0)
136  * bumblebee_frame_width = 640 // [bumblebee] Capture width (not present or set to 0 for default)
137  * bumblebee_frame_height = 480 // [bumblebee] Capture height (not present or set to 0 for default)
138  * bumblebee_fps = 15 // [bumblebee] Capture FPS (not present or 0 for default)
139  * bumblebee_mono = 0|1 // [bumblebee] OPTIONAL: If this parameter is present, monocular (0:left, 1:right) images will be grabbed instead of stereo pairs.
140  * bumblebee_get_rectified = 0|1 // [bumblebee] Determines if the camera should grab rectified or raw images (1 is the default)
141  *
142  * # Options for grabber_type= ffmpeg -------------------------------------
143  * ffmpeg_url = rtsp://127.0.0.1 // [ffmpeg] The video file or IP camera to open
144  *
145  * # Options for grabber_type= rawlog -------------------------------------
146  * 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.
147  * 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.
148  *
149  * # Options for grabber_type= svs -------------------------------------
150  * svs_camera_index = 0
151  * svs_frame_width = 800
152  * svs_frame_height = 600
153  * svs_framerate = 25.0
154  * svs_NDisp = ...
155  * svs_Corrsize = ...
156  * svs_LR = ...
157  * svs_Thresh = ...
158  * svs_Unique = ...
159  * svs_Horopter = ...
160  * svs_SpeckleSize = ...
161  * svs_procesOnChip = false
162  * svs_calDisparity = true
163  *
164  * # Options for grabber_type= swissranger -------------------------------------
165  * sr_use_usb = true // True: use USB, false: use ethernet
166  * sr_IP = 192.168.2.14 // If sr_use_usb=false, the camera IP
167  * sr_grab_grayscale = true // whether to save the intensity channel
168  * sr_grab_3d = true // whether to save the 3D points
169  * sr_grab_range = true // whether to save the range image
170  * sr_grab_confidence = true // whether to save the confidence image
171  *
172  * # Options for grabber_type= XBox kinect -------------------------------------
173  * kinect_grab_intensity = true // whether to save the intensity (RGB) channel
174  * kinect_grab_3d = true // whether to save the 3D points
175  * kinect_grab_range = true // whether to save the depth image
176  * #kinect_video_rgb = true // Optional. If set to "false", the IR intensity channel will be grabbed instead of the color RGB channel.
177  *
178  * # Options for grabber_type= flycap (Point Grey Research's FlyCapture 2) --------
179  * flycap_camera_index = 0
180  * #... (all the parameters enumerated in mrpt::hwdrivers::TCaptureOptions_FlyCapture2 with the prefix "flycap_")
181  *
182  * # Options for grabber_type= flycap_stereo (Point Grey Research's FlyCapture 2, two cameras setup as a stereo pair) ------
183  * # fcs_start_synch_capture = false // *Important*: Only set to true if using Firewire cameras: the "startSyncCapture()" command is unsupported in USB3 and GigaE cameras.
184  *
185  * fcs_LEFT_camera_index = 0
186  * #... (all the parameters enumerated in mrpt::hwdrivers::TCaptureOptions_FlyCapture2 with the prefix "fcs_LEFT_")
187  * fcs_RIGHT_camera_index = 0
188  * #... (all the parameters enumerated in mrpt::hwdrivers::TCaptureOptions_FlyCapture2 with the prefix "fcs_RIGHT_")
189  *
190  * # Options for grabber_type= image_dir
191  * image_dir_url = // [string] URL of the directory
192  * left_filename_format = imL_%05d.jpg // [string] Format including prefix, number of trailing zeros, digits and image format (extension)
193  * 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.
194  * start_index = 0 // [int] Starting index for images
195  * end_index = 100 // [int] End index for the images
196  *
197  * # Options for grabber_type= duo3d
198  * Create a section like this:
199  * [DUO3DOptions]
200  * rawlog-grabber-ignore = true // Instructs rawlog-grabber to ignore this section (it is not a separate device!)
201  *
202  * image_width = 640 // [int] x Resolution
203  * image_height = 480 // [int] y Resolution
204  * fps = 30 // [int] Frames per second (<= 30)
205  * exposure = 50 // [int] Exposure value (1..100)
206  * led = 0 // [int] Led intensity (only for some device models) (1..100).
207  * gain = 50 // [int] Camera gain (1..100)
208  * capture_rectified = false // [bool] Rectify captured images
209  * capture_imu = true // [bool] Capture IMU data from DUO3D device (if available)
210  * calibration_from_file = true // [bool] Use YML calibration files provided by calibration application supplied with DUO3D device
211  * 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.
212  * 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.
213  * 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.
214  *
215  * // if 'calibration_from_file' = false, three more sections containing the calibration must be provided:
216  * [DUO3D_LEFT]
217  * rawlog-grabber-ignore = true // Instructs rawlog-grabber to ignore this section (it is not a separate device!)
218  * resolution = [640 480]
219  * cx = 320
220  * cy = 240
221  * fx = 700
222  * fy = 700
223  * dist = [0 0 0 0 0]
224  *
225  * [DUO3D_RIGHT]
226  * rawlog-grabber-ignore = true // Instructs rawlog-grabber to ignore this section (it is not a separate device!)
227  * resolution = [640 480]
228  * cx = 320
229  * cy = 240
230  * fx = 700
231  * fy = 700
232  * dist = [0 0 0 0 0]
233  *
234  * [DUO3D_LEFT2RIGHT_POSE]
235  * rawlog-grabber-ignore = true // Instructs rawlog-grabber to ignore this section (it is not a separate device!)
236  * pose_quaternion = [0.12 0 0 1 0 0 0]
237  *
238  * \endcode
239  *
240  * \note The execution rate, in rawlog-grabber or the user code calling doProcess(), should be greater than the required capture FPS.
241  * \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.
242  * \sa mrpt::hwdrivers::CImageGrabber_OpenCV, mrpt::hwdrivers::CImageGrabber_dc1394, CGenericSensor, prepareVideoSourceFromUserSelection()
243  * \ingroup mrpt_hwdrivers_grp
244  */
246  {
248 
249  public:
250  /** Constructor. The camera is not open until "initialize" is called. */
251  CCameraSensor();
252 
253  /** Destructor */
254  virtual ~CCameraSensor();
255 
256  // See docs in parent class
257  void doProcess();
258 
259  /** Retrieves the next frame from the video source, raising an exception on any error.
260  * Note: The returned observations can be of one of these classes (you can use IS_CLASS(obs,CObservationXXX) to determine it):
261  * - mrpt::obs::CObservationImage (For normal cameras or video sources)
262  * - mrpt::obs::CObservationStereoImages (For stereo cameras)
263  * - mrpt::obs::CObservation3DRangeScan (For 3D cameras)
264  */
265  mrpt::obs::CObservationPtr getNextFrame( );
266  void getNextFrame( std::vector<mrpt::utils::CSerializablePtr> & out_obs );
267 
268  /** Tries to open the camera, after setting all the parameters with a call to loadConfig.
269  * \exception This method must throw an exception with a descriptive message if some critical error is found.
270  */
271  virtual void initialize();
272 
273  /** Close the camera (if open).
274  * This method is called automatically on destruction.
275  */
276  void close();
277 
278  /** Set Software trigger level value (ON or OFF) for cameras with this function available.
279  */
280  void setSoftwareTriggerLevel( bool level );
281 
282  /** Set the path where to save off-rawlog image files (this class DOES take into account this path).
283  * An empty string (the default value at construction) means to save images embedded in the rawlog, instead of on separate files.
284  * \exception std::exception If the directory doesn't exists and cannot be created.
285  */
286  virtual void setPathForExternalImages( const std::string &directory );
287 
288  /** This must be called before initialize() */
289  void enableLaunchOwnThreadForSavingImages(bool enable=true) { m_external_images_own_thread = enable; };
290 
291  /** Functor type */
292  typedef void (*TPreSaveUserHook)(const mrpt::obs::CObservationPtr &obs, void* user_ptr);
293 
294  /** 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.)
295  * Notice that this code may be called from detached threads, so it must be thread safe.
296  * If used, call this before initialize() */
297  void addPreSaveHook( TPreSaveUserHook user_function, void *user_ptr ) { m_hook_pre_save=user_function; m_hook_pre_save_param=user_ptr; };
298 
299  protected:
300  // Options for any grabber_type ------------------------------------
302 
303  std::string m_grabber_type; //!< Can be "opencv",...
305 
306  // Options for grabber_type= opencv ------------------------------------
308  std::string m_cv_camera_type;
310 
311  // Options for grabber_type= dc1394 -------------------------------------
317 
318  // Options for grabber_type= bumblebee ----------------------------------
321  int m_bumblebee_monocam; // 0:Left, 1: Right, <0,>1 -> Stereo
322 
323  // Options for grabber type= svs -----------------------------------------
326 
327  // Options for grabber_type= ffmpeg -------------------------------------
328  std::string m_ffmpeg_url;
329 
330  // Options for grabber_type= rawlog -------------------------------------
331  std::string m_rawlog_file;
334 
335  // Options for grabber_type= swissranger -------------------------------------
336  bool m_sr_open_from_usb; //!< true: USB, false: ETH
337  std::string m_sr_ip_address;
338  bool m_sr_save_3d; //!< Save the 3D point cloud (default: true)
339  bool m_sr_save_range_img; //!< Save the 2D range image (default: true)
340  bool m_sr_save_intensity_img; //!< Save the 2D intensity image (default: true)
341  bool m_sr_save_confidence; //!< Save the estimated confidence 2D image (default: false)
342 
343  // Options for grabber_type= XBox kinect -------------------------------------
344  bool m_kinect_save_3d; //!< Save the 3D point cloud (default: true)
345  bool m_kinect_save_range_img; //!< Save the 2D range image (default: true)
346  bool m_kinect_save_intensity_img; //!< Save the 2D intensity image (default: true)
347  bool m_kinect_video_rgb; //!< Save RGB or IR channels (default:true)
348 
349  // Options for grabber type= flycap -----------------------------------------
351 
352  // Options for grabber type= flycap_stereo -----------------------------------------
354  TCaptureOptions_FlyCapture2 m_flycap_stereo_options[2]; // [0]:left, [1]:right
355 
356  // Options for grabber type= image_dir
357  std::string m_img_dir_url;
362 
365 
366  // Options for grabber type= duo3d
368 
369  // Other options:
370  bool m_external_images_own_thread; //!< Whether to launch independent thread
371 
372  /** See the class documentation at the top for expected parameters */
373  void loadConfig_sensorSpecific(
374  const mrpt::utils::CConfigFileBase &configSource,
375  const std::string &iniSection );
376 
377  private:
378  // Only one of these will be !=NULL at a time ===========
379  CImageGrabber_OpenCV * m_cap_cv; //!< The OpenCV capture object.
380  CImageGrabber_dc1394 * m_cap_dc1394; //!< The dc1394 capture object.
381  CImageGrabber_FlyCapture2 * m_cap_flycap; //!< The FlyCapture2 object
382  CImageGrabber_FlyCapture2 * m_cap_flycap_stereo_l, *m_cap_flycap_stereo_r; //!< The FlyCapture2 object for stereo pairs
383  CStereoGrabber_Bumblebee * m_cap_bumblebee; //!< The bumblebee capture object.
384  CStereoGrabber_SVS * m_cap_svs; //!< The svs capture object.
385  CFFMPEG_InputStream * m_cap_ffmpeg; //!< The FFMPEG capture object
386  mrpt::utils::CFileGZInputStream * m_cap_rawlog; //!< The input file for rawlogs
387  CSwissRanger3DCamera * m_cap_swissranger; //!< SR 3D camera object.
388  CKinect * m_cap_kinect; //!< Kinect camera object.
389  COpenNI2Sensor * m_cap_openni2; //!< OpenNI2 object.
390  std::string * m_cap_image_dir; //!< Read images from directory
391  CDUO3DCamera * m_cap_duo3d; //!< The DUO3D capture object
392  // =========================
393 
396 
398  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.
399 
400  /** @name Stuff related to working threads to save images to disk
401  @{ */
402  unsigned int m_external_image_saver_count; //!< Number of working threads. Default:1, set to 2 in quad cores.
403  std::vector<mrpt::system::TThreadHandle> m_threadImagesSaver;
404 
406  mrpt::synch::CCriticalSection m_csToSaveList; //!< The critical section for m_toSaveList
407  std::vector<TListObservations> m_toSaveList; //!< The queues of objects to be returned by getObservations, one for each working thread.
408  void thread_save_images(unsigned int my_working_thread_index); //!< Thread to save images to files.
409 
410  TPreSaveUserHook m_hook_pre_save;
412  /** @} */
413 
414  }; // end class
415 
416  typedef stlplus::smart_ptr<CCameraSensor> CCameraSensorPtr; //!< A smart pointer to a CCameraSensor
417 
418  /** Used only from MRPT apps: Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection *"
419  */
420  CCameraSensorPtr HWDRIVERS_IMPEXP prepareVideoSourceFromPanel(void *panel);
421 
422  /** Parse the user options in the wxWidgets "panel" and write the configuration into the given section of the given configuration file.
423  * Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection *"
424  * \sa prepareVideoSourceFromUserSelection, prepareVideoSourceFromPanel, readConfigIntoVideoSourcePanel
425  */
427  void *panel,
428  const std::string &in_cfgfile_section_name,
429  mrpt::utils::CConfigFileBase *out_cfgfile
430  );
431 
432  /** Parse the given section of the given configuration file and set accordingly the controls of the wxWidgets "panel".
433  * Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection *"
434  * \sa prepareVideoSourceFromUserSelection, prepareVideoSourceFromPanel, writeConfigFromVideoSourcePanel
435  */
437  void *panel,
438  const std::string &in_cfgfile_section_name,
439  const mrpt::utils::CConfigFileBase *in_cfgfile
440  );
441 
442  /** Show to the user a list of possible camera drivers and creates and open the selected camera.
443  */
445 
446 
447  } // end namespace
448 } // end namespace
449 
450 #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:125
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:25
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:72
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&#39;ll use only one window, but for stereo images we&#39;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.12 for MRPT 1.3.2 SVN: at Thu Nov 10 13:22:34 UTC 2016