python源码大全

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

2019-12-03  本文已影响0人  iCloudEnd

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) 

效果

图像处理和分割

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

上一篇下一篇

猜你喜欢

热点阅读