0

This code below will draw a red circle at x,y coordinates

>>cv2.circle(frame,(x, y), 10, (0,0,255), -1)

But the right rbg code for red color should be (255,0,0). When I printed out the color name, it showed blue.

>>print webcolors.rgb_to_name((0,0,255))
>>blue
U13-Forward
  • 69,221
  • 14
  • 89
  • 114

1 Answers1

1

OpenCV uses BGR color space for representing colors. So, your color code : (0, 0, 255) will be considered as RED in the BGR color space by OpenCV.

If you want to draw blue circle you have to pass color code as (255, 0, 0)

For more details about the color space in OpenCV go to this link

Sreeram TP
  • 11,346
  • 7
  • 54
  • 108