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/sig/Image.h>
11#include <yarp/sig/Vector.h>
12
13#include <yarp/dev/api.h>
15
16#include <yarp/dev/VertexData.h>
17
18namespace yarp::dev
19{
20 typedef enum
21 {
22 YARP_CROP_RECT = 0, // Rectangular region of interest style, requires the two corner as a parameter
23 YARP_CROP_LIST // Unordered list of points, the returned image will be a nx1 image with n the
24 // number of points required by user (size of input vector), with the corresponding
25 // pixel color.
27
28} // namespace yarp::dev
29
30namespace yarp::dev {
31
38{
39public:
44
49 virtual int height() const = 0;
50
55 virtual int width() const = 0;
56};
57
63template <typename ImageType>
66{
67public:
75
91 std::vector<yarp::dev::VertexData> vertices,
93};
94
97
102
103} // namespace yarp::dev
104
105#endif // YARP_DEV_IFRAMEGRABBERIMAGE_H
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 yarp::dev::ReturnValue getImage(ImageType &image)=0
Get an image from the frame grabber.
virtual yarp::dev::ReturnValue getImageCrop(yarp::dev::cropType_id_t cropType, std::vector< yarp::dev::VertexData > 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.
#define YARP_dev_API
Definition api.h:18
#define YARP_dev_EXTERN
Definition api.h:19