YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
15
20template <typename ImageType,
24 public yarp::dev::IFrameGrabberOf<ImageType>
25{
26private:
27 yarp::os::Port& m_port;
28
29public:
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
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_IMAGE
cropType_id_t
yarp::sig::ImageOf< yarp::sig::PixelRgb > ImageType
Definition ImageType.h:24
Read a YARP-format image (of a specific type) from a device.
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.
std::int32_t vocab32_t
Definition numeric.h:78