37 cfg.put(
"device",
"fakeFrameGrabber");
39 testgrabber.
view(image);
56 return image->
width();
67 width = image->
width();
122 intrinsic.
put(
"physFocalLength", 0.5);
123 intrinsic.
put(
"focalLengthX", 512);
124 intrinsic.
put(
"focalLengthY", 512);
125 intrinsic.
put(
"principalPointX", 235);
126 intrinsic.
put(
"principalPointY", 231);
127 intrinsic.
put(
"distortionModel",
"plumb_bob");
128 intrinsic.
put(
"k1", 0);
129 intrinsic.
put(
"k2", 0);
130 intrinsic.
put(
"t1", 0);
131 intrinsic.
put(
"t2", 0);
132 intrinsic.
put(
"k3", 0);
145 return image->
width();
157 intrinsic.
put(
"physFocalLength", 0.5);
158 intrinsic.
put(
"focalLengthX", 512);
159 intrinsic.
put(
"focalLengthY", 512);
160 intrinsic.
put(
"principalPointX", 235);
161 intrinsic.
put(
"principalPointY", 231);
162 intrinsic.
put(
"distortionModel",
"plumb_bob");
163 intrinsic.
put(
"k1", 0);
164 intrinsic.
put(
"k2", 0);
165 intrinsic.
put(
"t1", 0);
166 intrinsic.
put(
"t2", 0);
167 intrinsic.
put(
"k3", 0);
217 if (!image->
getImage(imageof)) {
return false;}
229 if (!image->
getImage(imageof)) {
return false;}
231 for (
size_t i = 0; i < imageof.
width(); i++)
233 for (
size_t j = 0;
j < imageof.
height();
j++)
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
int getDepthWidth() override
Return the height of each frame.
bool setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
bool getExtrinsicParam(yarp::sig::Matrix &extrinsic) override
Get the extrinsic parameters from the device.
bool getDepthMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
bool setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
bool getRgbSupportedConfigurations(yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations) override
Get the possible configurations of the camera.
bool setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
int getRgbHeight() override
Return the height of each frame.
double getDepthAccuracy() override
Get the minimum detectable variation in distance [meter].
bool getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getDepthImage(depthImage &depthImage, Stamp *timeStamp=nullptr) override
bool getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
bool setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
bool getRgbImage(FlexImage &rgbImage, Stamp *timeStamp=nullptr) override
Get the rgb frame from the device.
std::string getLastErrorMsg(Stamp *timeStamp=nullptr) override
Return an error message in case of error.
int getDepthHeight() override
Return the height of each frame.
bool getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
bool getDepthIntrinsicParam(Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
RGBDSensor_status getSensorStatus() override
Get the surrent status of the sensor, using enum type.
bool getDepthClipPlanes(double &nearPlane, double &farPlane) override
Get the clipping planes of the sensor.
bool getImages(FlexImage &colorFrame, depthImage &depthFrame, Stamp *colorStamp=nullptr, Stamp *depthStamp=nullptr) override
bool setDepthClipPlanes(double nearPlane, double farPlane) override
Set the clipping planes of the sensor.
bool getRgbIntrinsicParam(Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
bool close() override
Close the DeviceDriver.
~FakeDepthCameraDriver() override
bool getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
bool setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
int getRgbWidth() override
Return the width of each frame.
bool setDepthResolution(int width, int height) override
Set the resolution of the depth image from the camera.
bool setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
bool view(T *&x)
Get an interface to the device driver.
virtual int width() const =0
Return the width of each frame.
virtual int height() const =0
Return the height of each frame.
virtual bool getImage(ImageType &image)=0
Get an image from the frame grabber.
bool open(const std::string &txt)
Construct and configure a device by its common name.
A mini-server for performing network communication in the background.
A class for storing options and configuration information.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
A base class for nested structures that can be searched.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
An abstraction for a time stamp and/or sequence number.
void update()
Set the timestamp to the current time, and increment the sequence number (wrapping to 0 if the sequen...
Image class with user control of representation details.
size_t width() const
Gets width of image in pixels.
unsigned char * getRawImage() const
Access to the internal image buffer.
size_t getRawImageSize() const
Access to the internal buffer size information (this is how much memory has been allocated for the im...
void resize(size_t imgWidth, size_t imgHeight)
Reallocate an image to be of a desired size, throwing away its current contents.
size_t height() const
Gets height of image in pixels.
unsigned char * getPixelAddress(size_t x, size_t y) const
Get address of a pixel in memory.
#define yCWarning(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
double now()
Return the current time in seconds, relative to an arbitrary starting point.
An interface to the operating system, including Port based communication.