| | |
| | | #include "tools.h" |
| | | #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; |
| | | |
| | | } |