-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Anti-aliasing error when drawing circles #16308
Copy link
Copy link
Closed
Labels
Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/https://opencv.org/opencv-hackathon-starts-next-week/bugcategory: imgprocconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete
Milestone
Description
When I try to draw an anti-aliased circle in Python 3 (OpenCV 4.2.1.30) the border is incorrect. I have no idea what could have gone wrong... anyone?
img = np.zeros((101, 101), dtype=np.uint8)
cv2.circle(img, (50, 50), 50, 255, cv2.FILLED, cv2.LINE_AA)
cv2.imwrite("circle.png", img)This is the result (4x zoom), the issue is most noticable at the top and bottom of the circle, but the sides don't look too smooth too...
EDIT: The issue is even clearer in a non-filled circle; it is missing parts of the circumference entirely.
cv2.circle(img, (50, 50), 50, 255, 1, cv2.LINE_AA)P.S. I'm getting the same result on both Linux and Windows.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/https://opencv.org/opencv-hackathon-starts-next-week/bugcategory: imgprocconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete

