2
* Copyright (C) 2013 ~ 2015 National University of Defense Technology(NUDT) & Kylin Ltd.
5
* Kobe Lee xiangli@ubuntukylin.com/kobe24_lixiang@126.com
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; version 3.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef CAMERAMANAGER_H
21
#define CAMERAMANAGER_H
22
//sudo apt-get install libcv-dev libopencv-highgui-dev libopencv-dev libhighgui-dev
24
#include "../component/kylintitlebar.h"
26
#include <QTimer>// 设置采集数据的间隔时间
27
#include <highgui.h> //包含opencv库头文件
29
//#include <opencv2/highgui.hpp> //1710opencv库
38
class SessionDispatcher;
42
class CameraManager :public QDialog
46
CameraManager(QWidget *parent = 0, SessionDispatcher *proxy = 0, QString skin = ":/background/res/skin/1.png");
48
void setParentWindow(MainWindow *From) { mainwindow = From;}
50
void setOKButtonEnable(bool enable);
51
void resetTitleSkin(QString skin);
53
IplImage* DoPyrDown(IplImage* image, int filter);
54
QString getCurrentDateTime();
55
QString getHomePath();
59
void readFarme();//读取当前帧信息
60
void onCloseButtonClicked();
61
void onOKButtonClicked();
62
void onViewButtonClicked();
66
// void keyPressEvent( QKeyEvent *k );
69
void initTitleBar(QString skin);
72
MainWindow *mainwindow;
73
SessionDispatcher *sessionproxy;
76
CvCapture *cam;// 视频获取结构, 用来作为视频获取函数的一个参数
77
IplImage *frame;//申请IplImage类型指针,就是申请内存空间来存放每一帧图像
78
KylinTitleBar *title_bar;
89
#endif // CAMERAMANAGER_H