31#ifndef YARP_ROSMSG_sensor_msgs_RegionOfInterest_h
32#define YARP_ROSMSG_sensor_msgs_RegionOfInterest_h
47 std::uint32_t x_offset;
48 std::uint32_t y_offset;
95 if (!connection.
expectBlock((
char*)&do_rectify, 1)) {
131 return (connection.
isBareMode() ? readBare(connection)
132 : readBottle(connection));
187 return (connection.
isBareMode() ? writeBare(connection)
188 : writeBottle(connection));
197 static constexpr const char* typeName =
"sensor_msgs/RegionOfInterest";
200 static constexpr const char* typeChecksum =
"bdb633039d588fcccb441a4d43ccfe09";
203 static constexpr const char* typeText =
"\
204# This message is used to specify a region of interest within an image.\n\
206# When used to specify the ROI setting of the camera when the image was\n\
207# taken, the height and width fields should either match the height and\n\
208# width fields for the associated image; or height = width = 0\n\
209# indicates that the full resolution image was captured.\n\
211uint32 x_offset # Leftmost pixel of the ROI\n\
212 # (0 if the ROI includes the left edge of the image)\n\
213uint32 y_offset # Topmost pixel of the ROI\n\
214 # (0 if the ROI includes the top edge of the image)\n\
215uint32 height # Height of ROI\n\
216uint32 width # Width of ROI\n\
218# True if a distinct rectified ROI should be calculated from the \"raw\"\n\
219# ROI in this message. Typically this should be False if the full image\n\
220# is captured (ROI not used), and True if a subwindow is captured (ROI\n\
An interface for reading from a network connection.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
virtual bool isError() const =0
An interface for writing to a network connection.
virtual bool isError() const =0
virtual bool isBareMode() const =0
Check if the connection is bare mode.
virtual void appendInt8(std::int8_t data)=0
Send a representation of a 8-bit integer to the network connection.
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
virtual void appendInt32(std::int32_t data)=0
Send a representation of a 32-bit integer to the network connection.
virtual void appendBlock(const char *data, size_t len)=0
Send a block of data to the network connection.
static Type byName(const char *name)
Type & addProperty(const char *key, const Value &val)
A single value (typically within a Bottle).
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
virtual bool read(yarp::os::idl::WireReader &reader)
virtual bool write(const yarp::os::idl::WireWriter &writer) const
IDL-friendly connection reader.
std::int32_t expectInt32()
yarp::rosmsg::sensor_msgs::RegionOfInterest RegionOfInterest
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
The main, catch-all namespace for YARP.