My first tutorial will help you to configure EmguCV/OpenCV with Visual Studio C# so you can develop your first Computer Vision application! This application will capture the video from your webcam and display it, with a button that will start or stop this process. It is kind of a “Hello World” program in Computer Vision.

Step 1: Download Visual Studio 2015.

You can download it from here: Visual Studio 2015. The version you should download is the Community 2015.

A_.jpg

Once you have downloaded and install it correctly (it will take a while…), we can move on to step 2!

Step 2: Download EmguCV 3.1

You can download EmguCV 3.1 from here: EmguCV

  1. Select libemgucv-windesktop-3.1.0.2282.exe
  2. It will download an executable file. After the download finishes, execute this file.
  3. Follow the instruction and select the folder where you want to copy the library. I recommend to create a folder in the root directory, like C:/emgucv/emgucvXX. That way, you can have several versions of EmguCV and you can find them easily.
  4. You can go into that directory and look at the files. You will find many folders but the first one we are going to look at is the bin folder. There you will find the .dll files for each one of the modules for OpenCV. Also, you can find some examples programs. We will look at them later.

b_

Step 3: Configure the Environment Variables

  1. Go to Control Panel, select System and then Advance System Configuration. Then go to Environment Variables. Look for PATH and select Edit. You should add the following two new variables, separated by a semicolon (;):
    1. C:\emgu\emgucv3.1\bin
    2. C:\emgu\emgucv3.1\bin\x64
  2. Once we have added these variables, we can execute the Example programs found in the bin folder.
  3. Go to C:\emgu\emgucv3.1\bin and execute Example.HelloWorld.exe. This program will open a new window where “Hello World” will be displayed. If this executes correctly, we can go forward.

C_.jpg

So far, we have downloaded everything we need and in the next post we are going to learn how to configure Visual Studio with EmguCV.

Advertisements