初次接触一种东西,总是会遇到很多意想不到的问题,尤其是技术性的问题,细节多,规则也多,一步一个陷阱,能够尽快的理出思路,找到头绪,则是快速解决问题的关键。
最近开始基础openCV,希望了解一点里面的算法,用于自己的产品中,然而,初次接触,再加上,是在之前很少接触的windows平台上,真是吃尽苦头。
最近版本的openCV2.0提供的动态链接库,看是活生生的存在于bin目录下,编译链接,运行程序时却总是提示找不到,而VS的提示也让人摸不着头脑,明明是某函数不能加载,却提示成另外一个函数找不到。一气之下,打算重新编译一下opencv。
由于也是初次使用微软的编译环境,一切都得学习,于是百度+google,然而搜到的内容大多是将如何配置一个使用opencv进行应用开发的配置,很少有文章涉及opencv的编译。想来技术这种事情本来就是,对于过来人,举重若轻,对于菜鸟,真是泰山压顶!
经历了很长时间的闭门羹后,终于还是在opencv自带的doc目录下,发现了编译的提示:
http://opencv.willowgarage.com/wiki/InstallGuide
windows和linux的步骤混合在一起。看起来也不轻松, 下面是我整理后的步骤(一共11步):
<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:214780764; mso-list-type:hybrid; mso-list-template-ids:-1823177122 844908758 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 {mso-level-tab-stop:18.0pt; mso-level-number-position:left; margin-left:18.0pt; text-indent:-18.0pt;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->
build the openCV step by step:
1. download the openCV and install it, assuming: D:/Program Files/OpenCV2.0
2.