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::proto::framegrabber {
15 
20 template <typename ImageType,
24  public yarp::dev::IFrameGrabberOf<ImageType>
25 {
26 private:
27  yarp::os::Port& m_port;
28 
29 public:
31  ~FrameGrabberOf_Forwarder() override = default;
32 
33  int height() const override;
34  int width() const override;
35  bool getImage(ImageType& image) override;
36  bool getImageCrop(cropType_id_t cropType,
37  yarp::sig::VectorOf<std::pair<int, int>> vertices,
38  ImageType& image) override;
39 };
40 
41 } // namespace yarp::proto::framegrabber
42 
43 
45 
46 #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:46
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:117
std::int32_t vocab32_t
Definition: numeric.h:78