Camera References

class RGBCamera
RGBCamera()

Construct the RGBCamera.

Return type:

RGBCamera

~RGBCamera()

Deconstruct the RGBCamera.

Return type:

None

setRelPose(const Ref<Vector<3>> B_r_BC, const Ref<Matrix<3, 3>> R_BC)

Set the relative position of the camera to quadrotor.

Parameters:
  • B_r_BC (const Ref<Vector<3>>) – relative position

  • R_BC (const Ref<Matrix<3, 3>>) – relative orientation

Return type:

bool

setWidth(const int width)

Set the width of the camera screen.

Parameters:

width (const int) – screen width

Return type:

bool

setHeight(const int height)

Set the height of the camera screen.

Parameters:

height (const int) – screen height

Return type:

bool

setFOV(const Scalar fov)

Set the field of view of the camera. Together with the height and the width the camera calibration matrix is defined.

Parameters:

fov (const Scalar) – Field of view

Return type:

bool

setDepthScale(const Scalar depth_scale)

Set the depth scale. The value needs to be within the range [0.0, 1.0].

Parameters:

depth_scale (const Scalar) – Depth scale

Return type:

bool

setPostProcesscing(const std::vector<bool>& enabled_layers)

Enable the post-processing layers.

Parameters:

enabled_layers (const std::vector<bool>&) – Layers enables (depth, segmentation, optical flow)

Return type:

bool

feedImageQueue(const int image_layer, const cv::Mat& image_mat)

Store OpenCV mat within a queue.

Parameters:
  • image_layer (const int) – Layers (rgb=0, depth=1, segmentation=2, optical flow=3)

  • image_mat (const cv::Mat&) – OpenCV Mat (CV_8UC3)

Return type:

bool

getEnabledLayers()

Get a list of enabled layers. (depth, segmentation, optical flow)

Return type:

std::vector<bool> (Default=false, false, false)

getRelPose()

Get the relative pose of the camera.

:rtype:Matrix<4, 4>

getChannels()

Get the number of channels of the camera.

Return type:

int (Default=3)

getWidth()

Get the width of the camera screen.

Return type:

int (Default=720)

getHeight()

Get the height of the camera screen.

Return type:

int (Default=480)

getFOV()

Get the field of view of the camera.

Return type:

Scalar (Default=70.0)

getDepthScale()

Get the depth scale of the camera.

Return type:

Scalar (Default=0.2)

getRGBImage(cv::Mat& rgb_img)

Get an image from the RGBImageQueue. Mat format CV_8UC3.

Return type:

bool, successfully retrieved an image

getDepthMap(cv::Mat& depth_map)

Get an image from the DepthMapQueue. Mat format CV_8UC3.

Return type:

bool, successfully retrieved an image

getSegmentation(cv::Mat& segmentation)

Get an image from the SegmentationQueue. Mat format CV_8UC3.

Return type:

bool, successfully retrieved an image

getOpticalFlow(cv::Mat& opticalflow)

Get an image from the OpticalFlowQueue. Mat format CV_8UC3.

Return type:

bool, successfully retrieved an image

enableDepth(const bool on)

Auxiliary function to enable the depth.

Parameters:

on (bool) – Enable depth

Return type:

None

enableSegmentation(const bool on)

Auxiliary function to enable the segmentation.

Parameters:

on (bool) – Enable segmentation

Return type:

None

enableOpticalFlow(const bool on)

Auxiliary function to enable the optical flow.

Parameters:

on (bool) – Enable optical flow

Return type:

None