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)
相关推荐
后端小肥肠26 分钟前
别再盲目抽卡了!Seedance 2.0 成本太高?教你用 Claude Code 100% 出片
人工智能·aigc·agent
每日新鲜事33 分钟前
热销复盘:招商林屿缦岛203套售罄背后的客户逻辑分析
大数据·人工智能
Coder_Boy_39 分钟前
基于SpringAI的在线考试系统-考试系统开发流程案例
java·数据库·人工智能·spring boot·后端
挖坑的张师傅1 小时前
对 AI Native 架构的一些思考
人工智能
LinQingYanga2 小时前
极客时间多模态大模型训练营毕业总结(2026年2月8日)
人工智能
pccai-vip2 小时前
过去24小时AI创业趋势分析
人工智能
SEO_juper2 小时前
AI SEO实战:整合传统技术与AI生成搜索的优化框架
人工智能·chatgpt·facebook·seo·geo·aeo
pp起床2 小时前
Gen_AI 补充内容 Logit Lens 和 Patchscopes
人工智能·深度学习·机器学习
方见华Richard2 小时前
自指-认知几何架构 可行性边界白皮书(务实版)
人工智能·经验分享·交互·原型模式·空间计算
冬奇Lab2 小时前
AI时代的"工具自由":我是如何进入细糠时代的
人工智能·ai编程