资源简介
QT使用Opencv库参考http://blog.sina.com.cn/s/blog_5c70dfc80100qwi3.html
QT使用Opencv库打开网络摄像头请参考
http://blog.csdn.net/llh318724/article/details/7007661#
我做的这个是QT使用Opencv库及网络摄像头做的视频监控系统带人脸检测功能,
这是软件功能还不够完善,希望下载
的人将其完善后再发上来
代码片段和文件信息
/*
Author: Alberto G. Lagos (Kronen)
Copyright (C) 2010 Alberto G. Lagos (Kronen)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation either version 3 of the License or
(at your option) any later version.
This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not see
*/
#include “camerawindow.h“
#include
#include
#include
CameraWindow::CameraWindow(QWidget *parent) : QMainWindow(parent) {
setWindowIcon(QIcon(“:/images/OpenCv.ico“));
setMinimumSize(320 240);
cvWidget = new OpenCVWidget(this);
createCamShiftDialog();
createActions();
createMenu();
createToolBar();
createStatusBar();
// We check if OpenCV was able to detect a compatible device
if(!cvWidget->isCaptureActive()) {
QMessageBox::warning(this tr(“Qt + OpenCV“)
tr(“Can‘t detect a camera connected to the PC.\n“
“This program doesn‘t provide any option\n“
“to configure the device.“) QMessageBox::Close);
videoAction->setEnabled(false);
screenshotAction->setEnabled(false);
settingsMenu->setEnabled(false);
flagsMenu->setEnabled(false);
} else {
readSettings();
statusLabel->setText(QString(“OpenCV Face Detection. (w:%1 h:%2)“).arg(cvWidget->width()).arg(cvWidget->height()));
}
setCentralWidget(cvWidget);
}
void CameraWindow::closeEvent(QCloseEvent *event) {
writeSettings();
delete cvWidget;
if(mCamShiftDialog) delete mCamShiftDialog;
event->accept();
}
void CameraWindow::saveScreenshot() {
cvWidget->saveScreenshot();
}
// Start/Stop writing the webcam frames to a video file
void CameraWindow::writeVideo() {
if(videoAction->isChecked()) {
videoAction->setIcon(QIcon(“:/images/icon_stopvideo.png“));
statusLabel->setText(“Writing Video“);
cvWidget->videoWrite();
} else {
videoAction->setIcon(QIcon(“:/images/icon_video.png“));
statusLabel->setText(“Video Write Finished“);
cvWidget->videoStop();
}
}
// Start/Stop detect face mode
void CameraWindow::detectFaces() {
// We don‘t track and detect at the same time
if(detectFacesAction->isChecked()) {
// Call setCascadeFile if there isn‘t a default cascade file
if(!cvWidget->isFaceDetectAvalaible()) setCascadeFile();
// Don‘t track and detect at the same time
cvWidget->setTrackFace(false);
cvWidget->setDetectF
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-01-06 23:53 qt-opencv-qt-opencv-master\
文件 35148 2014-01-06 23:53 qt-opencv-qt-opencv-master\COPYING
文件 1068 2014-01-06 23:53 qt-opencv-qt-opencv-master\OpenCV.pro
文件 18167 2014-01-06 23:53 qt-opencv-qt-opencv-master\OpenCV.pro.user
文件 17921 2014-01-06 23:53 qt-opencv-qt-opencv-master\OpenCV.pro.user.3.0-pre1
文件 2288 2014-01-06 23:53 qt-opencv-qt-opencv-master\README
文件 13116 2014-01-06 23:53 qt-opencv-qt-opencv-master\camerawindow.cpp
文件 2568 2014-01-06 23:53 qt-opencv-qt-opencv-master\camerawindow.h
文件 4090 2014-01-06 23:53 qt-opencv-qt-opencv-master\camshift.cpp
文件 2050 2014-01-06 23:53 qt-opencv-qt-opencv-master\camshift.h
文件 865 2014-01-06 23:53 qt-opencv-qt-opencv-master\camshiftdialog.cpp
文件 998 2014-01-06 23:53 qt-opencv-qt-opencv-master\camshiftdialog.h
文件 4836 2014-01-06 23:53 qt-opencv-qt-opencv-master\camshiftdialog.ui
文件 5062 2014-01-06 23:53 qt-opencv-qt-opencv-master\facedetect.cpp
文件 515 2014-01-06 23:53 qt-opencv-qt-opencv-master\facedetect.h
目录 0 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\
文件 506314 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_eye.xm
文件 1095035 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_eye_tree_eyeglasses.xm
文件 919871 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_frontalface_alt.xm
文件 837462 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_frontalface_alt2.xm
文件 3644763 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_frontalface_alt_tree.xm
文件 1254733 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_frontalface_default.xm
文件 636650 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_fullbody.xm
文件 323227 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_lefteye_2splits.xm
文件 531497 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_lowerbody.xm
文件 358385 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_mcs_eyepair_big.xm
文件 410204 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_mcs_eyepair_small.xm
文件 312877 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_mcs_leftear.xm
文件 777721 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_mcs_lefteye.xm
文件 719806 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_mcs_mouth.xm
文件 1585210 2014-01-06 23:53 qt-opencv-qt-opencv-master\haarcascades\haarcascade_mcs_nose.xm
............此处省略28个文件信息
相关资源
- Qt实现微信气泡聊天效果
- QT实现浏览器+百度地图
- Qt5使用百度地图test
- QT 自定义无边框窗体,支持边缘拖拽
- Qt5-嵌入百度地图
- Qt-Charts动态显示多条折线电压值(实
- esp8266继电器配网+断电保存+可重复配
- 使用opencv与两个摄像头实现双目标定
- mupdf-qt已编译库文件
- STM32F103+SIM800C 移植MQTT 连接阿里云服务
- QT5版简易网络调试助手附带编译好的
- 封装QTableView,支持冻结列,绘制表头
- Qt实现二维码扫描器
- Qt局域网聊天工具
- qt指纹采集测试程序
- 浅墨opencv博客源码全部源码打包
- Qt实现浏览器
- qt调用百度地图与js通信源码
- Qt调用百度地图APImap_APP.7z
- Cpp/Qt/Opencv 识别简单手势剪刀石头布
- OpenCV 特征点匹配及 优化
- Qt加载HTML/js,实现相互调用的小程序
- QT简单的计时器程序
- libmodbus 在 Windows平台 Qt5 MinGW 中的测试
- QT5-电压电阻表盘源码可以自定义阴影
- QT-电压电阻表盘源码可以自定义阴影
- qt写word两种方式代码
- QTableWidget分页代码
- QT编写的邮件发送工具
- Qt写的实用闹钟,可以自己选择音乐
评论
共有 条评论