人脸识别性能测试部分代码

发布时间:2024-11-22 00:21

使用相机的面部识别或眼部检测功能,可以自动对焦在人脸中央 #生活技巧# #数码产品使用技巧# #相机调焦方法#

人脸识别性能测试部分代码

最新推荐文章于 2024-09-29 09:49:59 发布

雾霾的梦想 于 2018-06-04 10:38:38 发布

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

描述:

检测出来的人脸按人数分类加矩形实线框、保存在新目录下。

#include <time.h>

#include<string.h>
#include<sstream>
#include <iostream>
#include <iomanip>  
#include <fstream>  
#include<direct.h>    //头文件  
#include<opencv2/opencv.hpp>  
#include<opencv2/highgui/highgui.hpp>  
#include<opencv2/imgproc/imgproc.hpp>  
#include "FaceDetection.h"
/*整型转为字符串型*/
string num2str(int i);
/*双浮点点型转为字符串型*/
string num2str(double i);
/*检测单张人脸图像*/
void getface(string filename, string savepath);
/*调用检测人脸程序*/
void get_face_detected();
/*总的人脸数*/
int face_number = 0;
vector<ObjectStruct>vframe;
/*输出结果文件*/
ofstream out("F:\\save_detected_face\\result.txt");
/*绘制矩形*/
void find_all_point(Point start, Point end, vector<Point> &save);
void full_rotated_rect(Mat &image, const RotatedRect &rect, const Scalar &color);

int  main()
{

// Mat img_masked;
// image.copyTo(img_masked, mask);


get_face_detected();
getchar();
return 0;
}
/*创建文件夹*/
/*调用检测人脸程序*/
void get_face_detected(){
/*frameImg 读入图像变量 frameImg1读入图像副本变量*/
std::vector<cv::String> filenames; // notice here that we are using the Opencv's embedded "String" class
// cv::String folder = "F:\\qq_friend_down_pic\\test\\*.jpg"; // again we are using the Opencv's embedded "String" class
cv::String folder = "F:\\qq_friend_down_pic\\test\\*.jpg";
cv::glob(folder, filenames); // new function that does the job ;-);
for (size_t i = 0; i < filenames.size(); ++i){
</

网址:人脸识别性能测试部分代码 https://www.yuejiaxmz.com/news/view/182457

相关内容

人脸识别手机扫码速通门让你秒进写字楼
基于人脸识别的智能服饰搭配小程序
系统性能测试
性能测试工具一之ab(一)
全部心理测试
[性能测试] Benchmarks(压力测试工具汇总)
软件压力测试知识分享,2022好用压力测试工具有哪些?
性能测试概述
HR常用的人才测评工具:职业能力测试,职业性格测试工具
OCR识别:纸币(人民币)号码识别

随便看看