|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
35 fgCtrl_DC1394 = interface;
47 response.
addInt32(
int(fgCtrl_DC1394->getVideoModeMaskDC1394()));
50 response.
addInt32(
int(fgCtrl_DC1394->getVideoModeDC1394()));
56 response.
addInt32(
int(fgCtrl_DC1394->getFPSMaskDC1394()));
59 response.
addInt32(
int(fgCtrl_DC1394->getFPSDC1394()));
66 response.
addInt32(
int(fgCtrl_DC1394->getISOSpeedDC1394()));
76 response.
addInt32(
int(fgCtrl_DC1394->getColorCodingDC1394()));
84 unsigned int xstep,ystep,xdim,ydim,xoffstep,yoffstep;
85 fgCtrl_DC1394->getFormat7MaxWindowDC1394(xdim,ydim,xstep,ystep,xoffstep,yoffstep);
96 unsigned int xdim,ydim;
98 fgCtrl_DC1394->getFormat7WindowDC1394(xdim,ydim,x0,y0);
109 response.
addInt32(
int(fgCtrl_DC1394->setOperationModeDC1394(cmd.
get(1).
asInt32()!=0)));
112 response.
addInt32(fgCtrl_DC1394->getOperationModeDC1394());
116 response.
addInt32(
int(fgCtrl_DC1394->setTransmissionDC1394(cmd.
get(1).
asInt32()!=0)));
119 response.
addInt32(fgCtrl_DC1394->getTransmissionDC1394());
125 response.
addInt32(
int(fgCtrl_DC1394->setDefaultsDC1394()));
128 response.
addInt32(
int(fgCtrl_DC1394->setResetDC1394()));
140 response.
addInt32(fgCtrl_DC1394->getBytesPerPacketDC1394());
146 yCWarning(SERVERGRABBER) <<
"DC1394Parser: firewire interface not implemented in subdevice, some features could not be available";
149 return DeviceResponder::respond(cmd,response);
169 yCError(SERVERGRABBER) <<
"ServerGrabberResponder: invalid server pointer";
176 if(server->
respond(command,reply,left,
false))
182 return DeviceResponder::respond(command, reply);
246 if(isSubdeviceOwned && poly2)
252 isSubdeviceOwned=
false;
262 yCError(SERVERGRABBER,
"Did you just try to open the same ServerGrabber twice?");
268 yCError(SERVERGRABBER) <<
"Device ServerGrabber failed to open, check previous log for error messages.";
274 yCError(SERVERGRABBER) <<
"Error initializing YARP ports";
278 if(isSubdeviceOwned){
279 if(! openAndAttachSubDevice(config))
281 yCError(SERVERGRABBER,
"Error while opening subdevice");
287 yCInfo(SERVERGRABBER) <<
"Running, waiting for attach...";
288 if(!openDeferredAttach(config))
327 if(config.
check(
"period",
"refresh period(in ms) of the broadcasted values through yarp ports")
332 if((config.
check(
"subdevice")) && (config.
check(
"left_config") || config.
check(
"right_config")))
334 yCError(SERVERGRABBER) <<
"Found both 'subdevice' and 'left_config/right_config' parameters...";
337 if(!config.
check(
"subdevice",
"name of the subdevice to use as a data source")
338 && config.
check(
"left_config",
"name of the ini file containing the configuration of one of two subdevices to use as a data source")
339 && config.
check(
"right_config" ,
"name of the ini file containing the configuration of one of two subdevices to use as a data source"))
341 if(config.
check(
"twoCameras",
"if true ServerGrabber will open and handle two devices, if false only one"))
343 if(config.
check(
"split",
"set 'true' to split the streaming on two different ports"))
345 if(config.
check(
"capabilities",
"two capabilities supported, COLOR and RAW respectively for rgb and raw streaming"))
353 yCWarning(SERVERGRABBER) <<
"'capabilities' parameter not found or misspelled, the option available are COLOR(default) and RAW, using default";
354 param.
canDrop = !config.
check(
"no_drop",
"if present, use strict policy for sending data");
355 param.
addStamp = config.
check(
"stamp",
"if present, add timestamps to data");
358 config.
check(
"single_threaded",
359 "if present, operate in single threaded mode")!=0;
361 std::string rootName;
362 rootName = config.
check(
"name",
Value(
"/grabber"),
363 "name of port to send data on").asString();
376 rpcPort_Name = rootName +
"/left/rpc";
377 rpcPort2_Name = rootName +
"/right/rpc";
380 pImg_Name = rootName +
"/left";
381 pImg2_Name = rootName +
"/right";
384 pImg_Name = rootName;
388 if(config.
check(
"left_config") && config.
check(
"right_config"))
390 isSubdeviceOwned=
true;
394 isSubdeviceOwned=
false;
404 pImg_Name = rootName +
"/left";
405 pImg2_Name = rootName +
"/right";
409 pImg_Name = rootName;
411 rpcPort_Name = rootName +
"/rpc";
412 if(config.
check(
"subdevice"))
414 isSubdeviceOwned=
true;
418 isSubdeviceOwned=
false;
431 if(!rpcPort.
open(rpcPort_Name))
433 yCError(SERVERGRABBER) <<
"Unable to open rpc Port" << rpcPort_Name.c_str();
440 if(!pImg.
open(pImg_Name))
442 yCError(SERVERGRABBER) <<
"Unable to open image streaming Port" << pImg_Name.c_str();
449 if(!rpcPort2.
open(rpcPort2_Name))
451 yCError(SERVERGRABBER) <<
"Unable to open rpc Port" << rpcPort2_Name.c_str();
461 if(!pImg2.
open(pImg2_Name))
463 yCError(SERVERGRABBER) <<
"Unable to open image streaming Port" << pImg2_Name.c_str();
493 int nPoints = list->
size() /2;
498 for(
int i=0; i<nPoints; i++)
501 vertices[i].second = list->
get(i*2 +1).
asInt32();
532 imageInterface = fgImage;
534 u_offset = imageInterface->
width()/2;
543 imageInterface = fgImage2;
549 if(vertices[0].first >= fgImage->
width())
551 imageInterface = fgImage2;
552 u_offset = -fgImage->
width();
559 if(imageInterface !=
nullptr)
572 response.
addString(
"GetImageCrop failed: RECT mode requires 2 vertices.");
573 yCError(SERVERGRABBER) <<
"GetImageCrop failed: RECT mode requires 2 vertices, got " << nPoints;
579 cropped.resize(vertices[1].first - vertices[0].first +1, vertices[1].second - vertices[0].second +1);
581 for(
int u_in=vertices[0].first + u_offset, u_out=0; u_in<=vertices[1].first + u_offset; u_in++, u_out++)
583 for(
int v_in=vertices[0].second, v_out=0; v_in <= vertices[1].second; v_in++, v_out++)
585 cropped.
pixel(u_out, v_out).
r = full.
pixel(u_in, v_in).
r;
586 cropped.
pixel(u_out, v_out).
g = full.
pixel(u_in, v_in).
g;
587 cropped.
pixel(u_out, v_out).
b = full.
pixel(u_in, v_in).
b;
593 response.
addString(
"List type not yet implemented");
605 response.
addInt32(cropped.height());
607 response.
add(
Value(cropped.getRawImage(), cropped.getRawImageSize()));
617 yCError(SERVERGRABBER) <<
"FrameGrabberImage interface received an unknown command " << cmd.
toString();
633 if(!
ret || (response!=response2))
638 yCWarning(SERVERGRABBER) <<
"Response different among cameras or failed";
655 return ifgCtrl_Parser.
respond(cmd, response);
680 if(response!=response2)
685 yCWarning(SERVERGRABBER) <<
"Response different among cameras or failed";
695 return rgbParser.
respond(cmd,response);
707 ret=ifgCtrl_DC1394_Parser.
respond(cmd, response);
708 ret&=ifgCtrl2_DC1394_Parser.
respond(cmd, response2);
709 if(!
ret || (response!=response2))
712 response.
addString(
"command not recognized");
714 yCWarning(SERVERGRABBER) <<
"Responses different among cameras or failed";
722 ret=ifgCtrl_DC1394_Parser.
respond(cmd, response);
726 ret=ifgCtrl2_DC1394_Parser.
respond(cmd, response);
732 return ifgCtrl_DC1394_Parser.
respond(cmd, response);
745 bool rightDone=
false;
746 if (device2attach.
size() != 2)
748 yCError(SERVERGRABBER,
"Expected two devices to be attached");
751 for(
int i=0;i<device2attach.
size();i++)
754 if (!Idevice2attach->
isValid())
756 yCError(SERVERGRABBER) <<
"Device " << device2attach[i]->key <<
" to attach to is not valid ... cannot proceed";
759 if(device2attach[i]->key ==
"LEFT" && !leftDone)
761 leftDone |= Idevice2attach->
view(rgbVis_p);
762 leftDone |= Idevice2attach->
view(fgImage);
763 leftDone |= Idevice2attach->
view(fgImageRaw);
764 leftDone |= Idevice2attach->
view(fgCtrl);
765 leftDone |= Idevice2attach->
view(fgCtrl_DC1394);
767 else if(device2attach[i]->key ==
"RIGHT" && !rightDone)
769 rightDone |= Idevice2attach->
view(rgbVis_p2);
770 rightDone |= Idevice2attach->
view(fgImage2);
771 rightDone |= Idevice2attach->
view(fgImageRaw2);
772 rightDone |= Idevice2attach->
view(fgCtrl2);
773 rightDone |= Idevice2attach->
view(fgCtrl2_DC1394);
777 yCError(SERVERGRABBER) <<
"Failed to attach. The two targets must be LEFT RIGHT and devices must implement"
778 " either IFrameGrabberImage or IFrameGrabberImageRaw";
787 if((fgImage==
nullptr) || (fgImage2==
nullptr))
789 yCError(SERVERGRABBER) <<
"Capability required not supported";
796 if((fgImageRaw==
nullptr) || (fgImageRaw2==
nullptr))
798 yCError(SERVERGRABBER) <<
"Capability required not supported";
803 if((rgbVis_p ==
nullptr) || (rgbVis_p2 ==
nullptr))
805 yCWarning(SERVERGRABBER) <<
"Targets has not IVisualParamInterface, some features cannot be available";
808 if(rgbVis_p !=
nullptr && rgbVis_p2 !=
nullptr)
812 yCError(SERVERGRABBER) <<
"Error configuring interfaces for parsers";
816 if(fgCtrl !=
nullptr && fgCtrl2 !=
nullptr)
820 yCError(SERVERGRABBER) <<
"Error configuring interfaces for parsers";
824 if(fgCtrl_DC1394 !=
nullptr && fgCtrl2_DC1394 !=
nullptr)
826 if(!(ifgCtrl_DC1394_Parser.
configure(fgCtrl_DC1394)) || !(ifgCtrl2_DC1394_Parser.
configure(fgCtrl2_DC1394)))
828 yCError(SERVERGRABBER) <<
"Error configuring interfaces for parsers";
834 if (device2attach.
size() != 1)
836 yCError(SERVERGRABBER,
"Expected one device to be attached");
840 Idevice2attach->
view(rgbVis_p);
841 Idevice2attach->
view(fgImage);
842 Idevice2attach->
view(fgImageRaw);
843 Idevice2attach->
view(fgCtrl);
844 Idevice2attach->
view(fgCtrl_DC1394);
850 yCError(SERVERGRABBER) <<
"Capability required not supported";
857 if(fgImageRaw==
nullptr)
859 yCError(SERVERGRABBER) <<
"Capability required not supported";
865 if (!Idevice2attach->
isValid())
867 yCError(SERVERGRABBER) <<
"Device " << device2attach[0]->key <<
" to attach to is not valid ... cannot proceed";
871 if(rgbVis_p ==
nullptr)
873 yCWarning(SERVERGRABBER) <<
"Targets has not IVisualParamInterface, some features cannot be available";
877 if(rgbVis_p !=
nullptr)
881 yCError(SERVERGRABBER) <<
"Error configuring interfaces for parsers";
885 if(fgCtrl !=
nullptr)
889 yCError(SERVERGRABBER) <<
"Error configuring interfaces for parsers";
894 if(fgCtrl_DC1394 !=
nullptr)
896 if(!(ifgCtrl_DC1394_Parser.
configure(fgCtrl_DC1394)))
898 yCError(SERVERGRABBER) <<
"Error configuring interfaces for parsers";
904 PeriodicThread::setPeriod(period);
905 ret = PeriodicThread::start();
912 if (isSubdeviceOwned)
927 fgImageRaw =
nullptr;
928 fgImageRaw2 =
nullptr;
931 fgCtrl_DC1394 =
nullptr;
932 fgCtrl2_DC1394 =
nullptr;
947 yCError(SERVERGRABBER) <<
"Server grabber configured for two cameras, but only one provided";
959 yCError(SERVERGRABBER) <<
"Invalid device to be attached";
969 bool ServerGrabber::openDeferredAttach(
Searchable &prop){
971 isSubdeviceOwned =
false;
975 bool ServerGrabber::openAndAttachSubDevice(
Searchable &prop){
981 std::string file, file2;
982 if(!prop.
check(
"left_config") || !prop.
check(
"right_config"))
984 yCError(SERVERGRABBER) <<
"Missing 'left_config' or 'right_config' filename... ";
988 if(prop.
check(
"context"))
999 yCError(SERVERGRABBER) <<
"Unable to find files specified in 'left_config' and/or 'right_config'";
1016 yCError(SERVERGRABBER) <<
"Error in the configuration file, the two images have to have the same dimensions";
1027 yCError(SERVERGRABBER,
"Opening devices... FAILED");
1050 p.setMonitor(prop.getMonitor(),
"subdevice");
1059 yCError(SERVERGRABBER,
"opening subdevice... FAILED");
1068 isSubdeviceOwned =
true;
1081 img2->resize(fgImage2->
width(),fgImage2->
height());
1086 img_Raw->resize(fgImageRaw->
width(),fgImageRaw->
height());
1088 img2_Raw->resize(fgImageRaw2->
width(),fgImageRaw2->
height());
1098 img->resize(fgImage->
width()/2,fgImage->
height());
1101 img2->resize(fgImage->
width()/2,fgImage->
height());
1113 img_Raw->resize(fgImageRaw->
width()/2,fgImageRaw->
height());
1116 img2_Raw->resize(fgImageRaw->
width()/2,fgImageRaw->
height());
1120 img_Raw->resize(fgImageRaw->
width(), fgImageRaw->
height());
1143 if(fgImage!=
nullptr && fgImage2 !=
nullptr)
1151 yCError(SERVERGRABBER) <<
"Image not captured.. check hardware configuration";
1156 if(fgImageRaw!=
nullptr && fgImageRaw2 !=
nullptr)
1164 yCError(SERVERGRABBER) <<
"Image not captured.. check hardware configuration";
1184 if(fgImage!=
nullptr && fgImage2 !=
nullptr)
1194 yCError(SERVERGRABBER) <<
"Failed to concatenate images";
1199 yCError(SERVERGRABBER) <<
"Image not captured.. check hardware configuration";
1204 if(fgImageRaw!=
nullptr && fgImageRaw2 !=
nullptr)
1213 yCError(SERVERGRABBER) <<
"Failed to concatenate images";
1218 yCError(SERVERGRABBER) <<
"Image not captured.. check hardware configuration";
1238 if(fgImage!=
nullptr)
1246 yCError(SERVERGRABBER) <<
"Failed to split the image";
1254 yCError(SERVERGRABBER) <<
"Image not captured.. check hardware configuration";
1258 if(fgImageRaw!=
nullptr)
1266 yCError(SERVERGRABBER) <<
"Failed to split the image";
1275 yCError(SERVERGRABBER) <<
"Image not captured.. check hardware configuration";
1294 if(fgImage!=
nullptr)
1300 yCError(SERVERGRABBER) <<
"Image not captured.. check hardware configuration";
1304 if(fgImageRaw!=
nullptr)
1310 yCError(SERVERGRABBER) <<
"Image not captured.. check hardware configuration";
1344 if(img_Raw!=
nullptr)
1349 if(img2_Raw!=
nullptr)
void close() override
Stop port activity.
constexpr yarp::conf::vocab32_t VOCAB_DRSETCOD
constexpr yarp::conf::vocab32_t VOCAB_DRSETISO
A simple collection of objects that can be described and transmitted in a portable way.
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
virtual bool getImage(yarp::sig::ImageOf< yarp::sig::PixelMono > &image)=0
Get a raw image from the frame grabber.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
void clear()
Empties the bottle of any objects it contains.
constexpr yarp::conf::vocab32_t VOCAB_DRGETISO
void resize(size_t size) override
Resize the vector.
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
bool close() override
Close the DeviceDriver.
A base class for nested structures that can be searched.
constexpr yarp::conf::vocab32_t VOCAB_DRSETPWR
size_type size() const
Gets the number of elements in the bottle.
contains the definition of a Vector type
constexpr yarp::conf::vocab32_t VOCAB_DRGETCCM
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_IMAGE
#define yCWarning(component,...)
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
constexpr yarp::conf::vocab32_t VOCAB_DRSETBPP
void fromString(const std::string &txt, bool wipe=true)
Interprets a string as a list of properties.
bool isValid() const
Check if device is valid.
#define YARP_LOG_COMPONENT(name,...)
bool vertSplit(const yarp::sig::Image &inImg, yarp::sig::Image &outImgL, yarp::sig::Image &outImgR)
vertSplit, split vertically an image in two images of the same size.
bool attach(yarp::dev::PolyDriver *poly) override
Attach to another object.
constexpr yarp::conf::vocab32_t VOCAB_GET
size_t getQuantum() const
The size of a row is constrained to be a multiple of the "quantum".
constexpr yarp::conf::vocab32_t VOCAB_DRSETTXM
constexpr yarp::conf::vocab32_t VOCAB_DRGETOPM
constexpr yarp::conf::vocab32_t VOCAB_DRGETVMD
void setupFlexImage(const yarp::sig::Image &img, yarp::sig::FlexImage &flex_i)
constexpr yarp::conf::vocab32_t VOCAB_INTRINSIC_PARAM
void interrupt() override
Interrupt any current reads or writes attached to the port.
constexpr yarp::conf::vocab32_t VOCAB_DRSETVMD
void setStrict(bool strict=true) override
Call this to strictly keep all messages, or allow old ones to be quietly dropped.
bool setEnvelope(PortWriter &envelope) override
Set an envelope (e.g., a timestamp) to the next message which will be sent.
bool view(T *&x)
Get an interface to the device driver.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
constexpr yarp::conf::vocab32_t VOCAB_DRSETCAP
void promiseType(const Type &typ) override
Commit the port to a particular type of data.
bool open(const std::string &txt)
Construct and configure a device by its common name.
bool configure(yarp::dev::IFrameGrabberControlsDC1394 *interface)
bool isRunning() const
Returns true when the thread is started, false otherwise.
double now()
Return the current time in seconds, relative to an arbitrary starting point.
An interface for the device drivers.
constexpr yarp::conf::vocab32_t VOCAB_DRGETFPM
size_t width() const
Gets width of image in pixels.
void setExternal(const void *data, size_t imgWidth, size_t imgHeight)
Use this to wrap an external image.
void push(PolyDriver *p, const char *k)
T & prepare()
Access the object which will be transmitted by the next call to yarp::os::BufferedPort::write.
void setQuantum(size_t imgQuantum)
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
constexpr yarp::conf::vocab32_t VOCAB_DRGETWF7
bool open(yarp::os::Searchable &config) override
Configure with a set of options.
constexpr yarp::conf::vocab32_t VOCAB_SET
bool respond(const yarp::os::Bottle &command, yarp::os::Bottle &reply) override
Respond to a message.
bool initialize_YARP(yarp::os::Searchable ¶ms)
bool setDefaultContext(const std::string &contextName)
Sets the context for the current ResourceFinder object.
~ServerGrabber() override
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Bottle & addList()
Places an empty nested list in the bottle, at the end of the list.
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
Read a YARP-format image from a device.
Image class with user control of representation details.
virtual bool getImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)=0
Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied.
void setReader(PortReader &reader) override
Set an external reader for port data.
void setPixelCode(int imgPixelCode)
virtual bool asBool() const
Get boolean value.
virtual std::string asString() const
Get string value.
void shallowCopyImages(const yarp::sig::FlexImage &src, yarp::sig::FlexImage &dest)
constexpr yarp::conf::vocab32_t VOCAB_DRGETCOD
A container for a device driver.
constexpr yarp::conf::vocab32_t VOCAB_FAILED
bool close() override
Close the DeviceDriver.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
void resize(size_t imgWidth, size_t imgHeight)
Reallocate an image to be of a desired size, throwing away its current contents.
bool detach() override
Detach the object (you must have first called attach).
constexpr yarp::conf::vocab32_t VOCAB_DRSETFPS
size_t height() const
Gets height of image in pixels.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual int width() const =0
Return the width of each frame.
bool respond(const yarp::os::Bottle &command, yarp::os::Bottle &reply, bool left, bool both)
constexpr yarp::conf::vocab32_t VOCAB_DRGETFPS
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
constexpr yarp::conf::vocab32_t VOCAB_DRSETOPM
virtual bool getImageCrop(cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)
Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is ...
virtual int height() const =0
Return the height of each frame.
constexpr yarp::conf::vocab32_t VOCAB_DRGETMSK
constexpr yarp::conf::vocab32_t VOCAB_DRGETTXM
void addString(const char *str)
Places a string in the bottle, at the end of the list.
bool fromConfig(yarp::os::Searchable &config)
void setReader(PortReader &reader) override
Set an external reader for port data.
An abstraction for a periodic thread.
void addVocab(int x)
Places a vocabulary item in the bottle, at the end of the list.
define common interfaces to discover remote camera capabilities
void run() override
Loop function.
T & pixel(size_t x, size_t y)
bool configure(IRgbVisualParams *interface)
constexpr yarp::conf::vocab32_t VOCAB_DRGETF7M
An abstraction for a time stamp and/or sequence number.
#define yCError(component,...)
constexpr yarp::conf::vocab32_t VOCAB_DRSETDEF
constexpr yarp::conf::vocab32_t VOCAB_RGB_VISUAL_PARAMS
virtual std::int32_t asInt32() const
Get 32-bit integer value.
constexpr yarp::conf::vocab32_t VOCAB_DRSETBCS
void write(bool forceStrict=false)
Write the current object being returned by BufferedPort::prepare.
bool fromConfigFile(const std::string &fname, bool wipe=true)
Interprets a file as a list of properties.
#define yCInfo(component,...)
An interface to the operating system, including Port based communication.
constexpr yarp::conf::vocab32_t VOCAB_CROP
#define DEFAULT_THREAD_PERIOD
bool attachAll(const yarp::dev::PolyDriverList &device2attach) override
Attach to a list of objects.
constexpr yarp::conf::vocab32_t VOCAB_DRGETBPP
Base class for storing images.
virtual bool isNull() const
Checks if the object is invalid.
virtual int height() const =0
Return the height of each frame.
void close() override
Stop port activity.
bool horzConcat(const yarp::sig::Image &inImgL, const yarp::sig::Image &inImgR, yarp::sig::Image &outImg)
horzConcat, concatenate horizontally two images of the same size in one with double width.
void interrupt() override
Interrupt any current reads or writes attached to the port.
virtual Bottle * asList() const
Get list value.
void stop()
Call this to stop the thread, this call blocks until the thread is terminated (and releaseThread() ca...
ServerGrabberResponder(bool _left=false)
bool threadInit() override
Initialization method.
virtual int width() const =0
Return the width of each frame.
constexpr yarp::conf::vocab32_t VOCAB_DRSETWF7
void add(const Value &value)
Add a Value to the bottle, at the end of the list.
constexpr yarp::conf::vocab32_t VOCAB_IS
void threadRelease() override
Release method.
bool detachAll() override
Detach the object (you must have first called attach).
std::string findFileByName(const std::string &name)
Find the full path to a file.
std::string toString() const override
Return a standard text representation of the content of the object.
A single value (typically within a Bottle).
bool configure(IFrameGrabberControls *interface)
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
constexpr yarp::conf::vocab32_t VOCAB_DRSETRST
grabberDual: A Network grabber for camera devices.
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL_DC1394
unsigned char * getRawImage() const
Access to the internal image buffer.
A class for storing options and configuration information.
bool configure(ServerGrabber *_server)
void append(const Bottle &alt)
Append the content of the given bottle to the current list.
Helper class for finding config files and other external resources.
virtual bool isInt32() const
Checks if value is a 32-bit integer.
virtual int getPixelCode() const
Gets pixel type identifier.