mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
GUYS I THINK MAYBE IT WAS BROKEN ON OPENCV IDK
This commit is contained in:
@@ -806,13 +806,7 @@ void threat_classifier(char *datacfg, char *cfgfile, char *weightfile, int cam_i
|
||||
list *options = read_data_cfg(datacfg);
|
||||
|
||||
srand(2222222);
|
||||
CvCapture * cap;
|
||||
|
||||
if(filename){
|
||||
cap = cvCaptureFromFile(filename);
|
||||
}else{
|
||||
cap = cvCaptureFromCAM(cam_index);
|
||||
}
|
||||
void * cap = open_video_stream(filename, cam_index, 0,0,0);
|
||||
|
||||
int top = option_find_int(options, "top", 1);
|
||||
|
||||
@@ -934,13 +928,7 @@ void gun_classifier(char *datacfg, char *cfgfile, char *weightfile, int cam_inde
|
||||
list *options = read_data_cfg(datacfg);
|
||||
|
||||
srand(2222222);
|
||||
CvCapture * cap;
|
||||
|
||||
if(filename){
|
||||
cap = cvCaptureFromFile(filename);
|
||||
}else{
|
||||
cap = cvCaptureFromCAM(cam_index);
|
||||
}
|
||||
void * cap = open_video_stream(filename, cam_index, 0,0,0);
|
||||
|
||||
int top = option_find_int(options, "top", 1);
|
||||
|
||||
@@ -950,8 +938,6 @@ void gun_classifier(char *datacfg, char *cfgfile, char *weightfile, int cam_inde
|
||||
int *indexes = calloc(top, sizeof(int));
|
||||
|
||||
if(!cap) error("Couldn't connect to webcam.\n");
|
||||
cvNamedWindow("Threat Detection", CV_WINDOW_NORMAL);
|
||||
cvResizeWindow("Threat Detection", 512, 512);
|
||||
float fps = 0;
|
||||
int i;
|
||||
|
||||
@@ -1008,23 +994,10 @@ void demo_classifier(char *datacfg, char *cfgfile, char *weightfile, int cam_ind
|
||||
list *options = read_data_cfg(datacfg);
|
||||
|
||||
srand(2222222);
|
||||
CvCapture * cap;
|
||||
|
||||
int w = 1280;
|
||||
int h = 720;
|
||||
|
||||
if(filename){
|
||||
cap = cvCaptureFromFile(filename);
|
||||
}else{
|
||||
cap = cvCaptureFromCAM(cam_index);
|
||||
}
|
||||
|
||||
if(w){
|
||||
cvSetCaptureProperty(cap, CV_CAP_PROP_FRAME_WIDTH, w);
|
||||
}
|
||||
if(h){
|
||||
cvSetCaptureProperty(cap, CV_CAP_PROP_FRAME_HEIGHT, h);
|
||||
}
|
||||
void * cap = open_video_stream(filename, cam_index, w, h, 0);
|
||||
|
||||
int top = option_find_int(options, "top", 1);
|
||||
|
||||
@@ -1035,8 +1008,6 @@ void demo_classifier(char *datacfg, char *cfgfile, char *weightfile, int cam_ind
|
||||
int *indexes = calloc(top, sizeof(int));
|
||||
|
||||
if(!cap) error("Couldn't connect to webcam.\n");
|
||||
cvNamedWindow(base, CV_WINDOW_NORMAL);
|
||||
cvResizeWindow(base, 512, 512);
|
||||
float fps = 0;
|
||||
int i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user