Using OpenCV on Windows

Hi! I’ve put together a few short articles that will get you started with your first step in using OpenCV on Windows! By the end of this tutorial, you’ll be proficient at:

  • Setting up a project for OpenCV
  • Loading images
  • Manipulate images (increase contrast, some funky effects, etc)
  • Capture images from your camera (and apply the above effects too)
  • Create simple user interfaces with HighGUI

That’s a lot of stuff! So lets get started right now!

The tutorials

This is a series of tutorials. Here’s the entire list of tutorials:

Lesson 01 Why OpenCV?
This article talks about why to choose OpenCV over Matlab. Update: I found a comparison of OpenCV against other vision libraries.
Installing and getting OpenCV running
Here you’ll learn how to setup your IDE to recognize OpenCV.
Hello, World! with images
Your very first OpenCV project! You’ll load an image and display it on screen.
Filtering images
Do some weird effects on your images! This is a fun lesson!
Capturing images
Using OpenCV’s inbuilt capabilities to get live video from your camera. Update: Feeling adventerous? Try capturing with DirectX (works on any camera).
HighGUI: Creating Interfaces
Learn the basics of creating an interface and detecting events from trackbars and windows.

What exactly is OpenCV?

This might sound obvious, but just to be clear, OpenCV is a library of functions. OpenCV is NOT a piece of software that you run and process images. You need to write code.

You can download Microsoft’s Visual Studio Express Edition (for free). It is one superb IDE. Go get Visual Studio Express here! You need to download the Visual C++ 2010 Express.

Also, OpenCV is not some executable file that you double click and it’ll start working. It is pure code, library files and DLL files. When you write your own code, you “link” to these library files to access the OpenCV functions.

Again, this might sound obvious, but just to be sure I put this up.

Summary

After you’ve been through this tutorial, you’ll know how to go about using OpenCV on a Windows box! Enjoy!

Issues? Suggestions? Visit the Github issue tracker for AI Shack

Back to top

6 Comments

  1. Omkar Bellare
    Posted August 18, 2010 at 2:38 pm | Permalink

    Hey Utkarsh,
    I know you from college. Just found your website. Damn cool stuff here. I wanted to install OpenCV on my comp and start using it with CodeBlocks. I tried linking the libraries and the include files of OpenCV, but doesnt seem to be working.Could you help me out with it?
    Thanks

  2. Siddhesh Wani
    Posted November 9, 2010 at 5:12 pm | Permalink

    Hi,Utkarsh.Ihve started using OpenCV just now & found you website very useful.Is this website created and maintained by tou?If yes,Why don’t you add some tutorials about that also?

    • Posted November 12, 2010 at 1:26 am | Permalink

      Yes I created AI Shack and maintain it too… What tutorials should I add?

      • Siddhesh Wani
        Posted November 13, 2010 at 11:51 am | Permalink

        Hi Utkarsh,
        Can you add tutorials about writing html code for website?
        Right from beginning that is how to get domain etc.
        Thank you.

        • Posted November 13, 2010 at 11:55 am | Permalink

          There are lots of tutorials about that on the internet. Do a search and you’ll find lots. On AI Shack I write about only artificial intelligence related things.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>