def print_img_array(self):
img = self.take_screenshot('array')
#converts image to HSV
img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
# gets the values from the sliders
low_hue = self.low_hue.get()
low_sat = self.low_sat.get()
low_val = self.low_val.get()
# gets upper values from sliders
high_hue = self.high_hue.get()
high_sat = self.high_sat.get()
high_val = self.high_val.get()
lower_color = np.array([low_hue,low_sat,low_val])
upper_color= np.array([high_hue,high_sat,high_val])
#creates the mask and result
mask = cv2.inRange(self.hsv_image, lower_color, upper_color)
mask = np.array(mask)
mask.view
# Instance of Tkinter
评论列表
文章目录