10 #ifndef YARP_DEV_REMOTEFRAMEGRABBER_H
11 #define YARP_DEV_REMOTEFRAMEGRABBER_H
27 public
yarp::dev::IFrameGrabberControlsDC1394
39 bool setCommand(
int code,
double v)
46 _port->write(cmd,response);
50 bool setCommand(
int code,
double b,
double r)
58 _port->write(cmd,response);
62 double getCommand(
int code)
const
68 _port->write(cmd,response);
73 bool getCommand(
int code,
double &b,
double &r)
const
79 _port->write(cmd,response);
94 _port->write(cmd,response);
106 _port->write(cmd,response);
119 _port->write(cmd,response);
120 return response.
get(0).
asInt32()!=0?
true:
false;
129 _port->write(cmd,response);
141 _port->write(cmd,response);
154 _port->write(cmd,response);
155 return response.
get(0).
asInt32()!=0?
true:
false;
164 _port->write(cmd,response);
177 _port->write(cmd,response);
178 return response.
get(0).
asInt32()!=0?
true:
false;
188 _port->write(cmd,response);
200 _port->write(cmd,response);
213 _port->write(cmd,response);
214 return response.
get(0).
asInt32()!=0?
true:
false;
217 bool getFormat7MaxWindowDC1394(
unsigned int &xdim,
unsigned int &ydim,
unsigned int &xstep,
unsigned int &ystep,
unsigned int &xoffstep,
unsigned int &yoffstep)
override
222 _port->write(cmd,response);
230 return response.
get(0).
asInt32()!=0?
true:
false;
238 _port->write(cmd,response);
243 return response.
get(0).
asInt32()!=0?
true:
false;
255 _port->write(cmd,response);
256 return response.
get(0).
asInt32()!=0?
true:
false;
266 _port->write(cmd,response);
267 return response.
get(0).
asInt32()!=0?
true:
false;
275 _port->write(cmd,response);
276 return response.
get(0).
asInt32()!=0?
true:
false;
286 _port->write(cmd,response);
287 return response.
get(0).
asInt32()!=0?
true:
false;
295 _port->write(cmd,response);
296 return response.
get(0).
asInt32()!=0?
true:
false;
306 _port->write(cmd,response);
307 return response.
get(0).
asInt32()!=0?
true:
false;
315 _port->write(cmd,response);
316 return response.
get(0).
asInt32()!=0?
true:
false;
324 _port->write(cmd,response);
325 return response.
get(0).
asInt32()!=0?
true:
false;
334 _port->write(cmd,response);
335 return response.
get(0).
asInt32()!=0?
true:
false;
345 _port->write(cmd,response);
346 return response.
get(0).
asInt32()!=0?
true:
false;
356 _port->write(cmd,response);
357 return response.
get(0).
asInt32()!=0?
true:
false;
366 _port->write(cmd,response);
397 if(no_stream ==
true)
404 if (reader.
read(
true)!=NULL) {
406 lastHeight = image.
height();
407 lastWidth = image.
width();
423 for(
size_t i=0; i<vertices.size(); i++)
428 port.
write(cmd,response);
474 "port name of real grabber").asString();
476 "port name to use locally").asString();
477 std::string carrier =
479 "carrier to use for streaming").asString();
484 if(!config.
check(
"no_stream") )
510 #ifndef YARP_NO_DEPRECATED
609 bool no_stream{
false};
622 port.
write(cmd,response);
634 port.
write(cmd,response);
643 port.
write(cmd,response);
654 port.
write(cmd,response);
constexpr yarp::conf::vocab32_t VOCAB_DRGETISO
constexpr yarp::conf::vocab32_t VOCAB_GAMMA
constexpr yarp::conf::vocab32_t VOCAB_GAIN
constexpr yarp::conf::vocab32_t VOCAB_DRSETFPS
constexpr yarp::conf::vocab32_t VOCAB_SHUTTER
constexpr yarp::conf::vocab32_t VOCAB_DRSETDEF
constexpr yarp::conf::vocab32_t VOCAB_DRSETVMD
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL_DC1394
constexpr yarp::conf::vocab32_t VOCAB_DRSETWF7
constexpr yarp::conf::vocab32_t VOCAB_DRGETF7M
constexpr yarp::conf::vocab32_t VOCAB_WHITE
constexpr yarp::conf::vocab32_t VOCAB_DRSETBCS
constexpr yarp::conf::vocab32_t VOCAB_IRIS
constexpr yarp::conf::vocab32_t VOCAB_DRSETCAP
constexpr yarp::conf::vocab32_t VOCAB_DRSETCOD
constexpr yarp::conf::vocab32_t VOCAB_HUE
constexpr yarp::conf::vocab32_t VOCAB_SHARPNESS
constexpr yarp::conf::vocab32_t VOCAB_DRGETMSK
constexpr yarp::conf::vocab32_t VOCAB_DRGETFPS
constexpr yarp::conf::vocab32_t VOCAB_DRSETOPM
constexpr yarp::conf::vocab32_t VOCAB_DRGETBPP
constexpr yarp::conf::vocab32_t VOCAB_DRSETPWR
constexpr yarp::conf::vocab32_t VOCAB_DRGETCCM
constexpr yarp::conf::vocab32_t VOCAB_DRGETTXM
constexpr yarp::conf::vocab32_t VOCAB_DRSETRST
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_IMAGE
constexpr yarp::conf::vocab32_t VOCAB_DRSETBPP
constexpr yarp::conf::vocab32_t VOCAB_BRIGHTNESS
constexpr yarp::conf::vocab32_t VOCAB_DRGETWF7
constexpr yarp::conf::vocab32_t VOCAB_DRGETVMD
constexpr yarp::conf::vocab32_t VOCAB_DRGETFPM
constexpr yarp::conf::vocab32_t VOCAB_SATURATION
constexpr yarp::conf::vocab32_t VOCAB_DRSETTXM
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL
constexpr yarp::conf::vocab32_t VOCAB_CROP
constexpr yarp::conf::vocab32_t VOCAB_DRGETCOD
constexpr yarp::conf::vocab32_t VOCAB_DRSETISO
constexpr yarp::conf::vocab32_t VOCAB_EXPOSURE
constexpr yarp::conf::vocab32_t VOCAB_DRGETOPM
constexpr yarp::conf::vocab32_t VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_SET
const yarp::os::LogComponent & REMOTEFRAMEGRABBER()
unsigned int getISOSpeedDC1394() override
bool setBroadcastDC1394(bool onoff) override
bool setDefaultsDC1394() override
bool getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0) override
bool setOperationModeDC1394(bool b1394b) override
bool setResetDC1394() override
unsigned int getFPSMaskDC1394() override
unsigned int getVideoModeMaskDC1394() override
bool setFPSDC1394(int fps) override
bool setISOSpeedDC1394(int speed) override
unsigned int getColorCodingMaskDC1394(unsigned int video_mode) override
bool setPowerDC1394(bool onoff) override
unsigned int getFPSDC1394() override
bool setColorCodingDC1394(int coding) override
bool getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep) override
unsigned int getColorCodingDC1394() override
unsigned int getBytesPerPacketDC1394() override
void init(yarp::os::Port *__port)
bool setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0) override
bool getOperationModeDC1394() override
bool setTransmissionDC1394(bool bTxON) override
bool setCaptureDC1394(bool bON) override
bool getTransmissionDC1394() override
unsigned int getVideoModeDC1394() override
bool setVideoModeDC1394(int video_mode) override
bool setBytesPerPacketDC1394(unsigned int bpp) override
bool setExposure(double v) override
Set the exposure.
double getCommand(int code) const
double getIris() override
Read the iris parameter.
bool open(yarp::os::Searchable &config) override
Configure with a set of options.
bool setShutter(double v) override
Set the shutter parameter.
bool setWhiteBalance(double blue, double red) override
Set the white balance for the frame grabber.
bool setSaturation(double v) override
Set the saturation.
RemoteFrameGrabber & operator=(RemoteFrameGrabber &&)=delete
IFrameGrabberControlsDC1394 * Ifirewire
bool setCommand(int code, double v)
bool setGamma(double v) override
Set the gamma.
bool setIris(double v) override
Set the iris.
int height() const override
Return the height of each frame.
double getExposure() override
Read the exposure parameter.
bool setCommand(int code, double b, double r)
double getSaturation() override
Read the saturation parameter.
RemoteFrameGrabber(RemoteFrameGrabber &&)=delete
double getShutter() override
Read the shutter parameter.
RemoteFrameGrabber & operator=(const RemoteFrameGrabber &)=delete
bool getImageCrop(cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is ...
bool setHue(double v) override
Set the hue.
bool getWhiteBalance(double &blue, double &red) override
Read the white balance parameters.
double getBrightness() override
Read the brightness parameter.
double getSharpness() override
Read the sharpness parameter.
double getHue() override
Read the hue parameter.
int width() const override
Return the width of each frame.
double getGain() override
Read the gain parameter.
bool close() override
Close the DeviceDriver.
bool setBrightness(double v) override
Set the brightness.
bool setSharpness(double v) override
Set the sharpness.
bool getCommand(int code, double &b, double &r) const
double getGamma() override
Read the gamma parameter.
RemoteFrameGrabber(const RemoteFrameGrabber &)=delete
~RemoteFrameGrabber() override=default
bool getImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied.
bool setGain(double v) override
Set the gain.
Interface implemented by all device drivers.
This classes implement a sender / parser for IFrameGrabberControls interface messages.
Read a YARP-format image from a device.
A simple collection of objects that can be described and transmitted in a portable way.
Bottle & addList()
Places an empty nested list in the bottle, at the end of the list.
size_type size() const
Gets the number of elements in the bottle.
void addFloat64(yarp::conf::float64_t x)
Places a 64-bit floating point number in the bottle, at the end of the list.
void addVocab(int x)
Places a vocabulary item in the bottle, at the end of the list.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
static bool connect(const std::string &src, const std::string &dest, const std::string &carrier="", bool quiet=true)
Request that an output port connect to an input port.
Buffer incoming data to a port.
T * read(bool shouldWait=true) override
Read an available object from the port.
void attach(Port &port)
Attach this buffer to a particular port.
T * lastRead() override
Get the last data returned by read()
A mini-server for network communication.
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
A single value (typically within a Bottle).
virtual yarp::conf::float64_t asFloat64() const
Get 64-bit floating point value.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual bool isBlob() const
Checks if value is a binary object.
virtual const char * asBlob() const
Get binary data value.
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
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.
void zero()
Set all pixels to 0.
size_t height() const
Gets height of image in pixels.
#define yCInfo(component,...)
#define yCError(component,...)
#define yCTrace(component,...)
#define YARP_DECLARE_LOG_COMPONENT(name)
#define yCDebug(component,...)
The main, catch-all namespace for YARP.