| | |
| | | image get_image_from_stream(CvCapture *cap); |
| | | |
| | | static char **demo_names; |
| | | static image *demo_alphabet; |
| | | static image **demo_alphabet; |
| | | static int demo_classes; |
| | | |
| | | static float **probs; |
| | |
| | | if(l.type == DETECTION){ |
| | | get_detection_boxes(l, 1, 1, demo_thresh, probs, boxes, 0); |
| | | } else if (l.type == REGION){ |
| | | get_region_boxes(l, 1, 1, demo_thresh, probs, boxes, 0); |
| | | get_region_boxes(l, 1, 1, demo_thresh, probs, boxes, 0, 0); |
| | | } else { |
| | | error("Last layer must produce detections\n"); |
| | | } |
| | |
| | | void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix) |
| | | { |
| | | //skip = frame_skip; |
| | | image *alphabet = load_alphabet(); |
| | | image **alphabet = load_alphabet(); |
| | | int delay = frame_skip; |
| | | demo_names = names; |
| | | demo_alphabet = alphabet; |
| | |
| | | srand(2222222); |
| | | |
| | | if(filename){ |
| | | printf("video file: %s\n", filename); |
| | | cap = cvCaptureFromFile(filename); |
| | | }else{ |
| | | cap = cvCaptureFromCAM(cam_index); |