我尝试将 OpenCV 与 VS Express 2015 关联起来,就像我在VS 2013中所做的那样,但我得到了.dll was not found in my system.
。它说这是// emulating csv file
String[] lines = {
"shape id day hour week id footfall category area name",
"22496 22/3/14 3 12 634 Work cluster CBD area 1",
"22670 22/3/14 3 12 220 Shopping cluster Orchard Road 1",
"23287 22/3/14 3 12 723 Airport Changi Airport 2",
"16430 22/3/14 4 12 947 Work cluster CBD area 2",
"4697 22/3/14 3 12 220 Residential area Ang Mo Kio 2",
"4911 22/3/14 3 12 1001 Shopping cluster Orchard Rd 3",
"11126 22/3/14 3 12 220 Residential area Ang Mo Kio 2"
};
List<Integer> hours = new ArrayList<Integer>();
// | begin of input
// || any number of characters, reluctantly quantified
// || | 1+ whitespace
// || | | single digit in group 1 (the hours)
// || | | | 1+ whitespace
Pattern p = Pattern.compile("^.+?\\s+(\\d)\\s+");
// here you probably want to only add the m.group(1) to your list, possibly as integer as it's done here
for (String s: lines) {
Matcher m = p.matcher(s);
if (m.find()) {
hours.add(Integer.parseInt(m.group(1)));
}
}
System.out.println(hours);
关于如何将OpenCV与VS 2015 Express联系起来的任何想法?
答案 0 :(得分:2)
我设法通过在我的系统上安装Visual Studio 2013 Express,使OpenCV Debug配置在Visual Studio 2015 Community Edition中运行。结果,文件msvcr120d.dll出现在Windows \ System32中,并且在重新启动计算机之后,我能够在Visual Studio 2015中调试OpenCV示例。
答案 1 :(得分:2)
Prebuild Libs仅适用于VS11和VS12,这是Visual Studio 2012和2013.您可以为Visual Studio 2015 comm构建和发布自己的OpenCV库。版。 只需使用本教程 Install OpenCV Visual Studio 2015
答案 2 :(得分:1)
在另一台计算机上安装Visual Studio 2013 Community Edition,然后将dll msvcp120d.dll和msvcr120d.dll复制到我的工作计算机的Windows \ System32 \中。为opencv 2.4 x64开发工作。
这不是opencv 3+所必需的,因为有可用的vs14二进制文件。
- 编辑23/8 / 16-- 实际上,工作不太顺利。 msvcr120d.dll中包含opencv对象(包括Mat和KeyPoint)的向量被解构或使用大量保留时构造的运行时错误。