An example of how to receive, process, and output images to and from a port.
int main(
int argc,
char* argv[])
{
BufferedPort<ImageOf<PixelRgb>> port;
Property options;
options.fromCommand(argc, argv);
std::string portName = options.check("name", Value("/worker")).asString();
port.open(portName);
size_t ct = 0;
while (true) {
ImageOf<PixelRgb>* img = port.read();
if (img == nullptr) {
continue;
}
PixelRgb blue{0, 0, 255};
ct = (ct + 5) % img->width();
port.prepare() = *img;
port.write();
}
return 0;
}
A mini-server for performing network communication in the background.
Utilities for manipulating the YARP network, including initialization and shutdown.
A class for storing options and configuration information.
A single value (typically within a Bottle).
void addCircle(ImageOf< T > &dest, const T &pix, int i, int j, int r)
The main, catch-all namespace for YARP.
int main(int argc, char *argv[])