From 13ab3d6db66bef485afda3278ed7ca6d14c735c8 Mon Sep 17 00:00:00 2001
From: pans <pans@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期四, 05 一月 2017 16:56:46 +0800
Subject: [PATCH] 

---
 RtspFace/demo/src/tools.cpp |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/RtspFace/demo/src/tools.cpp b/RtspFace/demo/src/tools.cpp
index 7fb3e33..ad8166d 100644
--- a/RtspFace/demo/src/tools.cpp
+++ b/RtspFace/demo/src/tools.cpp
@@ -2,14 +2,15 @@
 
 tools::tools()
 {
-	std::cout<<"tools() start"<<std::endl;
-	my_db mydb= {"root","Basic@2017","localhost","demo",3306};
-
-	dbu = DBuntil(mydb);
-	std::cout<<"tools() end"<<std::endl;
 }
 
 tools::~tools() {}
+
+bool tools::init(){
+	my_db mydb= {"root","Basic@2017","localhost","demo",3306};
+	//DBuntil dbu =DBuntil();
+	return dbu.db_init(mydb);
+}
 
 int tools::search(cv::Mat image,person *p)
 {
@@ -30,7 +31,7 @@
 
 int tools::search(char* s_feature,person *p)
 {
-	p={};
+	p= {};
 	p->f_id = f_api.do_reasch(s_feature);
 	if(p->f_id > 0)
 	{
@@ -56,6 +57,7 @@
 	//if(dbu.myCont == NULL){
 	//	std::cout<<"myCont is null"<<std::endl;
 	//}
+	
 	dbu.db_search(p);
 	if(p->p_id != NULL)
 	{
@@ -66,7 +68,7 @@
 
 int tools::do_register(cv::Mat image,person *p)
 {
-	p={};
+	p= {};
 	p->f_id = f_api.do_register(image);
 	if(p->f_id > 0)
 	{

--
Gitblit v1.8.0