Skip to content

Scalar value for argument 'color' is not numeric type error in cv2.circle() #9

@gizemozd

Description

@gizemozd

The following error occurs while generating the video with a stimulus indicator.

~/Desktop/GIT/utils_video/utils_video/utils.py in add_dot(image, radius, center, color)
    589 
    590 def add_dot(image, radius=35, center=(50, 50), color=(255, 0, 0)):
--> 591     image = cv2.circle(image, center, radius, color, -1)
    592     return image
    593 

TypeError: Scalar value for argument 'color' is not numeric

I tried these options but neither worked for me:
color = np.array((255,0,0), dtype=np.uint8)
and
color = tuple([int(x) for x in (255,0,0)])

OpenCV version: 4.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions