07_矩形圆形绘制

import cv2
import numpy as np
newImageInfo = (600,600,3)
dst = np.zeros(newImageInfo,np.uint8)
#  1 2 左上角 3 右下角 4 5 fill -1 >0 line w
cv2.rectangle(dst,(150,380),(350,550),(150,200,100),3)
# 2 center 3 r 
cv2.circle(dst,(250,250),(100),(0,0,255),6)
# 2 center 3 轴 4 angle 5 begin 6 end 7 
cv2.ellipse(dst, (256,256), (150,100), 0, 0, 180, (0,255,255), 10)

points = np.array([[150,50], [140,140], [200,170], [250,250], [150,50]], np.int32)
#print(points.shape)
#points = points.reshape((-1,1,2))
#print(points.shape)
#cv2.polylines(dst,[points],True,(255,255,0))
# cv2.imshow('dst',dst)
# cv2.waitKey(0)
import matplotlib.pyplot as plt
%matplotlib inline

dst = cv2.cvtColor(dst, cv2.COLOR_BGR2RGB)
plt.imshow(dst)
plt.show()

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值