Setup OpenCV 2.4.9 Visual Studio 2013 Win 10

17 772 0
Setup OpenCV 2.4.9 Visual Studio 2013 Win 10

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Setup OpenCV 2.4.9 Visual Studio 2013 Win 10 1. Install tool for compile OpenCV 2. Setup Environment variables for OpenCV 3. Configure in Visual Studio and simple example. 4. Result   I. Install tools for compile OpenCV 1. Visual Studio Download and install Visual Studio 2013 or Visual Studio 2015 (CC++). It’s free and choosing all default options will work fine 2. OpenCV 3.1.0 Goto http:opencv.org and download the OpenCV latest version 2.4.9 for Windows. Then set Extract to: to your C: directory. II. Setup Environment variables for OpenCV Goto “My Computer”, click ringt mouse select “Properties

SETUP OPENCV 2.4.9 Overview Install tool for compile OpenCV Setup Environment variables for OpenCV Configure in Visual Studio and simple example Result I II Install tools for compile OpenCV Visual Studio Download and install Visual Studio 2013 or Visual Studio 2015 (C/C++) It’s free and choosing all default options will work fine OpenCV 3.1.0 Goto http://opencv.org/ and download the OpenCV latest version 2.4.9 for Windows Then set "Extract to:" to your "C:\" directory Setup Environment variables for OpenCV] Goto “My Computer”, click ringt mouse select “Properties” Then chose “Advanced system setting” Then we chose And edit “Path” field Add “C:\opencv\build\x64\vc12\bin” Because we are using Visual Studio 2013 (vc12) Click “OK” to save Pull up a Command Prompt and verify the bin directory is now in PATH, then reboot Configure in Visual Studio and simple example Start Visual Studio, choose File -> New -> Project Choose Visual C++, Empty Project, name as you prefer, ex “OpenCV_Test1”, set preferred location, uncheck "Create directory for solution" and "Add to source control", choose OK III Then right click in Solution Explorer, choose Add -> New Item Choose "C++ File", name the C++ file as preferred, ex "Main.cpp", choose "Add" In the Visual Studio toolbar, verify that "Solution Configurations" is set to "Debug", then change "Solution Platforms" to "x64" (make sure not to skip this step, or 32-bit vs 64-bit errors will be encountered) Chose “OpenCV_Test1”, click “Properties” Chose “Configuration Manager” Click “Win 32” in “Platofrom” Chose “x64”, then click OK • In “VC++ Directories”, - in “Include Directories ” field add “C:\opencv\build\include” and - in field “Library Directories” add “C:\opencv\build\x64\vc12\lib” • In “C/C++” field, at “Additional Include Directories” field Add “C:\opencv\build\include” • In “Linker” field At “Additional Include Directories” field, add “C:\opencv\build\x64\vc12\lib” At “Input” field Add “ 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_ts249d.lib; opencv_video249d.lib; opencv_videostab249d.lib;” in “Additional Dependencies” field “opencv_calib3d249.lib; opencv_contrib249.lib; opencv_core249.lib; opencv_features2d249.lib; opencv_flann249.lib; opencv_gpu249.lib; opencv_highgui249.lib; opencv_imgproc249.lib; opencv_legacy249.lib; opencv_ml249.lib; opencv_nonfree249.lib; opencv_objdetect249.lib; opencv_ocl249.lib; opencv_photo249.lib; opencv_stitching249.lib; opencv_superres249.lib; opencv_ts249.lib; opencv_video249.lib; opencv_videostab249.lib;” (when Release mode, we remove symbol “d” in the version Ex: opencv_calib3d249.lib) So, we configured environment for Visual Studio IV Result We are test with project “Trace the red” use Camera [...]... “C: \opencv\ build\x64\vc12\lib” At “Input” field Add “ 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_ superres249d.lib; opencv_ ts249d.lib; opencv_ video249d.lib; opencv_ videostab249d.lib;” in “Additional Dependencies” field opencv_ calib3d249.lib; opencv_ contrib249.lib; opencv_ core249.lib; opencv_ features2d249.lib; opencv_ flann249.lib; opencv_ gpu249.lib; opencv_ highgui249.lib; opencv_ imgproc249.lib; opencv_ legacy249.lib; opencv_ ml249.lib; opencv_ nonfree249.lib; opencv_ objdetect249.lib; opencv_ ocl249.lib; opencv_ photo249.lib;... opencv_ nonfree249.lib; opencv_ objdetect249.lib; opencv_ ocl249.lib; opencv_ photo249.lib; opencv_ stitching249.lib; opencv_ superres249.lib; opencv_ ts249.lib; opencv_ video249.lib; opencv_ videostab249.lib;” (when Release mode, we remove symbol “d” in the version Ex: opencv_ calib3d249.lib) So, we configured environment for Visual Studio IV Result We are test with project “Trace the red” use Camera

Ngày đăng: 23/03/2016, 15:19

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan