0% found this document useful (0 votes)
156 views23 pages

OpenCV 2.4.8 Introduction (English) v2

This document provides an introduction and overview for installing and configuring OpenCV 2.4.8 for computer vision applications. It outlines downloading and unpacking OpenCV, creating a new project, and configuring the project to include OpenCV libraries and include paths. Example applications are provided, including loading, displaying and saving an image, splitting an image into RGB color channels, and blurring an image. Instructions are given in both English and Chinese.

Uploaded by

killua142
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
156 views23 pages

OpenCV 2.4.8 Introduction (English) v2

This document provides an introduction and overview for installing and configuring OpenCV 2.4.8 for computer vision applications. It outlines downloading and unpacking OpenCV, creating a new project, and configuring the project to include OpenCV libraries and include paths. Example applications are provided, including loading, displaying and saving an image, splitting an image into RGB color channels, and blurring an image. Instructions are given in both English and Chinese.

Uploaded by

killua142
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Computer Vision and Its Applications

OpenCV 2.4.8 Introduction

Jison G.S. Hsu

Department of Mechanical Engineering


NTUST

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://opencv.itseez.com/

Computer Vision, Js Hsu

Unpack OpenCV

Path_A

Computer Vision, Js Hsu

Open a new project

Computer Vision, Js Hsu

Open a new project

Computer Vision, Js Hsu

Configure your project


Add two folders to Your_project directory
External_lib

workingdir32

Computer Vision, Js Hsu

Configure your project


Copy lib files from opencv\build\x86\vc10\lib
To Your_project\External_lib

Computer Vision, Js Hsu

Configure your project


Copy include files from opencv\build\include
To Your_project\External_lib

Computer Vision, Js Hsu

Configure your project


Copy dll files from opencv\build\x86\vc10\bin
To Your_project\workingdir32

Computer Vision, Js Hsu

Configure your project

Computer Vision, Js Hsu

Configure your project


Include path

Click

Computer Vision, Js Hsu

Configure your project


Include path

$(SolutionDir)External_lib\include
$(SolutionDir)External_lib\include\opencv
$(SolutionDir)External_lib\include\opencv2

Computer Vision, Js Hsu

Configure your VS2010


Add lib files

$(SolutionDir)External_lib\lib

Computer Vision, Js Hsu

Configure your VS2010


Add lib files

Click

Computer Vision, Js Hsu

Configure your VS2010


Add lib files
opencv_calib3d248d.lib
opencv_contrib248d.lib
opencv_core248d.lib
opencv_features2d248d.lib
opencv_flann248d.lib
opencv_gpu248d.lib
opencv_highgui248d.lib
opencv_imgproc248d.lib
opencv_legacy248d.lib
opencv_ml248d.lib
opencv_nonfree248d.lib
opencv_objdetect248d.lib
opencv_photo248d.lib
opencv_stitching248d.lib
opencv_ts248d.lib
opencv_video248d.lib
opencv_videostab248d.lib
Computer Vision, Js Hsu

Configure your project


workingdir

$(SolutionDir)workingdir32

Computer Vision, Js Hsu

Example 1
Load, Show, and Save an Image

Computer Vision, Js Hsu

Exercise 1
OpenCV

Hint :
cvtColor ( input image , output image , CV_BGR2GRAY )

Computer Vision, Js Hsu

openCV
BGR

Computer Vision, Js Hsu

Example 2 RGB split

BGR

Hint : split( Mat input , vector<Mat> output )


Computer Vision, Js Hsu

Exercise 2
OpenCV
Split

Computer Vision, Js Hsu

Computer Vision, Js Hsu

Example 3 Image blur

Hint : blur( Mat input , Mat output


, winsize )
Computer Vision, Js Hsu

You might also like