def on_mouse(self, event, x, y, flag, param):
if event == cv2.EVENT_LBUTTONDBLCLK:
# Circle to indicate hsv location, and update frame
cv2.circle(self.img_debug, (x, y), 3, (0, 0, 255))
cv2.imshow('hsv_extractor', self.img_debug)
# Print values
values = self.hsv_frame[y, x]
print('H:', values[0], '\tS:', values[1], '\tV:', values[2])
评论列表
文章目录