Professional Documents
Culture Documents
Luigi De Russis
Introduction to
OpenCV
OpenC what?
OpenCV in brief
Introduction to OpenCV
04/11/2014
What is OpenCV?
3
Cross platform
Introduction to OpenCV
04/11/2014
Introduction to OpenCV
04/11/2014
Motivations - OpenCV
Always ask why?
Introduction to OpenCV
04/11/2014
Why OpenCV?
6
vs.
Introduction to OpenCV
04/11/2014
OpenCV: pros
7
Specificity
OpenCV
Speed
30+
Efficiency
Matlab
Introduction to OpenCV
OpenCV: cons
8
Easy of use
Matlab
Memory management
Introduction to OpenCV
04/11/2014
Price (!)
OpenCV Wrappers
SimpleCV,
Introduction to OpenCV
04/11/2014
10
Motivation - Java
When Java meets OpenCV
Introduction to OpenCV
04/11/2014
Some facts
11
years
Introduction to OpenCV
04/11/2014
Introduction to OpenCV
04/11/2014
Introduction to OpenCV
04/11/2014
Introduction to OpenCV
04/11/2014
examples:
Introduction to OpenCV
04/11/2014
Question:
is
Introduction to OpenCV
04/11/2014
Question:
is
Response:
No,
obviously
Do you need a GUI? Go with JavaFX!
Do you have memory constraint? Go with C/C++!
Please, no extremism!
Introduction to OpenCV
04/11/2014
18
Introduction to OpenCV
04/11/2014
Modules
19
core
imgproc
video
Introduction to OpenCV
04/11/2014
Modules
20
highgui
calib3d
features2d
objdetect
Introduction to OpenCV
04/11/2014
Modules
21
ml
machine
gpu
GPU-accelerated
photo
computational
algorithms
photography
ccl
OpenCL-accelerated
Introduction to OpenCV
algorithms
04/11/2014
Data Structures
22
Introduction to OpenCV
04/11/2014
Data Structures
23
Point
2D point
defined by x, y coordinates
Size
2D size structure
specify the size (width and height) of an image or
rectangle
Rect
2D rectangle object
Introduction to OpenCV
04/11/2014
Highgui.imread
loads an image from file and return the corresponding Mat
object
Mat Highgui.imread(String filename,
int flags)
Highui.imwrite
Introduction to OpenCV
04/11/2014
Core.circle
draws a simple or filled circle with a given center and radius on a
given image
Core.line
draws a line between two point in the given image
Core.ellipse
draws an ellipse outline, a filled ellipse, an elliptic arc, a filled
ellipse sector,
Core.rectangle
draws a rectangle outline or a filled rectangle
note that negative thickness will fill the rectangle
Introduction to OpenCV
04/11/2014
Color Spaces
26
Imgproc.cvtColor
Introduction to OpenCV
04/11/2014
27
Introduction to OpenCV
04/11/2014
LABINF:
already
At home:
we
Installation:
see
Introduction to OpenCV
04/11/2014
Small problems
drop me a line
luigi.derussis@polito.it
Normal problems
Awesome student to me
Hi,
[] Im using cvtColor(image, gray, COLOR_BGR2GRAY); but it give this exception: []
Can you help me?
Regards,
Enormous problems
pray?
no, seriously, we can schedule an extra lesson
Introduction to OpenCV
04/11/2014
OpenCV installation
Small problems
drop me a line
luigi.derussis@polito.it
Normal problems
Not-So-Awesome student to me
Hi,
[] I followed the guide for installing OpenCV on my Mac but I have an error after step 3. Can
we meet on next Wednesday to solve the problem?
Thanks!
Regards,
Enormous problems
pray?
no, seriously, we can schedule an extra lesson
Introduction to OpenCV
04/11/2014
Small problems
drop me a line
luigi.derussis@polito.it
Normal problems
come to office hours
every Thursday, 16:00 - 17:30
my office is at the third floor of DAUIN (B side)
please send an e-mail beforehand
Good student to me
Hi,
[] I see the solution of Exercise 2.1 but I dont understand the following expressions:
main();
System.out.println();
@Override.
Can you explain to me what they are?
Enormous problems
Regards,
pray?
no, seriously, we can schedule an extra lesson
Introduction to OpenCV
04/11/2014
Introduction to OpenCV
04/11/2014
Useful Resources
33
OpenCV Wiki
http://answers.opencv.org/questions/
OpenCV Javadocs
http://docs.opencv.org/
http://code.opencv.org/projects/opencv/wiki
http://docs.opencv.org/java/
JavaFX Documentation
http://www.oracle.com/technetwork/java/javase/document
ation/javafx-docs-2159875.html
Introduction to OpenCV
04/11/2014
34
Demo Hour
Put everything together
Introduction to OpenCV
04/11/2014
License
35
This work is licensed under the Creative Commons AttributionNonCommercial-ShareAlike Unported (CC BY-NC-SA 3,0) License.
You are free:
Introduction to OpenCV
04/11/2014