| | |
| | | return 0; |
| | | } |
| | | |
| | | extern "C" void demo_yolo(char *cfgfile, char *weightfile, float thresh) |
| | | extern "C" void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index) |
| | | { |
| | | printf("YOLO demo\n"); |
| | | net = parse_network_cfg(cfgfile); |
| | |
| | | |
| | | srand(2222222); |
| | | |
| | | cv::VideoCapture cam(0); |
| | | cv::VideoCapture cam(cam_index); |
| | | cap = cam; |
| | | if(!cap.isOpened()) error("Couldn't connect to webcam.\n"); |
| | | |
| | |
| | | } |
| | | } |
| | | #else |
| | | extern "C" void demo_yolo(char *cfgfile, char *weightfile, float thresh){ |
| | | extern "C" void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index){ |
| | | fprintf(stderr, "YOLO demo needs OpenCV for webcam images.\n"); |
| | | } |
| | | #endif |