1 Star 0 Fork 0

Fighting/virtual_drawing_board

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hand_track_img.py 697 Bytes
一键复制 编辑 原始数据 按行查看 历史
gursi26 提交于 2021-03-29 22:58 +08:00 . trials
import cv2
import mediapipe as mp
import time
#img_path = input('Image path : ')
img_path = '/Users/gursi/Desktop/ASL/asl_dataset/A/A1949.jpg'
frame = cv2.imread(img_path)
mpHands = mp.solutions.hands
hands = mpHands.Hands(
static_image_mode=False,
max_num_hands=2,
min_detection_confidence=0.5,
min_tracking_confidence=0.5
)
mp_draw = mp.solutions.drawing_utils
img_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
results = hands.process(img_rgb)
if results.multi_hand_landmarks :
for hand_landmarks in results.multi_hand_landmarks :
mp_draw.draw_landmarks(frame, hand_landmarks, mpHands.HAND_CONNECTIONS)
cv2.imshow('output', frame)
cv2.waitKey(0)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jscc/virtual_drawing_board.git
git@gitee.com:jscc/virtual_drawing_board.git
jscc
virtual_drawing_board
virtual_drawing_board
improved-eraser

搜索帮助