Solar
Classes | Public Member Functions | List of all members
SolAR::MODULES::REALSENSE::SolARRGBDCamera Class Reference

This component handles a real sense RGBD camera and provides access to the color image, the depth image, and the 3D point cloud. More...

#include <SolARRGBDCameraRealSense.h>

Inheritance diagram for SolAR::MODULES::REALSENSE::SolARRGBDCamera:
Inheritance graph
[legend]
Collaboration diagram for SolAR::MODULES::REALSENSE::SolARRGBDCamera:
Collaboration graph
[legend]

Public Member Functions

org::bcom::xpcf::XPCFErrorCode onConfigured () override
 
FrameworkReturnCode getNextImage (SRef< datastructure::Image > &colorImg) override
 At the moment we are not able to deliver you only the RGB Image, as we aquiere both depth and image at the same time Please use getNextRGBDFrame() instead. More...
 
FrameworkReturnCode getNextDepthFrame (SRef< datastructure::Image > &depthImg) override
 At the moment we are not able to deliver you only the Depth Image, as we aquiere both depth and image at the same time Please use getNextRGBDFrame() instead. More...
 
FrameworkReturnCode getNextRGBDFrame (SRef< datastructure::Image > &colorImg, SRef< datastructure::Image > &depthImg) override
 Provides the last color image, depth image, corresponding 3D point cloud, and aligned images (RGB on depth and depth on RGB). If output parameters are null (nullptr), it means that the implementation, or the requested mode does not provide this feature. More...
 
FrameworkReturnCode getPointCloud (SRef< datastructure::PointCloud > &pc) override
 Provides the corresponding 3D point cloud to last depth image aquiered (getNextRGBDFrame()) Should have no effect if the user didn't call getNextRGBDFrame() beforehand. More...
 
FrameworkReturnCode start () override
 Start the acquisition device reference. More...
 
FrameworkReturnCode stop () override
 Stop the acquisition device. More...
 
virtual FrameworkReturnCode alignDepthToColor (SRef< datastructure::Image > &alignedDepthImg) const override
 Provides a depth image aligned on the color image. More...
 
virtual FrameworkReturnCode alignColorToDepth (SRef< datastructure::Image > &alignedColorImg) const override
 Provides a color image alingned on the depth image. More...
 
virtual datastructure::Point3Df getPixelToWorld (const datastructure::Point2Di &inPixel) const override
 Provides the 3D point in the depth sensor coordinate system corresponding to a given pixel of the color image. More...
 
virtual datastructure::Point2Di getWorldToPixel (const datastructure::CloudPoint &in3DPoint) const override
 Provides the pixel of the color image to the projection of a given 3D point. More...
 
virtual std::vector< datastructure::Point2Df > getWorldToPixels (const std::vector< SRef< datastructure::CloudPoint > > &in3DPoints) const override
 Provides the pixels of the color image to the projection of given 3D points. More...
 
void setResolution (const datastructure::Sizei &resolution) override
 Set the color image resolution of the acquisition device.
 
FrameworkReturnCode setDepthResolution (datastructure::Sizei resolution) override
 Set the depth image resolution of the acquisition device.
 
void setIntrinsicParameters (const datastructure::CamCalibration &intrinsic_parameters) override
 Set the intrinsic RGB camera parameters.
 
FrameworkReturnCode setIntrinsicDepthParameters (const datastructure::CamCalibration &intrinsic_parameters) override
 Set the intrinsic parameters of the depth camera.
 
void setDistortionParameters (const datastructure::CamDistortion &distortion_parameters) override
 Set the distortion intrinsic parameters of the RGB camera.
 
FrameworkReturnCode setDistortionDepthParameters (const datastructure::CamDistortion &distortion_parameters) override
 Set the distortion intrinsic parameters of the depth camera.
 
void setParameters (const datastructure::CameraParameters &parameters) override
 Set the distortion intrinsic camera parameters.
 
datastructure::Sizei getResolution () const override
 Get the image resolution of the RGB acquisition device.
 
datastructure::Sizei getDepthResolution () const override
 Get the image resolution of the depth acquisition device.
 
float getDepthMinDistance () const override
 Get the min acquisition distance of the device.
 
const datastructure::CamCalibration & getIntrinsicsParameters () const override
 
const datastructure::CameraParameters & getParameters () const override
 
const datastructure::CamCalibration & getIntrinsicsDepthParameters () const override
 
const datastructure::CamDistortion & getDistortionParameters () const override
 
const datastructure::CamDistortion & getDistortionDepthParameters () const override
 
void unloadComponent () override final
 

Detailed Description

This component handles a real sense RGBD camera and provides access to the color image, the depth image, and the 3D point cloud.

Properties
rgb_width
type: int; range : [0..MAX INT]; default: 0
rgb_height
type: int; range : [0..MAX INT]; default: 0
rgb_framerate
type: int; range : [0..MAX INT]; default: 30
depth_width
type: int; range : [0..MAX INT]; default: 0
depth_height
type: int; range : [0..MAX INT]; default: 0
depth_framerate
type: int; range : [0..MAX INT]; default: 30
depth_colorize call rs2::colorizer if >= 0
type: int; range : [MIN INT..MAX INT]; default: -1
depth_minimum
type: float; range : [0..MAX FLOAT]; default: 0.105f

Member Function Documentation

◆ alignColorToDepth()

virtual FrameworkReturnCode SolAR::MODULES::REALSENSE::SolARRGBDCamera::alignColorToDepth ( SRef< datastructure::Image > &  alignedColorImg) const
overridevirtual

Provides a color image alingned on the depth image.

Parameters
alignedColorImgthe RGB image captured by the RGBD camera and aligned on the depth image

◆ alignDepthToColor()

virtual FrameworkReturnCode SolAR::MODULES::REALSENSE::SolARRGBDCamera::alignDepthToColor ( SRef< datastructure::Image > &  alignedDepthImg) const
overridevirtual

Provides a depth image aligned on the color image.

Parameters
alignedDepthImgthe depth image captured by the RGBD camera and aligned on the color image

◆ getDistortionDepthParameters()

const datastructure::CamDistortion & SolAR::MODULES::REALSENSE::SolARRGBDCamera::getDistortionDepthParameters ( ) const
override
Returns
Return the distortion depth camera lens parameters

◆ getDistortionParameters()

const datastructure::CamDistortion & SolAR::MODULES::REALSENSE::SolARRGBDCamera::getDistortionParameters ( ) const
override
Returns
Return the distortion RGB camera lens parameters

◆ getIntrinsicsDepthParameters()

const datastructure::CamCalibration & SolAR::MODULES::REALSENSE::SolARRGBDCamera::getIntrinsicsDepthParameters ( ) const
override
Returns
Return the intrinsic depth camera parameters

◆ getIntrinsicsParameters()

const datastructure::CamCalibration & SolAR::MODULES::REALSENSE::SolARRGBDCamera::getIntrinsicsParameters ( ) const
override
Returns
Return the intrinsic RGB camera parameters

◆ getNextDepthFrame()

FrameworkReturnCode SolAR::MODULES::REALSENSE::SolARRGBDCamera::getNextDepthFrame ( SRef< datastructure::Image > &  depthImg)
override

At the moment we are not able to deliver you only the Depth Image, as we aquiere both depth and image at the same time Please use getNextRGBDFrame() instead.

Parameters
depthImgWill always be null
See also
getNextRGBDFrame()
Returns
FrameworkReturnCode Return fail event

◆ getNextImage()

FrameworkReturnCode SolAR::MODULES::REALSENSE::SolARRGBDCamera::getNextImage ( SRef< datastructure::Image > &  colorImg)
override

At the moment we are not able to deliver you only the RGB Image, as we aquiere both depth and image at the same time Please use getNextRGBDFrame() instead.

Parameters
colorImgWill always be null
See also
getNextRGBDFrame()
Returns
FrameworkReturnCode Return fail event

◆ getNextRGBDFrame()

FrameworkReturnCode SolAR::MODULES::REALSENSE::SolARRGBDCamera::getNextRGBDFrame ( SRef< datastructure::Image > &  colorImg,
SRef< datastructure::Image > &  depthImg 
)
override

Provides the last color image, depth image, corresponding 3D point cloud, and aligned images (RGB on depth and depth on RGB). If output parameters are null (nullptr), it means that the implementation, or the requested mode does not provide this feature.

Parameters
colorImgthe RGB image captured by the RGBD camera
depthImgthe depth image captured by the RGBD camera
Returns
FrameworkReturnCode to track sucessful or failing event.

◆ getParameters()

const datastructure::CameraParameters & SolAR::MODULES::REALSENSE::SolARRGBDCamera::getParameters ( ) const
override
Returns
Return the camera parameters

◆ getPixelToWorld()

virtual datastructure::Point3Df SolAR::MODULES::REALSENSE::SolARRGBDCamera::getPixelToWorld ( const datastructure::Point2Di &  inPixel) const
overridevirtual

Provides the 3D point in the depth sensor coordinate system corresponding to a given pixel of the color image.

Parameters
inPixelThe pixel for which we want the 3 position
Returns
a 3D point corresponding to the input pixel

◆ getPointCloud()

FrameworkReturnCode SolAR::MODULES::REALSENSE::SolARRGBDCamera::getPointCloud ( SRef< datastructure::PointCloud > &  pc)
override

Provides the corresponding 3D point cloud to last depth image aquiered (getNextRGBDFrame()) Should have no effect if the user didn't call getNextRGBDFrame() beforehand.

Parameters
pcthe 3D point cloud reconstructed from the depth image. Points coordinates are defined according to the RGBD camera coordinate system.
Returns
FrameworkReturnCode to track sucessful or failing event.

◆ getWorldToPixel()

virtual datastructure::Point2Di SolAR::MODULES::REALSENSE::SolARRGBDCamera::getWorldToPixel ( const datastructure::CloudPoint &  in3DPoint) const
overridevirtual

Provides the pixel of the color image to the projection of a given 3D point.

Parameters
in3DPointThe 3Dpoint we want to project on the color image
Returns
a 2D point representing a pixel of the color image on which the 3D point in projected

◆ getWorldToPixels()

virtual std::vector< datastructure::Point2Df > SolAR::MODULES::REALSENSE::SolARRGBDCamera::getWorldToPixels ( const std::vector< SRef< datastructure::CloudPoint > > &  in3DPoints) const
overridevirtual

Provides the pixels of the color image to the projection of given 3D points.

Parameters
in3DPointsThe 3D points we want to project on the color image
Returns
a 2D points vector representing the pixels of the color image on which the 3D points are projected

◆ start()

FrameworkReturnCode SolAR::MODULES::REALSENSE::SolARRGBDCamera::start ( )
override

Start the acquisition device reference.

Returns
FrameworkReturnCode to track sucessful or failing event.

◆ stop()

FrameworkReturnCode SolAR::MODULES::REALSENSE::SolARRGBDCamera::stop ( )
override

Stop the acquisition device.

Returns
FrameworkReturnCode::SUCCESS if sucessful, eiher FrameworkRetunrnCode::_ERROR.

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