7#ifndef YARP_DEV_IFRAMEGRABBERIMAGE_INL_H
8#define YARP_DEV_IFRAMEGRABBERIMAGE_INL_H
17template <
typename ImageType>
19 std::vector<yarp::dev::vertex_t> vertices,
23 if (vertices.size() != 2) {
35 std::pair<unsigned int, unsigned int> v0;
36 v0.first = vertices[0].x;
37 v0.second = vertices[0].y;
38 std::pair<unsigned int, unsigned int> v1;
39 v1.first = vertices[1].x;
40 v1.second = vertices[1].y;
const yarp::os::LogComponent & IFRAMEGRABBEROF()
virtual yarp::dev::ReturnValue getImageCrop(yarp::dev::cropType_id_t cropType, std::vector< vertex_t > vertices, ImageType &image)
Get a crop of the image from the frame grabber.
@ return_value_error_not_implemented_by_device
@ return_value_error_generic
Method was successfully executed.
@ return_value_error_method_failed
Method is deprecated.
size_t width() const
Gets width of image in pixels.
size_t height() const
Gets height of image in pixels.
#define yCError(component,...)
#define YARP_DECLARE_LOG_COMPONENT(name)
For streams capable of holding different kinds of content, check what they actually have.
bool cropRect(const yarp::sig::Image &inImg, const std::pair< unsigned int, unsigned int > &vertex1, const std::pair< unsigned int, unsigned int > &vertex2, yarp::sig::Image &outImg)
Crop a rectangle area out of an image given two opposite vertices.