Tuesday, June 7, 2011

Installing OpenCV

If you have no Open Source OS installed still in your system, go to my previous post and there is a link to install openCV in windows. You can skip this post.

Also if you have openCV already in your system, skip this post.

OpenCV installing is very trivial and most of the sites tell you it's easy and give you four to five commands that get the things done quickly.But if you want to really harness the complete power of openCV, follow the steps below ( For Ubuntu, can be easily applied to other Linux based OS's )

1. Although OpenCV 2.2 is the latest version, 2.1 is more stable and has got enough libraries to keep you going.

2. Follow the below link to install openCV in a step by step manner (can be applied to all Ubuntu versions)

3. There is just one major step where you need to be carefull, the step where he tells you to check the below image

4. Don't proceed for the next step in that website, till all the parts in the above image, are exactly like the ones you see in your system

This is the way, I resolved the dependencies...

For example, beside FFMPEG in the image, I have a zero, where I need to have one, so I open the Synaptic Package Manager and search for that term and install it and rerun the "cmake ."

5. Try the examples to check your openCV installation and have some fun in the last remnants of that post

6. That's it, you have openCV now and we can keep going from the next post

And one more thing, if you are interested in doing cool things with images or photography, this is a link from the same website (Not at all related to openCV)

Update (20/06/11) : Forgot to tell you the one most important thing, before doing anything in the site I have given, you need to run the following command

sudo apt-get install libavformat-dev libgtk2.0-dev pkg-config cmake libswscale-dev bzip2
This will automatically let you over come the ffmpeg error.Also, keep in mind, if anytime while fetching the packages through terminal, you can see, unable to fetch sometimes.Then immediately run the same command with --fix-missing as suffix and keep running it, until you never see the error.The advantage of running the command with this suffix is, it only tries to get the missing files.So for the above command, if you see unable to fetch archives, simply run

sudo apt-get install libavformat-dev libgtk2.0-dev pkg-config cmake libswscale-dev bzip2 --fix -missing

Don't forget to hit "+1" below this post to make this blog reach more people

No comments:

Post a Comment