Image Processing 1 (IP1) Bildverarbeitung 1

Similar documents
Region Description for Recognition

Image Processing 1 (IP1) Bildverarbeitung 1

Image Processing 1 (IP1) Bildverarbeitung 1

Artificial Neural Networks Examination, June 2004

Neural Networks: Introduction

Image Processing 1 (IP1) Bildverarbeitung 1

Lecture 4: Perceptrons and Multilayer Perceptrons

Introduction to Artificial Neural Networks

Course 395: Machine Learning - Lectures

Reconnaissance d objetsd et vision artificielle

ECE521 Lectures 9 Fully Connected Neural Networks

Neural Networks Learning the network: Backprop , Fall 2018 Lecture 4

Lab 5: 16 th April Exercises on Neural Networks

Introduction to Natural Computation. Lecture 9. Multilayer Perceptrons and Backpropagation. Peter Lewis

Neural Networks biological neuron artificial neuron 1

Simulating Neural Networks. Lawrence Ward P465A

CSE 352 (AI) LECTURE NOTES Professor Anita Wasilewska. NEURAL NETWORKS Learning

Artificial Neural Networks Examination, June 2005

) (d o f. For the previous layer in a neural network (just the rightmost layer if a single neuron), the required update equation is: 2.

Representing regions in 2 ways:

CS 4700: Foundations of Artificial Intelligence

Multilayer Perceptrons and Backpropagation

Introduction To Artificial Neural Networks

Computational Intelligence

Artificial Neural Networks. Introduction to Computational Neuroscience Tambet Matiisen

4. Multilayer Perceptrons

Computational Intelligence Winter Term 2017/18

Computational Intelligence Winter Term 2009/10

Neural Networks for Machine Learning. Lecture 2a An overview of the main types of neural network architecture

Data Mining Part 5. Prediction

Lecture 7 Artificial neural networks: Supervised learning

Input layer. Weight matrix [ ] Output layer

Computational Intelligence

Computational Intelligence

Artificial Neural Networks. Edward Gatt

Artificial Neural Networks

Introduction Biologically Motivated Crude Model Backpropagation

Image Processing 1 (IP1) Bildverarbeitung 1

Edge Detection PSY 5018H: Math Models Hum Behavior, Prof. Paul Schrater, Spring 2005

CSC321 Lecture 5: Multilayer Perceptrons

Machine Learning. Neural Networks

100 inference steps doesn't seem like enough. Many neuron-like threshold switching units. Many weighted interconnections among units

CHALMERS, GÖTEBORGS UNIVERSITET. EXAM for ARTIFICIAL NEURAL NETWORKS. COURSE CODES: FFR 135, FIM 720 GU, PhD

Data Mining. Preamble: Control Application. Industrial Researcher s Approach. Practitioner s Approach. Example. Example. Goal: Maintain T ~Td

Neural Networks. Nicholas Ruozzi University of Texas at Dallas

Machine Learning

Multilayer Neural Networks

Νεςπο-Ασαυήρ Υπολογιστική Neuro-Fuzzy Computing

CS 179: LECTURE 16 MODEL COMPLEXITY, REGULARIZATION, AND CONVOLUTIONAL NETS

ARTIFICIAL NEURAL NETWORKS گروه مطالعاتي 17 بهار 92

NN V: The generalized delta learning rule

Neural Networks with Applications to Vision and Language. Feedforward Networks. Marco Kuhlmann

CE213 Artificial Intelligence Lecture 14

COMP-4360 Machine Learning Neural Networks

Artificial Neural Networks

CSC 411 Lecture 10: Neural Networks

Artificial Neural Networks Examination, March 2002

Image Processing 1 (IP1) Bildverarbeitung 1

ARTIFICIAL NEURAL NETWORK PART I HANIEH BORHANAZAD

Sections 18.6 and 18.7 Analysis of Artificial Neural Networks

Introduction to feedforward neural networks

Simple Neural Nets For Pattern Classification

Lecture 4: Feed Forward Neural Networks

Artificial Neural Networks

COMS 4771 Introduction to Machine Learning. Nakul Verma

Lecture 11 Linear programming : The Revised Simplex Method

Plan. Perceptron Linear discriminant. Associative memories Hopfield networks Chaotic networks. Multilayer perceptron Backpropagation

Convolutional Neural Networks

Artificial Neural Networks" and Nonparametric Methods" CMPSCI 383 Nov 17, 2011!

Lecture 5: Logistic Regression. Neural Networks

Final Examination CS 540-2: Introduction to Artificial Intelligence

Machine Learning

Using a Hopfield Network: A Nuts and Bolts Approach

Multilayer Neural Networks. (sometimes called Multilayer Perceptrons or MLPs)

SPSS, University of Texas at Arlington. Topics in Machine Learning-EE 5359 Neural Networks

Sections 18.6 and 18.7 Artificial Neural Networks

Neural Networks Lecture 2:Single Layer Classifiers

CSCI 315: Artificial Intelligence through Deep Learning

Chapter ML:VI. VI. Neural Networks. Perceptron Learning Gradient Descent Multilayer Perceptron Radial Basis Functions

Artificial Neural Networks Examination, March 2004

Unit 8: Introduction to neural networks. Perceptrons

Sections 18.6 and 18.7 Artificial Neural Networks

Master Recherche IAC TC2: Apprentissage Statistique & Optimisation

Introduction to Biomedical Engineering

Neural networks. Chapter 20. Chapter 20 1

Neural Networks Lecturer: J. Matas Authors: J. Matas, B. Flach, O. Drbohlav

Advanced Topics in Machine Learning, Summer Semester 2012

Learning and Memory in Neural Networks

Mining Classification Knowledge

Neural Networks 2. 2 Receptive fields and dealing with image inputs

COMP 551 Applied Machine Learning Lecture 14: Neural Networks

INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Neural Networks: Backpropagation

Intelligent Systems Discriminative Learning, Neural Networks

Multilayer Perceptron = FeedForward Neural Network

Neural Networks DWML, /25

GROUP THEORY PRIMER. New terms: so(2n), so(2n+1), symplectic algebra sp(2n)

6.034 Notes: Section 12.1

Pattern Recognition Prof. P. S. Sastry Department of Electronics and Communication Engineering Indian Institute of Science, Bangalore

Transcription:

MIN-Fakultät Fachbereich Informatik Arbeitsbereich SAV/BV (KOGS) Image Processing 1 (IP1) Bildverarbeitung 1 Lecture 14 Skeletonization and Matching Winter Semester 2015/16 Slides: Prof. Bernd Neumann Slightly revised by: Dr. Benjamin Seppke & Prof. Siegfried Stiehl

Skeletons The skeleton of a region is a line structure which represents "the essence" of the shape of the region, i.e. follows elongated parts. Useful e.g. for character recognition Medial Axis Transform (MAT) is one way to define a skeleton: The MAT of a region R consists of all pixels of R which have more than one closest boundarypoint. MAT skeleton consists of centers of circles which touch boundaryat more than one point MAT skeleton of a rectangle shows problems: Note that "closest boundary point" depends on digital metric! 2

Skeleton Extraction for Chinese Character Description 3

Stroke Analysis by Triangulation ConstrainedDelaunay Triangulation (CDT) connects contour points to triangles such that the circumference of a triangle contains no other points. CDT generates three types of triangles: junction triangles (green) none of the triangle sides coincides with thecontour sleeve triangles (blue) terminal triangles (red) Junction triangles indicate stroke intersections or sharp stroke corners 4

Conditions for Junction Triangles R R α α D D D 2 R always junction triangles A curved line with angle α and outer contour radius R, drawn with a stylus of diameter D, will generate a junction triangle if D > R (1 + cos α/2) 5

Weak Influence of Contour Point Spacing dense spacing medium spacing coarse spacing nojunctiontriangles if corners are cut 6

Stroke Segment Merging Segments meeting at a junction may be merged if they are compatible regardingorientation and stroke width Segments betweentwo neighbouringjunctiontriangles may be intersections with irregular direction and stroke width Global criteria and knowledge of the writing system must be invoked to resolve ambiguities 7

Results of Stroke Analysis I 8

Results of Stroke Analysis II 9

Thinning Algorithm Thinning algorithm by Zhang and Suen 1987 (from Gonzalez and Wintz: "Digital Image Processing") Repeat A to D until no more changes: A Flag all contourpoints which satisfy conditions (1) to (4) B Delete flagged points C Flag all contourpoints which satisfy conditions (5) to (8) D Delete flagged points Example: Assumptions: region pixels = 1 background pixels = 0 contour pixels 8-neighbours of background Conditions: (1) 2 N(p 1 ) 6 (2) S(p 1 ) = 1 (3) p 2 p 4 p 6 = 0 (4) p 4 p 6 p 8 = 0 (5) 2 N(p 1 ) 6 (6) S(p 1 ) = 1 (7) p 2 p 4 p 8 = 0 (8) p 2 p 6 p 8 = 0 Neighbourhood labels: p 9 p 8 p 7 p 2 p 3 N(p 1 ) = number of nonzero neighbours of p 1 S(p 1 ) = number of 0-1 transitions in ordered sequence p 2, p 3,... p 1 p 6 p 4 p 5 10

Templates A template is a translation-, rotation- and scale-variant shape desription. It may be used for object recognition in a fixed, reoccurring pose. A M-by-N template may be treated as a vector in MN-dimensional feature space Unknown objectsmay be compared with templates bytheir distance in feature space Distance measures: g pixels of image t pixels of template d e 2 = (g t ) 2 d a = g t d b = max g t squared Euclidean distance absolute distance maximal absolute distance Example: Template for face recognition g MN g 13 template as point in feature space g 12 g 11 11

Cross-correlation r = g t cross-correlation between image g and template t Compare with squared Euclidean distance d e2 : d 2 e = (g t ) 2 2 2 = g + t 2r Image "energy" Σg 2 and template "energy" Σt 2 correspond to length of feature vectors. r! = g t 2 g 2 t Cauchy-Schwartz Inequality: r 1 with equality iff g = c t, all Normalized cross-correlation is independent of image and template energy. It measures the cosine of the angle between the feature vectors in MN-space. 12

Fast Normalized Cross-Correlation I Normalized Cross-correlation should be preferred w.r.t. cross-correlation: Illumination invariant Comparableresultingvalue range [-1,..., 1] Problem: (non-normalized) cross-correlation can be computed efficiently Remember Convolution Theorem, Fourier-Transform & FFT Normalization is not computable usingfft! Computation time is very high! Solution by Lewis 95: Optimize the Normalized Cross- Correlation by means of FFT and caching strategies 13

Fast Normalized Cross Correlation II Recall the basic equation: Non-nomalized cross-correlation: may be computed fast using the FFT, since: g t = FT 1 FT(g) conj( FT(t) ) r! = g t ( ) Sum under the template: 2 g Sum under the image: Not constant! Changes for each position of the template! 2 t constant for all nm, canbe precomputed Idea of Lewis: Use the integral image to compute the nonconstant term efficiently 14

Fast Normalized Cross Correlation III Creation of (squared) integral images s(u,v) and s2(u,v): s(u, v) = g(u, v) + s(u-1, v) + s(u, v-1) - s(u-1, v-1) s 2 (u, v) = g 2 (u; v) + s 2 (u-1, v) + s 2 (u, v-1) - s 2 (u-1, v-1) Extraction of the sums for a window (sizem N) at position (u,v): e f =s(u+n-1, v+n-1) - s(u-1,v+n-1) - s(u+n-1, v-1) + s(u-1,v-1) e f 2 =s 2 (u+n-1, v+n-1) - s 2 (u-1,v+n-1) - s 2 (u+n-1, v-1) + s 2 (u-1,v-1) Complexityanalysis: Table creation needs approx. 3M N operations Less than explicitly computed window sums! In praxis: Acceleration of factors 1000 and more w.r.t. the naive implementation! 15

Artificial Neural Nets Information processingin biological systems is based on neurons with roughly the following properties: the degree of activationis determined by incoming signals the outgoing signal is a function of the activation incoming signals are mediated by weights weights may be modified by learning net input for cell j Σ w ij o i (t) activation a j (t) = f j (a j, Σ w ij o i (t)) output signal o j (t) = F j (a j ) Typical shapes of f i and F i : f i F i input signal for cell j from cell i weight w ij output signal of cell j cell j 16

Multilayer Feed-forward Nets Example: 3-layer net each unit of a layer is connected to each unit of the layer below output units... units within a layer are not connected activation function f is differentiable (for learning) hidden units...... input units... 17

Character Recognition with a Neural Net Schematic drawingshows 3-layer feed-forward net: input units are activated bysensors and feed hidden units hidden units feed output units each unitreceives weighted sum of incomingsignals 0 1 2 3 4 5 6 7 8 9 output units hidden units Supervised learning Weights are adjusted iteratively until prototypes are classified correctly (-> backpropagation) input units 18

nominal output signal t pj actual output signal o pj cell j w ij Learning by Backpropagation cell i Supervised learning procedure: present example and determine output error signals adjust weights which contribute to errors Adjustingweights: Error signal of output cell j for pattern p is δ pj = (t pj - o pj ) f j (net pj ) f j () is the derivative of the activation function f() Determine error signal δ pi for internal cell i recursively from error signals of all cells k to which cell i contributes. δ pi = f i (net pi ) Σ k δ pk w ik Modify all weights: Δ p w ij = ηδ pj o pi h is a positive constant input pattern p The procedure must be repeated many times until the weights are "optimally" adjusted. There is no general convergence guarantee. 19

Perceptrons I Which shapepropertiescan bedetermined bycombining theoutputsof local operators? A perceptron is a simple computational model for combining local Boolean operations. (Minsky and Papert, Perceptrons, 69) ϕ 1 ϕ 2 Ω 0 1 φ i Boolean functions with local support in the retina: - limited diameter - limited number of cells output is 0 or 1 B/W Retina ϕ n Boolean functions Boole'sche Funktionen lineare! Schwellwert= zelle threshold element Ω compares weighted sum of the φ i with fixed threshold θ: # % Ω = $ &% 1 if w i ϕ i >θ 0 otherwise 20

Perceptrons II A limited-diameter perceptron cannot determine connectedness Assume perceptron with maximal diameter d for the support of each φ i. Consider 4 shapes as below with a < d and b >> d. a b Boolean operators may distinguish 5 local situations: φ 1 φ 2 φ 3 φ 4 φ 5 For Ω to exist, we must have: w 1 φ 1 + w 4 φ 4 < θ w 2 φ 2 + w 3 φ 3 < θ Σ w i φ i < 2θ w 2 φ 2 + w 4 φ 4 > θ w 1 φ 1 + w 3 φ 3 > θ Σ w i φ i > 2θ φ 5 is clearly irrelevant for distinguishing between the 2 connected and the 2 disconnected shapes contradiction, hence Ω cannot exist 21