SlideShare a Scribd company logo
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/
What is OpenCV?
    Open source Computer Vision library
            http://opencv.org/
    Originally developed by Intel
    Has more than 2500 optimized algorithms
    C/C++/Python API
            it is written natively in C++
    Cross-platform
                                                                               includes a
            also available for Android and iOS
                                                                                Java API
    Released under a BSD license (it’s free)
    Current release version: 2.4.3RC (October 2012)
10/26/2012                        Luigi De Russis - Computer Vision - OpenCV            2
Various applications…
    Human-Computer Interaction (HCI)
    Object Identification
    Object Recognition
    Face Recognition
    Gesture Recognition
    Motion Tracking
    Image Processing
    Mobile Robotics
    … and so on.

10/26/2012          Luigi De Russis - Computer Vision - OpenCV   3
Why OpenCV? (I)
    Best competitor here: Matlab
    Pros
            Specific
                OpenCV was made for image processing
                Matlab is quite generic
            Speed
                around 30 frames processed per seconds in real time image
                 processing (OpenCV)
                around 4-5 frames processed per seconds in real time image
                 processing (Matlab)
            Efficient
                Matlab needs more system resources than OpenCV
10/26/2012                      Luigi De Russis - Computer Vision - OpenCV    4
Why OpenCV? (II)
    Cons
            Easy of use
            Integrated Development Environment
                you can use Eclipse, Netbeans, Visual Studio, Qt, XCode, … a
                 simple text editor for OpenCV
            Memory management
    Two more “pros”…
            Price (!)
            OpenCV Wrappers
                SimpleCV, JavaCV, Emgu CV, JavacvPro, …



10/26/2012                      Luigi De Russis - Computer Vision - OpenCV      5
Modules (I)
    OpenCV has a modular structure, i.e., the package
     includes several shared or static libraries:
            core
                basic structures and algorithms
            imgproc
                Image Processing algorithms (such as image filtering,
                 geometrical image transformations, histograms, etc.)
            video
                video analysis (such as motion estimation and object tracking)
            highgui
                built-in simple UI
                in addition, we will use Qt
10/26/2012                        Luigi De Russis - Computer Vision - OpenCV      6
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, …)
            ml
                 machine learning classes used for statistical classification,
                  regression and clustering of data
            gpu
                 GPU-accelerated algorithms
10/26/2012                         Luigi De Russis - Computer Vision - OpenCV      7
Data structures (I)
    We speak about C++ API
    All the OpenCV classes and functions are placed
     into the cv namespace
    Mat
            the primary image structure in OpenCV 2.x
            overcomes the “old” IplImage/CvMat problems
             (OpenCV 1.x/C API)
            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
10/26/2012                       Luigi De Russis - Computer Vision - OpenCV   8
Data structures (II)
    Point_ (Point2f, Point, Point2d)
            2D point
            defined by x, y coordinates
                Point first(2, 3);
    Size_ (Size, Size2f)
            2D size structure
            specify the size (width and height) of an image or
             rectangle
    Rect
            2D rectangle object

10/26/2012                   Luigi De Russis - Computer Vision - OpenCV   9
Image I/O
    Image I/O
            imread
                legge un’immagine da file e lo salva in un oggetto di tipo Mat
                 Mat imread(const string& filename, int flags=1)
            imwrite
                salva un’immagine su file
                 bool imwrite(const string& filename, InputArray img,
                 const vector<int>& params=vector<int>())
            imshow
                mostra un’immagine a schermo (in una finestra creata
                 precedentemente)
                 void imshow(const string& winname, InputArray mat)


10/26/2012                       Luigi De Russis - Computer Vision - OpenCV       10
Drawing operations
    Base drawing operations
            circle
                draws a simple or filled circle with a given center and radius on a
                 given image
            line
                draws a line between two point in the given image
            ellipse
                draws an ellipse outline, a filled ellipse, an elliptic arc, a filled
                 ellipse sector, …
            rectangle
                draws a rectangle outline or a filled rectangle
                note that negative thickness will fill the rectangle
10/26/2012                         Luigi De Russis - Computer Vision - OpenCV            11
Color spaces
    Converting color spaces
            cvtColor
                converts an input image from one color space to another
                examples:
                    cvtColor(src, dest, CV_RGB2GRAY);
                    cvtColor(src, dest, CV_HSV2BGR);
                    cvtColor(src, dest, CV_RGB2BGR);
            important, since images in OpenCV uses BGR instead of
             RGB




10/26/2012                       Luigi De Russis - Computer Vision - OpenCV   12
How we can use OpenCV?
    LABINF:
       already installed under Windows
      version 2.3.1

      Qt Creator (4.7.4) is the IDE to be used

    At home:
            feel free to install OpenCV version 2.4.3
                it should be more “stable”
            you can use whatever IDE you like
                but we give full support only for Qt Creator
    Installation:
            see the next set of slides for a step-by-step guide


10/26/2012                           Luigi De Russis - Computer Vision - OpenCV   13
What if I got problems?
    Small problems
            drop me a line                          Problems with Qt and a gray scale image

                luigi.derussis@polito.it
                                                     Awesome student to me

    Normal problems                                  Hi,
                                                      […] I’m using “cvtColor(image, gray, CV_BGR2GRAY);” and Indexed8 to convert an image in
                                                      gray scale but the image is not shown in Qt…

            come to office hours                     Can you help me?

                                                      Regards,
                                                      …
                every Tuesday, 9:00 - 11:00
                LAB6, second floor of DAUIN
                please send an e-mail beforehand
    Enormous problems
            come to the dedicated lessons
                Tuesday 30th October, 9:30-12:30, DAUIN
                Thursday 8th November, 15:00-18:00, DAUIN
10/26/2012                        Luigi De Russis - Computer Vision - OpenCV                                                                    14
What if I got problems?
                                                 OpenCV installation


    Small problems                              Not-So-Awesome student to me

            drop me a line                       Hi,
                                                  […] I followed the guide for installing OpenCV on my Mac but I have an error after step 3. Can
                                                  we meet on next Tuesday to solve the problem?
                luigi.derussis@polito.it         Thanks!

                                                  Regards,

    Normal problems                              …




            come to office hours
                every Tuesday, 9:00 - 11:00
                LAB6, second floor of DAUIN
                please send an e-mail beforehand
    Enormous problems
            come to the dedicated lessons
                Tuesday 30th October, 9:30-12:30, DAUIN
                Thursday 8th November, 15:00-18:00, DAUIN
10/26/2012                        Luigi De Russis - Computer Vision - OpenCV                                                                       15
What if I got problems?
    Small problems
            drop me a line
                luigi.derussis@polito.it
    Normal problems                             Help with OpenCV



            come to office hours                Good student to me

                                                  Hi,
                every Tuesday, 9:00 - 11:00      […] I see the solution of Exercise 2.1 but I don’t understand the following expressions:
                                                  -   main();
                                                  -   int* number;
                LAB6, second floor of DAUIN      -   &timer.
                                                  Can you explain to me what they are?


                please send an e-mail beforehand Regards,
                                                  …




    Enormous problems
            come to the dedicated lessons
                Tuesday 30th October, 9:30-12:30, DAUIN
                Thursday 8th November, 15:00-18:00, DAUIN
10/26/2012                        Luigi De Russis - Computer Vision - OpenCV                                                                 16
An mail not to be sent!!!




10/26/2012   Luigi De Russis - Computer Vision - OpenCV   17
Resources
   OpenCV Wiki
        http://code.opencv.org/projects/opencv/wiki
   OpenCV 2.x Official Documentation
        http://docs.opencv.org/
   User Q&A forum
        http://answers.opencv.org/questions/
   OpenCV 2.x Tutorials
        http://docs.opencv.org/opencv_tutorials.pdf


   Books:
        Robert Laganière, OpenCV 2 Computer Vision Application Programming
         Cookbook, Packt Publishing, ISBN 978-1849513241
        Gary Bradsky, Adrian Kaehler, Learning OpenCV: Computer Vision in C++ with
         the OpenCV Library, O'Reilly Media, ISBN 978-1449314651 (to be published)


10/26/2012                         Luigi De Russis - Computer Vision - OpenCV         18
License
  This work is licensed under the Creative Commons
  “Attribution-NonCommercial-ShareAlike Unported (CC BY-
  NC-SA 3,0)” License.
  You are free:
            to Share - to copy, distribute and transmit the work
            to Remix - to adapt the work
  Under the following conditions:
            Attribution - You must attribute the work in the manner
             specified by the author or licensor (but not in any way that
             suggests that they endorse you or your use of the work).
            Noncommercial - You may not use this work for commercial
             purposes.
            Share Alike - If you alter, transform, or build upon this work,
             you may distribute the resulting work only under the same or
             similar license to this one.

26/10/2012                    Luigi De Russis - Computer Vision - OpenCV       19

More Related Content

What's hot

Computer Vision
Computer VisionComputer Vision
Computer Vision
Ameer Mohamed Rajah
 
Hog and sift
Hog and siftHog and sift
Hog and sift
AnandShinde47
 
Application of image processing
Application of image processingApplication of image processing
Application of image processing
University of Potsdam
 
Opencv
OpencvOpencv
Opencv
Procheta Nag
 
Introduction to object detection
Introduction to object detectionIntroduction to object detection
Introduction to object detection
Brodmann17
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
Inamul Hossain Imran
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
Rajamanickam Gomathijayam
 
openCV with python
openCV with pythonopenCV with python
openCV with python
Wei-Wen Hsu
 
Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2
Iftikhar Ahmad
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
ArtiKhanchandani
 
Image recognition
Image recognitionImage recognition
Image recognition
Nikhil Singh
 
Google Media Pipe and Computer Vision
Google Media Pipe and Computer VisionGoogle Media Pipe and Computer Vision
Google Media Pipe and Computer Vision
Matias Iacono
 
raycasting. ppt
raycasting. pptraycasting. ppt
raycasting. ppt
Rashun Kumar R
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
vikas dhakane
 
GAN - Theory and Applications
GAN - Theory and ApplicationsGAN - Theory and Applications
GAN - Theory and Applications
Emanuele Ghelfi
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Simplilearn
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
Bulbul Agrawal
 
Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.
SomitSamanto1
 
Machine learning in image processing
Machine learning in image processingMachine learning in image processing
Machine learning in image processing
Data Science Thailand
 

What's hot (20)

Edge detection
Edge detectionEdge detection
Edge detection
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
Hog and sift
Hog and siftHog and sift
Hog and sift
 
Application of image processing
Application of image processingApplication of image processing
Application of image processing
 
Opencv
OpencvOpencv
Opencv
 
Introduction to object detection
Introduction to object detectionIntroduction to object detection
Introduction to object detection
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 
openCV with python
openCV with pythonopenCV with python
openCV with python
 
Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
Image recognition
Image recognitionImage recognition
Image recognition
 
Google Media Pipe and Computer Vision
Google Media Pipe and Computer VisionGoogle Media Pipe and Computer Vision
Google Media Pipe and Computer Vision
 
raycasting. ppt
raycasting. pptraycasting. ppt
raycasting. ppt
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
GAN - Theory and Applications
GAN - Theory and ApplicationsGAN - Theory and Applications
GAN - Theory and Applications
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.
 
Machine learning in image processing
Machine learning in image processingMachine learning in image processing
Machine learning in image processing
 

Viewers also liked

OpenCV 3.0 - Latest news and the Roadmap
OpenCV 3.0 - Latest news and the RoadmapOpenCV 3.0 - Latest news and the Roadmap
OpenCV 3.0 - Latest news and the RoadmapEugene Khvedchenya
 
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming..."The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
Edge AI and Vision Alliance
 
Installing OpenCV 2.4.x with Qt
Installing OpenCV 2.4.x with QtInstalling OpenCV 2.4.x with Qt
Installing OpenCV 2.4.x with QtLuigi De Russis
 
Looking into the past - feature extraction from historic maps using Python, O...
Looking into the past - feature extraction from historic maps using Python, O...Looking into the past - feature extraction from historic maps using Python, O...
Looking into the past - feature extraction from historic maps using Python, O...
James Crone
 
Introduction to OpenCV with python (at taichung.py)
Introduction to OpenCV with python (at taichung.py)Introduction to OpenCV with python (at taichung.py)
Introduction to OpenCV with python (at taichung.py)
Max Lai
 
How to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDKHow to Build & Use OpenCL on OpenCV & Android NDK
Using openCV 3.1.0 with vs2015
Using openCV 3.1.0 with vs2015Using openCV 3.1.0 with vs2015
Using openCV 3.1.0 with vs2015
Wei-Wen Hsu
 
Using openCV 2.0 with Dev C++
Using openCV 2.0 with Dev C++Using openCV 2.0 with Dev C++
Using openCV 2.0 with Dev C++
Wei-Wen Hsu
 
Guide: How to Build OpenCV 3.0.0
Guide: How to Build OpenCV 3.0.0Guide: How to Build OpenCV 3.0.0
Guide: How to Build OpenCV 3.0.0
André Moreira
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)
Luigi De Russis
 
Face Recognition with OpenCV and scikit-learn
Face Recognition with OpenCV and scikit-learnFace Recognition with OpenCV and scikit-learn
Face Recognition with OpenCV and scikit-learn
Shiqiao Du
 
OpenCV Workshop
OpenCV WorkshopOpenCV Workshop
OpenCV Workshop
Lentin Joseph
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
Edge AI and Vision Alliance
 
Computer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCVComputer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCV
Farshid Pirahansiah
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection System
Abhiroop Ghatak
 
Using openCV 3.2.0 with CodeBlocks
Using openCV 3.2.0 with CodeBlocksUsing openCV 3.2.0 with CodeBlocks
Using openCV 3.2.0 with CodeBlocks
Wei-Wen Hsu
 
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit, Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Farshid Pirahansiah
 

Viewers also liked (17)

OpenCV 3.0 - Latest news and the Roadmap
OpenCV 3.0 - Latest news and the RoadmapOpenCV 3.0 - Latest news and the Roadmap
OpenCV 3.0 - Latest news and the Roadmap
 
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming..."The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
"The OpenCV Open Source Computer Vision Library: What’s New and What’s Coming...
 
Installing OpenCV 2.4.x with Qt
Installing OpenCV 2.4.x with QtInstalling OpenCV 2.4.x with Qt
Installing OpenCV 2.4.x with Qt
 
Looking into the past - feature extraction from historic maps using Python, O...
Looking into the past - feature extraction from historic maps using Python, O...Looking into the past - feature extraction from historic maps using Python, O...
Looking into the past - feature extraction from historic maps using Python, O...
 
Introduction to OpenCV with python (at taichung.py)
Introduction to OpenCV with python (at taichung.py)Introduction to OpenCV with python (at taichung.py)
Introduction to OpenCV with python (at taichung.py)
 
How to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDKHow to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDK
 
Using openCV 3.1.0 with vs2015
Using openCV 3.1.0 with vs2015Using openCV 3.1.0 with vs2015
Using openCV 3.1.0 with vs2015
 
Using openCV 2.0 with Dev C++
Using openCV 2.0 with Dev C++Using openCV 2.0 with Dev C++
Using openCV 2.0 with Dev C++
 
Guide: How to Build OpenCV 3.0.0
Guide: How to Build OpenCV 3.0.0Guide: How to Build OpenCV 3.0.0
Guide: How to Build OpenCV 3.0.0
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)
 
Face Recognition with OpenCV and scikit-learn
Face Recognition with OpenCV and scikit-learnFace Recognition with OpenCV and scikit-learn
Face Recognition with OpenCV and scikit-learn
 
OpenCV Workshop
OpenCV WorkshopOpenCV Workshop
OpenCV Workshop
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
 
Computer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCVComputer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCV
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection System
 
Using openCV 3.2.0 with CodeBlocks
Using openCV 3.2.0 with CodeBlocksUsing openCV 3.2.0 with CodeBlocks
Using openCV 3.2.0 with CodeBlocks
 
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit, Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
 

Similar to Introduction to OpenCV

Introduction to OpenCV 2.3.1
Introduction to OpenCV 2.3.1Introduction to OpenCV 2.3.1
Introduction to OpenCV 2.3.1
Luigi De Russis
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
Vishwas459764
 
Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)
Luigi De Russis
 
Image Detection and Count Using Open Computer Vision (Opencv)
Image Detection and Count Using Open Computer Vision (Opencv)Image Detection and Count Using Open Computer Vision (Opencv)
Image Detection and Count Using Open Computer Vision (Opencv)
IJERA Editor
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCVAutomatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV
Editor IJCATR
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV
Editor IJCATR
 
Image Processing In Open CV. Image Processing In Open CV. Image Processing In...
Image Processing In Open CV. Image Processing In Open CV. Image Processing In...Image Processing In Open CV. Image Processing In Open CV. Image Processing In...
Image Processing In Open CV. Image Processing In Open CV. Image Processing In...
Antoinette Williams
 
Intro_OpenCV.ppt
Intro_OpenCV.pptIntro_OpenCV.ppt
Intro_OpenCV.ppt
RithikRaj25
 
Implementation of embedded arm9 platform using qt and open cv for human upper...
Implementation of embedded arm9 platform using qt and open cv for human upper...Implementation of embedded arm9 platform using qt and open cv for human upper...
Implementation of embedded arm9 platform using qt and open cv for human upper...
Krunal Patel
 
On technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyondOn technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyond
dividiti
 
BEST IMAGE PROCESSING TOOLS TO EXPECT in 2023 – Tutors India
BEST IMAGE PROCESSING TOOLS TO EXPECT in 2023 – Tutors IndiaBEST IMAGE PROCESSING TOOLS TO EXPECT in 2023 – Tutors India
BEST IMAGE PROCESSING TOOLS TO EXPECT in 2023 – Tutors India
Tutors India
 
OpenCV (Open source computer vision)
OpenCV (Open source computer vision)OpenCV (Open source computer vision)
OpenCV (Open source computer vision)
Chetan Allapur
 
Corey.Berry.Portfolio.2016
Corey.Berry.Portfolio.2016Corey.Berry.Portfolio.2016
Corey.Berry.Portfolio.2016Corey Berry
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
Mark Kilgard
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
Oğul Göçmen
 
lec1b.ppt
lec1b.pptlec1b.ppt
lec1b.ppt
RithikRaj25
 
16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx
ssuser90e017
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1
benDesigning
 
Finding Resource Manipulation Bugs in Linux Code
Finding Resource Manipulation Bugs in Linux CodeFinding Resource Manipulation Bugs in Linux Code
Finding Resource Manipulation Bugs in Linux Code
Andrzej Wasowski
 

Similar to Introduction to OpenCV (20)

Introduction to OpenCV 2.3.1
Introduction to OpenCV 2.3.1Introduction to OpenCV 2.3.1
Introduction to OpenCV 2.3.1
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
 
Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)
 
Image Detection and Count Using Open Computer Vision (Opencv)
Image Detection and Count Using Open Computer Vision (Opencv)Image Detection and Count Using Open Computer Vision (Opencv)
Image Detection and Count Using Open Computer Vision (Opencv)
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCVAutomatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV
 
Portfolio
PortfolioPortfolio
Portfolio
 
Image Processing In Open CV. Image Processing In Open CV. Image Processing In...
Image Processing In Open CV. Image Processing In Open CV. Image Processing In...Image Processing In Open CV. Image Processing In Open CV. Image Processing In...
Image Processing In Open CV. Image Processing In Open CV. Image Processing In...
 
Intro_OpenCV.ppt
Intro_OpenCV.pptIntro_OpenCV.ppt
Intro_OpenCV.ppt
 
Implementation of embedded arm9 platform using qt and open cv for human upper...
Implementation of embedded arm9 platform using qt and open cv for human upper...Implementation of embedded arm9 platform using qt and open cv for human upper...
Implementation of embedded arm9 platform using qt and open cv for human upper...
 
On technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyondOn technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyond
 
BEST IMAGE PROCESSING TOOLS TO EXPECT in 2023 – Tutors India
BEST IMAGE PROCESSING TOOLS TO EXPECT in 2023 – Tutors IndiaBEST IMAGE PROCESSING TOOLS TO EXPECT in 2023 – Tutors India
BEST IMAGE PROCESSING TOOLS TO EXPECT in 2023 – Tutors India
 
OpenCV (Open source computer vision)
OpenCV (Open source computer vision)OpenCV (Open source computer vision)
OpenCV (Open source computer vision)
 
Corey.Berry.Portfolio.2016
Corey.Berry.Portfolio.2016Corey.Berry.Portfolio.2016
Corey.Berry.Portfolio.2016
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
 
lec1b.ppt
lec1b.pptlec1b.ppt
lec1b.ppt
 
16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1
 
Finding Resource Manipulation Bugs in Linux Code
Finding Resource Manipulation Bugs in Linux CodeFinding Resource Manipulation Bugs in Linux Code
Finding Resource Manipulation Bugs in Linux Code
 

More from Luigi De Russis

Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric SpeechAssessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Luigi De Russis
 
Semantic Web: an Introduction
Semantic Web: an IntroductionSemantic Web: an Introduction
Semantic Web: an Introduction
Luigi De Russis
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
Luigi De Russis
 
Semantic Web - Ontology 101
Semantic Web - Ontology 101Semantic Web - Ontology 101
Semantic Web - Ontology 101
Luigi De Russis
 
AmI 2017 - Python intermediate
AmI 2017 - Python intermediateAmI 2017 - Python intermediate
AmI 2017 - Python intermediate
Luigi De Russis
 
AmI 2017 - Python basics
AmI 2017 - Python basicsAmI 2017 - Python basics
AmI 2017 - Python basics
Luigi De Russis
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
AmI 2016 - Python basics
AmI 2016 - Python basicsAmI 2016 - Python basics
AmI 2016 - Python basics
Luigi De Russis
 
Ambient Intelligence: An Overview
Ambient Intelligence: An OverviewAmbient Intelligence: An Overview
Ambient Intelligence: An Overview
Luigi De Russis
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Luigi De Russis
 
LAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks TechnologiesLAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks Technologies
Luigi De Russis
 
AmI 2015 - Python basics
AmI 2015 - Python basicsAmI 2015 - Python basics
AmI 2015 - Python basics
Luigi De Russis
 
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
Luigi De Russis
 
Interacting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis PresentationInteracting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis Presentation
Luigi De Russis
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
Luigi De Russis
 
Living in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD ReportLiving in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD Report
Luigi De Russis
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
Luigi De Russis
 
Social Network Technologies
Social Network TechnologiesSocial Network Technologies
Social Network Technologies
Luigi De Russis
 
Clean Code
Clean CodeClean Code
Clean Code
Luigi De Russis
 
Living in Smart Environments - 2nd year PhD Report
Living in Smart Environments - 2nd year PhD ReportLiving in Smart Environments - 2nd year PhD Report
Living in Smart Environments - 2nd year PhD Report
Luigi De Russis
 

More from Luigi De Russis (20)

Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric SpeechAssessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
 
Semantic Web: an Introduction
Semantic Web: an IntroductionSemantic Web: an Introduction
Semantic Web: an Introduction
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
 
Semantic Web - Ontology 101
Semantic Web - Ontology 101Semantic Web - Ontology 101
Semantic Web - Ontology 101
 
AmI 2017 - Python intermediate
AmI 2017 - Python intermediateAmI 2017 - Python intermediate
AmI 2017 - Python intermediate
 
AmI 2017 - Python basics
AmI 2017 - Python basicsAmI 2017 - Python basics
AmI 2017 - Python basics
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
 
AmI 2016 - Python basics
AmI 2016 - Python basicsAmI 2016 - Python basics
AmI 2016 - Python basics
 
Ambient Intelligence: An Overview
Ambient Intelligence: An OverviewAmbient Intelligence: An Overview
Ambient Intelligence: An Overview
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
LAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks TechnologiesLAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks Technologies
 
AmI 2015 - Python basics
AmI 2015 - Python basicsAmI 2015 - Python basics
AmI 2015 - Python basics
 
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
 
Interacting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis PresentationInteracting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis Presentation
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
 
Living in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD ReportLiving in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD Report
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
 
Social Network Technologies
Social Network TechnologiesSocial Network Technologies
Social Network Technologies
 
Clean Code
Clean CodeClean Code
Clean Code
 
Living in Smart Environments - 2nd year PhD Report
Living in Smart Environments - 2nd year PhD ReportLiving in Smart Environments - 2nd year PhD Report
Living in Smart Environments - 2nd year PhD Report
 

Recently uploaded

The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 

Recently uploaded (20)

The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 

Introduction to OpenCV

  • 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  http://opencv.org/  Originally developed by Intel  Has more than 2500 optimized algorithms  C/C++/Python API  it is written natively in C++  Cross-platform includes a  also available for Android and iOS Java API  Released under a BSD license (it’s free)  Current release version: 2.4.3RC (October 2012) 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 2
  • 3. Various applications…  Human-Computer Interaction (HCI)  Object Identification  Object Recognition  Face Recognition  Gesture Recognition  Motion Tracking  Image Processing  Mobile Robotics  … and so on. 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 3
  • 4. Why OpenCV? (I)  Best competitor here: Matlab  Pros  Specific  OpenCV was made for image processing  Matlab is quite generic  Speed  around 30 frames processed per seconds in real time image processing (OpenCV)  around 4-5 frames processed per seconds in real time image processing (Matlab)  Efficient  Matlab needs more system resources than OpenCV 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 4
  • 5. Why OpenCV? (II)  Cons  Easy of use  Integrated Development Environment  you can use Eclipse, Netbeans, Visual Studio, Qt, XCode, … a simple text editor for OpenCV  Memory management  Two more “pros”…  Price (!)  OpenCV Wrappers  SimpleCV, JavaCV, Emgu CV, JavacvPro, … 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 5
  • 6. Modules (I)  OpenCV has a modular structure, i.e., the package includes several shared or static libraries:  core  basic structures and algorithms  imgproc  Image Processing algorithms (such as image filtering, geometrical image transformations, histograms, etc.)  video  video analysis (such as motion estimation and object tracking)  highgui  built-in simple UI  in addition, we will use Qt 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 6
  • 7. 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, …)  ml  machine learning classes used for statistical classification, regression and clustering of data  gpu  GPU-accelerated algorithms 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 7
  • 8. Data structures (I)  We speak about C++ API  All the OpenCV classes and functions are placed into the cv namespace  Mat  the primary image structure in OpenCV 2.x  overcomes the “old” IplImage/CvMat problems (OpenCV 1.x/C API)  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 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 8
  • 9. Data structures (II)  Point_ (Point2f, Point, Point2d)  2D point  defined by x, y coordinates  Point first(2, 3);  Size_ (Size, Size2f)  2D size structure  specify the size (width and height) of an image or rectangle  Rect  2D rectangle object 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 9
  • 10. Image I/O  Image I/O  imread  legge un’immagine da file e lo salva in un oggetto di tipo Mat Mat imread(const string& filename, int flags=1)  imwrite  salva un’immagine su file bool imwrite(const string& filename, InputArray img, const vector<int>& params=vector<int>())  imshow  mostra un’immagine a schermo (in una finestra creata precedentemente) void imshow(const string& winname, InputArray mat) 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 10
  • 11. Drawing operations  Base drawing operations  circle  draws a simple or filled circle with a given center and radius on a given image  line  draws a line between two point in the given image  ellipse  draws an ellipse outline, a filled ellipse, an elliptic arc, a filled ellipse sector, …  rectangle  draws a rectangle outline or a filled rectangle  note that negative thickness will fill the rectangle 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 11
  • 12. Color spaces  Converting color spaces  cvtColor  converts an input image from one color space to another  examples:  cvtColor(src, dest, CV_RGB2GRAY);  cvtColor(src, dest, CV_HSV2BGR);  cvtColor(src, dest, CV_RGB2BGR);  important, since images in OpenCV uses BGR instead of RGB 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 12
  • 13. How we can use OpenCV?  LABINF:  already installed under Windows  version 2.3.1  Qt Creator (4.7.4) is the IDE to be used  At home:  feel free to install OpenCV version 2.4.3  it should be more “stable”  you can use whatever IDE you like  but we give full support only for Qt Creator  Installation:  see the next set of slides for a step-by-step guide 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 13
  • 14. What if I got problems?  Small problems  drop me a line Problems with Qt and a gray scale image  luigi.derussis@polito.it Awesome student to me  Normal problems Hi, […] I’m using “cvtColor(image, gray, CV_BGR2GRAY);” and Indexed8 to convert an image in gray scale but the image is not shown in Qt…  come to office hours Can you help me? Regards, …  every Tuesday, 9:00 - 11:00  LAB6, second floor of DAUIN  please send an e-mail beforehand  Enormous problems  come to the dedicated lessons  Tuesday 30th October, 9:30-12:30, DAUIN  Thursday 8th November, 15:00-18:00, DAUIN 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 14
  • 15. What if I got problems? OpenCV installation  Small problems Not-So-Awesome student to me  drop me a line Hi, […] I followed the guide for installing OpenCV on my Mac but I have an error after step 3. Can we meet on next Tuesday to solve the problem?  luigi.derussis@polito.it Thanks! Regards,  Normal problems …  come to office hours  every Tuesday, 9:00 - 11:00  LAB6, second floor of DAUIN  please send an e-mail beforehand  Enormous problems  come to the dedicated lessons  Tuesday 30th October, 9:30-12:30, DAUIN  Thursday 8th November, 15:00-18:00, DAUIN 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 15
  • 16. What if I got problems?  Small problems  drop me a line  luigi.derussis@polito.it  Normal problems Help with OpenCV  come to office hours Good student to me Hi,  every Tuesday, 9:00 - 11:00 […] I see the solution of Exercise 2.1 but I don’t understand the following expressions: - main(); - int* number;  LAB6, second floor of DAUIN - &timer. Can you explain to me what they are?  please send an e-mail beforehand Regards, …  Enormous problems  come to the dedicated lessons  Tuesday 30th October, 9:30-12:30, DAUIN  Thursday 8th November, 15:00-18:00, DAUIN 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 16
  • 17. An mail not to be sent!!! 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 17
  • 18. Resources  OpenCV Wiki  http://code.opencv.org/projects/opencv/wiki  OpenCV 2.x Official Documentation  http://docs.opencv.org/  User Q&A forum  http://answers.opencv.org/questions/  OpenCV 2.x Tutorials  http://docs.opencv.org/opencv_tutorials.pdf  Books:  Robert Laganière, OpenCV 2 Computer Vision Application Programming Cookbook, Packt Publishing, ISBN 978-1849513241  Gary Bradsky, Adrian Kaehler, Learning OpenCV: Computer Vision in C++ with the OpenCV Library, O'Reilly Media, ISBN 978-1449314651 (to be published) 10/26/2012 Luigi De Russis - Computer Vision - OpenCV 18
  • 19. License This work is licensed under the Creative Commons “Attribution-NonCommercial-ShareAlike Unported (CC BY- NC-SA 3,0)” License. You are free:  to Share - to copy, distribute and transmit the work  to Remix - to adapt the work Under the following conditions:  Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).  Noncommercial - You may not use this work for commercial purposes.  Share Alike - If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. 26/10/2012 Luigi De Russis - Computer Vision - OpenCV 19