YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IFrameGrabberImage.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_DEV_IFRAMEGRABBERIMAGE_H
8#define YARP_DEV_IFRAMEGRABBERIMAGE_H
9
10#include <yarp/dev/api.h>
11#include <yarp/sig/Image.h>
12#include <yarp/sig/Vector.h>
13
14typedef enum {
15 YARP_CROP_RECT = 0, // Rectangular region of interest style, requires the two corner as a parameter
16 YARP_CROP_LIST // Unordered list of points, the returned image will be a nx1 image with n the
17 // number of points required by user (size of input vector), with the corresponding
18 // pixel color.
20
21namespace yarp::dev {
22
29{
30public:
35
40 virtual int height() const = 0;
41
46 virtual int width() const = 0;
47};
48
54template <typename ImageType>
57{
58public:
65 virtual bool getImage(ImageType& image) = 0;
66
81 virtual bool getImageCrop(cropType_id_t cropType,
82 yarp::sig::VectorOf<std::pair<int, int>> vertices,
83 ImageType& image);
84};
85
88
93
94} // namespace yarp::dev
95
96#endif // YARP_DEV_IFRAMEGRABBERIMAGE_H
cropType_id_t
@ YARP_CROP_LIST
@ YARP_CROP_RECT
contains the definition of a Vector type
Read a YARP-format image from a device.
virtual int width() const =0
Return the width of each frame.
virtual int height() const =0
Return the height of each frame.
virtual ~IFrameGrabberImageBase()
Destructor.
Read a YARP-format image (of a specific type) from a device.
virtual bool getImage(ImageType &image)=0
Get an image from the frame grabber.
virtual bool getImageCrop(cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, ImageType &image)
Get a crop of the image from the frame grabber.
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
#define YARP_dev_API
Definition api.h:18
#define YARP_dev_EXTERN
Definition api.h:19