Tutorial for Open CV with Visual Studio Installation Install Opencv Software and Interact with Visual Studio on a Microsoft Windows 7 Computer
Total Page:16
File Type:pdf, Size:1020Kb
Tutorial for Open CV with Visual Studio installation Install OpenCV software and interact with Visual studio on a Microsoft Windows 7 computer Keywords: Open CV, Visual studio, integrated development environment, Arthor: Poyuan Han Date: 11/14/2014 Executive Summary OpenCV is a tool for both academic and commercial use. It is interface in C++, C, Python, and support Windows, MacOS, and Linux. OpenCV was designed for computational efficiency and with strong focus on real-time applications. Visual studio is an integrated development environment (IDE) from Microsoft Windows. It supports varies programming language with code editor, such as in C++, and C. Objective This application note will explain how to install OpenCV on Windows and interact with Visual studio step by step. Introduction OpenCV is a library of many inbuilt functions mainly aimed at real- time image processing. This application areas are include such as 2D and 3 D feature toolkits, Motion detection, and Object identification. It can be written in C and C++. Visual studio is a suitable program for interact with C++ and C, and also support with Windows 7, which is friendly use in public. Hardware This application is require minimum Windows 7 computer. It can be either desktop or laptop. The OpenCV is require 3.5GB memory. Make sure there is enough memory on hard drive on computer Software The primary software for this application is Visual studio. Once we have hardware set up and hard drive ready in use. The OpenCV installation process is on next step Environmental variable set up GO to ”My computer” and right click it, and click drop down menu, If the system type is 64 bit operating system, the system architecture is x64. In this tutorial we are using vc11 as compiler type, and the supporting complier types of OpenCV is C:\opencv\build\x64 in this case. Next, click “Advance System Setting” Click” Enviroment Variable” Then click “New” button Type OPENCV_DIR as Variable name, and type C:\opencv\build\ as Variable value Then click ok, once is finished Now we are going to edit a system variable, click “Path” inside the list of System variable, and click “Edit”. Add ;%OPENCV_DIR%\x86\vc11\bin in the Variable value The OpenCV installation process is complete, next step is Visual Studio configuration Configure Visual Studio Start Microsoft Visual Studio. GO to File>New Project> Installed>Visual C++. Select “Win32 Console Application”. Then, enter the name of the file and location as you choose. Press OK after is finish. Press ”Ctrl+W” and release it. Then press “S” in keyboard. The “solution Explorer” window will show up Choose” All Configurations” for the Configuration. In Common Properties, Configuration properties > C/C++> General. Then copy and paste $(OPENCV_DIR)\include from “Additional Include Direction” Click Linker>General, then copy and paste $(OPENCV_DIR)\x86\vc11\lib from “Additional Library Direction” Click Linker>Input, then click down arrow on the right of window, then click <Edit…> After you click <Edit…>, the dialog box will appear and you have to copy and paste following library file names in below. In this tutorial we are using the version of OpenCV 2.4.5. If you are using different version, you need to modify the library file names corresponding to the version you have. For example, if you have OpenCV 2.4.9, change to the number 9 instead of 5. opencv_calib3d245d.lib opencv_contrib245d.lib opencv_core245d.lib opencv_features2d245d.lib opencv_flann245d.lib opencv_gpu245d.lib opencv_haartraining_engined.lib opencv_highgui245d.lib opencv_imgproc245d.lib opencv_legacy245d.lib opencv_ml245d.lib opencv_nonfree245d.lib opencv_objdetect245d.lib opencv_photo245d.lib opencv_stitching245d.lib opencv_superres245d.lib opencv_ts245d.lib opencv_video245d.lib opencv_videostab245d.lib You can find the complete file names in “C:\opencv\build\x86\vc11” location Click “OK” after you finish, and now the Open CV is interface with Visual Studio Conclusion This application is a tutorial for installation OpenCV and how to interact with the programming software. Using Visual studio is a proper software as a choice. It contain C++ language code editor, also support Windows 7. By following the tutorial step by step, One can finish and robust the installation concept without any frustration. Reference http://opencv-srf.blogspot.com/2013/05/installing-configuring-opencv-with-vs.html http://en.wikipedia.org/wiki/OpenCV http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Designer .