From 0bad0e6b94c566f63bb97661850899f679fd1d12 Mon Sep 17 00:00:00 2001
From: pans <pans@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期三, 04 一月 2017 16:06:48 +0800
Subject: [PATCH] 

---
 RtspFace/demo/src/tools.cpp |   61 ++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 1 deletions(-)

diff --git a/RtspFace/demo/src/tools.cpp b/RtspFace/demo/src/tools.cpp
index ff644cc..b64f807 100644
--- a/RtspFace/demo/src/tools.cpp
+++ b/RtspFace/demo/src/tools.cpp
@@ -1 +1,60 @@
-#include "tools.h"
\ No newline at end of file
+#include "tools.h"
+
+tools::tools() {}
+
+tools::~tools() {}
+
+int tools::search(cv::Mat image,person *p)
+{
+	idx = f_api->do_reasch(image);
+	if(idx<0)
+	{
+		p = f_db->db_rearch(int);
+		if(p != NULL)
+		{
+			return 0;
+		}
+	}
+	return -1;
+}
+
+int tools::search(char* s_feature,person *p)
+{
+	idx = f_api->do_reasch(s_feature);
+	if(idx<0)
+	{
+		p = db_rearch(int);
+		if(p != NULL)
+		{
+			return 0;
+		}
+	}
+	return -1;
+}
+
+int tools::register(cv::Mat image,person *p)
+{
+	do_register(image,p);
+}
+
+person tools::do_search(int idx)
+{
+	person p;
+	p = f_db->db_rearch(int);
+	return p;
+}
+
+int tools::do_register(cv::Mat image,person *p)
+{
+	idx = f_api->do_register(image);
+	if(idx<0)
+	{
+		idx = f_db->do_register(idx,p);
+		if(idx)
+		{
+			return 0;
+		}
+	}
+	return -1;
+
+}
\ No newline at end of file

--
Gitblit v1.8.0