Download And Installation: Difference between revisions
Jump to navigation
Jump to search
Line 44: | Line 44: | ||
===Building Emgu CV from source=== | ===Building Emgu CV from source=== | ||
To | [[Emgu CV]] has adapted to use cmake to compile all it source code (as well as [[OpenCV]]). | ||
*Make sure you have cmake installed, if not, login as root and call | |||
<pre> yum install cmake </pre> | |||
*To build from source, you will need a SVN client to check out the source code from SourceForge. For more information, see [[SVN]]. The following command can be used to check out the source: | |||
<pre>svn co https://emgucv.svn.sourceforge.net/svnroot/emgucv/trunk emgucv </pre> | |||
*Go to emgucv directory, call | |||
<pre>cmake .</pre> | |||
This will generate make file for [[Emgu CV]] | |||
*Build [[Emgu CV]] by calling | |||
<pre>make</pre> | |||
Sit back and wait as this will build [[OpenCV]], as well as cvextern.so, Emgu.Util.dll, Emgu.CV.dll, Emgu.CV.UI.dll and Emgu.CV.ML.dll | |||
*To test the build, you can also build the PlanarSubdivision Example by calling | |||
<pre>make Emgu.CV.Example.PlanarSubdivision</pre> | |||
The PlanarSubdivision example use "cvextern.so" such that we can verify its correctness | |||
*Now go to the bin folder | |||
<pre>cd bin</pre> | |||
*make sure mono can load the dynamic library from the current location by typing | |||
<pre>export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH</pre> | |||
*Try to run the example | |||
<pre>mono Emgu.CV.Example.PlanarSubdivision.monoexe</pre> | |||
You should see the planar subdivision window | |||
*Now you can try to call monodevelop to develop application on Linux, as the required binaries has been build and setup by cmake |
Revision as of 17:59, 29 April 2009
Windows
Getting the Dependency
- Emgu CV use WCF(Windows Communication Foundation) therefore requires .Net 3.0
Building the Examples
- Follow this link to the file server on Source Forge.
- Download and extract the package Emgu.CV.SourceAndExamples-{version}.zip
- Go to the Solution folder
- If you are using Visual Studio 2005, browse to VS2005_MonoDevelop
- If you are using Visual Studio 2008, browse to VS2008
- Open Emgu.CV.Example.sln and build the solution. At this point, you should be able to run the example programs.
Creating a New Project in Visual Studio
To use the framework in Visual Studio, you need to
- Download and extract the binary files package Emgu.CV.Windows.Binary-{version}.zip (They are compiled from source on Windows using MsBuild)
- Create a new Visual Studio project or use an existing one
- Add the 3 files
zlib.net.dll
,Emgu.Utils.dll
andEmgu.CV.dll
to References of the project. If you needs to use the Machine Learning library, includeEmgu.CV.ML.dll
to References as well. - Copy the OpenCV dll files:
cv110.dll
,cvaux110.dll
,cxcore110.dll
,highgui110.dll
,ffopencv110.dll
andml110.dll
to the execution directory. - Optionally put the following lines in the top of your code to include the Emgu.CV namespace.
using Emgu.CV;
using Emgu.CV.Structure;
If you use the Machine Learning library, you mights wants to include the following as well
using Emgu.CV.ML;
- Follow the Tutorial to learn how to use Emgu CV. The "Hello, World" Example is a good starting point.
Linux
Getting the Dependency
- Mono
- You need Mono >= 2.2. If you need to compile Emgu CV from source, do NOT use gmcs 2.0.0 / 2.0.1, there is a bug in these two versions.
- Emgu CV library use WCF (Windows Communication Fundation) and therefore also requires mono-extra.
- You can install both by running
yum install mono-core mono-extra
as root. (Please enable rawhide repository in order to get Mono >= 2.2)
Follow this link to access the file server on Source Forge.
- OpenCV
- We will build a custom version of OpenCV in the next step. It is recommended to remove any OpenCV package if it is installed on your machine. On Fedora 10, you can remove OpenCV by running
yum remove opencv
as root
- We will build a custom version of OpenCV in the next step. It is recommended to remove any OpenCV package if it is installed on your machine. On Fedora 10, you can remove OpenCV by running
Building Emgu CV from source
Emgu CV has adapted to use cmake to compile all it source code (as well as OpenCV).
- Make sure you have cmake installed, if not, login as root and call
yum install cmake
- To build from source, you will need a SVN client to check out the source code from SourceForge. For more information, see SVN. The following command can be used to check out the source:
svn co https://emgucv.svn.sourceforge.net/svnroot/emgucv/trunk emgucv
- Go to emgucv directory, call
cmake .
This will generate make file for Emgu CV
- Build Emgu CV by calling
make
Sit back and wait as this will build OpenCV, as well as cvextern.so, Emgu.Util.dll, Emgu.CV.dll, Emgu.CV.UI.dll and Emgu.CV.ML.dll
- To test the build, you can also build the PlanarSubdivision Example by calling
make Emgu.CV.Example.PlanarSubdivision
The PlanarSubdivision example use "cvextern.so" such that we can verify its correctness
- Now go to the bin folder
cd bin
- make sure mono can load the dynamic library from the current location by typing
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
- Try to run the example
mono Emgu.CV.Example.PlanarSubdivision.monoexe
You should see the planar subdivision window
- Now you can try to call monodevelop to develop application on Linux, as the required binaries has been build and setup by cmake