From b394337824c59dd970b87c5978fe4e8b94b85cb2 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Tue, 17 Nov 2015 19:09:00 +0000
Subject: [PATCH] killed some warnings, cam control

---
 src/yolo_kernels.cu |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/yolo_kernels.cu b/src/yolo_kernels.cu
index 487e9bd..86cdc53 100644
--- a/src/yolo_kernels.cu
+++ b/src/yolo_kernels.cu
@@ -1,3 +1,7 @@
+#include "cuda_runtime.h"
+#include "curand.h"
+#include "cublas_v2.h"
+
 extern "C" {
 #include "network.h"
 #include "detection_layer.h"
@@ -57,7 +61,7 @@
     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);
@@ -68,7 +72,7 @@
 
     srand(2222222);
 
-    cv::VideoCapture cam(0);
+    cv::VideoCapture cam(cam_index);
     cap = cam;
     if(!cap.isOpened()) error("Couldn't connect to webcam.\n");
 
@@ -114,7 +118,7 @@
     }
 }
 #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

--
Gitblit v1.10.0