zl程序教程

您现在的位置是:首页 >  后端

当前栏目

Python代码库OpenCV之07图像处理和分割(含代码)

2023-09-11 14:18:32 时间

Python代码库OpenCV之08图像处理和分割(含代码)

代码

import numpy
import cv2
filename="D:\\pythondev\\dev\\opencv\\img\\tu.png"
#read the flower image and load it into a variable flower_image
flower_image=cv2.imread(filename)
cv2.line(flower_image,(25,21),(100,100),(255,0,0),5)
cv2.rectangle(flower_image,(25,21),(200,200),(0,255,0),2)
cv2.circle(flower_image,(50,50),50,(0,0,255),-1)

cv2.imshow("Geometry",flower_image)
cv2.waitKey(0) 

效果

41085-5c2a76c11e2b1a61.png
图像处理和分割

更多精彩代码请关注我的专栏