| Algorithm 2. Fragment of the Python code: other conversion function with associated parameters. |
| def process_frame(self, frame): |
| self.hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) |
| # transform into HSV color space⋯ blurred = cv2.GaussianBlur(self.hsv, (11,11), 0) |
| mask = cv2.inRange(blurred, self.color_low, self.color_high) # threshold mask = cv2.erode(mask, None, iterations = 2) |
| mask = cv2.dilate(mask, None, iterations = 2) |