cv.circle() 函数的用法(在原始图像中划圆)

import cv2 as cv
img=cv.imread('0.jpg')
cv.imshow('img',img)
print(img.shape)
cv.circle(img,(520,430),300,(255,0,0),8) # 在img原始图片中划圈,其圈的中心点为(520,430),半径=300,颜色为(255,0,0),粗细=8
cv.imshow('img1',img)
cv.imwrite('f.png',img) # 存储有圈的图片
cv.waitKey()
cv.destroyAllWindows()

其效果:

猜你喜欢

转载自www.cnblogs.com/tangjunjun/p/11671935.html