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

Public Member Functions

 CameraImages (const std::string &path, 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.
 
virtual bool odomProvided () const
 Checks if the sensor provides odometry poses.
 
std::string getPath () const
 
unsigned int imagesCount () const
 
std::vector< std::string > filenames () const
 
bool isImagesRectified () const
 
int getBayerMode () const
 
const CameraModelcameraModel () const
 
void setPath (const std::string &dir)
 
virtual void setStartIndex (int index)
 
virtual void setMaxFrames (int value)
 
void setDirRefreshed (bool enabled)
 
void setImagesRectified (bool enabled)
 
void setBayerMode (int mode)
 
void setTimestamps (bool fileNamesAreStamps, const std::string &filePath="", bool syncImageRateWithStamps=true)
 
void setConfigForEachFrame (bool value)
 
bool isConfigForEachFrame () const
 
void setMultiCameraCalibration (bool enabled)
 
void setScanPath (const std::string &dir, int maxScanPts=0, const Transform &localTransform=Transform::getIdentity())
 
void setDepthFromScan (bool enabled, int fillHoles=1, bool fillHolesFromBorder=false)
 
void setOdometryPath (const std::string &filePath, int format=0)
 
void setGroundTruthPath (const std::string &filePath, int format=0, const Transform &localTransform=Transform::getIdentity())
 
void setMaxPoseTimeDiff (double diff)
 
double getMaxPoseTimeDiff () const
 
void setDepth (bool isDepth, float depthScaleFactor=1.0f)
 
- 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 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)
 
const std::string & lastImageFileName () const
 
- 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.
 

Protected Attributes

std::string _calibrationFolder
 
bool _multiCameraCalib
 
int _multiCameraCount
 

Detailed Description

Definition at line 39 of file CameraImages.h.

Member Function Documentation

◆ init()

virtual bool rtabmap::CameraImages::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.

Reimplemented in rtabmap::CameraRGBDImages, and rtabmap::CameraStereoImages.

◆ isCalibrated()

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

Implements rtabmap::Camera.

◆ getSerial()

virtual std::string rtabmap::CameraImages::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.

Reimplemented in rtabmap::CameraStereoImages.

◆ odomProvided()

virtual bool rtabmap::CameraImages::odomProvided ( ) const
inlinevirtual

Checks if the sensor provides odometry poses.

Some sensors (e.g., visual-inertial cameras) can provide pose estimates directly. This method indicates whether the sensor supports pose queries.

Returns
True if the sensor provides odometry poses, false otherwise
Note
Default implementation returns false. Derived classes should override if they support pose estimation.
See also
getPose()

Reimplemented from rtabmap::SensorCapture.

Definition at line 53 of file CameraImages.h.

◆ getPath()

std::string rtabmap::CameraImages::getPath ( ) const
inline

Definition at line 54 of file CameraImages.h.

◆ isImagesRectified()

bool rtabmap::CameraImages::isImagesRectified ( ) const
inline

Definition at line 57 of file CameraImages.h.

◆ getBayerMode()

int rtabmap::CameraImages::getBayerMode ( ) const
inline

Definition at line 58 of file CameraImages.h.

◆ cameraModel()

const CameraModel & rtabmap::CameraImages::cameraModel ( ) const
inline

Definition at line 59 of file CameraImages.h.

◆ setPath()

void rtabmap::CameraImages::setPath ( const std::string &  dir)
inline

Definition at line 61 of file CameraImages.h.

◆ setStartIndex()

virtual void rtabmap::CameraImages::setStartIndex ( int  index)
inlinevirtual

Definition at line 62 of file CameraImages.h.

◆ setMaxFrames()

virtual void rtabmap::CameraImages::setMaxFrames ( int  value)
inlinevirtual

Definition at line 63 of file CameraImages.h.

◆ setDirRefreshed()

void rtabmap::CameraImages::setDirRefreshed ( bool  enabled)
inline

Definition at line 64 of file CameraImages.h.

◆ setImagesRectified()

void rtabmap::CameraImages::setImagesRectified ( bool  enabled)
inline

Definition at line 65 of file CameraImages.h.

◆ setBayerMode()

void rtabmap::CameraImages::setBayerMode ( int  mode)
inline

Definition at line 66 of file CameraImages.h.

◆ setTimestamps()

void rtabmap::CameraImages::setTimestamps ( bool  fileNamesAreStamps,
const std::string &  filePath = "",
bool  syncImageRateWithStamps = true 
)
inline

Definition at line 68 of file CameraImages.h.

◆ setConfigForEachFrame()

void rtabmap::CameraImages::setConfigForEachFrame ( bool  value)
inline

Definition at line 75 of file CameraImages.h.

◆ isConfigForEachFrame()

bool rtabmap::CameraImages::isConfigForEachFrame ( ) const
inline

Definition at line 79 of file CameraImages.h.

◆ setMultiCameraCalibration()

void rtabmap::CameraImages::setMultiCameraCalibration ( bool  enabled)
inline

Definition at line 97 of file CameraImages.h.

◆ setScanPath()

void rtabmap::CameraImages::setScanPath ( const std::string &  dir,
int  maxScanPts = 0,
const Transform localTransform = Transform::getIdentity() 
)
inline

Definition at line 102 of file CameraImages.h.

◆ setDepthFromScan()

void rtabmap::CameraImages::setDepthFromScan ( bool  enabled,
int  fillHoles = 1,
bool  fillHolesFromBorder = false 
)
inline

Definition at line 112 of file CameraImages.h.

◆ setOdometryPath()

void rtabmap::CameraImages::setOdometryPath ( const std::string &  filePath,
int  format = 0 
)
inline

Definition at line 120 of file CameraImages.h.

◆ setGroundTruthPath()

void rtabmap::CameraImages::setGroundTruthPath ( const std::string &  filePath,
int  format = 0,
const Transform localTransform = Transform::getIdentity() 
)
inline

Definition at line 127 of file CameraImages.h.

◆ setMaxPoseTimeDiff()

void rtabmap::CameraImages::setMaxPoseTimeDiff ( double  diff)
inline

Definition at line 134 of file CameraImages.h.

◆ getMaxPoseTimeDiff()

double rtabmap::CameraImages::getMaxPoseTimeDiff ( ) const
inline

Definition at line 135 of file CameraImages.h.

◆ setDepth()

void rtabmap::CameraImages::setDepth ( bool  isDepth,
float  depthScaleFactor = 1.0f 
)
inline

Definition at line 137 of file CameraImages.h.

◆ captureImage()

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

Implements rtabmap::Camera.

◆ lastImageFileName()

const std::string & rtabmap::CameraImages::lastImageFileName ( ) const
inlineprotected

Definition at line 149 of file CameraImages.h.

Member Data Documentation

◆ _calibrationFolder

std::string rtabmap::CameraImages::_calibrationFolder
protected

Definition at line 153 of file CameraImages.h.

◆ _multiCameraCalib

bool rtabmap::CameraImages::_multiCameraCalib
protected

Definition at line 159 of file CameraImages.h.

◆ _multiCameraCount

int rtabmap::CameraImages::_multiCameraCount
protected

Definition at line 160 of file CameraImages.h.


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