7#ifndef YARP_DEV_REMOTEFRAMEGRABBER_H
8#define YARP_DEV_REMOTEFRAMEGRABBER_H
36 public
yarp::dev::DeviceDriver,
38 public
yarp::proto::framegrabber::FrameGrabberControls_Forwarder,
39 public
yarp::proto::framegrabber::FrameGrabberControlsDC1394_Forwarder,
40 public
yarp::proto::framegrabber::RgbVisualParams_Forwarder
61 if (reader.read(
true)!=
nullptr) {
62 image = *(reader.lastRead());
63 lastHeight = image.
height();
64 lastWidth = image.
width();
81 for(
size_t i=0; i<vertices.size(); i++)
86 port.write(cmd,response);
133 "port name of real grabber").asString();
135 "port name to use locally").asString();
136 std::string carrier =
138 "carrier to use for streaming").asString();
143 if(!config.
check(
"no_stream") )
169#ifndef YARP_NO_DEPRECATED
268 bool no_stream{
false};
272 IFrameGrabberControlsDC1394 *Ifirewire{
nullptr};
281 port.
write(cmd,response);
293 port.
write(cmd,response);
303 port.
write(cmd,response);
314 port.
write(cmd,response);
constexpr yarp::conf::vocab32_t VOCAB_GAMMA
constexpr yarp::conf::vocab32_t VOCAB_GAIN
constexpr yarp::conf::vocab32_t VOCAB_SHUTTER
constexpr yarp::conf::vocab32_t VOCAB_WHITE
constexpr yarp::conf::vocab32_t VOCAB_IRIS
constexpr yarp::conf::vocab32_t VOCAB_HUE
constexpr yarp::conf::vocab32_t VOCAB_SHARPNESS
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_IMAGE
constexpr yarp::conf::vocab32_t VOCAB_BRIGHTNESS
constexpr yarp::conf::vocab32_t VOCAB_SATURATION
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL
constexpr yarp::conf::vocab32_t VOCAB_CROP
constexpr yarp::conf::vocab32_t VOCAB_EXPOSURE
constexpr yarp::conf::vocab32_t VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_SET
const yarp::os::LogComponent & REMOTEFRAMEGRABBER()
remote_grabber: Connect to a ServerFrameGrabber. See ServerFrameGrabber for the network protocol used...
RemoteFrameGrabber & operator=(const RemoteFrameGrabber &)=delete
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.
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.
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 image from the frame grabber.
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 image from the frame grabber.
bool setGain(double v) override
Set the gain.
RemoteFrameGrabber & operator=(RemoteFrameGrabber &&)=delete
A simple collection of objects that can be described and transmitted in a portable way.
void addVocab32(yarp::conf::vocab32_t x)
Places a vocabulary item in the bottle, at the end of the list.
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.
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.
A mini-server for network communication.
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
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 yarp::conf::vocab32_t asVocab32() const
Get vocabulary identifier as an integer.
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.
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,...)
IFrameGrabberOf< yarp::sig::ImageOf< yarp::sig::PixelRgb > > IFrameGrabberImage
The main, catch-all namespace for YARP.