From 7f3430f95dda8bc60e00b07e22c0de6cd9fba760 Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期一, 14 三月 2022 15:25:46 +0800
Subject: [PATCH] change countours method

---
 debug/0_get_frame.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/debug/0_get_frame.py b/debug/0_get_frame.py
index 757ccff..148cdb7 100644
--- a/debug/0_get_frame.py
+++ b/debug/0_get_frame.py
@@ -3,6 +3,7 @@
 
 import datetime
 import cv2
+from _image_clip_setting import image_clip
 
 time_now = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
 #cap = cv2.VideoCapture(0)
@@ -12,6 +13,7 @@
 print('鎵嬪姩璁剧疆 鍞竴鐨勫弬鏁�: 鏁板瓧浠〃鐩樼殑浣嶇疆: 瑕佺◢寰暀浜涗綑閲忋��')
 print('鏍煎紡涓哄浘鍍忓尯鍩� [Y杞� min:max, X杞� min:max],濡俒176:234,280:426]')
 print('鍙﹀鍥惧舰 宸︿笂瑙掍负0,0 鍚戝彸 涓篨杞存鍚戯紝鍚戜笅涓篩杞存鍚�')
-cv2.imwrite(time_now+"_clip.jpg",frame[176:234,280:426])
+cv2.imwrite(time_now+"_clip.jpg",
+            frame[image_clip[0]:image_clip[1], image_clip[2]:image_clip[3]])
 cap.release()
 cv2.destroyAllWindows()

--
Gitblit v1.9.1