// // Created by Scheaven on 2019/11/18. // #include "src/h_interface.h" #include "src/std_target.h" #include // C++ #include "src/utils/draw_util.h" using namespace std; using namespace cv; void* handle; int main(int argc, char *argv[]) { // //视频流信息 VideoCapture cap; VideoCapture cap2; int cam_id = 0; int cam_id2 = 1; Mat frame, blob; Mat frame2, blob2; const char *conf = "../config.json"; int *max_chan; int x = 5; max_chan=&x; handle = create(conf, max_chan); void *sr; void *sr2; TImage *img = new TImage(); TImage *img2 = new TImage(); int i = 0; cap = VideoCapture("../1.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; sr = get_result(handle, img, 0); 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; }