From a54e2c8ed81ec720f45470292cdd97e3fc86d8e9 Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 25 四月 2017 15:34:10 +0800
Subject: [PATCH]
---
FaceServer/sample_face_search.h | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/FaceServer/sample_face_search.h b/FaceServer/sample_face_search.h
index fb37ee7..89a9853 100644
--- a/FaceServer/sample_face_search.h
+++ b/FaceServer/sample_face_search.h
@@ -1,6 +1,9 @@
#ifndef _SAMPLE_FACE_SEARCH_H_
#define _SAMPLE_FACE_SEARCH_H_
+#include <stdint.h>
+#include <vector>
+
typedef void* cv_handle_t;
struct cv_feature_t;
@@ -14,19 +17,45 @@
{}
};
+struct STFaceImage
+{
+ int32_t db_id;
+ int16_t mb_type; // MB_Frame::MBFType
+ int16_t width;
+ int16_t height;
+ uint32_t size;
+ const uint8_t* buff;
+};
+
+struct TopIdxScore
+{
+ int idx;
+ float score;
+
+ TopIdxScore(int _idx, float _score) : idx(_idx), score(_score)
+ {}
+};
+
+typedef std::vector<TopIdxScore> top_idx_score_vect_t;
+
cv_feature_t *stface_extract_feature(stface_handles& handles, const char *image_path);
+cv_feature_t *stface_extract_feature(stface_handles& handles, const STFaceImage& image);
int stface_db_add(stface_handles& handles, const char *image_path);
+int stface_db_add(stface_handles& handles, const STFaceImage& image);
bool stface_db_del(stface_handles& handles, int idx);
-bool stface_db_save(stface_handles& handles, char *db_path);
+bool stface_db_save(stface_handles& handles, const char *db_path);
-bool stface_db_load(stface_handles& handles, char *db_path);
+bool stface_db_load(stface_handles& handles, const char *db_path);
+
+bool stface_db_create(stface_handles& handles, const char *db_path);
bool stface_db_gen(stface_handles& handles, char *image_list, char *output_db_path);
bool stface_search_db(stface_handles& handles, char *image_path);
+bool stface_search_db(stface_handles& handles, const STFaceImage& image, top_idx_score_vect_t& result);
bool stface_search_list(stface_handles& handles, char *image_path, char *list_path);
--
Gitblit v1.8.0