From a59ae87213293f5f6946d04694996675c32fd97e Mon Sep 17 00:00:00 2001 From: HJW <1576345902@qq.com> Date: Fri, 17 Jan 2025 08:53:49 +0800 Subject: [PATCH] =?UTF-8?q?UPDATE=20Vision=20=E4=BF=AE=E5=A4=8DZ=E8=BD=B4?= =?UTF-8?q?=E6=8A=93=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Vision/camera_coordinate_dete_planevison.py | 1 + Vision/tool/utils.py | 1 + get_position_test.py | 1 + 3 files changed, 3 insertions(+) diff --git a/Vision/camera_coordinate_dete_planevison.py b/Vision/camera_coordinate_dete_planevison.py index a574df0..5b76953 100644 --- a/Vision/camera_coordinate_dete_planevison.py +++ b/Vision/camera_coordinate_dete_planevison.py @@ -46,6 +46,7 @@ class Detection_plane_vsion: self.img = cv2.resize(self.img,((int(self.img.shape[1]/2),int(self.img.shape[0]/2)))) self.point = np.loadtxt(point_path).reshape(self.img.shape[0], self.img.shape[1], 3) self.seg_distance_threshold = 5 + pass def get_position(self, Point_isVision=False, Box_isPoint=True, First_Depth=True, Iter_Max_Pixel=30, diff --git a/Vision/tool/utils.py b/Vision/tool/utils.py index 2ca22ac..b7e7c25 100644 --- a/Vision/tool/utils.py +++ b/Vision/tool/utils.py @@ -160,6 +160,7 @@ def get_disk_space(path='C:'): # space_free = bytes2human(usage.free) # space_used_percent = bytes2human(usage.percent) space_free = float(space_free[:-1]) + return space_free def find_position(Depth_Z, RegionalArea, RegionalArea_Threshold, first_depth=True): if first_depth == True: diff --git a/get_position_test.py b/get_position_test.py index 37867b4..5147eb7 100644 --- a/get_position_test.py +++ b/get_position_test.py @@ -83,6 +83,7 @@ def detectionPerson_test(): else: cv2.destroyAllWindows() + print("person", person) # video_path = ''.join([os.getcwd(), '/Vision/model/data/1.mp4']) # cam = cv2.VideoCapture(video_path)