Learn Before
Concept

Random Colors

We can randomize the colors of the lines and shapes.

color = tuple(map(lambda x: int(x), np.random.randint(0, 255, size = 3)))

We use the lambda function above to convert the list of 64 bit integers and turn them into the python atomic integer type, 32 bit. After that, we convert the 32 bit integer list into a tuple, which is usable in openCV line methods.

0

1

Updated 2021-07-06

Tags

Python Programming Language

Data Science

Related