91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 34KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-27
  • 語言: 其他
  • 標(biāo)簽: 人臉識別??qt-arm??

資源簡介

利用opencv,在arm板上做人臉識別。

資源截圖

代碼片段和文件信息

#include?
#include?“facedetect.h“

FaceDetect::FaceDetect()
{
????cascadeFile?=?“haarcascade_frontalface_alt2.xml“;
????cascade?=?(CvHaarClassifierCascade?*)?cvLoad(cascadeFile.toUtf8());
????flags?=?CV_HAAR_FIND_BIGGEST_object|CV_HAAR_DO_ROUGH_SEARCH;

????//?Storage?for?the?rectangles?detected
????storage?=?cvCreateMemStorage(0);
????CvSize?size;
????size.width?=?70;
????size.height?=?80;
????faceImage?=?cvCreateImage(sizeIPL_DEPTH_8UCV_8UC1);

}

FaceDetect::~FaceDetect()?{
????if(cascade)?cvReleaseHaarClassifierCascade(&cascade);
}


//?Load?a?new?classifier?cascade?we?unload?first?the?previous?classifier
void?FaceDetect::setCascadeFile(QString?cascadeFrom)?{
????cascadeFile?=?cascadeFrom;
????if(cascade)?cvReleaseHaarClassifierCascade(&cascade);
????cascade?=?(CvHaarClassifierCascade?*)?cvLoad(cascadeFile.toUtf8());
}

QString?FaceDetect::cascadeName()?const?{
????return?cascadeFile;
}

/*?Possible?values?for?flags?on?cvHaarDetectobjects.?It?can?be?a?combination?of?zero?or?more?of?the?following?values:

????????*?CV_HAAR_SCALE_IMAGE-?for?each?scale?factor?used?the?function?will?downscale?the?image?rather?than?“zoom“
????????????the?feature?coordinates?in?the?classifier?cascade.?Currently?the?option?can?only?be?used?alone
????????????i.e.?the?flag?can?not?be?set?together?with?the?others.
????????*?CV_HAAR_DO_CANNY_PRUNING-?If?it?is?set?the?function?uses?Canny?edge?detector?to?reject?some?image?regions
????????????that?contain?too?few?or?too?much?edges?and?thus?can?not?contain?the?searched?object.?The?particular
????????????threshold?values?are?tuned?for?face?detection?and?in?this?case?the?pruning?speeds?up?the?processing.
????????*?CV_HAAR_FIND_BIGGEST_object-?If?it?is?set?the?function?finds?the?largest?object?(if?any)?in?the?image.
????????????That?is?the?output?sequence?will?contain?one?(or?zero)?element(s).
????????*?CV_HAAR_DO_ROUGH_SEARCH-?It?should?be?used?only?when?CV_HAAR_FIND_BIGGEST_object?is?set?and?min_neighbors?>?0.
????????????If?the?flag?is?set?the?function?does?not?look?for?candidates?of?a?smaller?size?as?soon?as?it?has?found?the
????????????object?(with?enough?neighbor?candidates)?at?the?current?scale.?Typically?when?min_neighbors?is?fixed?the
????????????mode?yields?less?accurate?(a?bit?larger)?object?rectangle?than?the?regular?single-object?mode
????????????(CV_HAAR_FIND_BIGGEST_object)?but?it?is?much?faster?up?to?an?order?of?magnitude.?A?greater?value?of
????????????min_neighbors?may?be?specified?to?improve?the?accuracy.

Note?that?in?single-object?mode?CV_HAAR_DO_CANNY_PRUNING?does?not?improve?performance?much?and?can?even?slow?down?the
processing.?*/



void?FaceDetect::setFlags(int?flagsFrom)?{
????flags?=?flagsFrom;
}

QVector?FaceDetect::detectFaces(IplImage?*cvImage)?{
????QVector?listRect;
????CvRect?*rect?=?NULL;
????double?scale?=?1.2;

????//?Create?a?gray?scale?image?(1?channel)?to?turn?it?into?a?small?image?that?we?send?to?cvHaarDetectobjects?to?process
????IplImage?*grayImage

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\
?????文件?????????540??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\QTFaceRec.pro
?????文件???????24328??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\QTFaceRec.pro.user
?????文件???????????0??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\README
?????文件????????5355??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\facedetect.cpp
?????文件?????????652??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\facedetect.h
?????文件???????10917??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\facerecognize.cpp
?????文件????????2357??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\facerecognize.h
?????文件?????????405??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\main.cpp
?????文件????????9770??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\mainwindow.cpp
?????文件?????????960??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\mainwindow.h
?????文件???????12523??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\mainwindow.ui
?????文件???????38210??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\posix_qextserialport.cpp
?????文件????????1934??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\posix_qextserialport.h
?????文件????????9677??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\processImage.cpp
?????文件????????1810??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\processImage.h
?????文件????????6528??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\qextserialbase.cpp
?????文件????????6873??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\qextserialbase.h
?????文件?????????233??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\thread.cpp
?????文件?????????245??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\thread.h
?????文件????????7173??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\videodevice.cpp
?????文件????????1002??2011-10-15?22:18??sun11-QTFaceRec-7e5de14\videodevice.h

評論

共有 條評論