資源簡介
qt, arm, facial recognition, mini2440
代碼片段和文件信息
#include?“widget.h“
#include?“ui_widget.h“
#include?
#include?
#ifndef?PROPERTY
#define?PROPERTY
#define?image_width?320?//圖片顯示寬度
#define?image_height?240????//圖片顯示高度
#define?image_Format?QImage::Format_RGB888?//圖片顯示格式
#define?cameraDevice?“/dev/video0“??//攝像頭設(shè)備
#define?haarxml?“./data/haarcascade_frontalface_alt2.xml“???//人臉模型級聯(lián)分類器文件
#define?imgSizeScaleSmall?0.5????//圖像防縮比例
#define?imgSizeScaleBig?2????//圖像防縮比例
#endif??//PROPERTY
Widget::Widget(QWidget?*parent)?:
????QWidget(parent)
????ui(new?Ui::Widget)
{
????ui->setupUi(this);
????imgBuf?=?(unsigned?char?*)malloc(image_width?*?image_height/*QWidget::width()*QWidget::height()*/*?3?*?sizeof(char));
????frame?=?new?QImage(imgBufimage_widthimage_heightimage_Format);???//根據(jù)存儲空間開辟Q(mào)Image圖像
????m_camera?=?new?VideoD
- 上一篇:前推回帶潮流計算
- 下一篇:QML +Qt C++一個很好的搜索框
評論
共有 條評論