source: pacpussensors/trunk/CameraViewer/CameraViewerComponent.hpp@ 145

Last change on this file since 145 was 141, checked in by ldecherf, 8 years ago

Ajout du composant CameraViewer (input pour le composant Vislab)

File size: 1.6 KB
Line 
1#ifndef DEF_CAMERA_VIEWER_COMPONENT_HPP
2#define DEF_CAMERA_VIEWER_COMPONENT_HPP
3
4
5// Includes, qt.
6#include <QTimer>
7#include <QObject>
8
9// Includes, pacpus.
10#include <Pacpus/kernel/ComponentBase.h>
11#include <Pacpus/kernel/DbiteFile.h>
12#include <Pacpus/kernel/pacpus.h>
13
14// Includes, opencv.
15#include <opencv2/opencv.hpp>
16#include <opencv2/highgui.hpp>
17
18
19#ifdef WIN32
20# ifdef CAMERA_VIEWER_COMPONENT_EXPORTS
21# define CAMERA_VIEWER_COMPONENT_API __declspec(dllexport)
22# else
23# define CAMERA_VIEWER_COMPONENT_API __declspec(dllimport)
24# endif
25#else
26# define CAMERA_VIEWER_COMPONENT_API
27#endif
28
29namespace pacpus
30{
31 class CAMERA_VIEWER_COMPONENT_API CameraViewerComponent
32 : public QObject
33 , public ComponentBase
34 {
35 Q_OBJECT
36 public:
37
38 //device(){}
39 /// Ctor of CameraViewerComponent.
40 //CameraViewerComponent(const QString& windowName, lib3dv::image::type::types imageType);
41
42 CameraViewerComponent(QString const& name);
43
44 /// Dtor of CameraViewerComponent
45 ~CameraViewerComponent();
46
47 /// Stop the processing thread.
48 virtual void stopActivity();
49
50 /// Start the processing thread.
51 virtual void startActivity();
52
53 /// Configure the component.
54 virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
55 void process(cv::Mat const& frame);
56
57 // Working thread, grabbing frame from a webcam.
58 DbiteFile mDBTFile;
59
60 public:
61 virtual void addInputs();
62
63 private:
64 std::string mOutputFileName;
65 Q_SIGNAL void doDisplay(cv::Mat const& frame);
66 Q_SLOT void DisplayFrame(cv::Mat const& frame);
67 };
68}
69
70#endif
Note: See TracBrowser for help on using the repository browser.