Go to the documentation of this file.
10 #ifndef CCameraSensor_H
11 #define CCameraSensor_H
351 using Ptr = std::shared_ptr<CCameraSensor>;
371 std::vector<mrpt::serialization::CSerializable::Ptr>& out_obs);
588 void* panel,
const std::string& in_cfgfile_section_name,
599 void* panel,
const std::string& in_cfgfile_section_name,
std::shared_ptr< CObservation > Ptr
void setSoftwareTriggerLevel(bool level)
Set Software trigger level value (ON or OFF) for cameras with this function available.
TPreSaveUserHook m_hook_pre_save
virtual void initialize()
Tries to open the camera, after setting all the parameters with a call to loadConfig.
std::string m_rawlog_file
mrpt::gui::CDisplayWindow::Ptr m_preview_win1
Normally we'll use only one window, but for stereo images we'll use two of them.
bool m_kinect_video_rgb
Save RGB or IR channels (default:true)
std::unique_ptr< std::string > m_cap_image_dir
Read images from directory.
bool m_kinect_save_intensity_img
Save the 2D intensity image (default: true)
std::unique_ptr< CImageGrabber_FlyCapture2 > m_cap_flycap_stereo_l
The FlyCapture2 object for stereo pairs.
CCameraSensor()
Constructor.
The central class for camera grabbers in MRPT, implementing the "generic sensor" interface.
int m_bumblebee_dc1394_camera_unit
std::unique_ptr< CImageGrabber_FlyCapture2 > m_cap_flycap_stereo_r
uint64_t m_bumblebee_dc1394_camera_guid
Options used when creating a camera capture object of type CImageGrabber_FlyCapture2.
Options used when creating a STOC Videre Design camera capture object.
TCaptureOptions_DUO3D m_duo3d_options
int m_camera_grab_decimator_counter
bool m_kinect_save_range_img
Save the 2D range image (default: true)
std::string m_rawlog_camera_sensor_label
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
Options used when creating a camera capture object of type CImageGrabber_FlyCapture2.
std::string m_grabber_type
Can be "opencv",...
double m_bumblebee_dc1394_framerate
std::string m_sr_ip_address
virtual ~CCameraSensor()
Destructor.
std::shared_ptr< CDisplayWindow > Ptr
void enableLaunchOwnThreadForSavingImages(bool enable=true)
This must be called before initialize()
std::unique_ptr< CFFMPEG_InputStream > m_cap_ffmpeg
The FFMPEG capture object.
CCameraSensor::Ptr prepareVideoSourceFromUserSelection()
Show to the user a list of possible camera drivers and creates and open the selected camera.
TCaptureOptions_SVS m_svs_options
std::unique_ptr< CImageGrabber_OpenCV > m_cap_cv
The OpenCV capture object.
bool m_sr_save_confidence
Save the estimated confidence 2D image (default: false)
std::unique_ptr< CDUO3DCamera > m_cap_duo3d
The DUO3D capture object.
mrpt::obs::CObservation::Ptr getNextFrame()
Retrieves the next frame from the video source, raising an exception on any error.
std::string m_img_dir_left_format
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...
This class allows loading and storing values and vectors of different types from a configuration text...
std::unique_ptr< CImageGrabber_dc1394 > m_cap_dc1394
The dc1394 capture object.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
std::unique_ptr< CStereoGrabber_Bumblebee_libdc1394 > m_cap_bumblebee_dc1394
std::vector< TListObservations > m_toSaveList
The queues of objects to be returned by getObservations, one for each working thread.
unsigned __int64 uint64_t
std::unique_ptr< CSwissRanger3DCamera > m_cap_swissranger
SR 3D camera object.
int m_img_dir_start_index
std::unique_ptr< CImageGrabber_FlyCapture2 > m_cap_flycap
The FlyCapture2 object.
std::unique_ptr< mrpt::io::CFileGZInputStream > m_cap_rawlog
The input file for rawlogs.
unsigned int m_external_image_saver_count
Number of working threads.
std::function< void(const mrpt::obs::CObservation::Ptr &obs, void *user_ptr)> TPreSaveUserHook
Functor type.
CCameraSensor::Ptr prepareVideoSourceFromPanel(void *panel)
Used only from MRPT apps: Use with caution since "panel" MUST be a "mrpt::gui::CPanelCameraSelection ...
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Options used when creating an dc1394 capture object All but the frame size, framerate,...
TCaptureCVOptions m_cv_options
std::unique_ptr< CStereoGrabber_SVS > m_cap_svs
The svs capture object.
Versatile class for consistent logging and management of output messages.
std::string m_img_dir_right_format
bool m_external_images_own_thread
Whether to launch independent thread.
std::mutex m_csToSaveList
The critical section for m_toSaveList.
std::string m_cv_camera_type
TCaptureOptions_FlyCapture2 m_flycap_options
uint64_t m_dc1394_camera_guid
bool m_sr_save_range_img
Save the 2D range image (default: true)
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
Options used when creating an OpenCV capture object Some options apply to IEEE1394 cameras only.
void * m_hook_pre_save_param
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
bool m_sr_save_3d
Save the 3D point cloud (default: true)
bool m_threadImagesSaverShouldEnd
std::string m_img_dir_url
bool m_sr_save_intensity_img
Save the 2D intensity image (default: true)
bool m_sr_open_from_usb
true: USB, false: ETH
void close()
Close the camera (if open).
void writeConfigFromVideoSourcePanel(void *panel, const std::string &in_cfgfile_section_name, mrpt::config::CConfigFileBase *out_cfgfile)
Parse the user options in the wxWidgets "panel" and write the configuration into the given section of...
bool m_kinect_save_3d
Save the 3D point cloud (default: true)
GLsizei const GLchar ** string
std::shared_ptr< CCameraSensor > Ptr
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection)
See the class documentation at the top for expected parameters.
TCaptureOptions_FlyCapture2 m_flycap_stereo_options[2]
int m_camera_grab_decimator
void readConfigIntoVideoSourcePanel(void *panel, const std::string &in_cfgfile_section_name, const mrpt::config::CConfigFileBase *in_cfgfile)
Parse the given section of the given configuration file and set accordingly the controls of the wxWid...
virtual void setPathForExternalImages(const std::string &directory)
Set the path where to save off-rawlog image files (this class DOES take into account this path).
std::unique_ptr< CKinect > m_cap_kinect
Kinect camera object.
std::string m_rawlog_detected_images_dir
std::vector< std::thread > m_threadImagesSaver
poses::CPose3D m_sensorPose
void thread_save_images(unsigned int my_working_thread_index)
Thread to save images to files.
bool m_fcs_start_synch_capture
mrpt::gui::CDisplayWindow::Ptr m_preview_win2
std::unique_ptr< COpenNI2Sensor > m_cap_openni2
OpenNI2 object.
TCaptureOptions_dc1394 m_dc1394_options
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |