Image Processing & Computer Vision With MATLAB 2013
Image Processing & Computer Vision With MATLAB 2013
March, 2013
Roy Fahn
Application Engineer royf@systematics.co.il www.linkedin.com/in/royfahn Blog: http://matlabisrael.blogspot.com/
Agenda
Retinal Blood Vessel Extraction Using Kirsch's Templates Circular Objects Detection & Visualization ViolaJones Object Detection Kanade-Lucas-Tomasi Point Tracking Break Image Registration using SURF Speeding-Up Image Processing Applications using the GPU Video Focusing in Real-Time
G > th Edge !
Kirsch Operator
A non-linear operator that finds the maximum edge strength in a few predetermined directions. The operator is calculated as follows for directions with 45 difference: where the direction kernels and so on
Kirsch,R.A.,1971. Computer Determination of the Constituent Structure of Biological Images. Computers and Biomedical Research 4,315-328.
Kirsch Implementation
LISP MATLAB help
Kirsch Implementation
MATLAB Central
Speeding Up MATLAB
MATLAB Coder Parallel Computing Toolbox
MATLAB Coder
Compiler
VVV
Wavelet Compression
Eikelboom,R., Yogesan,K., Barry,C., Constable, I., Tay-Kearney, M., Jitskaia,L., House,P., 2000. Methods and limits of digital image compression of retinal images for telemedicine. Invest. Ophthalmol. Vis. Sci. 41,191619 24.
Tools Used
MATLAB Image Processing Toolbox MATLAB Coder Embedded Coder Parallel Computing Toolbox MATLAB Compiler Wavelet Toolbox
Agenda
Retinal Blood Vessel Extraction Using Kirsch's Templates Circular Objects Detection & Visualization ViolaJones Object Detection Kanade-Lucas-Tomasi Point Tracking Break Image Registration using SURF Speeding-Up Image Processing Applications using the GPU Video Focusing in Real-Time
Agenda
Retinal Blood Vessel Extraction Using Kirsch's Templates Circular Objects Detection & Visualization ViolaJones Object Detection Kanade-Lucas-Tomasi Point Tracking Break Image Registration using SURF Speeding-Up Image Processing Applications using the GPU Video Focusing in Real-Time
System Objects
R2010a- http://www.systematics.co.il/hebrew/News/PDF/2010/MATLAB-VIDEO.PDF System Objects R2011b-
System Toolboxes
trainCascadeObjectDetector (R2013a)
Requires positive and negative samples Trains to reject negative samples as quickly as possible Produces an XML file compatible with OpenCV Training can take from 5 minutes to several days
Agenda
Retinal Blood Vessel Extraction Using Kirsch's Templates Circular Objects Detection & Visualization ViolaJones Object Detection Kanade-Lucas-Tomasi Point Tracking Break Image Registration using SURF Speeding-Up Image Processing Applications using the GPU Video Focusing in Real-Time
Kanade-Lucas-Tomasi (KLT)
Algorithm for tracking points across frames (sparse optical flow) First introduced in 1981 (!) by Lucas and Kanade Workflow:
Specify initial points to track (e. g. detect corners) Use KLT Re-detect points if necessary
Agenda
Retinal Blood Vessel Extraction Using Kirsch's Templates Circular Objects Detection & Visualization ViolaJones Object Detection Kanade-Lucas-Tomasi Point Tracking Break Image Registration using SURF Speeding-Up Image Processing Applications using the GPU Video Focusing in Real-Time
Filtering
integralFilter* integralImage Isfilterseparable* Integral image filter Compute integral image Determine whether filter coefficients are separable
assignDetectionsToTrack
configureKalmanFilter detectMSERFeatures detectSURFFeatures extractFeatures insertObjectAnnotation matchFeatures showMatchedFeatures
Assign detections to tracks for multi-object tracking Create Kalman filter for object tracking Detect MSER features Detect SURF features Extract interest point descriptors Insert annotation in image or video stream Find matching features Display corresponding feature points
RANSAC
Random Sample Consensus
RANSAC
)Stereo vision( Fundamental Matrix
a b c
G(a,b,c,d) = 0101
Agenda
Retinal Blood Vessel Extraction Using Kirsch's Templates Circular Objects Detection & Visualization ViolaJones Object Detection Kanade-Lucas-Tomasi Point Tracking Break Image Registration using SURF Speeding-Up Image Processing Applications using the GPU Video Focusing in Real-Time
What is a GPU?
Graphical Processing Unit
NVIDIA Quadro NVS 4200M # Cores 48, @810 MHz
1024 MB DDR 3
PCI-E 2.0 x 16
History of GPUs
3D Gaming & CAD Scientific Computing
Core 3
Core 4
Cache
Device Memory
System Memory
Weather Modeling
N-Body Simulations
Molecular Modeling
http://www.nvidia.com/object/cuda_showcase_html.html
Functionality Overview
nVIDIA Solutions
gpuArray(A)
gather(A)
Processing Elements
10
10
10
Time (s)
10
-2
Time (s)
32 64 128 256 512 1024 Matrix Size (n-by-n) 2048 4096
10
-1
10
-1
10
-2
10
-3
10
-3
10
-4
10
-4
32
64
128
2048
4096
10
10
10
-1
10
-1
Time (s)
10
-3
Time (s)
32 64 128 256 512 1024 Matrix Size (n-by-n) 2048 4096
10
-2
10
-2
10
-3
10
-4
10
-4
10
-5
10
-5
32
64
128
2048
4096
Accelerate scalar operations on large arrays Combine computations into a single kernel
0.02
0.015
0.01
0.005
CPU
GPU
Asquare (2r ) 4r
Acircle Asquare 4
P( x y r )
2 2 2
Pros Call existing CUDA code from MATLAB Highest level of functionality Cons Requires knowledge of CUDA Requires knowledge of Parallel Programming
Speedup
30
25
20
15
10
5 1000
1500
2000
4000
4500
5000
Summary of Features
1) Invoking built-in functions on arrays existing on the GPU
Greater Functionality
Ease of Use
2)
3)
2011-2012 Upgrades
More GPU-enabled MATLAB functions & features, including capabilities from: - Communications System Toolbox (11) - Signal Processing Toolbox (5) - Phased Array System Toolbox - Neural Network Toolbox MATLAB Compiler generated standalone executables and components now support applications that use the GPU Improved arrayfun function for GPU computing applications in MATLAB Random number generation on GPUs
Agenda
Retinal Blood Vessel Extraction Using Kirsch's Templates Circular Objects Detection & Visualization ViolaJones Object Detection Kanade-Lucas-Tomasi Point Tracking Break Image Registration using SURF Speeding-Up Image Processing Applications using the GPU Video Focusing in Real-Time
? Simulink
( )
Simulink
) Application Program Interface (API MATLAB C/HDL
)R2010b, R2011b(
Interface Analog Camera Link DCAM FireWire Windows Linux Macintosh
GigE Vision
OS Integrated
More Information
Web: http://www.mathworks.com
Blog: http://matlabisrael.blogspot.com
LinkedIn Group: MATLAB & Simulink users in Israel Seminars: http://www.systematics.co.il/mathworks/Events/events.html Courses: http://www.systematics.co.il/mathworks/Training/Courses.html Webinars: http://www.mathworks.com/events Support & Sales: 03-7660111
Thank you !