1 Star 0 Fork 14

圆月庄主/ccface

forked from zhouxiang/ccface 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
opencvshowframe.h 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
zhouxiang 提交于 2015-05-11 21:00 . create pro
#ifndef OPENCVSHOWFRAME_H
#define OPENCVSHOWFRAME_H
#include <QQuickItem>
#include <QTimer>
#include <list>
#include <QImage>
#include <opencv/cv.h>
#include <opencv/highgui.h>
class OpenCVcapture;
class OpencvFaceRecognizer;
class OpenCVfaceDetectAction;
class OpenCVshowFrame : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(int m_frameRate READ frameRate WRITE setFrameRate NOTIFY frameRateChanged)
Q_PROPERTY(bool m_run READ run WRITE setRun NOTIFY runChanged)
Q_PROPERTY(QObject* m_capture READ capture WRITE setCapture NOTIFY captureChanged)
public:
explicit OpenCVshowFrame(QQuickItem *parent = 0);
~OpenCVshowFrame();
int frameRate() const;
void setFrameRate(int rate);
bool run() const;
void setRun(bool r);
QObject* capture() const;
void setCapture(QObject *c);
Q_INVOKABLE void addAction(QObject *act);
Q_INVOKABLE void startPredict();
Q_INVOKABLE void setLabel(int i);
Q_INVOKABLE void startTrain();
signals:
void frameRateChanged();
void runChanged();
void captureChanged();
void who(int i);
public slots:
void fun();
protected slots:
void updateFrame();
void a() {
}
protected:
QSGNode* updatePaintNode(QSGNode * old, UpdatePaintNodeData *);
private:
int m_frameRate;
bool m_run;
QObject *m_capture;
QTimer m_timer;
std::list<QObject*> m_actions;
IplImage* doActions(IplImage *img);
OpencvFaceRecognizer *fr;
OpenCVfaceDetectAction *f;
QImage::Format format(int depth, int nChannels);
};
#endif // OPENCVSHOWFRAME_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/yanshinghwang/ccface.git
git@gitee.com:yanshinghwang/ccface.git
yanshinghwang
ccface
ccface
master

搜索帮助