opencv 可视化函数

目录

cv2.rectangle

cv2.putText

cv2.circle


cv2.rectangle

cv2.putText

python 复制代码
    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

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

python 复制代码
cv2.circle(img_show, (x_new, y_new), 1, (255, 0, 0), 2)
相关推荐
Moshow郑锴1 小时前
人工智能中的(特征选择)数据过滤方法和包裹方法
人工智能
TY-20252 小时前
【CV 目标检测】Fast RCNN模型①——与R-CNN区别
人工智能·目标检测·目标跟踪·cnn
CareyWYR2 小时前
苹果芯片Mac使用Docker部署MinerU api服务
人工智能
失散133 小时前
自然语言处理——02 文本预处理(下)
人工智能·自然语言处理
mit6.8243 小时前
[1Prompt1Story] 滑动窗口机制 | 图像生成管线 | VAE变分自编码器 | UNet去噪神经网络
人工智能·python
sinat_286945193 小时前
AI应用安全 - Prompt注入攻击
人工智能·安全·prompt
迈火4 小时前
ComfyUI-3D-Pack:3D创作的AI神器
人工智能·gpt·3d·ai·stable diffusion·aigc·midjourney
Moshow郑锴5 小时前
机器学习的特征工程(特征构造、特征选择、特征转换和特征提取)详解
人工智能·机器学习
CareyWYR6 小时前
每周AI论文速递(250811-250815)
人工智能
AI精钢6 小时前
H20芯片与中国的科技自立:一场隐形的博弈
人工智能·科技·stm32·单片机·物联网