---
# System prepended metadata

title: Untitled

---

#CVZone pose estimation


![](https://i.imgur.com/nkH6SwX.png)

[YT](https://www.youtube.com/results?search_query=Pose+Estimation)

[MarkDown語法大全](https://hackmd.io/@eMP9zQQ0Qt6I8Uqp2Vqy6w/SyiOheL5N/%2FBVqowKshRH246Q7UDyodFA?type=book)

##kevin
>186

*kevin*
**kevin**

```python=
# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""
import cv2
import mediapipe as mp

mpPose = mp.solutions.pose

pose = mpPose.Pose()
mpDraw = mp.solutions.drawing_utils

cap = cv2.VideoCapture('pose2.wmv')


while True:
    success,img = cap.read()
    imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
    results = pose.process(imgRGB)
    
    #print(results)
    
    if results.pose_landmarks:
        mpDraw.draw_landmarks(img,
                              results.pose_landmarks,
                              mpPose.POSE_CONNECTIONS)
        
        #print(results.pose_landmarks)
        nose = results.pose_landmarks.landmark[0]
        x,y = nose.x, nose.y
        h,w,c=img.shape
        x = int(x * w)
        y = int(y * h)
        cv2.circle(img, (x,y), 10,
                   (0,0,255), -1)

    
    cv2.imshow('image', img)
    
    if cv2.waitKey(1) == ord('q'):
        break
    
cap.release()
cv2.destroyAllWindows()
```


##Math

Latex math format