mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Added resolution parameters for Usb camera and realsense2 sources
This commit is contained in:
@@ -59,7 +59,6 @@ public:
|
||||
static bool available();
|
||||
|
||||
public:
|
||||
// default local transform z in, x right, y down));
|
||||
CameraRealSense2(
|
||||
const std::string & deviceId = "",
|
||||
float imageRate = 0,
|
||||
@@ -72,8 +71,11 @@ public:
|
||||
bool odomProvided() const;
|
||||
|
||||
// parameters are set during initialization
|
||||
// D400 series
|
||||
void setEmitterEnabled(bool enabled);
|
||||
void setIRDepthFormat(bool enabled);
|
||||
void setResolution(int width, int height, int fps = 30);
|
||||
// T265 related parameters
|
||||
void setImagesRectified(bool enabled);
|
||||
void setOdomProvided(bool enabled);
|
||||
|
||||
@@ -117,6 +119,9 @@ private:
|
||||
bool irDepth_;
|
||||
bool rectifyImages_;
|
||||
bool odometryProvided_;
|
||||
int cameraWidth_;
|
||||
int cameraHeight_;
|
||||
int cameraFps_;
|
||||
|
||||
static Transform realsense2PoseRotation_;
|
||||
static Transform realsense2PoseRotationInv_;
|
||||
|
||||
@@ -58,6 +58,13 @@ public:
|
||||
int getUsbDevice() const {return _usbDevice;}
|
||||
const std::string & getFilePath() const {return _filePath;}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* */
|
||||
void setResolution(int width, int height) {_width=width, _height=height;}
|
||||
|
||||
protected:
|
||||
virtual SensorData captureImage(CameraInfo * info = 0);
|
||||
|
||||
@@ -72,6 +79,8 @@ private:
|
||||
// Usb camera
|
||||
int _usbDevice;
|
||||
std::string _guid;
|
||||
int _width;
|
||||
int _height;
|
||||
|
||||
CameraModel _model;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user