From 934195a3c73562739a8957a46a4a6d633014a5e6 Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期三, 29 三月 2017 09:26:15 +0800
Subject: [PATCH]
---
RtspFace/SensetimeFaceAPIWrapper/src/faceDB.h | 40 +++++++++++++++++++---------------------
1 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/RtspFace/SensetimeFaceAPIWrapper/src/faceDB.h b/RtspFace/SensetimeFaceAPIWrapper/src/faceDB.h
index c1aedda..6895c0c 100644
--- a/RtspFace/SensetimeFaceAPIWrapper/src/faceDB.h
+++ b/RtspFace/SensetimeFaceAPIWrapper/src/faceDB.h
@@ -1,44 +1,42 @@
#ifndef _FACEDB_H_
#define _FACEDB_H_
+#include <opencv2/opencv.hpp>
#include <cv_face.h>
#include "time_helper.h"
-#include <opencv2/opencv.hpp>
-
-//人脸验证
-static cv_handle_t handle_verify;
-//数据库操作
-static cv_handle_t handle_db;
-//静态人脸识别
-static cv_handle_t handle_detect;
-
-class faceDB
+class FaceDB
{
public:
- //static faceDB* GetInstance();
+ FaceDB();
+ virtual ~FaceDB();
+
+ //人脸验证
+ cv_handle_t handle_verify;
+ //数据库操作
+ cv_handle_t handle_db;
+ //静态人脸识别
+ cv_handle_t handle_detect;
+
+ //初始化
+ bool init(char* db_path);
+ //保存数据库
+ bool finally();
//搜索SDK数据库
int search_db(cv_feature_t* p_feature );
//添加记录
int db_add(cv_feature_t* p_feature);
- //保存数据库
- bool db_save();
- int set_dbpath(char* db_path);
- faceDB();
- virtual ~faceDB();
+
//提取特征值
cv_feature_t *extract_feature(cv::Mat image_color);
private:
-
cv_result_t cv_result;
- //static faceDB* db;
- //faceDB(const faceDB & );
+ char* db_path;
//加载sdk数据库
bool db_load();
+ bool db_save();
};
-
-
#endif
\ No newline at end of file
--
Gitblit v1.8.0