1 / 19

Introduction to O penCV

Introduction to O penCV. Dr. Chung- Hao Chen Haole Guo Sep 2011. Index. What is OpenCV ? What can OpenCV do ? How to setup OpenCV ?. What is OpenCV ?. OpenCV is a based on C / C + + language, open source image processing library Develop by Inter Free to use.

waylon
Download Presentation

Introduction to O penCV

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to OpenCV Dr. Chung-Hao Chen HaoleGuo Sep 2011

  2. Index • What is OpenCV ? • What can OpenCVdo ? • How to setup OpenCV ?

  3. What is OpenCV? • OpenCVis a based on C / C + + language, open source image processing library • Develop by Inter • Free to use

  4. What can OpenCVdo ? • Image data manipulation • Image and video I/O • Matrix and vector manipulation and linear algebra routines • Various dynamic data structures • Basic image processing • Structural • Camera calibration • Motion analysis • Object recognition • Basic GUI • Image labeling

  5. How to setup openCV ? Downlinks: 1. OpenCVlib http://sourceforge.net/projects/opencvlibrary/files/ 2.VS2008 http://www.microsoft.com/express/product/default.aspx 3.Codeblock http://www.codeblocks.org/ 4. Cmake http://www.cmake.org/cmake/resources/software.html

  6. Download OpenCVand install • Download the OpenCV 2.1.0 Windows installer from SourceForge - "OpenCV-2.1.0-win32-vs2008.exe". • Install it to a folder (without any spaces in it), say "C:\OpenCV2.1\". This article will refer to this path as $openCVDir • During installation, enable the option "Add OpenCV to the system PATH for all users".

  7. Setup OpenCVin VS2008 1. Configure Visual Studio • Open VC++ Directories configuration: Tools > Options > Projects and Solutions > VC++ Directories • Choose "Show directories for: Include files" • Add "$openCVDir\include\opencv" • Choose "Show directories for: Library files" • Add "$openCVDir\lib" • Choose "Show directories for: Source files" • Add "$openCVDir\src\cv" • Add "$openCVDir\src\cvaux" • Add "$openCVDir\src\cxcore" • Add "$openCVDir\src\highgui"

  8. Setup OpenCVin VS2008 2. Configure your Project • After you've created a project you'll need to add the OpenCV dependencies. • Open Project Properties: Project > %projectName% Properties... • Open Linker Input properties: Configuration Properties > Linker > Input • Open the "..." window to edit "Additional Dependencies" and on each line put: • "cv210.lib" • "cxcore210.lib" • "highgui210.lib" • And any other lib file necessary for your project • Your project should now build. If you get any errors try restarting Visual Studio and then doing a clean Rebuild.

  9. Setup openCV in VS2008 3. Support video on youtube http://www.youtube.com/watch?v=9nPpa_WiArI

  10. Setup openCV in Codeblock 1.Build project

  11. Setup OpenCV in Codeblock 2.Name and address

  12. Setup openCV in codeblock 3.Write a test program

  13. Setup openCV in codeblock Sample program • #include "cv.h" • #include "highgui.h"   • int main( intargc, char** argv ) • { • IplImage* pImg; • if( argc == 2 && • (pImg = cvLoadImage( argv[1], 1)) != 0 ) • { cvNamedWindow( "Image", 1 ); • cvShowImage( "Image", pImg ); • cvWaitKey(0); • cvDestroyWindow( "Image" ); • cvReleaseImage( &pImg ); • return 0; • }   • return -1; • }

  14. Setup openCV in codeblock 4. Go setup build options

  15. Setup openCV in codeblock 5.Build option- search directories - complier

  16. Setup openCV in codeblock 6.Build option – search directories - linker

  17. Setup openCV in codeblock 7.Build option – linker settings

  18. Setup openCV in codeblock 8. Setup input image

  19. Setup openCV in codeblock 9.Result output:

More Related