Integrate OpenCV 2.4.9 with Microsoft Visual Studio 2012 (32 bit) [c++]


 In The Name Of  Allah ,Most gracious,Most Merciful!! Assalamu Alai kum. Welcome to  Planet : rksazid 


Integrate OpenCV 2.4.9 with 
Microsoft Visual Studio 2012 (32 bit)


1.       Download Visual Studio 2012 form this link Visual Studio 2012 download

 

2.       Install Visual Studio 2012 in any drive.

3.       Download OpenCV 2.4.9 form this link OpenCV 2.4.9 Download



4.       Install/Extract OpenCV 2.4.9 to C:\ drive.


5.       After install finished rename the opencv folder to opencv249


6.       Environment variable setup:

·         Right-click on My Computer & select Properties>Advance System settings


 

·         Then select the Environment variables.

 

·         From System variables find the “path” variable & add a semicolon (;) in last then add this path to it : C:\opencv249\build\x86\vc11\bin


Now, Restart your PC!

                                            
7.       Open Visual Studio & Create a “Win32 Console Application” Empty project.






8.       Right Click on your project name from Solution Explorer Select Properties


9.       Click VC++ Directories & click Edit on Include directories

  
 

10.   Add C:\opencv249\build\include path & click OK.



11.   click Edit on library directories & add this two path & click ok –
C:\opencv249\build\x86\vc11\lib
C:\opencv249\build\x86\vc11\bin

 
       
12.   Click Linker>Input>Additional dependencies>Edit add these file names & click ok –
                                                             opencv_calib3d249d.lib
         opencv_contrib249d.lib
         opencv_core249d.lib
         opencv_features2d249d.lib
         opencv_flann249d.lib
         opencv_gpu249d.lib
         opencv_highgui249d.lib
         opencv_imgproc249d.lib
         opencv_legacy249d.lib
         opencv_ml249d.lib
         opencv_nonfree249d.lib
         opencv_objdetect249d.lib
         opencv_ocl249d.lib
         opencv_photo249d.lib
         opencv_stitching249d.lib
         opencv_superres249d.lib
         opencv_video249d.lib
         opencv_videostab249d.lib


13.   Go Linker>General>Use library dependency Input & make it Yes.

 


Congratulation!! You successfully Integrate OpenCV 2.4.9 with Visual Studio 12


Now, to check your project follow these steps :

1.       Right-click on your project name from the Solution explorer.
2.       Add>New Item>C++ files
3.       Copy & paste this code :

#include <opencv\cv.h>
#include <opencv\highgui.h>
#include <opencv2/core/core.hpp>
#include<iostream>


using namespace cv;
using namespace std;

int main(){
   Mat img = imread("sample.jpg");
   imshow("Lena image",img);
   cvWaitKey(0);
}


4.       Right-click on your_project_name > Open Folder in file explorer ......project folder is opened
5.       Then copy any JPG image from your PC to Project folder & rename it with “sample
6.       Click on this Local Debugger. If an image window open then you are done!


*If you face any problem about this , feel free to inform me in comment box


Thank You !!


Comments

  1. The 13 Best Casino Games in St. Louis
    What Are the 포천 출장안마 Best 광주 출장마사지 Slots in 의왕 출장마사지 St. Louis? · 5. Slotocash · 4. Bovada · 3. Wildz · 2. Ignition · 청주 출장안마 1. Slots Tumble · 충청북도 출장마사지 1. Table Games.

    ReplyDelete

Post a Comment

Popular posts from this blog

Android Project : কি লাগবে?

Android project : "Block Phone calls of Driver's Phone while driving"