Skip to content
Advertisement

How to draw multi-color segmented circle using OpenCV?

What is the best way to draw multi-color segmented circle using OpenCV like below?

What I found, it can be:

  1. Using cv.fillPoly Many points are required for an arcs accurate drawing, the number of segments is several hundred;
  2. Using cv.line by rotating the line in a circle;
  3. Using cv.line by rotating whole image like in this similar case.

multicolor segmented circle

Advertisement

Answer

Using cv.ellipse you can draw segments pretty easily:

JavaScript

gives

1

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement