Computer Vision         OpenCV                       Luigi De Russis                  Politecnico di TorinoDipartimento di...
What is OpenCV?    Open source Computer Vision library    Cross-platform    C/C++ API    Originally developed by Intel...
Uses    Human-Computer Interaction (HCI)    Object Identification    Object Recognition    Face Recognition    Gestur...
OpenCV modules (I)    core            basic structures and algorithms    imgproc            Image Processing algorithm...
OpenCV modules (II)    calib3d            camera calibration and 3D reconstruction    features2d            2D feature...
OpenCV modules (III)    ml            machine learning classes used for statistical             classification, regressi...
cv::Mat    cv            all the OpenCV classes and functions are placed into             the cv namespace    Mat     ...
Demo Hour (I): Hello CV    Goal: to load an image and show it    Project available on the course page    Two files:    ...
Demo Hour (II)    helloCV.pro, the Qt project file (the one to open!)            to modify/copy on each new OpenCV+Qt pr...
Demo Hour (III)    main.cpp, the code that loads and shows an image             …             //read an image            ...
Demo Hour (IV)    Now, press “Run”…11/09/2011        Luigi De Russis - Computer Vision - OpenCV   11
Resources   OpenCV (Full) Wiki    http://opencv.willowgarage.com/wiki/FullOpenCVWiki   OpenCV 2.3 Documentation http://o...
Upcoming SlideShare
Loading in …5
×

Introduction to OpenCV 2.3.1

7,742 views

Published on

A brief introduction to OpenCV 2.3.1 for the Computer Vision Course at Politecnico di Torino (academic year 2011/2012).

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
7,742
On SlideShare
0
From Embeds
0
Number of Embeds
26
Actions
Shares
0
Downloads
186
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to OpenCV 2.3.1

  1. 1. Computer Vision OpenCV Luigi De Russis Politecnico di TorinoDipartimento di Automatica e Informatica (DAUIN) Torino - Italy luigi.derussis@polito.itThis work is licensed under the Creative Commons (CC BY-SA) License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
  2. 2. What is OpenCV? Open source Computer Vision library Cross-platform C/C++ API Originally developed by Intel Optimized and intended for real-time applications  More than 500 functions available Current release version: 2.3.1 (August 2011) Website: http://opencv.willowgarage.com/11/09/2011 Luigi De Russis - Computer Vision - OpenCV 2
  3. 3. Uses Human-Computer Interaction (HCI) Object Identification Object Recognition Face Recognition Gesture Recognition Motion Tracking Image Processing Mobile Robotics … and so on.11/09/2011 Luigi De Russis - Computer Vision - OpenCV 3
  4. 4. OpenCV modules (I) core  basic structures and algorithms imgproc  Image Processing algorithms (such as image filtering, geometrical image transformations, histograms, etc.) highgui we will use Qt, in  built-in simple UI addition to it video  video analysis (such as motion estimation and object tracking)11/09/2011 Luigi De Russis - Computer Vision - OpenCV 4
  5. 5. OpenCV modules (II) calib3d  camera calibration and 3D reconstruction features2d  2D features framework (feature detectors, descriptors, and descriptor matchers) objdetect  detection of objects and other items (e.g., faces, eyes, mugs, people, …)11/09/2011 Luigi De Russis - Computer Vision - OpenCV 5
  6. 6. OpenCV modules (III) ml  machine learning classes used for statistical classification, regression and clustering of data gpu  GPU-accelerated algorithms11/09/2011 Luigi De Russis - Computer Vision - OpenCV 6
  7. 7. cv::Mat cv  all the OpenCV classes and functions are placed into the cv namespace Mat  the basic image structure in OpenCV  overcomes the “old” IplImage problems  automatic memory management (more or less)  two data parts:  matrix header (contains information about the matrix)  a pointer to the matrix containing the pixel values11/09/2011 Luigi De Russis - Computer Vision - OpenCV 7
  8. 8. Demo Hour (I): Hello CV Goal: to load an image and show it Project available on the course page Two files:  helloCV.pro  main.cpp11/09/2011 Luigi De Russis - Computer Vision - OpenCV 8
  9. 9. Demo Hour (II) helloCV.pro, the Qt project file (the one to open!)  to modify/copy on each new OpenCV+Qt project  two important variables has to be defined: INCLUDEPATH += path/to/opencv/include LIBS += -Lpath/to/opencv/library -lopencv_core231d -lopencv_highgui231d -lopencv_imgproc231d … -lopencv_video231d11/09/2011 Luigi De Russis - Computer Vision - OpenCV 9
  10. 10. Demo Hour (III) main.cpp, the code that loads and shows an image … //read an image cv::Mat image = cv::imread("image.jpg"); //create an image window named "Hello CV“ cv::namedWindow("Hello CV"); //now, show the image on window cv::imshow("Hello CV", image); …11/09/2011 Luigi De Russis - Computer Vision - OpenCV 10
  11. 11. Demo Hour (IV) Now, press “Run”…11/09/2011 Luigi De Russis - Computer Vision - OpenCV 11
  12. 12. Resources OpenCV (Full) Wiki http://opencv.willowgarage.com/wiki/FullOpenCVWiki OpenCV 2.3 Documentation http://opencv.itseez.com/ [Book] Robert Laganière, OpenCV 2 Computer Vision Application Programming Cookbook, Packt Publishing OpenCV User Group http://groups.yahoo.com/group/OpenCV/ OpenCV 2.3 Tutorials https://code.ros.org/trac/opencv/export/5642/trunk/opencv/doc/open cv_tutorials.pdf11/09/2011 Luigi De Russis - Computer Vision - OpenCV 12

×