|
RoboCarts
|
Functions | |
| def | confirm_color (event, x, y, flags, color_boundaries) |
| def | pick_color (event, x, y, flags, span) |
| def | choose_color_boundaries (src, span=(10, 20, 40)) |
Variables | |
| image_hsv = None | |
| list | saved_boundaries = [] |
@file auto_color_picker.py @brief This file contains functions for the automatic color picking routine Inspired by https://github.com/mlachowski-stx/nai_opencv/blob/master/color_check.py
| def auto_color_picker.choose_color_boundaries | ( | src, | |
span = (10, 20, 40) |
|||
| ) |
Subroutine for selecting colors for the Color algorithm :param span: span of accepted range for colors :param src: source image :return: saved color ranges
| def auto_color_picker.confirm_color | ( | event, | |
| x, | |||
| y, | |||
| flags, | |||
| color_boundaries | |||
| ) |
Mouse callback function Left click on the binary image the range to the global list Right click deletes last range from the global list :param flags: check flags :param y: mouse y :param x: mouse x :param event: click event :param color_boundaries: color boundaries :return: -
| def auto_color_picker.pick_color | ( | event, | |
| x, | |||
| y, | |||
| flags, | |||
| span | |||
| ) |
Mouse callback function When left-clicking in the hsv image, displays the binary mask of the particular range in a separate window :param span: range of the color span :param flags: check flags :param event: a click event :param x: mouse x :param y: mouse y :return: -
1.8.13