Upload
killua142
View
259
Download
0
Embed Size (px)
Citation preview
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
1/23
Computer Vision, Js Hsu
Computer Vision and Its Applications
Jison G.S. HsuDepartment of Mechanical Engineering
NTUST
OpenCV 2.4.8 Introduction
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
2/23
Computer Vision, Js Hsu
Build the OpenCV library
For system other than Windows and Visual Studio 2010,please look for more details on official installation guide
http://docs.opencv.org/doc/tutorials/introduction/table_of
_content_introduction/table_of_content_introduction
Download OpenCV-2.4.8 http://opencv.org/downloads.html
OpenCV v2.4.8 documentation
http://o
pencv.itseez.com/
http://docs.opencv.org/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introductionhttp://docs.opencv.org/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introductionhttp://docs.opencv.org/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introductionhttp://opencv.org/downloads.htmlhttp://opencv.org/downloads.htmlhttp://opencv.itseez.com/http://opencv.itseez.com/http://opencv.itseez.com/http://opencv.itseez.com/http://opencv.org/downloads.htmlhttp://docs.opencv.org/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction7/24/2019 OpenCV 2.4.8 Introduction (English) v2
3/23
Computer Vision, Js Hsu
Unpack OpenCV
Path_A
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
4/23
Computer Vision, Js Hsu
Open a new project
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
5/23
Computer Vision, Js Hsu
Open a new project
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
6/23
Computer Vision, Js Hsu
Configure your project Add two folders to Your_project directory
External_lib
workingdir32
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
7/23Computer Vision, Js Hsu
Configure your project
Copy lib files from opencv\build\x86\vc10\lib
To Your_project\External_lib
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
8/23Computer Vision, Js Hsu
Configure your project
Copy include files from opencv\build\include
To Your_project\External_lib
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
9/23Computer Vision, Js Hsu
Configure your project
Copy dll files from opencv\build\x86\vc10\bin
To Your_project\workingdir32
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
10/23Computer Vision, Js Hsu
Configure your project
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
11/23Computer Vision, Js Hsu
Configure your project
Include path
Click
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
12/23Computer Vision, Js Hsu
Configure your project
Include path
$(SolutionDir)External_lib\include$(SolutionDir)External_lib\include\opencv
$(SolutionDir)External_lib\include\opencv2
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
13/23Computer Vision, Js Hsu
Configure your VS2010
Add lib files
$(SolutionDir)External_lib\lib
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
14/23Computer Vision, Js Hsu
Configure your VS2010
Add lib files
Click
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
15/23Computer Vision, Js Hsu
Configure your VS2010
Add lib filesopencv_calib3d248d.libopencv_contrib248d.libopencv_core248d.libopencv_features2d248d.libopencv_flann248d.lib
opencv_gpu248d.libopencv_highgui248d.libopencv_imgproc248d.libopencv_legacy248d.libopencv_ml248d.libopencv_nonfree248d.lib
opencv_objdetect248d.libopencv_photo248d.libopencv_stitching248d.libopencv_ts248d.libopencv_video248d.libopencv_videostab248d.lib
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
16/23Computer Vision, Js Hsu
Configure your project
workingdir
$(SolutionDir)workingdir32
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
17/23Computer Vision, Js Hsu
Example 1Load, Show, and Save an Image
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
18/23Computer Vision, Js Hsu
Exercise 1
OpenCV
Hint :
cvtColor ( input image , output image , CV_BGR2GRAY )
openCVBGR
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
19/23Computer Vision, Js Hsu
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
20/23Computer Vision, Js Hsu
Example 2 RGB split
BGR
Hint : split( Mat input , vector output )
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
21/23Computer Vision, Js Hsu
Exercise 2
OpenCVSplit
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
22/23Computer Vision, Js Hsu
7/24/2019 OpenCV 2.4.8 Introduction (English) v2
23/23
C t Vi i J H
Example 3 Image blur
Hint : blur( Mat input , Mat output
, winsize )