Drawing true filled circle on an image
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Industries in Orbit Looping
--
Chapters
00:00 Question
01:14 Accepted answer (Score 2)
01:56 Answer 2 (Score 4)
02:12 Thank you
--
Full question
https://stackoverflow.com/questions/4953...
Accepted answer links:
[image]: https://i.stack.imgur.com/YsgmX.png
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #matplotlib #plot #geometry #scikitimage
#avk47
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Industries in Orbit Looping
--
Chapters
00:00 Question
01:14 Accepted answer (Score 2)
01:56 Answer 2 (Score 4)
02:12 Thank you
--
Full question
https://stackoverflow.com/questions/4953...
Accepted answer links:
[image]: https://i.stack.imgur.com/YsgmX.png
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #matplotlib #plot #geometry #scikitimage
#avk47
ANSWER 1
Score 4
draw circles in the img.
import cv2
import numpy as np
img = np.zeros([474, 474])
cv2.circle(img, (100,100), 5, 255, -1)
cv2.circle(img, (200,200), 30, 255, -1)
cv2.imshow('image', img)
cv2.waitKey(0)
cv2.destroyAllWindows()
ACCEPTED ANSWER
Score 2
When drawing a circle in OpenCV, there are several parameters that can be chosen, one of them is used to define the type of the circle boundary, you have 4 types:
- Filled
- 4-connected line
- 8-connected line
- antialiased line
You can see the different effect on the following image (in same order)

An example code (in C++)
circle(src,cv::Point(300,300), 10, Scalar(0,0,255), 1, FILLED);