From 734e1a94bc026ba8e7e71de0a9ddabe12e07b13b Mon Sep 17 00:00:00 2001 From: pans <pans@454eff88-639b-444f-9e54-f578c98de674> Date: 星期三, 11 一月 2017 19:28:58 +0800 Subject: [PATCH] --- RtspFace/SensetimeFaceAPIWrapper/src/test.cpp | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/RtspFace/SensetimeFaceAPIWrapper/src/test.cpp b/RtspFace/SensetimeFaceAPIWrapper/src/test.cpp index e71513b..3c804bb 100644 --- a/RtspFace/SensetimeFaceAPIWrapper/src/test.cpp +++ b/RtspFace/SensetimeFaceAPIWrapper/src/test.cpp @@ -2,7 +2,7 @@ #include <vector> #include <stdio.h> -#include "tools.h" +#include "faceAPI.h" using namespace std; @@ -15,7 +15,7 @@ char *image_list = "../test_image/imglist"; - person p={0,"axsdcc",1}; +// person p={0,"axsdcc",1}; cv::Mat bgr_image = cv::imread(image_path); if(bgr_image.data != NULL) { @@ -25,16 +25,20 @@ cout<<image_path<<endl; } - int idx = -11; - tools tool=tools(); - tool.init(); - cout<<"======tools init ==========="<<endl; + FaceDB db =FaceDB(); + db.init(db_path); + int id = db.search_db(db.extract_feature(bgr_image)); +// int idx = -11; +// tools tool=tools(); +// tool.init(); +// cout<<"======tools init ==========="<<endl; //idx=tool.reg(bgr_image,&p); - tool.search(bgr_image,&p); +// tool.search(bgr_image,&p); + cout<<"id="<<id<<endl; cout<<"============================================"<<endl; - cout<<"p_id="<<p.p_id<<endl; - cout<<"name="<<p.name<<endl; - cout<<"f_id="<<p.f_id<<endl; +// cout<<"p_id="<<p.p_id<<endl; +// cout<<"name="<<p.name<<endl; +// cout<<"f_id="<<p.f_id<<endl; return 0; -- Gitblit v1.8.0