1 Star 0 Fork 3

sunpro108/hand_gester

forked from 杨雪元/hand_gester 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gesture_recognition(1).py 828 Bytes
一键复制 编辑 原始数据 按行查看 历史
杨雪元 提交于 2023-09-08 12:07 . first commit
import cv2 as cv
from utils import CvFpsCalc
from gestures import GestureRecognition
def main():
gesture_detector = GestureRecognition()
cap = cv.VideoCapture(0)
cv_fps_calc = CvFpsCalc(buffer_len=10)
mode = 0
number = -1
while True:
fps = cv_fps_calc.get()
ret, image = cap.read()
debug_image,show_image, gesture_id = gesture_detector.recognize(image, number, mode)
debug_image = gesture_detector.draw_info(debug_image, fps, mode, number)
print(gesture_id)
print(debug_image.shape)
cv.imshow('Gesture Recognition', debug_image)
cv.imshow('Character writing', show_image)
if cv.waitKey(1) == ord('q'): # 点击视频,输入q退出
break
cv.destroyAllWindows()
if __name__ == '__main__':
main()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sunpro108/hand_gester.git
git@gitee.com:sunpro108/hand_gester.git
sunpro108
hand_gester
hand_gester
master

搜索帮助