| | |
| | | |
| | | 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) |
| | | { |
| | |
| | | |
| | | int tools::search(char* s_feature,person *p) |
| | | { |
| | | p={}; |
| | | p= {}; |
| | | p->f_id = f_api.do_reasch(s_feature); |
| | | if(p->f_id > 0) |
| | | { |
| | |
| | | //if(dbu.myCont == NULL){ |
| | | // std::cout<<"myCont is null"<<std::endl; |
| | | //} |
| | | |
| | | dbu.db_search(p); |
| | | if(p->p_id != NULL) |
| | | { |
| | |
| | | |
| | | int tools::do_register(cv::Mat image,person *p) |
| | | { |
| | | p={}; |
| | | p= {}; |
| | | p->f_id = f_api.do_register(image); |
| | | if(p->f_id > 0) |
| | | { |