YARP
Yet Another Robot Platform
FrameGrabberOf_Forwarder.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_FRAMEGRABBER_PROTOCOL_FRAMEGRABBEROF_FORWARDER_H
7 #define YARP_FRAMEGRABBER_PROTOCOL_FRAMEGRABBEROF_FORWARDER_H
8 
10 #include <yarp/os/Port.h>
11 
12 #include "CameraVocabs.h"
13 
14 namespace yarp {
15 namespace proto {
16 namespace framegrabber {
17 
22 template <typename ImageType,
26  public yarp::dev::IFrameGrabberOf<ImageType>
27 {
28 private:
29  yarp::os::Port& m_port;
30 
31 public:
33  ~FrameGrabberOf_Forwarder() override = default;
34 
35  int height() const override;
36  int width() const override;
37  bool getImage(ImageType& image) override;
38  bool getImageCrop(cropType_id_t cropType,
39  yarp::sig::VectorOf<std::pair<int, int>> vertices,
40  ImageType& image) override;
41 };
42 
43 } // namespace framegrabber
44 } // namespace proto
45 } // namespace yarp
46 
47 
49 
50 #endif // YARP_FRAMEGRABBER_PROTOCOL_FRAMEGRABBEROF_FORWARDER_H
constexpr yarp::conf::vocab32_t VOCAB_RGB_IMAGE
Definition: CameraVocabs.h:116
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_IMAGE
Definition: CameraVocabs.h:16
cropType_id_t
A mini-server for network communication.
Definition: Port.h:47
This classes implement a sender / parser for IFrameGrabberOf interface messages.
int height() const override
Return the height of each frame.
int width() const override
Return the width of each frame.
bool getImage(ImageType &image) override
Get an image from the frame grabber.
bool getImageCrop(cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int >> vertices, ImageType &image) override
Get a crop of the image from the frame grabber.
Provides:
Definition: Vector.h:119
std::int32_t vocab32_t
Definition: numeric.h:78
The main, catch-all namespace for YARP.
Definition: dirs.h:16