#include"opencv2\opencv.hpp"
#include"cv.h"
#include<vector>
#include<windows.h>
#include"iostream"
#include"fstream"
#include<stdio.h>
#include"highgui.h"
#include"cxcore.h"
#include"time.h"
#include"math.h"
//==============
#include"opencv2/imgproc.hpp"
#include"opencv2/highgui.hpp"
#include"opencv2/ml.hpp"
#include"opencv2/objdetect.hpp"
#include"string"
#include"stdlib.h"
//=========2 14 添加
#include"io.h"
#include<stdio.h>
using namespace cv;
using namespace std;
vector<string> listDir(string path);
vector<string> listFile(string path, string format);
void GetAllFormatFiles(string path, vector<string>& files, string format);
//======add==
int main()
{
string gallery_path = "F:\\image_save\\advance_2";
string probe_path = "F:\\image_save\\new_test";
vector<string> gallery_folders = listDir(gallery_path);
for (int g = 0; g < gallery_folders.size(); g++) {
vector<string> image_list = listFile(gallery_path + "\\" + gallery_folders.at(g), "jpg");
for (int f = 0; f < image_list.size(); f++) {