qt opencv人脸识别
时间: 2023-10-28 13:05:23 浏览: 181
引用: The Face Recognition System Based on QT and OpenCV。引用:DevCamera.h #ifndef DEVCAMERA_H #define DEVCAMERA_H #include <QObject> #include <iostream> #include <QThread> #include <QDebug> #include <QMutex> #include <QImage> #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "FaceRecognition.h" class DevCamera : public QThread { Q_OBJECT public: DevCamera(); //将opencv的Mat类型转换为QImage QImage matToQimage( Mat frame ); //QThread 实际所在的线程 void run(); //关闭摄像头 void closeCamera(); signals: void signalNewQimageAvailable( QImage image ); void signalQimageToServer( QImage image ); private: //摄像机对象 VideoCapture *m_pCamera; //摄像机运行标志位 bool m_bCameraRunning; //线程锁 QMutex m_objMutex; //opencv人脸识别库文件的路径 QString m_objXmlPath; // QImage m_objQimg; // opencv的 Mat类型 Mat m_objFrame; //人脸识别类 FaceRecognition m_objFaceRecog; }; #endif // DEVCAMERA_H
QT和OpenCV是两种常用于人脸识别的开发工具。在上述引用中,引用提到了基于QT和OpenCV的人脸识别系统。并且引用中的代码展示了一个使用QT和OpenCV实现人脸识别的摄像头类DevCamera。
阅读全文