6#ifndef DEPTHCAMERA_DRIVER_H
7#define DEPTHCAMERA_DRIVER_H
24#define RAD2DEG (180/3.14159265359)
28#define DEG2RAD (3.14159265359/180.0)
198 bool close()
override;
252 inline bool initializeOpeNIDevice();
253 inline bool setParams();
256 bool setResolution(
int w,
int h, openni::VideoStream& stream);
257 bool setFOV(
double horizontalFov,
double verticalFov, openni::VideoStream& stream);
259 void settingErrorMsg(
const std::string&
error,
bool&
ret);
262 openni::VideoStream m_depthStream;
263 openni::VideoStream m_imageStream;
264 openni::Device m_device;
267 std::string m_lastError;
269 bool m_depthRegistration;
270 std::vector<cameraFeature_id_t> m_supportedFeatures;
contains the definition of a Matrix type
depthCamera: YARP driver for OpenNI2 compatible devices.
yarp::dev::ReturnValue getRgbImage(FlexImage &rgbImage, Stamp *timeStamp=NULL) override
Get the rgb frame from the device.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue setMode(int feature, FeatureMode mode) override
yarp::dev::ReturnValue setActive(int feature, bool onoff) override
yarp::dev::ReturnValue setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
yarp::dev::ReturnValue getDepthImage(depthImage &depthImage, Stamp *timeStamp=NULL) override
yarp::dev::ReturnValue setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
int getDepthHeight() override
Return the height of each frame.
yarp::dev::ReturnValue setDepthClipPlanes(double nearPlane, double farPlane) override
Set the clipping planes of the sensor.
int getRgbHeight() override
Return the height of each frame.
RGBDSensor_status getSensorStatus() override
yarp::dev::ReturnValue getCameraDescription(CameraDescriptor *camera) override
yarp::dev::ReturnValue getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue getDepthAccuracy(double &accuracy) override
Get the minimum detectable variation in distance [meter].
yarp::dev::ReturnValue getActive(int feature, bool *isActive) override
yarp::dev::ReturnValue getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
yarp::dev::ReturnValue getRgbIntrinsicParam(Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
yarp::dev::ReturnValue setDepthResolution(int width, int height) override
Set the resolution of the depth image from the camera.
yarp::dev::ReturnValue getExtrinsicParam(yarp::sig::Matrix &extrinsic) override
Get the extrinsic parameters from the device.
yarp::dev::ReturnValue getMode(int feature, FeatureMode *mode) override
std::string getLastErrorMsg(Stamp *timeStamp=NULL) override
yarp::dev::ReturnValue getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
yarp::dev::ReturnValue getFeature(int feature, double *value) override
int getRgbWidth() override
Return the width of each frame.
int getDepthWidth() override
Return the height of each frame.
yarp::dev::ReturnValue getDepthClipPlanes(double &nearPlane, double &farPlane) override
Get the clipping planes of the sensor.
yarp::dev::ReturnValue setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
yarp::dev::ReturnValue getRgbSupportedConfigurations(std::vector< yarp::dev::CameraConfig > &configurations) override
Get the possible configurations of the camera.
yarp::dev::ReturnValue getImages(FlexImage &colorFrame, depthImage &depthFrame, Stamp *colorStamp=NULL, Stamp *depthStamp=NULL) override
yarp::dev::ReturnValue getDepthIntrinsicParam(Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
static int pixFormatToCode(openni::PixelFormat p)
yarp::dev::ReturnValue setFeature(int feature, double value) override
yarp::dev::ReturnValue setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
yarp::dev::ReturnValue setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
yarp::dev::ReturnValue getDepthMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
yarp::dev::ReturnValue setOnePush(int feature) override
yarp::dev::ReturnValue setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
yarp::dev::ReturnValue getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
Interface implemented by all device drivers.
Control interface for frame grabber devices.
A generic interface for cameras that have both color camera as well as depth camera sensor,...
The RGBDSensorParamParser class.
A class for storing options and configuration information.
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.
Image class with user control of representation details.
constexpr char accuracy[]
The IntrinsicParams struct to handle the intrinsic parameter of cameras(RGB and RGBD either).