From 531f4ba5e02ccade5699f678e3c3bf8fa44bf13e Mon Sep 17 00:00:00 2001
From: Zhiying Li <zhiyingli@g.ucla.edu>
Date: Thu, 4 Nov 2021 22:21:02 -0700
Subject: [PATCH] add url as input to ball_detect_live function

---
 Code/Control/Laptop_Code/ball_detection/ball_detection.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Code/Control/Laptop_Code/ball_detection/ball_detection.py b/Code/Control/Laptop_Code/ball_detection/ball_detection.py
index f35e2f8..8e8f45f 100644
--- a/Code/Control/Laptop_Code/ball_detection/ball_detection.py
+++ b/Code/Control/Laptop_Code/ball_detection/ball_detection.py
@@ -23,9 +23,9 @@ distanceDetect = __import__('ball_detection.distance-detection-torch.distance-de
 
 # change the IP address below according to the IP shown in the Serial monitor of Arduino code
 # url='http://192.168.1.107/cam-lo.jpg'
-url='http://192.168.4.1/cam-hi.jpg'
+# url='http://192.168.4.1/cam-hi.jpg'
 # url='http://192.168.1.107/cam-mid.jpg'
-url='http://192.168.0.204/cam-hi.jpg' # url2
+# url='http://192.168.0.204/cam-hi.jpg' # url2
 
 #### Modify Detecto Core to include possibility of other base models
 def modifyCore():
@@ -81,7 +81,7 @@ def returnModel(device, labelSet, modelLoc, modelFile):
   return model
 
 #### Live Detection
-def detectLive(model, minDetectionScore = 0.90, showSight = True):
+def detectLive(url , model, minDetectionScore = 0.90, showSight = True):
     '''
     Descrption:
         ball detection ML Functions
-- 
GitLab