Skip to main content

Pose Estimation Example

Code example here

Code

PoseEstimationExample.py
from nkdcv.PoseModule import PoseDetector
import cv2

cap = cv2.VideoCapture(0)
detector = PoseDetector()
while True:
success, img = cap.read()
img = detector.findPose(img)
lmList, bboxInfo = detector.findPosition(img, bboxWithHands=False)
if bboxInfo:
center = bboxInfo["center"]
cv2.circle(img, center, 5, (255, 0, 255), cv2.FILLED)

cv2.imshow("Image", img)
cv2.waitKey(1)

Result

Pose Estimation Example