人脸识别流程一(人脸检测)
一、代码
#include <iostream>
#include<opencv2/opencv.hpp>
#define SFN 100
using namespace std;
using namespace cv;
const Size Dsize = Size(400,300);
const Size dsize = Size(400,300);
const Size msize = Size(100,75);
const string SF="D:\\code\\c\\opencv\\opencv_face_detection\\sample\\";
const string ISF="D:\\code\\c\\opencv\\opencv_face_detection\\input_sample\\";
const string CF="E:\\Application\\opencv\\OpenCV-MinGW-Build-OpenCV-4.1.1-x64\\etc\\haarcascades\\haarcascade_frontalface_alt.xml";
char char_filename[1024];
string change_int_to_char(int a)
{
string jpg="";
if(a==0)
{
return "0";
}
int b,t;
char c[10];
t=0;
while(a!=0)
{
b=a%10;
a/=10;
c[++t]=b+'0';
}
for(int i=t; i>=1