Beruflich Dokumente
Kultur Dokumente
MATLAB
Agenda
Welcome and Introductions
Image Processing with MATLAB
MathWorks at a Glance
Earths topography
on a Miller
cylindrical
projection, created
with MATLAB and
Mapping Toolbox.
Headquarters:
Europe:
Worldwide training
Natick, Massachusetts U.S.
France, Germany, Italy,
and consulting
Netherlands, Spain, Sweden,
Other U.S. Locations:
Distributors serving
Switzerland, United Kingdom
California; Michigan;
more than 20 countries
Texas; Washington, D.C.
Asia-Pacific:
Australia, China, India,
Japan, Korea
3
MathWorks Today
Privately held
2800 employees worldwide
More than 1 million users in 175+
countries
Key Industries
High-level language
Development environment
Agenda
Welcome and Introductions
Image Processing with MATLAB
Medical imaging
Surveillance
Robotics
Automotive safety
Consumer electronics
Geospatial computing
Machine vision
and more
Files
Data Analysis
and Modeling
Software
Algorithm
Development
Share
Reporting and
Documentation
Hardware
Application
Development
Deployment
Automate
10
11
12
Algorithm Summary
Image Enhancement
Morphological Operators
Image Segmentation
Thresholding
Color Segmentation
Image Analysis
Object properties and statistics
13
14
Image Enhancement
Deblurring and Noise Removal
15
Image Registration
2-D & 3-D Image Alignment
16
17
19
Agenda
Welcome and Introductions
Image Processing with MATLAB
Edge
Corner
Template
SURF
MSER
21
7.
Image/video acquisition
Image/video pre-processing
Feature detection
Feature extraction
Feature matching
Using features
Stabilization, mosaicking
Stereo image rectification
Feature classification
Computer Vision
System Toolbox
Statistics Toolbox
22
23
24
Stereo calibration
Semi-global disparity matching
Better results than block matching
29
32
Automatically detects
checkerboard patterns
35
36
Agenda
Welcome and Introductions
Image Processing with MATLAB
Agenda
Welcome and Introductions
Image Processing with MATLAB
value
variable
structure
Data
(properties)
Explore
Automate
Re-use
class
(methods)
Algorithm
function
script
command line
41
43
Memory
Batch
Video
Algorithm
Source
Memory
Stream
Processing
44
i = 1;
Explicit state management
while i <= numFrames
opticalFlowIn(:,:,2:end) = opticalFlowIn(:,:,1:end-1);
opticalFlowIn(:,:,1) = read(myVid,i);
flow = opticalFlow(opticalFlowIn(:,:,1),opticalFlowIn(:,:,5),
horn-schunck,numIter,magitude-squared);
opticalFlowOutput(:,:,i) = flow;
i = i+1;
Explicit indexing
end
implay(opticalFlowOutput,30)
Needs a buffer
45
Object
initialization
optical = video.OpticalFlow
optical.Method = horn-schunck;
optical.OutputValue = Magitude-squared;
optical.ReferenceFrameDelay = 3;
optical.MaximumIterationCount = 10;
48
Agenda
Welcome and Introductions
Image Processing with MATLAB
50
51
Built-in multithreading
Automatically enabled in MATLAB since R2008a
Multiple threads in a single MATLAB computation engine
www.mathworks.com/discovery/multicore-matlab.html
52
CPU
GPU
# of Threads
10s 100s
100s 1000s
Thread Scheduler
Memory
Upgradability
Medium
High
Scalability
vs.
54
imhist
imnoise
imopen
imresize
imrotate
imshow
imtophat
imwarp
mean2
medfilt2
padarray
rgb2gray
55
Massively parallel:
Calculations can be broken into hundreds
or thousands of independent units of work
Problem size takes advantage of many GPU cores
Computationally intensive:
Computation time significantly exceeds CPU/GPU data transfer time
www.mathworks.com/products/parallel-computing/builtin-parallel-support.html
www.mathworks.com/help/distcomp/using-gpuarray.html#bsloua3-1
www.mathworks.com/help/distcomp/execute-matlab-code-elementwise-on-agpu.html#bsnx7h8-1
56
Example:
GPU Computing
Grid Size
CPU
(s)
GPU
(s)
Speedup
64 x 64
0.05
0.11
0.4
128 x 128
0.14
0.11
1.3
256 x 256
0.83
0.12
7.2
512 x 512
4.40
0.24
18.
1024 x 1024
18.8
0.82
23.
2048 x 2048
75.0
3.67
20.
60
61
Tim
e
Tim
e
blogs.mathworks.com/loren/2009/10/02/using-parfor-loops-getting-up-andrunning/
62
64
gpuBenchmark
65
Noisy Image
Filtered Image
http://hirise.lpl.arizona.edu/
From - NASA/JPL/University of Arizona
67
Converted for-loop
into parfor-loop
68
Offload computation:
Computer Cluster
Free up desktop
Access better computers
Cluster
Scale speed-up:
Use more cores
Go from hours to minutes
MATLAB
Desktop (Client)
Scheduler
Scale memory:
Utilize distributed arrays
Solve larger problems without re-coding algorithms
69
Work
MATLAB
Desktop (Client)
Worker
Worker
Worker
Result
Worker
batch()
71
Work
MATLAB
Desktop (Client)
Worker
Worker
Worker
Result
Worker
batch(,'Pool',)
72
11 26 41
12 27 42
13 28 43
14 29 44
Worker
15 30 45
MATLAB
Desktop (Client)
16 31 46
17 32 47
Worker
Worker
17 33 48
19 34 49
Worker
20 35 50
21 36 51
22 37 52
Distributed Array
Lives on the Workers
73
Agenda
Welcome and Introductions
Image Processing with MATLAB
Agenda
Welcome and Introductions
Image Processing with MATLAB
Files
Data Analysis
and Modeling
Software
Algorithm
Development
Share
Reporting and
Documentation
Hardware
Application
Development
Deployment
Automate
77
Publish reports
Package as an App
Deploy applications
Deploying C Code
78
Publish Reports
79
MATLAB apps
Interactive applications to perform
technical computing tasks
Displayed in apps gallery
Share applications
Creates desktop or web
software components
MATLAB Compiler
MATLAB
Builder EX
MATLAB
Builder JA
MATLAB
Builder NE
Requires MATLAB
Compiler Runtime
.exe
.dll
Excel
Java
Web
COM
.NET
81
Generate C code
High performance C code
with shared libraries
MATLAB Coder
.c
.lib
MATLAB Compiler
.exe
MATLAB Coder
.c
.dll
.exe
.lib
.dll
83
MATLAB Compiler
Builders, MPS
Web
Desktop
Readable
.dll
.exe
.c
.cpp
Portable
Excel
.NET
Java
.exe
84
padarray
bwmorph
bwlookup
conndef
fspecial
imcomplement
imfill
imhmax
imhmin
imreconstruct
imregionalmax
iptcheckconn
label2rgb
85
vision.ForegroundDetector
extractFeatures
matchFeatures
detectSURFFeatures
vision.CascadeObjectDetector
86
.lib
.dll
.c
+
.lib
MEX
e
at
r
i te
.exe
.lib
.dll
verify
/
a cce
lerate
MEX
88
.c
Output
MATLAB Compiler
MATLAB Coder
Executable or software
component/library
Full language
MATLAB support
Most toolboxes
Graphics
Runtime requirement
License model
Subset of language
Some toolboxes
MATLAB Compiler
Runtime
None
Royalty-free
Royalty-free
90
Deployment: Demos
91
Agenda
Welcome and Introductions
Image Processing with MATLAB
Embedded
Coder
Simulink
Coder
MATLAB
Coder
Simulink Coder
Automatically generate C and C++ from
Simulink models and Stateflow charts
for Rapid Prototyping and Hardware-inthe-Loop
MATLAB Coder
Automatically generate C and C++ from
the suitable MATLAB subset
93
Arduino
Lego NXT
Raspberry Pi
BeagleBoard
PandaBoard
Gumstix Overo
http://www.mathworks.com/hardware-support/home.html
Raspberry Pi hardware
support package
Capturing live data from
sensors and imaging devices
(camera board)
Connects to MATLAB over
Ethernet (wired or wireless)
95
Connect Raspberry Pi
Plug in USB Ethernet Adapter to PC,
and Ethernet cable into adapter and
Raspberry Pi
Plug USB webcam into Raspberry Pi
Insert SD card (which may be a carrier
for SD micro) into Raspberry Pi
Attach USB power cable USB A to
PC, and USB micro B to power port on
Raspberry Pi
96
Raspberry Pi Demos
Object Detection
Locate and mark the center of green object
Barcode scanner
Scan barcode and output numerical digits
97
Agenda
Welcome and Introductions
Image Processing with MATLAB
High-level language
Native support for vector and matrix operations
Built-in math and visualization functions
Development environment
Interactive and easy to get started
Ideal for iterative exploration and design
100
Image analysis
Image enhancement
Geometric transformation
Image registration
Morphological operations
ROI-based processing
Image display and exploration
101
Comprehensive environment
Analysis, algorithm development, visualization, etc.
Computer vision
Image processing
Classification and clustering
Control system design, optimization, code generation
103
Camera Link
DCAM compatible FireWire (IIDC 1394)
GigE Vision
GenICam Interface
Manufacturers include:
Allied Vision Technologies
Basler
Baumer
FLIR
Hamamatsu
Point Grey
Teledyne DALSA
See Hardware Catalog for more details: www.mathworks.com/hardware
104
105
Consulting Services
Accelerating return on investment
A global team of experts supporting every stage of tool and process integration
Continuous Improvement
Process Assessment
Component
Deployment
Advisory Services
Jumpstart
Migration Planning
Research
Advanced Engineering
Supplier Involvement
106
Training Services
Exploit the full potential of MathWorks products
MATLAB Central
File Exchange
Access more than 10k free files
including functions, apps, examples,
and models
MATLAB Answers
Ask programming questions or search
18k+ community-answered Questions
Newsgroup
Participate in technical discussions
1,400 posts per day
Blogs
Read commentary from engineers who
design, build, and support MathWorks products
108
Connections Program
More than 400 add-on products and services that
complement and extend MathWorks products:
MATLAB and
Simulink interfaces,
toolboxes and libraries
Book Program
More than 1400 books for educational and professional
use, in 28 languages
Control systems
Digital signal processing
Image & video processing
Biosciences & biomedical
Communications systems
Mechanical engineering
Mathematics
Physics
Systems modeling
Chemistry
Computational finance
Electronics
110
Technical Support
Resources
112
113
Customer Service
Email: service@mathworks.com
Phone: 508.647.7000 option 1
MathWorks
www.mathworks.com
Technical Support
Email: support@mathworks.com
Phone: 508.647.7000 option 2
115