pans
2017-01-05 13ab3d6db66bef485afda3278ed7ca6d14c735c8
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)
   {