Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
rtabmap::CameraVideo Class Reference

#include <CameraVideo.h>

Inheritance diagram for rtabmap::CameraVideo:
Inheritance graph
[legend]

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())
 
const std::stringgetFilePath () const
 
virtual std::string getSerial () const
 
int getUsbDevice () const
 
virtual bool init (const std::string &calibrationFolder=".", const std::string &cameraName="")
 
virtual bool isCalibrated () const
 
void setResolution (int width, int height)
 
virtual ~CameraVideo ()
 
- Public Member Functions inherited from rtabmap::Camera
float getImageRate () const
 
const TransformgetLocalTransform () const
 
virtual bool getPose (double stamp, Transform &pose, cv::Mat &covariance)
 
bool initFromFile (const std::string &calibrationPath)
 
virtual bool odomProvided () const
 
void resetTimer ()
 
void setImageRate (float imageRate)
 
void setLocalTransform (const Transform &localTransform)
 
SensorData takeImage (CameraInfo *info=0)
 
virtual ~Camera ()
 

Protected Member Functions

virtual SensorData captureImage (CameraInfo *info=0)
 
- Protected Member Functions inherited from rtabmap::Camera
 Camera (float imageRate=0, const Transform &localTransform=Transform::getIdentity())
 
int getNextSeqID ()
 

Private Attributes

cv::VideoCapture _capture
 
std::string _filePath
 
std::string _guid
 
int _height
 
CameraModel _model
 
bool _rectifyImages
 
Source _src
 
int _usbDevice
 
int _width
 

Detailed Description

Definition at line 38 of file CameraVideo.h.

Member Enumeration Documentation

◆ Source

Enumerator
kVideoFile 
kUsbDevice 

Definition at line 42 of file CameraVideo.h.

Constructor & Destructor Documentation

◆ CameraVideo() [1/2]

rtabmap::CameraVideo::CameraVideo ( int  usbDevice = 0,
bool  rectifyImages = false,
float  imageRate = 0,
const Transform localTransform = Transform::getIdentity() 
)

Definition at line 41 of file CameraVideo.cpp.

◆ CameraVideo() [2/2]

rtabmap::CameraVideo::CameraVideo ( const std::string filePath,
bool  rectifyImages = false,
float  imageRate = 0,
const Transform localTransform = Transform::getIdentity() 
)

Definition at line 56 of file CameraVideo.cpp.

◆ ~CameraVideo()

rtabmap::CameraVideo::~CameraVideo ( )
virtual

Definition at line 71 of file CameraVideo.cpp.

Member Function Documentation

◆ captureImage()

SensorData rtabmap::CameraVideo::captureImage ( CameraInfo info = 0)
protectedvirtual

returned rgb and depth images should be already rectified if calibration was loaded

Implements rtabmap::Camera.

Definition at line 165 of file CameraVideo.cpp.

◆ getFilePath()

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

Definition at line 59 of file CameraVideo.h.

◆ getSerial()

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

Implements rtabmap::Camera.

Definition at line 160 of file CameraVideo.cpp.

◆ getUsbDevice()

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

Definition at line 58 of file CameraVideo.h.

◆ init()

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

Implements rtabmap::Camera.

Definition at line 76 of file CameraVideo.cpp.

◆ isCalibrated()

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

Implements rtabmap::Camera.

Definition at line 155 of file CameraVideo.cpp.

◆ 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 66 of file CameraVideo.h.

Member Data Documentation

◆ _capture

cv::VideoCapture rtabmap::CameraVideo::_capture
private

Definition at line 76 of file CameraVideo.h.

◆ _filePath

std::string rtabmap::CameraVideo::_filePath
private

Definition at line 73 of file CameraVideo.h.

◆ _guid

std::string rtabmap::CameraVideo::_guid
private

Definition at line 81 of file CameraVideo.h.

◆ _height

int rtabmap::CameraVideo::_height
private

Definition at line 83 of file CameraVideo.h.

◆ _model

CameraModel rtabmap::CameraVideo::_model
private

Definition at line 85 of file CameraVideo.h.

◆ _rectifyImages

bool rtabmap::CameraVideo::_rectifyImages
private

Definition at line 74 of file CameraVideo.h.

◆ _src

Source rtabmap::CameraVideo::_src
private

Definition at line 77 of file CameraVideo.h.

◆ _usbDevice

int rtabmap::CameraVideo::_usbDevice
private

Definition at line 80 of file CameraVideo.h.

◆ _width

int rtabmap::CameraVideo::_width
private

Definition at line 82 of file CameraVideo.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:39:00