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.
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
- Select libemgucv-windesktop-184.108.40.2062.exe
- It will download an executable file. After the download finishes, execute this file.
- 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.
- 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.
Step 3: Configure the Environment Variables
- 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 (;):
- Once we have added these variables, we can execute the Example programs found in the bin folder.
- 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.