10 #ifndef CCameraSensor_H
11 #define CCameraSensor_H
263 mrpt::obs::CObservationPtr getNextFrame( );
264 void getNextFrame( std::vector<mrpt::utils::CSerializablePtr> & out_obs );
269 virtual void initialize();
278 void setSoftwareTriggerLevel(
bool level );
284 virtual void setPathForExternalImages(
const std::string &directory );
290 typedef void (*TPreSaveUserHook)(
const mrpt::obs::CObservationPtr &obs,
void* user_ptr);
295 void addPreSaveHook( TPreSaveUserHook user_function,
void *user_ptr ) { m_hook_pre_save=user_function; m_hook_pre_save_param=user_ptr; };
371 void loadConfig_sensorSpecific(
406 void thread_save_images(
unsigned int my_working_thread_index);
416 std::shared_ptr<CCameraSensor>
m_ptr;
424 virtual const CCameraSensor* operator ->(
void)
const {
return m_ptr.get(); }
429 operator bool()
const {
return m_ptr.operator bool(); }
430 bool present()
const {
return m_ptr.get()!=NULL; }
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
The central class for camera grabbers in MRPT, implementing the "generic sensor" interface.
CSwissRanger3DCamera * m_cap_swissranger
SR 3D camera object.
bool m_sr_save_confidence
Save the estimated confidence 2D image (default: false)
void enableLaunchOwnThreadForSavingImages(bool enable=true)
This must be called before initialize()
bool m_kinect_save_range_img
Save the 2D range image (default: true)
void addPreSaveHook(TPreSaveUserHook user_function, void *user_ptr)
Provides a "hook" for user-code to be run BEFORE an image is going to be saved to disk if external st...
bool m_kinect_save_3d
Save the 3D point cloud (default: true)
unsigned int m_external_image_saver_count
Number of working threads. Default:1, set to 2 in quad cores.
int m_camera_grab_decimator
int m_img_dir_start_index
std::string m_sr_ip_address
TCaptureOptions_DUO3D m_duo3d_options
CImageGrabber_FlyCapture2 * m_cap_flycap
The FlyCapture2 object.
double m_bumblebee_dc1394_framerate
std::string m_rawlog_file
std::string m_img_dir_right_format
TCaptureOptions_dc1394 m_dc1394_options
mrpt::utils::CFileGZInputStream * m_cap_rawlog
The input file for rawlogs.
CStereoGrabber_Bumblebee_libdc1394 * m_cap_bumblebee_dc1394
bool m_threadImagesSaverShouldEnd
bool m_sr_open_from_usb
true: USB, false: ETH
uint64_t m_bumblebee_dc1394_camera_guid
std::vector< TListObservations > m_toSaveList
The queues of objects to be returned by getObservations, one for each working thread.
bool m_fcs_start_synch_capture
bool m_kinect_video_rgb
Save RGB or IR channels (default:true)
CImageGrabber_OpenCV * m_cap_cv
The OpenCV capture object.
bool m_external_images_own_thread
Whether to launch independent thread.
bool m_sr_save_3d
Save the 3D point cloud (default: true)
std::string m_rawlog_detected_images_dir
std::string * m_cap_image_dir
Read images from directory.
bool m_sr_save_intensity_img
Save the 2D intensity image (default: true)
uint64_t m_dc1394_camera_guid
CImageGrabber_dc1394 * m_cap_dc1394
The dc1394 capture object.
poses::CPose3D m_sensorPose
std::string m_img_dir_left_format
TCaptureOptions_FlyCapture2 m_flycap_options
std::vector< mrpt::system::TThreadHandle > m_threadImagesSaver
CImageGrabber_FlyCapture2 * m_cap_flycap_stereo_l
TCaptureOptions_SVS m_svs_options
CKinect * m_cap_kinect
Kinect camera object.
CDUO3DCamera * m_cap_duo3d
The DUO3D capture object.
void getNextFrame(std::vector< mrpt::utils::CSerializablePtr > &out_obs)
bool m_kinect_save_intensity_img
Save the 2D intensity image (default: true)
std::string m_cv_camera_type
bool m_sr_save_range_img
Save the 2D range image (default: true)
std::string m_img_dir_url
int m_camera_grab_decimator_counter
int m_bumblebee_dc1394_camera_unit
std::string m_grabber_type
Can be "opencv",...
TPreSaveUserHook m_hook_pre_save
CStereoGrabber_SVS * m_cap_svs
The svs capture object.
CFFMPEG_InputStream * m_cap_ffmpeg
The FFMPEG capture object.
mrpt::synch::CCriticalSection m_csToSaveList
The critical section for m_toSaveList.
COpenNI2Sensor * m_cap_openni2
OpenNI2 object.
mrpt::gui::CDisplayWindowPtr m_preview_win1
TCaptureCVOptions m_cv_options
void * m_hook_pre_save_param
std::string m_rawlog_camera_sensor_label
This "software driver" implements the communication protocol for interfacing a DUO3D Stereo Camera.
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
A wrapper for Point Gray Research (PGR) FlyCapture2 API for capturing images from Firewire,...
A class for grabing images from a "OpenCV"-compatible camera, or from an AVI video file.
A class for grabing images from a IEEE1394 (Firewire) camera using the libdc1394-2 library.
A class for grabing "range images", intensity images (either RGB or IR) and other information from an...
A class for grabing "range images", intensity images (either RGB or IR) and other information from an...
Grabs from a "Bumblebee" or "Bumblebee2" stereo camera using raw access to the libdc1394 library.
A class for grabing stereo images from a STOC camera of Videre Design NOTE:
A class for grabing "range images" from a MESA imaging SwissRanger 3D cameras (SR-2,...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
This class provides simple critical sections functionality.
This class allows loading and storing values and vectors of different types from a configuration text...
GLsizei GLsizei GLenum GLenum const GLvoid * data
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
GLsizei const GLchar ** string
std::vector< T1 > operator*(const std::vector< T1 > &a, const std::vector< T2 > &b)
a*b (element-wise multiplication)
Eigen::MatrixBase< Derived >::PlainObject operator!(const Eigen::MatrixBase< Derived > &m)
Unary inversion operator.
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...
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...
CCameraSensorPtr HWDRIVERS_IMPEXP prepareVideoSourceFromPanel(void *panel)
Used only from MRPT apps: Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection ...
CCameraSensorPtr HWDRIVERS_IMPEXP prepareVideoSourceFromUserSelection()
Show to the user a list of possible camera drivers and creates and open the selected camera.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned __int64 uint64_t
void set(CCameraSensor *p)
virtual CCameraSensor * get()
virtual const CCameraSensor * get() const
CCameraSensorPtr(CCameraSensor *data)
void reset(CCameraSensor *p)
std::shared_ptr< CCameraSensor > m_ptr
virtual CCameraSensor * pointer()
virtual const CCameraSensor * pointer() const
Options used when creating an OpenCV capture object Some options apply to IEEE1394 cameras only.
Options used when creating a camera capture object of type CImageGrabber_FlyCapture2.
Options used when creating a camera capture object of type CImageGrabber_FlyCapture2.
Options used when creating a STOC Videre Design camera capture object.
Options used when creating an dc1394 capture object All but the frame size, framerate,...