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)