当前位置: 首页 > news >正文

网站素材免费icp备案后要建网站吗

网站素材免费,icp备案后要建网站吗,花体字转换器,有网但是网页打不开是什么原因【精选】【优秀课设】基于OpenCVMediaPipe的手势识别#xff08;数字、石头剪刀布等手势识别#xff09;_石头剪刀布opencv识别代码_网易独家音乐人Mike Zhou的博客-CSDN博客 import cv2 import mediapipe as mp import mathdef vector_2d_angle(v1, v2):求解二维向量的角度v… 【精选】【优秀课设】基于OpenCVMediaPipe的手势识别数字、石头剪刀布等手势识别_石头剪刀布opencv识别代码_网易独家音乐人Mike Zhou的博客-CSDN博客 import cv2 import mediapipe as mp import mathdef vector_2d_angle(v1, v2):求解二维向量的角度v1_x v1[0]v1_y v1[1]v2_x v2[0]v2_y v2[1]try:angle_ math.degrees(math.acos((v1_x * v2_x v1_y * v2_y) / (((v1_x ** 2 v1_y ** 2) ** 0.5) * ((v2_x ** 2 v2_y ** 2) ** 0.5))))except:angle_ 65535.if angle_ 180.:angle_ 65535.return angle_def hand_angle(hand_):获取对应手相关向量的二维角度,根据角度确定手势angle_list []# ---------------------------- thumb 大拇指角度angle_ vector_2d_angle(((int(hand_[0][0]) - int(hand_[2][0])), (int(hand_[0][1]) - int(hand_[2][1]))),((int(hand_[3][0]) - int(hand_[4][0])), (int(hand_[3][1]) - int(hand_[4][1]))))angle_list.append(angle_)# ---------------------------- index 食指角度angle_ vector_2d_angle(((int(hand_[0][0]) - int(hand_[6][0])), (int(hand_[0][1]) - int(hand_[6][1]))),((int(hand_[7][0]) - int(hand_[8][0])), (int(hand_[7][1]) - int(hand_[8][1]))))angle_list.append(angle_)# ---------------------------- middle 中指角度angle_ vector_2d_angle(((int(hand_[0][0]) - int(hand_[10][0])), (int(hand_[0][1]) - int(hand_[10][1]))),((int(hand_[11][0]) - int(hand_[12][0])), (int(hand_[11][1]) - int(hand_[12][1]))))angle_list.append(angle_)# ---------------------------- ring 无名指角度angle_ vector_2d_angle(((int(hand_[0][0]) - int(hand_[14][0])), (int(hand_[0][1]) - int(hand_[14][1]))),((int(hand_[15][0]) - int(hand_[16][0])), (int(hand_[15][1]) - int(hand_[16][1]))))angle_list.append(angle_)# ---------------------------- pink 小拇指角度angle_ vector_2d_angle(((int(hand_[0][0]) - int(hand_[18][0])), (int(hand_[0][1]) - int(hand_[18][1]))),((int(hand_[19][0]) - int(hand_[20][0])), (int(hand_[19][1]) - int(hand_[20][1]))))angle_list.append(angle_)return angle_listdef h_gesture(angle_list):# 二维约束的方法定义手势# fist five gun love one six three thumbup yeahthr_angle 65. # 手指闭合则大于这个值大拇指除外thr_angle_thumb 53. # 大拇指闭合则大于这个值thr_angle_s 49. # 手指张开则小于这个值gesture_str Unknownif 65535. not in angle_list:if (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle) and (angle_list[2] thr_angle) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle):gesture_str 0elif (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle):gesture_str 1elif (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle_s) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle):gesture_str 2elif (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle_s) and (angle_list[3] thr_angle_s) and (angle_list[4] thr_angle):gesture_str 3elif (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle_s) and (angle_list[3] thr_angle_s) and (angle_list[4] thr_angle_s):gesture_str 4elif (angle_list[0] thr_angle_s) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle_s) and (angle_list[3] thr_angle_s) and (angle_list[4] thr_angle_s):gesture_str 5elif (angle_list[0] thr_angle_s) and (angle_list[1] thr_angle) and (angle_list[2] thr_angle) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle_s):gesture_str 6elif (angle_list[0] thr_angle_s) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle):gesture_str 8elif (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle) and (angle_list[2] thr_angle) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle_s):gesture_str Pink Upelif (angle_list[0] thr_angle_s) and (angle_list[1] thr_angle) and (angle_list[2] thr_angle) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle):gesture_str Thumb Upelif (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle) and (angle_list[2] thr_angle_s) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle):gesture_str Fuckelif (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle) and (angle_list[2] thr_angle_s) and (angle_list[3] thr_angle_s) and (angle_list[4] thr_angle_s):gesture_str Princesselif (angle_list[0] thr_angle_s) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle_s) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle):gesture_str Byeelif (angle_list[0] thr_angle_s) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle_s):gesture_str Spider-Manelif (angle_list[0] thr_angle_thumb) and (angle_list[1] thr_angle_s) and (angle_list[2] thr_angle) and (angle_list[3] thr_angle) and (angle_list[4] thr_angle_s):gesture_str RocknRollreturn gesture_strdef detect():mp_drawing mp.solutions.drawing_utilsmp_hands mp.solutions.handshands mp_hands.Hands(static_image_modeFalse,max_num_hands1,min_detection_confidence0.75,min_tracking_confidence0.75)cap cv2.VideoCapture(0)while True:ret, frame cap.read()frame cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)frame cv2.flip(frame, 1)results hands.process(frame)frame cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)if results.multi_handedness:for hand_label in results.multi_handedness:hand_jugg str(hand_label).split()[1]print(hand_jugg)cv2.putText(frame, hand_jugg, (50, 200), 0, 1.3, (0, 0, 255), 2)if results.multi_hand_landmarks:for hand_landmarks in results.multi_hand_landmarks:mp_drawing.draw_landmarks(frame, hand_landmarks, mp_hands.HAND_CONNECTIONS)hand_local []for i in range(21):x hand_landmarks.landmark[i].x * frame.shape[1]y hand_landmarks.landmark[i].y * frame.shape[0]hand_local.append((x, y))if hand_local:angle_list hand_angle(hand_local)gesture_str h_gesture(angle_list)print(gesture_str)cv2.putText(frame, gesture_str, (50, 100), 0, 1.3, (0, 0, 255), 2)cv2.imshow(MediaPipe Hands, frame)if cv2.waitKey(1) 0xFF 27:breakcap.release()cv2.destroyAllWindows()if __name__ __main__:detect() 代码的解释请参考 【精选】【优秀课设】基于OpenCVMediaPipe的手势识别数字、石头剪刀布等手势识别_石头剪刀布opencv识别代码_网易独家音乐人Mike Zhou的博客-CSDN博客
http://www.zqtcl.cn/news/78113/

相关文章:

  • 做公司网站是永久性的吗完全免费的网站源码
  • 网站前端和后端h5制作软件app
  • 外国优秀设计网站推荐怎么做简单的企业网站
  • 政务信息系统网站建设规范重庆文化墙制作
  • 网站正在建设中网页树枝seo
  • 柳州网站建设数公式大全网站后端技术有哪些
  • 一级做a免费观看视频网站做网站怎么做鼠标跟随
  • 腾讯云 门户网站建设腾讯云域名价格
  • 深圳网站设计技术泉州网站建设手机
  • 作品展示网站 源码制作网站多少钱
  • sdk广告平台网站首页优化方案
  • 电子商务网站的建设与维护方法wordpress批量修改内容
  • 如何自建网站接广告数字化营销怎么做
  • 素马网站建设费用差距深圳网站建设啊
  • 专业的聊城网站优化个人网站做cpa
  • 网站例子大全中国核工业华兴建设有限公司
  • wordpress源码整站wordpress忘记后台账号
  • 那个网站可教做课件好青海百度关键词seo
  • 网站开发流程书籍简单的网站首页模板
  • 第三方做公司网站wordpress hexo主题
  • 淄博怎么做网站千图主站的功能介绍
  • 外贸网站建设有哪些要求wordpress腾讯云CDN配置
  • 6618自助建站系统源码网站建设要经历哪些步骤
  • 青海高端网站建设多少钱天天传媒有限公司网站
  • 网站空间大小选择2021年年度关键词排名
  • 云南住房和城乡建设厅网站精品网站建设
  • 成都网站建设思乐科技公司logo图片素材大全
  • 如果自己建立网站百度网站收录查询地址
  • 河北固安县网站建设wordpress主题更改首页
  • 超炫html5网站模板西咸新区建设环保网站