{"id":114280,"date":"2026-10-08T19:16:43","date_gmt":"2026-10-08T11:16:43","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/114280.html"},"modified":"2026-10-08T19:16:43","modified_gmt":"2026-10-08T11:16:43","slug":"opencv%e5%ad%a6%e4%b9%a0%ef%bc%9amediapipe-%e6%89%8b%e9%83%a8%e5%85%b3%e9%94%ae%e7%82%b9%e6%a3%80%e6%b5%8b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/114280.html","title":{"rendered":"OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b"},"content":{"rendered":"<h2>OpenCV\u5b66\u4e60&#xff1a;MediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b<\/h2>\n<p>\u524d\u8a00&#xff1a;\u524d\u9762\u6211\u4eec\u5b66\u4e60\u4e86\u57fa\u4e8e dlib \u7684\u4eba\u8138\u68c0\u6d4b\u3001\u5173\u952e\u70b9\u68c0\u6d4b\u3001\u6362\u8138\u7b49\u6280\u672f\u3002\u672c\u7bc7\u6211\u4eec\u5c06\u5f15\u5165\u53e6\u4e00\u4e2a\u5f3a\u5927\u7684\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\u2014\u2014MediaPipe&#xff0c;\u5b66\u4e60\u5b83\u5728\u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b\u65b9\u9762\u7684\u5e94\u7528\u3002MediaPipe \u662f Google \u5f00\u53d1\u7684\u591a\u5a92\u4f53\u673a\u5668\u5b66\u4e60\u6846\u67b6&#xff0c;\u63d0\u4f9b\u4e86\u5f00\u7bb1\u5373\u7528\u7684\u624b\u90e8\u3001\u4eba\u8138\u3001\u59ff\u6001\u7b49\u68c0\u6d4b\u6a21\u578b&#xff0c;\u4f7f\u7528\u975e\u5e38\u7b80\u5355&#xff0c;\u68c0\u6d4b\u7cbe\u5ea6\u4e5f\u5f88\u9ad8\u3002<\/p>\n<h3>\u76ee\u5f55<\/h3>\n<ul>\n<li>\u4e00\u3001MediaPipe \u7b80\u4ecb<\/li>\n<li>\u4e8c\u3001\u624b\u90e8\u8bc6\u522b\u6a21\u5757<\/li>\n<li>\u4e09\u3001\u6838\u5fc3\u53c2\u6570\u8be6\u89e3<\/li>\n<li>\u56db\u3001\u5b8c\u6574\u4ee3\u7801<\/li>\n<li>\u4e94\u3001\u5173\u952e\u70b9\u8bf4\u660e<\/li>\n<li>\u516d\u3001\u603b\u7ed3<\/li>\n<\/ul>\n<h3>\u4e00\u3001MediaPipe \u7b80\u4ecb<\/h3>\n<h4>1.1 \u4ec0\u4e48\u662f MediaPipe&#xff1f;<\/h4>\n<p>MediaPipe \u662f Google \u5f00\u53d1\u5e76\u5f00\u6e90\u7684\u4e00\u4e2a\u8de8\u5e73\u53f0\u673a\u5668\u5b66\u4e60\u6846\u67b6&#xff0c;\u63d0\u4f9b\u4e86\u591a\u79cd\u9884\u8bad\u7ec3\u6a21\u578b&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u7528\u4e8e&#xff1a;<\/p>\n<table>\n<tr>\u6a21\u5757\u529f\u80fd<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">Hands<\/td>\n<td align=\"left\">\u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">Face Detection<\/td>\n<td align=\"left\">\u4eba\u8138\u68c0\u6d4b<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">Face Mesh<\/td>\n<td align=\"left\">\u4eba\u8138\u7f51\u683c&#xff08;468 \u4e2a\u5173\u952e\u70b9&#xff09;<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">Pose<\/td>\n<td align=\"left\">\u4eba\u4f53\u59ff\u6001\u68c0\u6d4b<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">Holistic<\/td>\n<td align=\"left\">\u5168\u8eab\u5173\u952e\u70b9\u68c0\u6d4b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>1.2 MediaPipe \u7684\u4f18\u52bf<\/h4>\n<table>\n<tr>\u4f18\u52bf\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">\u5f00\u7bb1\u5373\u7528<\/td>\n<td align=\"left\">\u5185\u7f6e\u9884\u8bad\u7ec3\u6a21\u578b&#xff0c;\u65e0\u9700\u81ea\u5df1\u8bad\u7ec3<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u901f\u5ea6\u5feb<\/td>\n<td align=\"left\">\u4e13\u4e3a\u5b9e\u65f6\u5e94\u7528\u4f18\u5316&#xff0c;\u624b\u673a\u7aef\u4e5f\u80fd\u6d41\u7545\u8fd0\u884c<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u7cbe\u5ea6\u9ad8<\/td>\n<td align=\"left\">\u624b\u90e8\u68c0\u6d4b\u80fd\u8bc6\u522b 21 \u4e2a\u5173\u952e\u70b9<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u8de8\u5e73\u53f0<\/td>\n<td align=\"left\">\u652f\u6301 Windows\u3001Linux\u3001macOS\u3001Android\u3001iOS<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>1.3 \u5b89\u88c5<\/h4>\n<p>pip <span class=\"token function\">install<\/span> <span class=\"token assign-left variable\">mediapipe<\/span><span class=\"token operator\">&#061;&#061;<\/span><span class=\"token number\">0.10<\/span>.21<\/p>\n<p>\u7248\u672c\u8bf4\u660e&#xff1a;MediaPipe \u7248\u672c\u8fed\u4ee3\u8f83\u5feb&#xff0c;\u4e0d\u540c\u7248\u672c API \u7565\u6709\u5dee\u5f02\u3002\u672c\u6848\u4f8b\u4f7f\u7528 0.10.21&#xff0c;\u5efa\u8bae\u4fdd\u6301\u4e00\u81f4\u3002<\/p>\n<h3>\u4e8c\u3001\u624b\u90e8\u8bc6\u522b\u6a21\u5757<\/h3>\n<h4>2.1 \u6a21\u5757\u5bfc\u5165<\/h4>\n<p><span class=\"token keyword\">import<\/span> cv2<br \/>\n<span class=\"token keyword\">import<\/span> mediapipe <span class=\"token keyword\">as<\/span> mp<\/p>\n<p>mp_drawing <span class=\"token operator\">&#061;<\/span> mp<span class=\"token punctuation\">.<\/span>solutions<span class=\"token punctuation\">.<\/span>drawing_utils  <span class=\"token comment\"># \u7ed8\u56fe\u6a21\u5757<\/span><br \/>\nmp_hands <span class=\"token operator\">&#061;<\/span> mp<span class=\"token punctuation\">.<\/span>solutions<span class=\"token punctuation\">.<\/span>hands            <span class=\"token comment\"># \u624b\u90e8\u8bc6\u522b\u6a21\u5757<\/span><\/p>\n<table>\n<tr>\u6a21\u5757\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">mp.solutions.drawing_utils<\/td>\n<td align=\"left\">\u7ed8\u56fe\u5de5\u5177&#xff0c;\u5c06\u5173\u952e\u70b9\u7ed8\u5236\u5230\u56fe\u50cf\u4e2d<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">mp.solutions.drawing_styles<\/td>\n<td align=\"left\">\u7ed8\u56fe\u98ce\u683c&#xff08;\u989c\u8272\u3001\u7c97\u7ec6\u7b49&#xff09;<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">mp.solutions.hands<\/td>\n<td align=\"left\">\u624b\u90e8\u8bc6\u522b\u6a21\u5757&#xff0c;\u63d0\u4f9b API<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>2.2 \u521d\u59cb\u5316\u624b\u90e8\u8bc6\u522b\u7c7b<\/h4>\n<p>hands <span class=\"token operator\">&#061;<\/span> mp_hands<span class=\"token punctuation\">.<\/span>Hands<span class=\"token punctuation\">(<\/span><br \/>\n    static_image_mode<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">False<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    max_num_hands<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    min_detection_confidence<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.75<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    min_tracking_confidence<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.75<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h4>2.3 \u5904\u7406\u56fe\u50cf<\/h4>\n<p>results <span class=\"token operator\">&#061;<\/span> hands<span class=\"token punctuation\">.<\/span>process<span class=\"token punctuation\">(<\/span>frame<span class=\"token punctuation\">)<\/span><\/p>\n<p>process() \u8fd4\u56de\u7684 results \u5305\u542b\u624b\u90e8\u68c0\u6d4b\u7ed3\u679c&#xff0c;\u5173\u952e\u5c5e\u6027\u662f&#xff1a;<\/p>\n<table>\n<tr>\u5c5e\u6027\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">multi_hand_landmarks<\/td>\n<td align=\"left\">\u68c0\u6d4b\u5230\u7684\u6240\u6709\u624b\u7684\u5173\u952e\u70b9<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">multi_handedness<\/td>\n<td align=\"left\">\u6bcf\u53ea\u624b\u7684\u5de6\u53f3\u624b\u4fe1\u606f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e09\u3001\u6838\u5fc3\u53c2\u6570\u8be6\u89e3<\/h3>\n<h4>3.1 static_image_mode<\/h4>\n<table>\n<tr>\u53d6\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">True<\/td>\n<td align=\"left\">\u9002\u7528\u4e8e\u9759\u6001\u56fe\u7247\u7684\u624b\u52bf\u8bc6\u522b<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">False<\/td>\n<td align=\"left\">\u9002\u7528\u4e8e\u89c6\u9891\u7b49\u52a8\u6001\u8bc6\u522b&#xff08;\u9ed8\u8ba4&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u533a\u522b&#xff1a;True \u6a21\u5f0f\u4e0b&#xff0c;\u6bcf\u5e27\u56fe\u7247\u72ec\u7acb\u68c0\u6d4b&#xff1b;False \u6a21\u5f0f\u4e0b&#xff0c;\u4f1a\u5229\u7528\u524d\u4e00\u5e27\u7684\u4fe1\u606f\u8fdb\u884c\u8ffd\u8e2a\u3002<\/p>\n<p>\u6ce8\u610f&#xff1a;\u82e5\u8bc6\u522b\u7684\u624b\u7684\u6570\u91cf\u8d85\u8fc7 max_num_hands&#xff0c;True \u6a21\u5f0f\u4e0b\u8bc6\u522b\u7684\u624b\u4f1a\u5728\u591a\u4e2a\u624b\u4e4b\u95f4\u4e0d\u505c\u95ea\u70c1&#xff1b;False \u6a21\u5f0f\u4e0b\u8d85\u51fa\u7684\u624b\u4e0d\u4f1a\u8bc6\u522b&#xff0c;\u7cfb\u7edf\u4f1a\u81ea\u52a8\u8ddf\u8e2a\u4e4b\u524d\u5df2\u7ecf\u8bc6\u522b\u8fc7\u7684\u624b\u3002<\/p>\n<h4>3.2 max_num_hands<\/h4>\n<table>\n<tr>\u53d6\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">int<\/td>\n<td align=\"left\">\u8bc6\u522b\u624b\u7684\u6700\u5927\u6570\u91cf&#xff0c;\u9ed8\u8ba4\u4e3a 2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>3.3 min_detection_confidence<\/h4>\n<table>\n<tr>\u53d6\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">0.0 ~ 1.0<\/td>\n<td align=\"left\">\u6700\u5c0f\u68c0\u6d4b\u7f6e\u4fe1\u5ea6&#xff0c;\u9ed8\u8ba4\u4e3a 0.5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f71\u54cd&#xff1a;\u503c\u8d8a\u5c0f\u8d8a\u5bb9\u6613\u8bc6\u522b\u51fa\u624b&#xff0c;\u7528\u65f6\u8d8a\u77ed&#xff0c;\u4f46\u51c6\u786e\u5ea6\u8d8a\u4f4e&#xff1b;\u503c\u8d8a\u5927\u8bc6\u522b\u8d8a\u7cbe\u51c6&#xff0c;\u4f46\u54cd\u5e94\u65f6\u95f4\u589e\u52a0\u3002<\/p>\n<h4>3.4 min_tracking_confidence<\/h4>\n<table>\n<tr>\u53d6\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">0.0 ~ 1.0<\/td>\n<td align=\"left\">\u6700\u5c0f\u8ffd\u8e2a\u7f6e\u4fe1\u5ea6&#xff0c;\u9ed8\u8ba4\u4e3a 0.5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f71\u54cd&#xff1a;\u503c\u8d8a\u5927\u624b\u90e8\u8ffd\u8e2a\u8d8a\u51c6\u786e&#xff0c;\u54cd\u5e94\u65f6\u95f4\u4e5f\u8d8a\u957f\u3002<\/p>\n<h4>3.5 \u53c2\u6570\u8c03\u4f18\u5efa\u8bae<\/h4>\n<table>\n<tr>\u573a\u666f\u53c2\u6570\u5efa\u8bae<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">\u5b9e\u65f6\u6027\u8981\u6c42\u9ad8<\/td>\n<td align=\"left\">min_detection_confidence&#061;0.5\u3001min_tracking_confidence&#061;0.5<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u7cbe\u5ea6\u8981\u6c42\u9ad8<\/td>\n<td align=\"left\">min_detection_confidence&#061;0.8\u3001min_tracking_confidence&#061;0.8<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u5904\u7406\u5355\u5f20\u56fe\u7247<\/td>\n<td align=\"left\">static_image_mode&#061;True<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u5904\u7406\u89c6\u9891\u6d41<\/td>\n<td align=\"left\">static_image_mode&#061;False<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u56db\u3001\u5b8c\u6574\u4ee3\u7801<\/h3>\n<p><span class=\"token keyword\">import<\/span> cv2<br \/>\n<span class=\"token keyword\">import<\/span> mediapipe <span class=\"token keyword\">as<\/span> mp<\/p>\n<p><span class=\"token comment\"># pip install mediapipe&#061;&#061;0.10.21<\/span><\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061; \u6a21\u5757\u521d\u59cb\u5316 &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/span><br \/>\n<span class=\"token comment\"># drawing_utils&#xff1a;\u7ed8\u56fe\u6a21\u5757&#xff0c;\u5c06\u5173\u952e\u70b9\u7ed8\u5236\u5230\u56fe\u50cf\u4e0a<\/span><br \/>\n<span class=\"token comment\"># hands&#xff1a;\u624b\u90e8\u8bc6\u522b\u6a21\u5757&#xff0c;\u63d0\u4f9b API<\/span><br \/>\nmp_drawing <span class=\"token operator\">&#061;<\/span> mp<span class=\"token punctuation\">.<\/span>solutions<span class=\"token punctuation\">.<\/span>drawing_utils<br \/>\nmp_hands <span class=\"token operator\">&#061;<\/span> mp<span class=\"token punctuation\">.<\/span>solutions<span class=\"token punctuation\">.<\/span>hands<\/p>\n<p><span class=\"token comment\"># \u521d\u59cb\u5316\u624b\u90e8\u8bc6\u522b\u7c7b<\/span><br \/>\nhands <span class=\"token operator\">&#061;<\/span> mp_hands<span class=\"token punctuation\">.<\/span>Hands<span class=\"token punctuation\">(<\/span><br \/>\n    static_image_mode<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">False<\/span><span class=\"token punctuation\">,<\/span>           <span class=\"token comment\"># False \u9002\u7528\u4e8e\u89c6\u9891\u52a8\u6001\u8bc6\u522b<\/span><br \/>\n    max_num_hands<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span>                   <span class=\"token comment\"># \u6700\u591a\u8bc6\u522b 2 \u53ea\u624b<\/span><br \/>\n    min_detection_confidence<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.75<\/span><span class=\"token punctuation\">,<\/span>     <span class=\"token comment\"># \u6700\u5c0f\u68c0\u6d4b\u7f6e\u4fe1\u5ea6<\/span><br \/>\n    min_tracking_confidence<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.75<\/span><span class=\"token punctuation\">)<\/span>      <span class=\"token comment\"># \u6700\u5c0f\u8ffd\u8e2a\u7f6e\u4fe1\u5ea6<\/span><\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061; \u6253\u5f00\u6444\u50cf\u5934 &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/span><br \/>\ncap <span class=\"token operator\">&#061;<\/span> cv2<span class=\"token punctuation\">.<\/span>VideoCapture<span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> cv2<span class=\"token punctuation\">.<\/span>CAP_DSHOW<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">while<\/span> <span class=\"token boolean\">True<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    ret<span class=\"token punctuation\">,<\/span> frame <span class=\"token operator\">&#061;<\/span> cap<span class=\"token punctuation\">.<\/span>read<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> ret<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">break<\/span><\/p>\n<p>    h<span class=\"token punctuation\">,<\/span> w <span class=\"token operator\">&#061;<\/span> frame<span class=\"token punctuation\">.<\/span>shape<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">]<\/span>  <span class=\"token comment\"># \u83b7\u53d6\u56fe\u50cf\u9ad8\u5ea6\u548c\u5bbd\u5ea6<\/span><\/p>\n<p>    <span class=\"token comment\"># MediaPipe \u9700\u8981 RGB \u683c\u5f0f\u8f93\u5165&#xff0c;OpenCV \u9ed8\u8ba4\u662f BGR&#xff0c;\u6240\u4ee5\u5148\u8f6c\u6362<\/span><br \/>\n    frame <span class=\"token operator\">&#061;<\/span> cv2<span class=\"token punctuation\">.<\/span>cvtColor<span class=\"token punctuation\">(<\/span>frame<span class=\"token punctuation\">,<\/span> cv2<span class=\"token punctuation\">.<\/span>COLOR_BGR2RGB<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6444\u50cf\u5934\u662f\u955c\u50cf\u7684&#xff0c;\u6c34\u5e73\u7ffb\u8f6c\u8ba9\u753b\u9762\u66f4\u81ea\u7136<\/span><br \/>\n    frame <span class=\"token operator\">&#061;<\/span> cv2<span class=\"token punctuation\">.<\/span>flip<span class=\"token punctuation\">(<\/span>frame<span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u624b\u90e8\u68c0\u6d4b<\/span><br \/>\n    results <span class=\"token operator\">&#061;<\/span> hands<span class=\"token punctuation\">.<\/span>process<span class=\"token punctuation\">(<\/span>frame<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u8f6c\u56de BGR \u683c\u5f0f&#xff0c;\u65b9\u4fbf OpenCV \u663e\u793a<\/span><br \/>\n    frame <span class=\"token operator\">&#061;<\/span> cv2<span class=\"token punctuation\">.<\/span>cvtColor<span class=\"token punctuation\">(<\/span>frame<span class=\"token punctuation\">,<\/span> cv2<span class=\"token punctuation\">.<\/span>COLOR_RGB2BGR<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061; \u7ed8\u5236\u5173\u952e\u70b9 &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> results<span class=\"token punctuation\">.<\/span>multi_hand_landmarks<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">for<\/span> hand_landmarks <span class=\"token keyword\">in<\/span> results<span class=\"token punctuation\">.<\/span>multi_hand_landmarks<span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token comment\"># \u904d\u5386 21 \u4e2a\u624b\u90e8\u5173\u952e\u70b9&#xff0c;\u7ed8\u5236\u7f16\u53f7<\/span><br \/>\n            <span class=\"token keyword\">for<\/span> i <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">range<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>hand_landmarks<span class=\"token punctuation\">.<\/span>landmark<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n                x <span class=\"token operator\">&#061;<\/span> hand_landmarks<span class=\"token punctuation\">.<\/span>landmark<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>x   <span class=\"token comment\"># \u5f52\u4e00\u5316\u7684 x \u5750\u6807&#xff08;0~1&#xff09;<\/span><br \/>\n                y <span class=\"token operator\">&#061;<\/span> hand_landmarks<span class=\"token punctuation\">.<\/span>landmark<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>y   <span class=\"token comment\"># \u5f52\u4e00\u5316\u7684 y \u5750\u6807&#xff08;0~1&#xff09;<\/span><br \/>\n                z <span class=\"token operator\">&#061;<\/span> hand_landmarks<span class=\"token punctuation\">.<\/span>landmark<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>z   <span class=\"token comment\"># \u6df1\u5ea6\u4fe1\u606f<\/span><br \/>\n                <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#039;\u5173\u952e\u70b9<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>i<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#xff1a;&#039;<\/span><\/span><span class=\"token punctuation\">,<\/span> x<span class=\"token punctuation\">,<\/span> y<span class=\"token punctuation\">,<\/span> z<span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token comment\"># \u5c06\u5f52\u4e00\u5316\u5750\u6807\u4e58\u4ee5\u56fe\u50cf\u5bbd\u9ad8&#xff0c;\u8f6c\u4e3a\u50cf\u7d20\u5750\u6807<\/span><br \/>\n                cv2<span class=\"token punctuation\">.<\/span>putText<span class=\"token punctuation\">(<\/span>frame<span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">(<\/span>i<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                            <span class=\"token punctuation\">(<\/span><span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>x <span class=\"token operator\">*<\/span> w<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>y <span class=\"token operator\">*<\/span> h<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                            cv2<span class=\"token punctuation\">.<\/span>FONT_HERSHEY_SIMPLEX<span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">255<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>            <span class=\"token comment\"># \u7ed8\u5236\u624b\u90e8\u5173\u952e\u70b9\u8fde\u63a5\u7ebf<\/span><br \/>\n            mp_drawing<span class=\"token punctuation\">.<\/span>draw_landmarks<span class=\"token punctuation\">(<\/span>frame<span class=\"token punctuation\">,<\/span><br \/>\n                                      hand_landmarks<span class=\"token punctuation\">,<\/span><br \/>\n                                      mp_hands<span class=\"token punctuation\">.<\/span>HAND_CONNECTIONS<span class=\"token punctuation\">)<\/span><\/p>\n<p>    cv2<span class=\"token punctuation\">.<\/span>imshow<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;MediaPipe Hands&#039;<\/span><span class=\"token punctuation\">,<\/span> frame<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6309 ESC \u952e\u9000\u51fa<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> cv2<span class=\"token punctuation\">.<\/span>waitKey<span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token number\">0xFF<\/span> <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">27<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">break<\/span><\/p>\n<p>cap<span class=\"token punctuation\">.<\/span>release<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\ncv2<span class=\"token punctuation\">.<\/span>destroyAllWindows<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h3>\u4e94\u3001\u5173\u952e\u70b9\u8bf4\u660e<\/h3>\n<h4>5.1 \u624b\u90e8 21 \u4e2a\u5173\u952e\u70b9<\/h4>\n<p>MediaPipe \u624b\u90e8\u68c0\u6d4b\u4f1a\u8fd4\u56de 21 \u4e2a\u5173\u952e\u70b9&#xff0c;\u5206\u5e03\u5982\u4e0b&#xff1a;<\/p>\n<table>\n<tr>\u7f16\u53f7\u5bf9\u5e94\u90e8\u4f4d\u7f16\u53f7\u5bf9\u5e94\u90e8\u4f4d<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">0<\/td>\n<td align=\"left\">\u624b\u8155<\/td>\n<td align=\"left\">11<\/td>\n<td align=\"left\">\u4e2d\u6307\u6839\u90e8<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">1<\/td>\n<td align=\"left\">\u62c7\u6307\u6839\u90e8<\/td>\n<td align=\"left\">12<\/td>\n<td align=\"left\">\u4e2d\u6307\u7b2c\u4e00\u5173\u8282<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">2<\/td>\n<td align=\"left\">\u62c7\u6307\u7b2c\u4e00\u5173\u8282<\/td>\n<td align=\"left\">13<\/td>\n<td align=\"left\">\u4e2d\u6307\u7b2c\u4e8c\u5173\u8282<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">3<\/td>\n<td align=\"left\">\u62c7\u6307\u7b2c\u4e8c\u5173\u8282<\/td>\n<td align=\"left\">14<\/td>\n<td align=\"left\">\u4e2d\u6307\u6307\u5c16<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">4<\/td>\n<td align=\"left\">\u62c7\u6307\u6307\u5c16<\/td>\n<td align=\"left\">15<\/td>\n<td align=\"left\">\u65e0\u540d\u6307\u6839\u90e8<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">5<\/td>\n<td align=\"left\">\u98df\u6307\u6839\u90e8<\/td>\n<td align=\"left\">16<\/td>\n<td align=\"left\">\u65e0\u540d\u6307\u7b2c\u4e00\u5173\u8282<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">6<\/td>\n<td align=\"left\">\u98df\u6307\u7b2c\u4e00\u5173\u8282<\/td>\n<td align=\"left\">17<\/td>\n<td align=\"left\">\u65e0\u540d\u6307\u7b2c\u4e8c\u5173\u8282<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">7<\/td>\n<td align=\"left\">\u98df\u6307\u7b2c\u4e8c\u5173\u8282<\/td>\n<td align=\"left\">18<\/td>\n<td align=\"left\">\u65e0\u540d\u6307\u6307\u5c16<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">8<\/td>\n<td align=\"left\">\u98df\u6307\u6307\u5c16<\/td>\n<td align=\"left\">19<\/td>\n<td align=\"left\">\u5c0f\u6307\u6839\u90e8<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">9<\/td>\n<td align=\"left\">\u4e2d\u6307\u6839\u90e8<\/td>\n<td align=\"left\">20<\/td>\n<td align=\"left\">\u5c0f\u6307\u6307\u5c16<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">10<\/td>\n<td align=\"left\">\u4e2d\u6307\u7b2c\u4e00\u5173\u8282<\/td>\n<td align=\"left\">\u2014<\/td>\n<td align=\"left\">\u2014<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5.2 \u5750\u6807\u8bf4\u660e<\/h4>\n<table>\n<tr>\u5750\u6807\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">x<\/td>\n<td align=\"left\">\u5f52\u4e00\u5316\u5750\u6807&#xff0c;0~1 \u4e4b\u95f4&#xff0c;\u9700\u8981\u4e58\u4ee5\u56fe\u50cf\u5bbd\u5ea6<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">y<\/td>\n<td align=\"left\">\u5f52\u4e00\u5316\u5750\u6807&#xff0c;0~1 \u4e4b\u95f4&#xff0c;\u9700\u8981\u4e58\u4ee5\u56fe\u50cf\u9ad8\u5ea6<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">z<\/td>\n<td align=\"left\">\u6df1\u5ea6\u4fe1\u606f&#xff0c;\u4ee5\u624b\u8155\u4e3a\u539f\u70b9&#xff0c;\u6570\u503c\u8d8a\u5c0f\u8d8a\u9760\u8fd1\u6444\u50cf\u5934<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5.3 HAND_CONNECTIONS<\/h4>\n<p>mp_hands.HAND_CONNECTIONS \u5b9a\u4e49\u4e86\u5173\u952e\u70b9\u4e4b\u95f4\u7684\u8fde\u63a5\u5173\u7cfb&#xff0c;\u7528\u4e8e\u7ed8\u5236\u9aa8\u67b6\u8fde\u7ebf\u3002<\/p>\n<h4>5.4 \u5e94\u7528\u573a\u666f<\/h4>\n<table>\n<tr>\u573a\u666f\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">\u624b\u52bf\u63a7\u5236<\/td>\n<td align=\"left\">\u901a\u8fc7\u624b\u52bf\u63a7\u5236\u8bbe\u5907\u6216\u6e38\u620f<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u624b\u8bed\u7ffb\u8bd1<\/td>\n<td align=\"left\">\u8bc6\u522b\u624b\u8bed\u52a8\u4f5c\u5e76\u7ffb\u8bd1<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u865a\u62df\u8bd5\u6234<\/td>\n<td align=\"left\">\u624b\u90e8\u5173\u952e\u70b9\u5b9a\u4f4d&#xff0c;\u7528\u4e8e\u6212\u6307\u3001\u624b\u8868\u8bd5\u6234<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u52a8\u4f5c\u5206\u6790<\/td>\n<td align=\"left\">\u5206\u6790\u624b\u90e8\u52a8\u4f5c&#xff0c;\u5982\u5f39\u94a2\u7434\u3001\u6253\u5b57<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">AR\/VR \u4ea4\u4e92<\/td>\n<td align=\"left\">\u624b\u90e8\u8ffd\u8e2a\u5b9e\u73b0\u81ea\u7136\u4ea4\u4e92<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<h4>\u6838\u5fc3\u51fd\u6570\u901f\u67e5<\/h4>\n<table>\n<tr>\u51fd\u6570\u7528\u9014<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">mp.solutions.hands.Hands(&#8230;)<\/td>\n<td align=\"left\">\u521d\u59cb\u5316\u624b\u90e8\u8bc6\u522b\u7c7b<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">hands.process(frame)<\/td>\n<td align=\"left\">\u5904\u7406\u56fe\u50cf&#xff0c;\u8fd4\u56de\u68c0\u6d4b\u7ed3\u679c<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">results.multi_hand_landmarks<\/td>\n<td align=\"left\">\u83b7\u53d6\u68c0\u6d4b\u5230\u7684\u624b\u90e8\u5173\u952e\u70b9<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">mp_drawing.draw_landmarks()<\/td>\n<td align=\"left\">\u7ed8\u5236\u5173\u952e\u70b9\u548c\u8fde\u63a5\u7ebf<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">hand_landmarks.landmark[i].x\/y\/z<\/td>\n<td align=\"left\">\u83b7\u53d6\u7b2c i \u4e2a\u5173\u952e\u70b9\u7684\u5750\u6807<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u6838\u5fc3\u53c2\u6570\u901f\u67e5<\/h4>\n<table>\n<tr>\u53c2\u6570\u9ed8\u8ba4\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">static_image_mode<\/td>\n<td align=\"left\">False<\/td>\n<td align=\"left\">True \u9002\u5408\u9759\u6001\u56fe\u7247&#xff0c;False \u9002\u5408\u89c6\u9891<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">max_num_hands<\/td>\n<td align=\"left\">2<\/td>\n<td align=\"left\">\u6700\u5927\u8bc6\u522b\u624b\u6570<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">min_detection_confidence<\/td>\n<td align=\"left\">0.5<\/td>\n<td align=\"left\">\u6700\u5c0f\u68c0\u6d4b\u7f6e\u4fe1\u5ea6<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">min_tracking_confidence<\/td>\n<td align=\"left\">0.5<\/td>\n<td align=\"left\">\u6700\u5c0f\u8ffd\u8e2a\u7f6e\u4fe1\u5ea6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u6ce8\u610f\u4e8b\u9879<\/h4>\n<table>\n<tr>\u8981\u70b9\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">\u56fe\u50cf\u683c\u5f0f<\/td>\n<td align=\"left\">MediaPipe \u9700\u8981 RGB \u8f93\u5165&#xff0c;OpenCV \u9ed8\u8ba4 BGR&#xff0c;\u9700\u8981\u8f6c\u6362<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u5750\u6807\u5f52\u4e00\u5316<\/td>\n<td align=\"left\">\u5173\u952e\u70b9\u5750\u6807\u662f 0~1 \u7684\u5f52\u4e00\u5316\u503c&#xff0c;\u9700\u4e58\u4ee5\u56fe\u50cf\u5bbd\u9ad8<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u955c\u50cf\u7ffb\u8f6c<\/td>\n<td align=\"left\">\u6444\u50cf\u5934\u5efa\u8bae\u6c34\u5e73\u7ffb\u8f6c&#xff0c;\u753b\u9762\u66f4\u81ea\u7136<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u5b9e\u65f6\u6027\u80fd<\/td>\n<td align=\"left\">\u89c6\u9891\u6a21\u5f0f\u4e0b&#xff0c;min_detection_confidence \u4e0d\u5b9c\u8fc7\u9ad8<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u9000\u51fa\u65b9\u5f0f<\/td>\n<td align=\"left\">\u6309 ESC \u952e\u9000\u51fa\u5faa\u73af<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u7cfb\u5217\u76f4\u8fbe<\/h3>\n<ul>\n<li>\u4e0a\u7bc7&#xff1a;OpenCV\u5b66\u4e60&#xff1a;\u4eff\u5c04\u53d8\u6362\u4e0e\u6362\u8138\u672f<\/li>\n<li>\u672c\u7bc7&#xff1a;OpenCV\u5b66\u4e60&#xff1a;MediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b&#xff08;\u672c\u6587&#xff09;<\/li>\n<li>\u4e0b\u7bc7&#xff1a;\u656c\u8bf7\u671f\u5f85<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>OpenCV\u5b66\u4e60&#xff1a;MediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b<br \/>\n\u524d\u8a00&#xff1a;\u524d\u9762\u6211\u4eec\u5b66\u4e60\u4e86\u57fa\u4e8e dlib \u7684\u4eba\u8138\u68c0\u6d4b\u3001\u5173\u952e\u70b9\u68c0\u6d4b\u3001\u6362\u8138\u7b49\u6280\u672f\u3002\u672c\u7bc7\u6211\u4eec\u5c06\u5f15\u5165\u53e6\u4e00\u4e2a\u5f3a\u5927\u7684\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\u2014\u2014MediaPipe&#xff0c;\u5b66\u4e60\u5b83\u5728\u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b\u65b9\u9762\u7684\u5e94\u7528\u3002MediaPipe \u662f Google \u5f00\u53d1\u7684\u591a\u5a92\u4f53\u673a\u5668\u5b66\u4e60\u6846\u67b6&#xff0c;\u63d0\u4f9b\u4e86\u5f00\u7bb1\u5373\u7528\u7684\u624b\u90e8\u3001\u4eba\u8138\u3001\u59ff\u6001\u7b49\u68c0\u6d4b\u6a21\u578b&#xff0c;\u4f7f\u7528\u975e\u5e38\u7b80\u5355&#xff0c;\u68c0\u6d4b\u7cbe\u5ea6\u4e5f\u5f88\u9ad8\u3002<br \/>\n\u76ee\u5f55<br \/>\n\u4e00\u3001MediaPipe<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1460,50,371],"topic":[],"class_list":["post-114280","post","type-post","status-publish","format-standard","hentry","category-server","tag-opencv","tag-50","tag-371"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/114280.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"OpenCV\u5b66\u4e60&#xff1a;MediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b \u524d\u8a00&#xff1a;\u524d\u9762\u6211\u4eec\u5b66\u4e60\u4e86\u57fa\u4e8e dlib \u7684\u4eba\u8138\u68c0\u6d4b\u3001\u5173\u952e\u70b9\u68c0\u6d4b\u3001\u6362\u8138\u7b49\u6280\u672f\u3002\u672c\u7bc7\u6211\u4eec\u5c06\u5f15\u5165\u53e6\u4e00\u4e2a\u5f3a\u5927\u7684\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\u2014\u2014MediaPipe&#xff0c;\u5b66\u4e60\u5b83\u5728\u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b\u65b9\u9762\u7684\u5e94\u7528\u3002MediaPipe \u662f Google \u5f00\u53d1\u7684\u591a\u5a92\u4f53\u673a\u5668\u5b66\u4e60\u6846\u67b6&#xff0c;\u63d0\u4f9b\u4e86\u5f00\u7bb1\u5373\u7528\u7684\u624b\u90e8\u3001\u4eba\u8138\u3001\u59ff\u6001\u7b49\u68c0\u6d4b\u6a21\u578b&#xff0c;\u4f7f\u7528\u975e\u5e38\u7b80\u5355&#xff0c;\u68c0\u6d4b\u7cbe\u5ea6\u4e5f\u5f88\u9ad8\u3002 \u76ee\u5f55 \u4e00\u3001MediaPipe\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/114280.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-08T11:16:43+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/114280.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/114280.html\",\"name\":\"OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-08T11:16:43+00:00\",\"dateModified\":\"2026-10-08T11:16:43+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/114280.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/114280.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/114280.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/114280.html","og_locale":"zh_CN","og_type":"article","og_title":"OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"OpenCV\u5b66\u4e60&#xff1a;MediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b \u524d\u8a00&#xff1a;\u524d\u9762\u6211\u4eec\u5b66\u4e60\u4e86\u57fa\u4e8e dlib \u7684\u4eba\u8138\u68c0\u6d4b\u3001\u5173\u952e\u70b9\u68c0\u6d4b\u3001\u6362\u8138\u7b49\u6280\u672f\u3002\u672c\u7bc7\u6211\u4eec\u5c06\u5f15\u5165\u53e6\u4e00\u4e2a\u5f3a\u5927\u7684\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\u2014\u2014MediaPipe&#xff0c;\u5b66\u4e60\u5b83\u5728\u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b\u65b9\u9762\u7684\u5e94\u7528\u3002MediaPipe \u662f Google \u5f00\u53d1\u7684\u591a\u5a92\u4f53\u673a\u5668\u5b66\u4e60\u6846\u67b6&#xff0c;\u63d0\u4f9b\u4e86\u5f00\u7bb1\u5373\u7528\u7684\u624b\u90e8\u3001\u4eba\u8138\u3001\u59ff\u6001\u7b49\u68c0\u6d4b\u6a21\u578b&#xff0c;\u4f7f\u7528\u975e\u5e38\u7b80\u5355&#xff0c;\u68c0\u6d4b\u7cbe\u5ea6\u4e5f\u5f88\u9ad8\u3002 \u76ee\u5f55 \u4e00\u3001MediaPipe","og_url":"https:\/\/www.wsisp.com\/helps\/114280.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-08T11:16:43+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/114280.html","url":"https:\/\/www.wsisp.com\/helps\/114280.html","name":"OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-08T11:16:43+00:00","dateModified":"2026-10-08T11:16:43+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/114280.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/114280.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/114280.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"OpenCV\u5b66\u4e60\uff1aMediaPipe \u624b\u90e8\u5173\u952e\u70b9\u68c0\u6d4b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/114280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=114280"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/114280\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=114280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=114280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=114280"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=114280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}