How to do quick user assign in kanban in Odoo 17 ERP
Introduction to OpenCV 2.3.1
1. Computer Vision
OpenCV
Luigi De Russis
Politecnico di Torino
Dipartimento di Automatica e Informatica (DAUIN)
Torino - Italy
luigi.derussis@polito.it
This 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. 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. 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. 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. 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. OpenCV modules (III)
ml
machine learning classes used for statistical
classification, regression and clustering of data
gpu
GPU-accelerated algorithms
11/09/2011 Luigi De Russis - Computer Vision - OpenCV 6
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 values
11/09/2011 Luigi De Russis - Computer Vision - OpenCV 7
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.cpp
11/09/2011 Luigi De Russis - Computer Vision - OpenCV 8
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_video231d
11/09/2011 Luigi De Russis - Computer Vision - OpenCV 9
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. Demo Hour (IV)
Now, press “Run”…
11/09/2011 Luigi De Russis - Computer Vision - OpenCV 11
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.pdf
11/09/2011 Luigi De Russis - Computer Vision - OpenCV 12