CV Zone 中 PoseDetector 类的用法

CVZone是一个基于OpenCV和Mediapipe的计算机视觉库,提供了PoseDetector类来估计人体姿势。该类包括初始化、姿势检测、特征点定位、角度计算和距离测量等功能。用户可以通过调整参数实现不同需求的姿势分析。
摘要由CSDN通过智能技术生成

介绍

CVZone是一个计算机视觉和深度学习的Python库,旨在提供一些用于计算机视觉任务的便捷工具和实用函数。CVZone库提供了一系列方便易用的功能,包括人脸检测、手势识别、姿势估计和表情识别等。

CVZone官网:https://www.computervision.zone/

GitHub地址:GitHub - cvzone/cvzone: This is a Computer vision package that makes its easy to run Image processing and AI functions. At the core it uses OpenCV and Mediapipe libraries.

PoseDetector 类

PoseDetector 类使用 mediapipe 库估计人体的姿势点。以下是封装的函数及用法:

1、初始化函数

定义:def __init__(self, mode=False, smooth=True, detectionCon=0.5, trackCon=0.5)

源代码:

    def __init__(self, mode=False, smooth=True,
                 detectionCon=0.5, trackCon=0.5):
        """
        :param mode: In static mode, detection is done on each image: slower
        :param upBody: Upper boy only flag
        :param smooth: Smoothness Flag
        :param detectionCon: Minimum Detection Confidence Threshold
        :param trackCon: Minimum Tracking Confidence Threshold
        """

        self.mode = mode
        self.smooth = smooth
        self.detectionCon = detectionCon
        self.trackCon = trackCon

        self.mpDraw = mp.soluti
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值