使用 OpenCV 函数 circle() 绘制一个圆
在本文中,我们将使用 OpenCV 函数 circle() 在图像上绘制一个圆形。
原图像

算法
Step 1: Import OpenCV. Step 2: Define the radius of circle. Step 3: Define the center coordinates of the circle. Step 4: Define the color of the circle. Step 5: Define the thickness. Step 6: Pass the above arguments into cv2.circle() along with the image. Step 7: Display the output.
示例代码
import cv2
image = cv2.imread('testimage.jpg')
radius = 100
center = (350, 175)
color = (255,255,0)
thickness = 15
image = cv2.circle(image, center, radius, color, thickness)
cv2.imshow('Circle', image)输出

广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP