From cf5f85cc1382420d9b6227121b67b183b184e09f Mon Sep 17 00:00:00 2001
From: Zhiying Li <zhiyingli@g.ucla.edu>
Date: Mon, 18 Oct 2021 19:31:17 -0700
Subject: [PATCH] print h and w of the image

---
 Code/Ball_Detection/PyTorch_with_ESPCAM/imageTread.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Code/Ball_Detection/PyTorch_with_ESPCAM/imageTread.py b/Code/Ball_Detection/PyTorch_with_ESPCAM/imageTread.py
index d2bac7d..2720416 100644
--- a/Code/Ball_Detection/PyTorch_with_ESPCAM/imageTread.py
+++ b/Code/Ball_Detection/PyTorch_with_ESPCAM/imageTread.py
@@ -14,8 +14,9 @@ url='http://192.168.4.1/cam-hi.jpg'
 # url='http://192.168.1.107/cam-mid.jpg'
 
 
-cv2.namedWindow("live transmission", cv2.WINDOW_AUTOSIZE)
+# cv2.namedWindow("live transmission", cv2.WINDOW_AUTOSIZE)
 
+cv2.namedWindow("live transmission", cv2.WINDOW_NORMAL)
 
 while True:
     header = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36."}
@@ -26,6 +27,8 @@ while True:
 
 
     cv2.imshow("live transmission", frame)
+    h,w,_ = frame.shape
+    print("with:{},high:{}".format(w,h))
     key=cv2.waitKey(5)
     if key==ord('q'):
         break
-- 
GitLab