YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImagePort.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: LGPL-2.1-or-later
5 */
6
7#ifndef IMGPORT
8#define IMGPORT
9
10#include <yarp/sig/Image.h>
13#include <yarp/os/Time.h>
14#include <yarp/conf/numeric.h>
15
16#include <string>
17
18#include <QObject>
19#include <QVideoFrame>
20#include "signalhandler.h"
21
26#ifdef YARP_LITTLE_ENDIAN
27class InputCallback: public QObject, public yarp::os::TypedReaderCallback<yarp::sig::ImageOf<yarp::sig::PixelBgra> >
28#else
29class InputCallback: public QObject, public yarp::os::TypedReaderCallback<yarp::sig::ImageOf<yarp::sig::PixelRgb> >
30#endif
31{
32
33public:
37
38#ifdef YARP_LITTLE_ENDIAN
41#else
44#endif
45
46private:
47 int counter;
48 SignalHandler *sigHandler;
49};
50
51#endif
This class is a callback class that receives the video frame from the YARP backend.
Definition ImagePort.h:31
void onRead(yarp::sig::ImageOf< yarp::sig::PixelBgra > &img) override
the function callback
Definition ImagePort.cpp:30
void setSignalHandler(SignalHandler *)
sets the signalhandler to the class
Definition ImagePort.cpp:84
The class that handles some signals.
A callback for typed data from a port.
Typed image class.
Definition Image.h:605