Module AmpliVision.src.objs.utils.utils_color
Functions
def get_pins_rgb(square) ‑> tuple[list[int], list[int]]
-
gets the average RGB of the pins in the square.
def get_rgb_avg_of_circle_contour(square, contour: numpy.ndarray, debug: bool = False) ‑> list[int]
-
Get RGB average of contour
Function that gets the average RGB of a contour in the image.
Args:
- contour: Contour of the object in the image.
- corner: Corner of the square the contour is in.
Returns:
- avg_color: Average RGB color of the contour.
def get_rgb_avg_of_contour(square, contour: numpy.ndarray, debug: bool = False) ‑> list[int]
-
rgb avg of any shapped contour
def lorentzian(x, a, x0, b)
def set_rgb_sequence_clockwise(square, pins_rgb: list[int], corner_key: list[int]) ‑> None
-
sets the rgb sequence of the square in clockwise order starting from top-left.