Installing Open CV in Windows for Python 2.7.3

Posted: June 23, 2012 in Programming, Python
Tags: , ,

OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision. I just finished installing OpenCV 2.4.1  in ma laptop. It look a while for me to download as my internet connection was laggy for a while.

Step 1: Download and Install Python:

Firstly, you will need Python installed in your system. If you can download it from here and follow the instructions which I have written to get Python successfully running in your computer in my previous blog entry here. Python will be installed in default folder “C:\Python27\

Step 2: Download Numpy:

Then you will need to download Numpy and install it .

Download Link for Numpy: Numpy

It will find the default Python Folder and you can just install it will the default settings.

Step 3: Download OpenCV:

Download Link for OpenCV : OpenCV

Now double-click OpenCV.exe. When it asks for extraction folder just give it as C:\ . The files will be now be extracted to C:\opencv .This might take a while.

Now, open folder “C:\opencv\build\python\2.7” and copy all the files in that folder to the folder “C:\Python27\Lib\site-packages” .

Step 4: Test it!

Open up your Python IDLE by clicking Start>All Programs>Python 2.7> IDLE (Python GUI) and type:

import cv2

If you have followed the described steps , then it would successfully import it and you can start programming right away! 😀

The OpenCV documentation can be found here.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s