RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
rtabmap::CameraVideo Class Reference
Inheritance diagram for rtabmap::CameraVideo:
Collaboration diagram for rtabmap::CameraVideo:

Public Types

enum  Source { kVideoFile , kUsbDevice }
 

Public Member Functions

 CameraVideo (int usbDevice=0, bool rectifyImages=false, float imageRate=0, const Transform &localTransform=Transform::getIdentity())
 
 CameraVideo (const std::string &filePath, bool rectifyImages=false, float imageRate=0, const Transform &localTransform=Transform::getIdentity())
 
virtual bool init (const std::string &calibrationFolder=".", const std::string &cameraName="")
 Initializes the sensor.
 
virtual bool isCalibrated () const
 
virtual std::string getSerial () const
 Returns the sensor's serial number or unique identifier.
 
int getUsbDevice () const
 
const std::string & getFilePath () const
 
void setResolution (int width, int height)
 
void setFOURCC (const std::string &fourcc)
 
- Public Member Functions inherited from rtabmap::Camera
SensorData takeImage (SensorCaptureInfo *info=0)
 
float getImageRate () const
 
void setImageRate (float imageRate)
 
void setInterIMUPublishing (bool enabled, IMUFilter *filter=0, bool baseFrameConversion=false)
 
bool isInterIMUPublishing () const
 
bool initFromFile (const std::string &calibrationPath)
 
- Public Member Functions inherited from rtabmap::SensorCapture
virtual ~SensorCapture ()
 Virtual destructor.
 
SensorData takeData (SensorCaptureInfo *info=0)
 Captures sensor data with frame rate control.
 
virtual bool odomProvided () const
 Checks if the sensor provides odometry poses.
 
virtual bool getPose (double stamp, Transform &pose, cv::Mat &covariance, double maxWaitTime=0.06)
 Gets the sensor's pose estimate at a specific timestamp.
 
float getFrameRate () const
 Returns the target frame rate.
 
const TransformgetLocalTransform () const
 Returns the local transform from base frame to sensor frame.
 
void setFrameRate (float frameRate)
 Sets the target frame rate.
 
void setLocalTransform (const Transform &localTransform)
 Sets the local transform from base frame to sensor frame.
 
void resetTimer ()
 Resets the frame rate timer.
 

Protected Member Functions

virtual SensorData captureImage (SensorCaptureInfo *info=0)
 
- Protected Member Functions inherited from rtabmap::Camera
 Camera (float imageRate=0, const Transform &localTransform=Transform::getIdentity())
 
void postInterIMU (const IMU &imu, double stamp)
 
- Protected Member Functions inherited from rtabmap::SensorCapture
 SensorCapture (float frameRate=0, const Transform &localTransform=Transform::getIdentity())
 Protected constructor.
 
int getNextSeqID ()
 Gets the next sequence ID.
 

Detailed Description

Definition at line 36 of file CameraVideo.h.

Member Enumeration Documentation

◆ Source

enum rtabmap::CameraVideo::Source

Definition at line 40 of file CameraVideo.h.

Member Function Documentation

◆ init()

virtual bool rtabmap::CameraVideo::init ( const std::string &  calibrationFolder = ".",
const std::string &  cameraName = "" 
)
virtual

Initializes the sensor.

Pure virtual method that must be implemented by derived classes to initialize the sensor hardware or data source. This typically involves:

  • Opening device connections or file streams
  • Loading camera calibration parameters
  • Configuring sensor settings
Parameters
calibrationFolderDirectory path where calibration files are located (default: current directory ".")
cameraNameBase name of the camera for loading calibration files (default: empty string)
Returns
True if initialization was successful, false otherwise
Note
Must be called before calling takeData() or captureData()

Implements rtabmap::SensorCapture.

◆ isCalibrated()

virtual bool rtabmap::CameraVideo::isCalibrated ( ) const
virtual

Implements rtabmap::Camera.

◆ getSerial()

virtual std::string rtabmap::CameraVideo::getSerial ( ) const
virtual

Returns the sensor's serial number or unique identifier.

Pure virtual method that must be implemented by derived classes to return a unique identifier for the sensor (e.g., device serial number, file path, or other identifier).

Returns
String identifier for the sensor

Implements rtabmap::SensorCapture.

◆ getUsbDevice()

int rtabmap::CameraVideo::getUsbDevice ( ) const
inline

Definition at line 56 of file CameraVideo.h.

◆ getFilePath()

const std::string & rtabmap::CameraVideo::getFilePath ( ) const
inline

Definition at line 57 of file CameraVideo.h.

◆ setResolution()

void rtabmap::CameraVideo::setResolution ( int  width,
int  height 
)
inline

Set wanted usb resolution, should be set before initialization. 0 means default resolution. It won't be applied if a valid camera calibration has been loaded, thus resolution from calibration is used.

Definition at line 64 of file CameraVideo.h.

◆ setFOURCC()

void rtabmap::CameraVideo::setFOURCC ( const std::string &  fourcc)
inline

Definition at line 65 of file CameraVideo.h.

◆ captureImage()

virtual SensorData rtabmap::CameraVideo::captureImage ( SensorCaptureInfo info = 0)
protectedvirtual

Implements rtabmap::Camera.


The documentation for this class was generated from the following file: