def mask_image(self):
"""Converts image to HSV mode and
filters color using values defined in sliders"""
hsv_im = cv2.cvtColor(self.image, cv2.COLOR_BGR2HSV)
min_target_color = self.get_hsv_color('min')
max_target_color = self.get_hsv_color('max')
self.mask = cv2.inRange(hsv_im,
min_target_color,
max_target_color)
评论列表
文章目录