我安装了EmguCV 2.4.2.1777.我有一个32位的Windows 7所以我使用安装程序安装它.现在我正在尝试编写一个简单的代码,以便在C#窗口中捕获网络摄像头的视频.问题是在执行期间我得到以下着名的错误:
A first chance exception of type 'System.DllNotFoundException' occurred in Emgu.CV.dll
A first chance exception of type 'System.TypeInitializationException' occurred in Emgu.CV.dll
An unhandled exception of type 'System.TypeInitializationException' occurred in Emgu.CV.dll
Run Code Online (Sandbox Code Playgroud)
文件夹中存在Emgu.CV.dll文件.我不明白为什么它会给出这个错误.我尝试了其他stackoverflow用户建议的所有检查以及许多其他参考:
1)已安装的MSVCR:MSVCRT 10.0 SP1 x86
2)将OpenCV dll复制到执行目录
3)我也有一个32位操作系统.所以这也不应成为一个问题.
但是当我检查依赖项时,我遇到了一个问题:
我使用DependecyWalker打开cvextern.dll,发现以下依赖项缺失:
NVCUDA.DLL
API-MS-WIN-CORE-COM-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL
DCOMP.DLL
IESHIMS.DLL
Run Code Online (Sandbox Code Playgroud)
它还提供了以下内容:
错误:找不到至少一个必需的隐式或转发依赖项.警告:找不到至少一个延迟加载依赖项模块.警告:由于延迟加载相关模块中缺少导出功能,至少有一个模块具有未解析的导入.
除了例外,请帮助我.提前致谢.
opencv exception visual-studio-2010 emgucv typeinitializeexception
在下面的代码中,我有两个链接列表liperm和litemp.我想首先使用liperm的值初始化litemp,然后添加其他值.但它不起作用,因为它没有初始化它们.你能帮忙吗?
public class ExamImmutableQueueImpl<E> implements ExamImmutableQueue<E> {
LinkedList<E> liperm = new LinkedList<E>();
LinkedList<E> litemp = new LinkedList<E>(liperm);
public ExamImmutableQueueImpl(LinkedList li){
System.out.println(li.toString());
}
public ExamImmutableQueueImpl(){}
@Override
public ExamImmutableQueue<E> enqueue(E e) {
System.out.println(litemp.toString());
litemp.add(e);
return new ExamImmutableQueueImpl<>(litemp);
}
public final void setQueue(E e){
liperm.add(e);
}
public void getQueue(){
System.out.println(litemp.toString());
}
}
Run Code Online (Sandbox Code Playgroud)
主要方法是:
public static void main(String args[]){
ExamImmutableQueueImpl<Integer> o1 = new ExamImmutableQueueImpl<Integer>();
ExamImmutableQueue<Integer> obj;
o1.setQueue(2);
o1.setQueue(1);
o1.setQueue(2);
o1.setQueue(3);
obj = o1.enqueue(6);
Run Code Online (Sandbox Code Playgroud)
界面是:
public interface ExamImmutableQueue<E> {
public ExamImmutableQueue<E> enqueue(E e);}
Run Code Online (Sandbox Code Playgroud)