ovl.thresholds.color.multi_color module

class ovl.thresholds.color.multi_color.MultiColor(colors)[source]

Bases: ovl.thresholds.threshold.Threshold

Multi Color is like the Color object but it allows for the use of multiple ranges a main use is for representing the red color range.

Example Code:

orange = [[10, 100, 100], [18, 255, 255]]
green = [[45, 100, 100], [75, 255, 255]]
orange_and_green = MultiColor([orange, green])

There are multiple built in “battery included” pre-made color object for instant use in testing and tuning List of colors:

Red (MultiColorObject) : Red (low) + Red (high) Red (Low): [0, 100, 100], [8, 255, 255] Red (High): [172, 100, 100], [179, 255, 255] Note: in order to find red, use both ranges (low and high) and use the some of both results. Blue: [105, 100, 100], [135, 255, 255] Green: [45, 100, 100], [75, 255, 255] Yellow: [20, 100, 100], [55, 255, 255] Orange: [10, 100, 100], [18, 255, 255] Grey: [0, 0, 0], [179, 50, 195] Black: [0, 0, 0], [179, 255, 30] White: [0, 0, 200], [179, 20, 255] Teal: [110, 100, 100], [130, 255, 255] Purple: [135, 100, 100], [165, 255, 255]
convert(image: numpy.ndarray)[source]

Thresholds an image using the color ranges, all pixels that are not in the color ranges defined are set to black (0, 0, 0) and all others to white (255, 255, 255)

validate(*args, **kwargs) → bool[source]