From be2357b9b0e221adbac1a18eba20a8d416df28ce Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Tue, 25 Feb 2020 17:19:08 +0000 Subject: [PATCH] change cropping mechanism --- detect.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/detect.py b/detect.py index 088368f..0d17544 100644 --- a/detect.py +++ b/detect.py @@ -89,9 +89,8 @@ def detect(calibration_width, img_file, show, quick): image = cv2.imread(img_file) #image = img_file.copy() - #image = cv2.resize(image, (int(image.shape[1]*1), int(image.shape[0]*1))) - image = cv2.resize(image, (1000, int( - image.shape[0]/image.shape[1] * 1000)), interpolation=cv2.INTER_NEAREST) + image = cv2.resize(image, (floor(image.shape[1]*0.5), floor(image.shape[0]*0.5))) + #image = cv2.resize(image, (1000, int(image.shape[0]/image.shape[1] * 1000)), interpolation=cv2.INTER_NEAREST) if show and not quick: cv2.namedWindow("Item Sorter")