Hello folks ,
If you are willing to use OpenCV , you are goin to have so many troubles and your trouble starts from installation.In case you are using Microsoft Visual Studio all the installation and configuration instruction are given on the willowgarage website "Installation Instruction" . However if you are not using Microsoft Visual Studio here is the way you can configure your dev-cpp to include OpenCV library to your c/c++ programme , furthur I'll also be explaining how to install and use OpenCV in linux.
Configuring Dev-cpp
- step 1: Download OpenCV2.1.rar
- step 2:Extract this file and put all of them in c:/OpenCV2.1 folder
- step 3:Start dev-cpp and go to the tools->compilar option
- step 4:Click on the directories option
- In the Binaries field add c:/OpenCV2.1/bin , In case you placed OpenCV in some other drive start with that drive letter
- In the library field add c:/OpenCV2.1/lib
- In the c Includes field add c:/OpenCV2.1/include/opencv
- In the c++ Includes add c:/OpenCV2.1/include/opencv
- step 5:Go to the Compilar option in the same window
- Check the box in front of Add these commands to linker command line
- In the box just below it write " -lcvhaartraining -lcxcore210 -lcv210 -lcvaux210 -lhighgui210 -lml210 " (Without quotes)
- step 6:Browse a sample programme from C:\OpenCV2.1\samples\c try contour.c
- step 7:Run it , if everything goes well , you are done start enjoying OpenCV
- If you are using feodra from root type yum install opencv in console.It'll take few minutes to download and install depending on your connectivity.
- If you are working in Ubuntu typr in console sudo apt-get install opencv or you can also use synaptic package manager.
- Check if the /usr/local/lib/pkg-config directory contains an opencv.pc file
- Set the PKG_CONFIG_PATH variable to " /usr/local/lib/pkg-config "
Now you have your own choice of opencv. Programme anywhere and enjoy.I'll keep on adding new and interesting stuff. Hope this would have solved your problem.You can post your problems in this post I'll definitly answer them.Please subscribe and don't ask stupid question.
-Anand Kumar
Student & Developer
No comments:
Post a Comment