// // Created by Scheaven on 2019/11/18. // #include "lib/h_interface.h" #include "lib/std_target.h" #include // C++ using namespace std; using namespace cv; void* handle; int main(int argc, char *argv[]) { // //视频流信息 VideoCapture cap; int cam_id = 0; Mat frame, blob; const char *conf = "../config.json"; int *max_chan; int x = 5; max_chan=&x; handle = create(conf, max_chan); void *sr; TImage *img = new TImage(); int i = 0; cap = VideoCapture("/data/workspace/01_Scheaven/04_gesture/03_hand.mp4"); while(1){ /* code */ cap >> frame; if(!frame.empty()) { img->width = frame.cols; img->height = frame.rows; img->channel = frame.channels(); img->data = frame.data; const int face_info_size = 0; char* face_info; sr = get_result_face(handle, img, "", 0, face_info, face_info_size); TResult * t_result = (TResult*) sr; cout << "t_result->count==" << t_result->count << endl; for (int i=0; icount; i++) cout << "confidence:" << t_result->targets[i].confidence << endl; }else{ cout << "------------over--" << endl; release(handle); release_result(sr); break; } } return 0; }