{"id":95,"date":"2017-01-24T23:11:40","date_gmt":"2017-01-24T15:11:40","guid":{"rendered":"http:\/\/kogasa.moe\/?p=95"},"modified":"2025-05-25T01:44:23","modified_gmt":"2025-05-24T17:44:23","slug":"%e9%87%8d%e7%bc%96%e8%af%91opencv","status":"publish","type":"post","link":"https:\/\/flandre-scarlet.moe\/blog\/95\/","title":{"rendered":"\u91cd\u7f16\u8bd1openCV"},"content":{"rendered":"<p>\u73b0\u57283.X\u7684openCV\u4f3c\u4e4e\u9ed8\u8ba4\u6ca1\u6709\u751f\u6210x86\u7248\u672c\u7684lib\u548cdll\u4e86\uff0c\u9700\u8981\u81ea\u5df1\u91cd\u65b0\u751f\u6210\u4e00\u4efd\u3002\uff08\u4f7f\u7528\u7684\u73af\u5883\u662fWin7x64 + vs2015\uff09<\/p>\n<ol>\n<li>\u51c6\u5907\u5de5\u5177<br \/>\n\u3000\u3000<a href=\"http:\/\/opencv.org\/downloads.html\" target=\"_blank\" rel=\"noopener\">openCV<\/a>(3.2.0)<br \/>\n\u3000\u3000<a href=\"https:\/\/cmake.org\/download\/\" target=\"_blank\" rel=\"noopener\">CMake<\/a>(3.7.2)<\/p>\n<\/li>\n<p><!--more--><\/p>\n<li>\u89e3\u538bopencv\u548ccmake\u540e\u8fd0\u884ccmake-gui.exe\uff0c\u5206\u522b\u6dfb\u52a0\u6e90\u4ee3\u7801\u76ee\u5f55(openCV\u5185\u7684source\u76ee\u5f55)\u548c\u751f\u6210\u7684\u76ee\u6807\u8def\u5f84\uff0c\u7136\u540e\u70b9\u51fbConfigure\u6309\u94ae\uff0c\u9009\u62e9\u5bf9\u5e94\u7684\u5e73\u53f0\uff0c\u6bd4\u5982vs2015\u4e0b\u768432\u4f4d\u5c31\u9009\u62e9Visual Studio 14 2015\uff0cx64\u548carm\u7684\u540e\u9762\u90fd\u5e26\u6709\u6807\u8bc6\uff0c\u6ca1\u6709\u6807\u8bc6\u7684\u5c31\u662fx86\u7684\u4e86\uff0c\u4e0b\u9762\u7684\u9009\u9879\u5219\u9ed8\u8ba4&#8221;Use default native compilers&#8221;\uff0c\u7136\u540e\u5355\u51fbFinish\u3002\n<p>\u203b \u5982\u679c\u63d0\u793a\u627e\u4e0d\u5230CXX\u548cC\u7f16\u8bd1\u5668\uff0c\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884cvs\u7684\u5b89\u88c5\u7a0b\u5e8f\uff0c\u786e\u8ba4\u52fe\u9009&#8221;\u9002\u7528\u4e8eVisual C++ 2015\u7684\u516c\u5171\u5de5\u5177&#8221;\u548c&#8221;Tools\u548cWindows XX SDK&#8221;\uff0c\u5982\u679c\u6ca1\u6709\u52fe\u4e0a\u7684\u8bdd\u5219\u91cd\u65b0\u5b89\u88c5\u8fd9\u90e8\u5206\u5185\u5bb9\u3002<\/p>\n<\/li>\n<li>CMake \u8f93\u51fa\u6846\u4e2d\u663e\u793a Configuring done \u540e\u518d\u70b9\u51fb Generate \u6309\u94ae\u5373\u53ef\u751f\u6210 VS \u5de5\u7a0b\u3002<br \/>\n\u3000\n<\/li>\n<li>\u751f\u6210\u7ed3\u675f\u540e\u6253\u5f00VS\u5de5\u7a0b\uff0c\u5728\u89e3\u51b3\u65b9\u6848\u8d44\u6e90\u7ba1\u7406\u5668\u7a97\u53e3\u91cc\u5728INSTALL\u9879\u76ee\u4e0a\u53f3\u952e\u5355\u51fb\u9009\u62e9\u751f\u6210\u6765\u751f\u6210\u5e93\uff0c\u751f\u6210\u7684\u6587\u4ef6\u90fd\u5728\u76ee\u6807\u6587\u4ef6\u5939\u7684install\u76ee\u5f55\u4e0b\u3002install\\include\u662f\u5934\u6587\u4ef6\uff0cinstall\\x86\\vc14\\lib\u662f\u5e93\u6587\u4ef6\uff0cinstall\\x86\\vc14\\bin\u5219\u662fdll\u3002<\/li>\n<\/ol>\n<p>\u3000\u3000IDE\u548c\u7f16\u8bd1\u5668\u7248\u672c\u5bf9\u5e94\uff1a<br \/>\n\u3000\u3000\u3000\u3000Visual Studio 2015 = vc14<br \/>\n\u3000\u3000\u3000\u3000Visual Studio 2013 = vc12<br \/>\n\u3000\u3000\u3000\u3000Visual Studio 2012 = vc11<br \/>\n\u3000\u3000\u3000\u3000Visual Studio 2010 = vc10<br \/>\n\u3000\u3000\u3000\u3000Visual Studio 2008 = vc9<br \/>\n\u3000\u3000\u3000\u3000Visual Studio 2005 = vc8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73b0\u57283.X\u7684openCV\u4f3c\u4e4e\u9ed8\u8ba4\u6ca1\u6709\u751f\u6210x86\u7248\u672c\u7684lib\u548cdll\u4e86\uff0c\u9700\u8981\u81ea\u5df1\u91cd\u65b0\u751f\u6210\u4e00\u4efd\u3002\uff08\u4f7f\u7528\u7684\u73af\u5883\u662fWi&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/flandre-scarlet.moe\/blog\/95\/\">\u9605\u8bfb\u66f4\u591a<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[],"class_list":["post-95","post","type-post","status-publish","format-standard","hentry","category-programs"],"_links":{"self":[{"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/posts\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/comments?post=95"}],"version-history":[{"count":1,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":2176,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/posts\/95\/revisions\/2176"}],"wp:attachment":[{"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/media?parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/categories?post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/tags?post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}