云计算百科
云计算领域专业知识百科平台

opencv 可视化函数

目录

cv2.rectangle

cv2.putText

cv2.circle


cv2.rectangle

cv2.putText

cv2.rectangle(img, (x1, y1), (x2, y2), (0, 255, 0), thickness=tl, lineType=cv2.LINE_AA)

clors = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0), (0, 255, 255)]

for i in range(5):
point_x = int(landmarks[2 * i])
point_y = int(landmarks[2 * i + 1])
cv2.circle(img, (point_x, point_y), tl + 1, clors[i], -1)

tf = max(tl – 1, 1) # font thickness
label = str(conf)[:5]
cv2.putText(img, label, (x1, y1 – 2), 0, tl / 3, [225, 255, 255], thickness=tf, lineType=cv2.LINE_AA)

cv2.circle

含义:图片,中心店,半径,颜色,圆轮廓粗细,线类型。

cv2.circle(img_show, (x_new, y_new), 1, (255, 0, 0), 2)

赞(0)
未经允许不得转载:网硕互联帮助中心 » opencv 可视化函数
分享到: 更多 (0)

评论 抢沙发

评论前必须登录!