{"id":206,"date":"2021-02-22T21:22:13","date_gmt":"2021-02-22T13:22:13","guid":{"rendered":"http:\/\/madapapa.com\/wordpress\/?p=206"},"modified":"2021-02-22T22:01:32","modified_gmt":"2021-02-22T14:01:32","slug":"jie-jueoptflowpy-wen-ti","status":"publish","type":"post","link":"http:\/\/madapapa.com\/wordpress\/?p=206","title":{"rendered":"\u89e3\u51b3opt_flow.py\u95ee\u9898"},"content":{"rendered":"<h2 id=\"toc_0\">terminal\u95ee\u9898<\/h2>\n<p>\u6628\u5929\u6d4b\u8bd5opt_flow\u8fd8\u6b63\u5e38\uff0c\u4eca\u5929\u53d1\u73b0\u5728studio code\u4e0b\u9762\u5c31\u73b0\u5b9e\u65e0\u6cd5\u83b7\u53d6\u6444\u50cf\u5934\u6743\u9650\uff08hist.py\u90fd\u6b63\u5e38\uff09\uff0c\u547d\u4ee4\u884c\u6a21\u5f0f\u4e5f\u65e0\u6cd5\u8fd0\u884c\u3002<br \/>\n\u505a\u4e86\u5982\u4e0b\u4fee\u6539\uff1a<\/p>\n<pre><code class=\"language-text\">brew update-reset\n<\/code><\/pre>\n<p>\u540c\u65f6\u4fee\u6539\u4e86pip\u7684\u6e90\uff08\u4ece\u6e05\u534e\u4fee\u6539\u4e3a\u79d1\u5927\uff09\u3002<br \/>\n\u56e0\u4e3a\u505a\u4e86\u4e24\u4e2a\u64cd\u4f5c\uff0c\u6211\u4e5f\u4e0d\u6e05\u695a\u662f\u54ea\u4e2a\u8d77\u4e86\u4f5c\u7528\uff0c\u547d\u4ee4\u884c\u6a21\u5f0f\u662fok\u4e86\u3002<\/p>\n<h2 id=\"toc_1\">vscode\u95ee\u9898<\/h2>\n<p>\u56fd\u5916\u5927\u62ff\u5206\u6790\uff08\u89c1\u53c2\u8003\uff09\uff0cvscode\u4e0bopcv\u6444\u50cf\u5934\u6ca1\u6709\u6743\u9650\uff0c\u662f\u7531\u4e8eapple mac\u6ca1\u6709\u7ed9\u4e88vscode\u6743\u9650\uff0c\u5728system preference\u91cc\u7684camera\u90e8\u5206\uff0c\u4e5f\u6ca1\u6709\u80fd\u591f\u589e\u52a0vscode\u7684\u5730\u65b9\uff0c\u56e0\u6b64\u9700\u8981\u76f4\u63a5\u4fee\u6539security&amp;privacy\u5b58\u50a8\u6570\u636e\u7684\u5730\u65b9\uff0c\u89c1\u4e0b\u9762\u3002\u5b8c\u6210\u540e\u91cd\u542fvscode\u5373\u53ef\uff08\u4fee\u6539\u524d\uff0c\u9700\u8981\u5728system preference\u91cc\u6388\u4e88terminal-Full Disk Access\u6743\u9650\uff09<\/p>\n<pre><code class=\"language-text\">cd ~\/Library\/Application Support\/com.apple.TCC\ncp TCC.db TCC.db_backup\nsqlite3 TCC.db\nINSERT into access (service, client, client_type, auth_value, auth_reason, auth_version) VALUES (&quot;kTCCServiceCamera&quot;,&quot;com.microsoft.VSCode&quot;,0,2,0,1);\nINSERT into access (service, client, client_type, auth_value, auth_reason, auth_version) VALUES (&quot;kTCCServiceMicrophone&quot;,&quot;com.microsoft.VSCode&quot;,0,2,0,1);\n.exit\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2021\/02\/Screen-Shot-2021-02-22-at-21.55.12.png\" alt=\"Screen Shot 2021-02-22 at 21.55.12\"\/><\/p>\n<p>\u53c2\u8003<br \/>\n<a href=\"https:\/\/github.com\/microsoft\/vscode\/issues\/95062\">vscode\u83b7\u5f97camera\u6743\u9650<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>terminal\u95ee\u9898 \u6628\u5929\u6d4b\u8bd5opt_flow\u8fd8\u6b63\u5e38\uff0c\u4eca\u5929\u53d1\u73b0\u5728studio code\u4e0b\u9762\u5c31\u73b0\u5b9e\u65e0\u6cd5\u83b7\u53d6\u6444\u50cf\u5934\u6743\u9650\uff08hist.py\u90fd\u6b63\u5e38\uff09\uff0c\u547d\u4ee4\u884c\u6a21\u5f0f\u4e5f\u65e0\u6cd5\u8fd0\u884c\u3002 \u505a\u4e86\u5982\u4e0b\u4fee\u6539\uff1a brew update-reset \u540c\u65f6\u4fee\u6539\u4e86pip\u7684\u6e90\uff08\u4ece\u6e05\u534e\u4fee\u6539\u4e3a\u79d1\u5927\uff09\u3002 \u56e0\u4e3a\u505a\u4e86\u4e24\u4e2a\u64cd\u4f5c\uff0c\u6211\u4e5f\u4e0d\u6e05\u695a\u662f\u54ea\u4e2a\u8d77\u4e86\u4f5c\u7528\uff0c\u547d\u4ee4\u884c\u6a21\u5f0f\u662fok\u4e86\u3002 vscode\u95ee\u9898 \u56fd\u5916\u5927\u62ff\u5206\u6790\uff08\u89c1\u53c2\u8003\uff09\uff0cvscode\u4e0bopcv\u6444\u50cf\u5934\u6ca1\u6709\u6743\u9650\uff0c\u662f\u7531\u4e8eapple mac\u6ca1\u6709\u7ed9\u4e88vscode\u6743\u9650\uff0c\u5728system preference\u91cc\u7684camera\u90e8\u5206\uff0c\u4e5f\u6ca1\u6709\u80fd\u591f\u589e\u52a0vscode\u7684\u5730\u65b9\uff0c\u56e0\u6b64\u9700\u8981\u76f4\u63a5\u4fee\u6539security&amp;privacy\u5b58\u50a8\u6570\u636e\u7684\u5730\u65b9\uff0c\u89c1\u4e0b\u9762\u3002\u5b8c\u6210\u540e\u91cd\u542fvscode\u5373\u53ef\uff08\u4fee\u6539\u524d\uff0c\u9700\u8981\u5728system preference\u91cc\u6388\u4e88terminal-Full Disk Access\u6743\u9650\uff09 cd ~\/Library\/Application Support\/com.apple.TCC cp TCC.db TCC.db_backup sqlite3 TCC.db INSERT into access (service, client, client_type, auth_value, auth_reason, auth_version) VALUES (&quot;kTCCServiceCamera&quot;,&quot;com.microsoft.VSCode&quot;,0,2,0,1); INSERT into access (service, client, client_type, auth_value, auth_reason, auth_version) VALUES (&quot;kTCCServiceMicrophone&quot;,&quot;com.microsoft.VSCode&quot;,0,2,0,1); .exit \u53c2\u8003 vscode\u83b7\u5f97camera\u6743\u9650<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[11],"tags":[31,36],"class_list":["post-206","post","type-post","status-publish","format-standard","hentry","category-tech","tag-opencv","tag-vscode"],"_links":{"self":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=206"}],"version-history":[{"count":2,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/206\/revisions"}],"predecessor-version":[{"id":209,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/206\/revisions\/209"}],"wp:attachment":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=206"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}