zoukankan      html  css  js  c++  java
  • Using Emgu CV in x64 based Windows 8 computer

    0. Environment

    Windows 8 Enterprice x64 En

    Visual studio Ultimate 2012

    Emgu CV 2.4.2.1777 (libemgucv-windows-x86-gpu-2.4.2.1777.exe, http://www.emgu.com/wiki/index.php/Main_Page)

    1. Steps

    1.1 Install Emgu by double click the exe file, and we will install Emgu in C:\Emgu\emgucv-windows-x86-gpu-2.4.2.1777 folder

    1.2 Add "C:\Emgu\emgucv-windows-x86-gpu-2.4.2.1777\bin;C:\Emgu\emgucv-windows-x86-gpu-2.4.2.1777\bin\x86" to your "Environment Variables"'s "Path"

    1.3 Download a "nvcuda.dll" file from the web, and put it in the "C:\Emgu\emgucv-windows-x86-gpu-2.4.2.1777\bin\x86" folder, after this you could run "cvextern_test.exe" in the same folder

    1.4 Open Visual studio and create a C# Console Application or other type of application

    1.5 Browse and add "Emgu.CV.dll, Emgu.CV.ML.dll, Emgu.CV.UI.dll, Emgu.Util.dll, ZedGraph.dll" to your project "References"

    1.6 Change your project "Platform target" to "x86" in "Properties -> Build -> General"

    1.7 Add the following code to your Main function and run it
    IntPtr image = CvInvoke.cvCreateImage(new System.Drawing.Size(400, 300), IPL_DEPTH.IPL_DEPTH_8U, 1);

    Ps: don't forget using the namespace
    using Emgu.CV;
    using Emgu.CV.Structure;
    using Emgu.CV.CvEnum;
    using System.Drawing;//in System.Drawing.dll

    2. Errors

    2.1 Error 1

    The type initializer for 'Emgu.CV.CvInvoke' threw an exception.
    Unable to load DLL 'opencv_core242': The specified module could not be found.

    Solution: 1.2 and 1.3

    2.2 Error 2

    The type initializer for 'Emgu.CV.CvInvoke' threw an exception.
    An attempt was made to load a program with an incorrect format.

    Solution: 1.6

    3. References

    http://blog.csdn.net/fengbingchun/article/details/8235499

    http://blog.csdn.net/mengze914/article/details/8281295

    (This article is from http://www.cnblogs.com/chenyineng/archive/2012/12/30/2840108.html, and belongs to http://chenyineng.cnblogs.com and http://www.chenyineng.info)

  • 相关阅读:
    HOJ 2930 Perfect Fill IIl 线性递推
    BZOJ 1269: [AHOI2006]文本编辑器editor Splay
    linux shell常用快捷键(转)
    【引用】Linux date命令
    linux shell if 参数(转)
    vsftpd 530 Permission denied(转)
    捕获非广播包和非发给自己主机的数据包的原理是什么 混杂模式(转)
    代理ARP(转)
    Linux和Unix系统 关系和区别详细介绍(转)
    路由表(转)
  • 原文地址:https://www.cnblogs.com/chenyineng/p/2840108.html
Copyright © 2011-2022 走看看