From 2fc90f99433eabdf49271dfba6b271ffc491cade Mon Sep 17 00:00:00 2001 From: zhouli <1932489836@qq.com> Date: Fri, 15 Sep 2023 16:35:33 +0800 Subject: [PATCH] Correct the order of image width and height --- gelsight/gsdevice.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gelsight/gsdevice.py b/gelsight/gsdevice.py index 7bfee66..dd41f8a 100644 --- a/gelsight/gsdevice.py +++ b/gelsight/gsdevice.py @@ -81,8 +81,6 @@ def connect(self): self.cam = cv2.VideoCapture(self.dev_id) if self.cam is None or not self.cam.isOpened(): print('Warning: unable to open video source: ', self.dev_id) - self.imgw = 240 - self.imgh = 320 return self.cam @@ -91,7 +89,7 @@ def get_raw_image(self): ret, f0 = self.cam.read() ret, f0 = self.cam.read() if ret: - f0 = resize_crop_mini(f0,self.imgh,self.imgw) + f0 = resize_crop_mini(f0,self.imgw,self.imgh) else: print('ERROR! reading image from camera') @@ -103,7 +101,7 @@ def get_image(self): ret, f0 = self.cam.read() if ret: - f0 = resize_crop_mini(f0, self.imgh, self.imgw) + f0 = resize_crop_mini(f0, self.imgw, self.imgh) else: print('ERROR! reading image from camera!')