source: pacpussensors/trunk/Vislab/Display.cpp@ 146

Last change on this file since 146 was 142, checked in by ldecherf, 7 years ago

Ajout de la classe outputter et modification d'openCV

File size: 808 bytes
Line 
1#include "Display.h"
2#include <iostream>
3#include <lib3dv/device.h>
4#include <QMetaType>
5#include "VislabImageProcessor.h"
6
7 /*! A more elaborate description of the constructor*/
8Display::Display(const QString& windowName, lib3dv::image::type::types imageType) : VislabImageProcessor(windowName, imageType)
9{
10 qRegisterMetaType<cv::Mat>("cv::Mat");
11 connect(this, SIGNAL(doDisplay(cv::Mat)),SLOT(DisplayFrame(cv::Mat)));
12
13}
14
15/*! DisplayFrame function from the Display class with a cv:Mat parameter */
16void Display::DisplayFrame(cv::Mat const& frame)
17{
18 cv::imshow(getName().toStdString(), frame);
19}
20
21/*! process function from the Display class with a cv:Mat parameter
22 Emit the signal to diplay the frame
23*/
24void Display::process(cv::Mat const& frame)
25{
26 emit doDisplay(frame);
27}
28
29
30
31
32
33
34
35
36
37
Note: See TracBrowser for help on using the repository browser.